1# $FreeBSD: src/share/mk/bsd.port.mk,v 1.303.2.2 2002/07/17 19:08:23 ru Exp $ 2# $DragonFly: src/share/mk/Attic/bsd.port.mk,v 1.17 2004/08/14 13:49:41 joerg Exp $ 3 4PORTSDIR?= /usr/ports 5DFPORTSDIR?= /usr/dfports 6PORTPATH!= /usr/bin/relpath ${PORTSDIR} ${.CURDIR} 7 8.if !defined(DFOSVERSION) 9DFOSVERSION!= /sbin/sysctl -n kern.osreldate 10.endif 11 12# Temporary Hack 13# 14OSVERSION ?= 480102 15UNAME_s?= FreeBSD 16UNAME_v?=FreeBSD 4.8-CURRENT 17UNAME_r?=4.8-CURRENT 18 19.makeenv UNAME_s 20.makeenv UNAME_v 21.makeenv UNAME_r 22.makeenv OSVERSION 23 24.if !exists(${DFPORTSDIR}/${PORTPATH}/Makefile) 25 26.if defined(USE_RC_SUBR) 27.undef USE_RC_SUBR 28RC_SUBR= /etc/rc.subr 29.endif 30 31# If the port does not exist in /usr/dfports/<portpath> use the original 32# FreeBSD port. Also process as per normal if BEFOREPORTMK is set so 33# any expected variables are set. 34# 35.include <bsd.own.mk> 36.include "${PORTSDIR}/Mk/bsd.port.mk" 37 38.else 39 40.undef BEFOREPORTMK 41.undef AFTERPORTMK 42 43# Otherwise retarget to the DragonFly override port. 44# 45 46TARGETS+= all 47TARGETS+= build 48TARGETS+= checksum 49TARGETS+= clean 50TARGETS+= clean-for-cdrom 51TARGETS+= clean-for-cdrom-list 52TARGETS+= clean-restricted 53TARGETS+= clean-restricted-list 54TARGETS+= configure 55TARGETS+= deinstall 56TARGETS+= depend 57TARGETS+= depends 58TARGETS+= describe 59TARGETS+= distclean 60TARGETS+= extract 61TARGETS+= fetch 62TARGETS+= fetch-list 63TARGETS+= ignorelist 64TARGETS+= makesum 65TARGETS+= maintainer 66TARGETS+= package 67TARGETS+= realinstall 68TARGETS+= reinstall 69TARGETS+= install 70TARGETS+= tags 71 72.undef PORTSDIR 73.if !make(package-depends-list) && !make(all-depends-list) && \ 74 !make(run-depends-list) && !make(build-depends-list) 75.BEGIN: 76 @echo "WARNING, USING DRAGONFLY OVERRIDE ${DFPORTSDIR}/${PORTPATH}" 77 cd ${DFPORTSDIR}/${PORTPATH} && ${MAKE} -B ${.TARGETS} 78.endif 79 80.if !empty(.TARGETS) 81${.TARGETS}: 82.else 83all: 84.MAIN: all 85.endif 86 87# Hack to get Makefiles with conditional statements working 88XFREE86_VERSION?= 4 89ARCH?= i386 90MACHINE_ARCH?= i386 91HAVE_GNOME?= 92FILESDIR?= ${.CURDIR}/files 93 94# WORKAROUND to get portupgrade working 95# Taken from: ${PORTSDIR}/Mk/bsd.port.mk 96.if !defined(PKGNAME) 97PKGNAME= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION:C/[-_,]/./g}${_SUF1}${_SUF2} 98.endif 99 100.endif 101 102