From owner-freebsd-ports Mon Feb 1 02:22:38 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA26682 for freebsd-ports-outgoing; Mon, 1 Feb 1999 02:22:38 -0800 (PST) (envelope-from owner-freebsd-ports@FreeBSD.ORG) Received: from rr.iij4u.or.jp (h046.p060.iij4u.or.jp [210.130.60.46]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id CAA26675 for ; Mon, 1 Feb 1999 02:22:35 -0800 (PST) (envelope-from sada@rr.iij4u.or.jp) Received: (qmail 10201 invoked by uid 1000); 1 Feb 1999 19:22:31 +0900 Date: 1 Feb 1999 19:22:31 +0900 Message-ID: <19990201102231.10200.sada@rr.iij4u.or.jp> To: kkennawa@physics.adelaide.edu.au Cc: ports@FreeBSD.ORG Subject: Re: USE_BZIP2 In-Reply-To: Your message of "Sun, 31 Jan 1999 16:00:45 JST". From: sada@rr.iij4u.or.jp (SADA Kenji) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Mailer: mnews [version 1.21] 1997-12/23(Tue) Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >> Can we have a USE_BZIP2 variable added to the build process, or perhaps >> automatic sensing of the .tar.bz2 EXTRACT_SUFX, to avoid the need to do things >> like: : >> This will become more useful as more ports start using bzip2'ed distfiles. I agree. For example, `automatic sensing' would be realized as below, but I can't imagine how to auto-depend to ${PORTSDIR}/archivers/bzip2. --- bsd.port.mk.orig Mon Feb 1 16:38:32 1999 +++ bsd.port.mk Mon Feb 1 19:19:44 1999 @@ -672,6 +672,10 @@ EXTRACT_BEFORE_ARGS?= -xzf .endif +BZIP2_EXTRACT_CMD= bzip2 +BZIP2_EXTRACT_BEFORE_ARGS= -dc +BZIP2_EXTRACT_AFTER_ARGS= | /usr/bin/tar -xf - + # Figure out where the local mtree file is .if !defined(MTREE_FILE) .if defined(USE_X_PREFIX) @@ -1333,9 +1337,11 @@ @${RM} -rf ${WRKDIR} @${MKDIR} ${WRKDIR} @for file in ${EXTRACT_ONLY}; do \ - if ! (cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\ - then \ - exit 1; \ + cd ${WRKDIR}; \ + if [ `expr $$file : '.*\.tar\.bz2'` -gt 0 ]; then \ + ${BZIP2_EXTRACT_CMD} ${BZIP2_EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${BZIP2_EXTRACT_AFTER_ARGS} || exit 1; \ + else \ + ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS} || exit 1; \ fi \ done .endif To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message