From owner-freebsd-ports Sat Apr 28 12:31:22 2001 Delivered-To: freebsd-ports@freebsd.org Received: from mail.musha.org (daemon.musha.org [61.122.44.178]) by hub.freebsd.org (Postfix) with ESMTP id 32DB637B422; Sat, 28 Apr 2001 12:31:15 -0700 (PDT) (envelope-from knu@iDaemons.org) Received: from archon.local.idaemons.org (archon.local.idaemons.org [192.168.1.32]) by mail.musha.org (Postfix) with ESMTP id A6C7F4DF50; Sun, 29 Apr 2001 04:31:13 +0900 (JST) Date: Sun, 29 Apr 2001 04:31:13 +0900 Message-ID: <861yqc95z2.wl@archon.local.idaemons.org> From: "Akinori MUSHA" To: ports@FreeBSD.org, portmgr@FreeBSD.org Subject: call for review: a patch against bsd.port.mk User-Agent: Wanderlust/2.5.4 (Smooth) SEMI/1.14.2 (=?ISO-8859-1?Q?Daish=F2?= =?ISO-8859-1?Q?ji?=) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i386--freebsd) Organization: Associated I. Daemons X-PGP-Public-Key: finger knu@FreeBSD.org X-PGP-Fingerprint: 081D 099C 1705 861D 4B70 B04A 920B EFC7 9FD9 E1EE MIME-Version: 1.0 (generated by SEMI 1.14.2 - =?ISO-8859-1?Q?=22Daish=F2ji=22?=) Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Please review the attached patch, which makes bsd.port.mk: 1. Support bzip2'ed distributed patches; automatically add bzip2 as dependency when PATCHFILES include *.bz2. 2. Add a bunch of command macros for convenience, mostly from NetBSD pkgsrc. 3. Allow the third field of *_DEPENDS to include make options. e.g.: BUILD_DEPENDS= foo:catX/foo:patch,-DWITH_BAA,-DWITH_BAR \ bar:catY/bar:build,EXTRAOPTIONS=\"baz,boo\" -- / /__ __ Akinori.org / MUSHA.org / ) ) ) ) / FreeBSD.org / Ruby-lang.org Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp "Freeze this moment a little bit longer, make each impression a little bit stronger.. Experience slips away -- Time stand still" Index: bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.366 diff -u -u -r1.366 bsd.port.mk --- bsd.port.mk 2001/04/22 16:47:55 1.366 +++ bsd.port.mk 2001/04/28 19:25:26 @@ -66,7 +66,7 @@ # patches (default: none). make will look for them at # PATCH_SITES (see below). They will automatically be # uncompressed before patching if the names end with -# ".gz" or ".Z". +# ".gz", ".bz2" or ".Z". # PATCH_SITES - Primary location(s) for distribution patch files # if not found locally. # DIST_SUBDIR - Suffix to ${DISTDIR}. If set, all ${DISTFILES} @@ -485,20 +485,32 @@ AWK?= /usr/bin/awk BASENAME?= /usr/bin/basename +BZCAT?= ${LOCALBASE}/bin/bzcat +BZIP2_CMD?= ${LOCALBASE}/bin/bzip2 CAT?= /bin/cat +CHGRP?= /usr/bin/chgrp CHMOD?= /bin/chmod CHOWN?= /usr/sbin/chown CP?= /bin/cp +CUT?= /usr/bin/cut +DC?= /usr/bin/dc ECHO?= /bin/echo +EGREP?= /usr/bin/egrep EXPR?= /bin/expr FALSE?= /usr/bin/false +FILE?= /usr/bin/file +FIND?= /usr/bin/find GREP?= /usr/bin/grep GUNZIP_CMD?= /usr/bin/gunzip -f GZCAT?= /usr/bin/gzcat GZIP?= -9 GZIP_CMD?= /usr/bin/gzip -nf ${GZIP} +HEAD?= /usr/bin/head +ID?= /usr/bin/id +IDENT?= /usr/bin/ident LDCONFIG?= /sbin/ldconfig LN?= /bin/ln +LS?= /bin/ls MKDIR?= /bin/mkdir -p MV?= /bin/mv RM?= /bin/rm @@ -506,10 +518,14 @@ SED?= /usr/bin/sed SETENV?= /usr/bin/env SH?= /bin/sh +SU?= /usr/bin/su +TAIL?= /usr/bin/tail +TEST?= /bin/test TR?= /usr/bin/tr TRUE?= /usr/bin/true UNAME?= /usr/bin/uname WHICH?= /usr/bin/which +XARGS?= /usr/bin/xargs # Used to print all the '===>' style prompts - override this to turn them off. ECHO_MSG?= ${ECHO} @@ -764,7 +780,13 @@ MANCOMPRESSED?= no .endif -.if defined(USE_BZIP2) +.if defined(PATCHFILES) +.if ${PATCHFILES:M*.bz2}x != x +USE_BZIP2_PATCH= yes +.endif +.endif + +.if defined(USE_BZIP2) || defined(USE_BZIP2_PATCH) BUILD_DEPENDS+= bzip2:${PORTSDIR}/archivers/bzip2 .endif .if defined(USE_ZIP) @@ -997,7 +1019,7 @@ EXTRACT_BEFORE_ARGS?= -dc EXTRACT_AFTER_ARGS?= | ${TAR} -xf - .if defined(USE_BZIP2) -EXTRACT_CMD?= bzip2 +EXTRACT_CMD?= ${BZIP2_CMD} .else EXTRACT_CMD?= ${GZIP_CMD} .endif @@ -1732,6 +1754,10 @@ *.Z|*.gz) \ ${GZCAT} $$i | ${PATCH} ${PATCH_DIST_ARGS}; \ ;; \ + *.bz2) \ + pwd ; echo ${BZCAT} $$i ! ${PATCH} ${PATCH_DIST_ARGS}; \ + ${BZCAT} $$i | ${PATCH} ${PATCH_DIST_ARGS}; \ + ;; \ *) \ ${PATCH} ${PATCH_DIST_ARGS} < $$i; \ ;; \ @@ -2078,7 +2104,7 @@ @cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} real-install # Scan PLIST for setugid files and startup scripts -@for i in `${GREP} -v '^@' ${TMPPLIST}`; do \ - /usr/bin/find ${PREFIX}/$$i -prune -type f \( -perm -4000 -o -perm -2000 \) \( -perm -0010 -o -perm -0001 \) -ls 2>/dev/null; \ + ${FIND} ${PREFIX}/$$i -prune -type f \( -perm -4000 -o -perm -2000 \) \( -perm -0010 -o -perm -0001 \) -ls 2>/dev/null; \ done > ${WRKDIR}/.PLIST.setuid; \ ${GREP} '^etc/rc.d/' ${TMPPLIST} > ${WRKDIR}/.PLIST.startup; \ if [ -s ${WRKDIR}/.PLIST.setuid -o -s ${WRKDIR}/.PLIST.startup ]; then \ @@ -2474,7 +2500,7 @@ prog=`${ECHO} $$i | ${SED} -e 's/:.*//'`; \ dir=`${ECHO} $$i | ${SED} -e 's/[^:]*://'`; \ if ${EXPR} "$$dir" : '.*:' > /dev/null; then \ - target=`${ECHO} $$dir | ${SED} -e 's/.*://'`; \ + target=`${ECHO} $$dir | ${SED} -e 's/.*://' -e 's/,/ /g'`; \ dir=`${ECHO} $$dir | ${SED} -e 's/:.*//'`; \ else \ target="${DEPENDS_TARGET}"; \ @@ -2512,7 +2538,7 @@ if [ ! -d "$$dir" ]; then \ ${ECHO_MSG} " >> No directory for $$prog. Skipping.."; \ else \ - (cd $$dir; ${MAKE} $$target $$depends_args) ; \ + (cd $$dir; eval ${MAKE} $$target $$depends_args) ; \ ${ECHO_MSG} "===> Returning to build of ${PKGNAME}"; \ fi; \ fi; \ @@ -2797,7 +2823,7 @@ www-site: .if exists(${DESCR}) - @${GREP} '^WWW:[ ]' ${DESCR} | ${AWK} '{print $$2}' | head -1 + @${GREP} '^WWW:[ ]' ${DESCR} | ${AWK} '{print $$2}' | ${HEAD} -1 .else @${ECHO} .endif To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message