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.24 2005/01/08 11:58:46 dillon 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 defined(USE_GCC) 32. if ${USE_GCC} == 3.4 33.undef USE_GCC 34CCVER= gcc34 35.makeenv CCVER 36. endif 37.endif 38 39# If the port does not exist in /usr/dfports/<portpath> use the original 40# FreeBSD port. Also process as per normal if BEFOREPORTMK is set so 41# any expected variables are set. 42# 43.include <bsd.own.mk> 44.include "${PORTSDIR}/Mk/bsd.port.mk" 45 46.else 47 48.if !defined(BEFOREPORTMK) 49.undef PORTSDIR 50.endif 51 52.undef BEFOREPORTMK 53.undef AFTERPORTMK 54 55# Otherwise retarget to the DragonFly override port. 56# 57 58TARGETS+= all 59TARGETS+= build 60TARGETS+= checksum 61TARGETS+= clean 62TARGETS+= clean-for-cdrom 63TARGETS+= clean-for-cdrom-list 64TARGETS+= clean-restricted 65TARGETS+= clean-restricted-list 66TARGETS+= configure 67TARGETS+= deinstall 68TARGETS+= depend 69TARGETS+= depends 70TARGETS+= describe 71TARGETS+= distclean 72TARGETS+= extract 73TARGETS+= fetch 74TARGETS+= fetch-list 75TARGETS+= ignorelist 76TARGETS+= makesum 77TARGETS+= maintainer 78TARGETS+= package 79TARGETS+= realinstall 80TARGETS+= reinstall 81TARGETS+= install 82TARGETS+= tags 83 84# WARNING! Do not use the -B option. This appears to propogate to the 85# gmake (probably because both use the same environment variable, MAKEFLAGS, 86# to pass make options) where as of version 3.80 -B means 'always-make', 87# which forces all targets, which blows up gnu builds in the ports system 88# because it appears to cause the configure.status target to loop. 89# 90.if !defined(_DFPORTS_REDIRECT) 91_DFPORTS_REDIRECT= 92.if !make(package-depends-list) && !make(all-depends-list) && \ 93 !make(run-depends-list) && !make(build-depends-list) && \ 94 !make(describe) 95.BEGIN: 96 @echo "WARNING, USING DRAGONFLY OVERRIDE ${DFPORTSDIR}/${PORTPATH}" 97 cd ${DFPORTSDIR}/${PORTPATH} && ${MAKE} ${.TARGETS} 98.else 99.BEGIN: 100 @cd ${DFPORTSDIR}/${PORTPATH} && ${MAKE} ${.TARGETS} 101.endif 102.endif 103 104.if !empty(.TARGETS) 105${.TARGETS}: 106.else 107all: 108.MAIN: all 109.endif 110 111# Hack to get Makefiles with conditional statements working 112XFREE86_VERSION?= 4 113ARCH?= i386 114MACHINE_ARCH?= i386 115HAVE_GNOME?= 116FILESDIR?= ${.CURDIR}/files 117X_WINDOW_SYSTEM?= xfree86-4 118CAT?= cat 119PREFIX?= /usr 120PERL_LEVEL?= 5 121LOCALBASE?= /usr/local 122SED?= /usr/bin/sed 123ECHO_CMD?= echo 124GREP?= /usr/bin/grep 125AWK?= /usr/bin/awk 126UNAME?= /usr/bin/uname 127EXPR?= /bin/expr 128HAVE_SDL?= 129 130# WORKAROUND to get portupgrade working 131# Taken from: ${PORTSDIR}/Mk/bsd.port.mk 132.if !defined(PKGNAME) 133PKGNAME= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION:C/[-_,]/./g}${_SUF1}${_SUF2} 134.endif 135 136.endif 137 138