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.27 2005/01/27 02:38:31 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# override for bsd.port.mk 20PERL_VERSION?= 5.8.5 21PERL_VER?= 5.8.5 22 23.makeenv UNAME_s 24.makeenv UNAME_v 25.makeenv UNAME_r 26.makeenv OSVERSION 27 28.if !exists(${DFPORTSDIR}/${PORTPATH}/Makefile) 29 30.if defined(USE_RC_SUBR) 31.undef USE_RC_SUBR 32RC_SUBR= /etc/rc.subr 33.endif 34 35.if defined(USE_GCC) 36. if ${USE_GCC} == 3.4 37.undef USE_GCC 38CCVER= gcc34 39.makeenv CCVER 40. endif 41.endif 42 43# If the port does not exist in /usr/dfports/<portpath> use the original 44# FreeBSD port. Also process as per normal if BEFOREPORTMK is set so 45# any expected variables are set. 46# 47.include <bsd.own.mk> 48.include "${PORTSDIR}/Mk/bsd.port.mk" 49 50.else 51 52.if !defined(BEFOREPORTMK) 53.undef PORTSDIR 54.endif 55 56.undef BEFOREPORTMK 57.undef AFTERPORTMK 58 59# Otherwise retarget to the DragonFly override port. 60# 61 62TARGETS+= all 63TARGETS+= build 64TARGETS+= checksum 65TARGETS+= clean 66TARGETS+= clean-for-cdrom 67TARGETS+= clean-for-cdrom-list 68TARGETS+= clean-restricted 69TARGETS+= clean-restricted-list 70TARGETS+= configure 71TARGETS+= deinstall 72TARGETS+= depend 73TARGETS+= depends 74TARGETS+= describe 75TARGETS+= distclean 76TARGETS+= extract 77TARGETS+= fetch 78TARGETS+= fetch-list 79TARGETS+= ignorelist 80TARGETS+= makesum 81TARGETS+= maintainer 82TARGETS+= package 83TARGETS+= realinstall 84TARGETS+= reinstall 85TARGETS+= install 86TARGETS+= tags 87 88# WARNING! Do not use the -B option. This appears to propogate to the 89# gmake (probably because both use the same environment variable, MAKEFLAGS, 90# to pass make options) where as of version 3.80 -B means 'always-make', 91# which forces all targets, which blows up gnu builds in the ports system 92# because it appears to cause the configure.status target to loop. 93# 94.if !defined(_DFPORTS_REDIRECT) 95_DFPORTS_REDIRECT= 96.if !make(package-depends-list) && !make(all-depends-list) && \ 97 !make(run-depends-list) && !make(build-depends-list) && \ 98 !make(describe) && !make(package-name) 99.BEGIN: 100 @echo "WARNING, USING DRAGONFLY OVERRIDE ${DFPORTSDIR}/${PORTPATH}" 101 cd ${DFPORTSDIR}/${PORTPATH} && ${MAKE} ${.TARGETS} 102.else 103.BEGIN: 104 @cd ${DFPORTSDIR}/${PORTPATH} && ${MAKE} ${.TARGETS} 105.endif 106.endif 107 108.if !empty(.TARGETS) 109${.TARGETS}: 110.else 111all: 112.MAIN: all 113.endif 114 115# Hack to get Makefiles with conditional statements working 116XFREE86_VERSION?= 4 117ARCH?= i386 118MACHINE_ARCH?= i386 119HAVE_GNOME?= 120FILESDIR?= ${.CURDIR}/files 121X_WINDOW_SYSTEM?= xfree86-4 122CAT?= cat 123PREFIX?= /usr 124PERL_LEVEL?= 5 125LOCALBASE?= /usr/local 126SED?= /usr/bin/sed 127ECHO_CMD?= echo 128GREP?= /usr/bin/grep 129AWK?= /usr/bin/awk 130UNAME?= /usr/bin/uname 131EXPR?= /bin/expr 132HAVE_SDL?= 133 134PKG_SUFX?= .tgz 135PKGNAME!= cd ${DFPORTSDIR}/${PORTPATH}; ${MAKE} -V PKGNAME 136.for _CATEGORY in ${CATEGORIES} 137PKGCATEGORY?= ${_CATEGORY} 138.endfor 139_PORTDIRNAME= ${.CURDIR:T} 140PORTDIRNAME?= ${_PORTDIRNAME} 141PKGORIGIN?= ${PKGCATEGORY}/${PORTDIRNAME} 142 143PKGREPOSITORYSUBDIR?= All 144PKGREPOSITORY?= ${PACKAGES}/${PKGREPOSITORYSUBDIR} 145.if exists(${PACKAGES}) 146PKGFILE?= ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX} 147.else 148PKGFILE?= ${.CURDIR}/${PKGNAME}${PKG_SUFX} 149.endif 150 151.endif 152 153