From owner-freebsd-ports Mon Aug 9 20:41:45 1999 Delivered-To: freebsd-ports@freebsd.org Received: from dfw-ix10.ix.netcom.com (dfw-ix10.ix.netcom.com [206.214.98.10]) by hub.freebsd.org (Postfix) with ESMTP id E9A231533B for ; Mon, 9 Aug 1999 20:41:37 -0700 (PDT) (envelope-from asami@cs.berkeley.edu) Received: (from smap@localhost) by dfw-ix10.ix.netcom.com (8.8.4/8.8.4) id WAA27679 for ; Mon, 9 Aug 1999 22:38:14 -0500 (CDT) Received: from sji-ca43-178.ix.netcom.com(209.111.209.178) by dfw-ix10.ix.netcom.com via smap (V1.3) id rma027656; Mon Aug 9 22:38:01 1999 Received: (from asami@localhost) by silvia.hip.berkeley.edu (8.9.3/8.6.9) id UAA42528; Mon, 9 Aug 1999 20:37:54 -0700 (PDT) Date: Mon, 9 Aug 1999 20:37:54 -0700 (PDT) Message-Id: <199908100337.UAA42528@silvia.hip.berkeley.edu> X-Authentication-Warning: silvia.hip.berkeley.edu: asami set sender to asami@cs.berkeley.edu using -f To: ports@freebsd.org Subject: bsd.port.mk update From: asami@cs.berkeley.edu (Satoshi Asami) Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, Please review the patches below. It includes updates to MASTER_SITE_XCONTRIB, checking for invalid categories in CATEGORIES line, making sure everything in ${WRKDIR} is initially owned by root (if you're root -- if you are not, they will be extracted as yourself anyway) and a little space-saving trick when building a port with a lot of dependencies (set DEPENDS_CLEAN and dependencies will be built with "make install clean" instead of "make install"). -PW === Index: bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.315 diff -u -r1.315 bsd.port.mk --- bsd.port.mk 1999/07/23 09:36:54 1.315 +++ bsd.port.mk 1999/08/09 06:03:42 @@ -824,6 +824,8 @@ AWK?= /usr/bin/awk BASENAME?= /usr/bin/basename CAT?= /bin/cat +CHMOD?= /bin/chmod +CHOWN?= /usr/sbin/chown CP?= /bin/cp ECHO?= /bin/echo EXPR?= /bin/expr @@ -854,7 +856,10 @@ # Popular master sites MASTER_SITE_XCONTRIB+= \ ftp://crl.dec.com/pub/X11/contrib/%SUBDIR%/ \ - ftp://ftp.eu.net/X11/contrib/%SUBDIR%/ + ftp://uiarchive.uiuc.edu/pub/X11/contrib/%SUBDIR%/ \ + ftp://ftp.duke.edu/pub/X11/contrib/%SUBDIR%/ \ + ftp://ftp.sunet.se/pub/X11/contrib/%SUBDIR%/ \ + ftp://sunsite.sut.ac.jp/pub/archives/X11/%SUBDIR%/ MASTER_SITE_GNU+= \ ftp://prep.ai.mit.edu/pub/gnu/%SUBDIR%/ \ @@ -1043,6 +1048,26 @@ .BEGIN: @${ECHO_MSG} "CATEGORIES is mandatory." @${FALSE} +.else +VALID_CATEGORIES+= afterstep archivers astro audio benchmarks biology \ + cad chinese comms converters databases deskutils devel \ + editors elisp emulators ftp games german gnome graphics \ + irc japanese java kde korean lang \ + mail math mbone misc net news \ + offix palm perl5 plan9 print python russian \ + security shells sysutils \ + tcl75 tcl76 tcl80 tcl81 textproc tk41 tk42 tk80 tkstep80 \ + vietnamese windowmaker www \ + x11 x11-clocks x11-fm x11-fonts x11-servers x11-toolkits x11-wm +check-categories: +.for cat in ${CATEGORIES} + @if ${ECHO} ${VALID_CATEGORIES} | ${GREP} -wq ${cat}; then \ + ${TRUE}; \ + else \ + ${ECHO_MSG} "Error: category ${cat} not in list of valid categories."; \ + ${FALSE}; \ + fi +.endfor .endif # Note this has to start with a capital letter (or more accurately, it @@ -1349,7 +1374,11 @@ .else DEPENDS_TARGET= install .endif +.if defined(DEPENDS_CLEAN) +DEPENDS_TARGET+= clean +DEPENDS_ARGS= NOCLEANDEPENDS=yes .endif +.endif ################################################################ # The following are used to create easy dummy targets for @@ -1469,6 +1498,12 @@ exit 1; \ fi \ done +.if !defined(EXTRACT_PRESERVE_OWNERSHIP) + @if [ `id -u` = 0 ]; then \ + ${CHMOD} -R ug-s ${WRKDIR}; \ + ${CHOWN} -R 0:0 ${WRKDIR}; \ + fi +.endif .endif # Patch @@ -1667,6 +1702,7 @@ @cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} build-depends lib-depends misc-depends .endif .if make(real-install) + @cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} check-categories .if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER) @if [ -d ${PKG_DBDIR}/${PKGNAME} ]; then \ ${ECHO_MSG} "===> ${PKGNAME} is already installed - perhaps an older version?"; \ @@ -2104,7 +2140,8 @@ target=`${ECHO} $$dir | ${SED} -e 's/.*://'`; \ dir=`${ECHO} $$dir | ${SED} -e 's/:.*//'`; \ else \ - target=${DEPENDS_TARGET}; \ + target="${DEPENDS_TARGET}"; \ + depends_args="${DEPENDS_ARGS}"; \ fi; \ if ${EXPR} "$$prog" : \\/ >/dev/null; then \ if [ -e "$$prog" ]; then \ @@ -2138,7 +2175,7 @@ if [ ! -d "$$dir" ]; then \ ${ECHO_MSG} " >> No directory for $$prog. Skipping.."; \ else \ - (cd $$dir; ${MAKE} $$target) ; \ + (cd $$dir; ${MAKE} $$target $$depends_args) ; \ ${ECHO_MSG} "===> Returning to build of ${PKGNAME}"; \ fi; \ fi; \ @@ -2162,7 +2199,8 @@ target=`${ECHO} $$dir | ${SED} -e 's/.*://'`; \ dir=`${ECHO} $$dir | ${SED} -e 's/:.*//'`; \ else \ - target=${DEPENDS_TARGET}; \ + target="${DEPENDS_TARGET}"; \ + depends_args="${DEPENDS_ARGS}"; \ fi; \ if ${LDCONFIG} -r | ${GREP} -qwF -e "-l$$lib"; then \ ${ECHO_MSG} "===> ${PKGNAME} depends on shared library: $$lib - found"; \ @@ -2181,7 +2219,7 @@ if [ ! -d "$$dir" ]; then \ ${ECHO_MSG} " >> No directory for $$lib. Skipping.."; \ else \ - (cd $$dir; ${MAKE} $$target) ; \ + (cd $$dir; ${MAKE} $$target $$depends_args) ; \ ${ECHO_MSG} "===> Returning to build of ${PKGNAME}"; \ if ${LDCONFIG} -r | ${GREP} -qwF -e "-l$$lib"; then \ ${TRUE}; \ @@ -2205,14 +2243,15 @@ target=`${ECHO} $$dir | ${SED} -e 's/.*://'`; \ dir=`${ECHO} $$dir | ${SED} -e 's/:.*//'`; \ else \ - target=${DEPENDS_TARGET}; \ + target="${DEPENDS_TARGET}"; \ + depends_args="${DEPENDS_ARGS}"; \ fi; \ ${ECHO_MSG} "===> ${PKGNAME} depends on: $$dir"; \ ${ECHO_MSG} "===> Verifying $$target for $$dir"; \ if [ ! -d $$dir ]; then \ ${ECHO_MSG} " >> No directory for $$dir. Skipping.."; \ else \ - (cd $$dir; ${MAKE} $$target) ; \ + (cd $$dir; ${MAKE} $$target $$depends_args) ; \ fi \ done @${ECHO_MSG} "===> Returning to build of ${PKGNAME}" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message