From owner-cvs-src@FreeBSD.ORG Mon Jan 14 18:11:55 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C72E916A417; Mon, 14 Jan 2008 18:11:55 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 7567413C442; Mon, 14 Jan 2008 18:11:55 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.1/8.14.1) with ESMTP id m0EIBtTt002481; Mon, 14 Jan 2008 10:11:55 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.1/8.14.1/Submit) id m0EIBs7d002480; Mon, 14 Jan 2008 10:11:54 -0800 (PST) (envelope-from obrien) Date: Mon, 14 Jan 2008 10:11:54 -0800 From: "David O'Brien" To: Kris Kennaway Message-ID: <20080114181154.GA2286@dragon.NUXI.org> References: <200801080800.m08806jI012963@repoman.freebsd.org> <478A8FFE.8080602@freebsd.org> <478A95F2.1070709@FreeBSD.org> <478AA9E4.2010807@kientzle.com> <478ABC4B.8080601@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <478ABC4B.8080601@FreeBSD.org> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Tim Kientzle , src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org, Tim Kientzle , Dag-Erling Smorgrav Subject: Re: cvs commit: src/usr.bin/unzip Makefile unzip.1 unzip.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2008 18:11:55 -0000 On Mon, Jan 14, 2008 at 02:35:07AM +0100, Kris Kennaway wrote: > Tim Kientzle wrote: >>>> Of course, giving those four ports a build-time dependency >>>> on the Info-Zip version is arguably the right approach >>>> in any case. >>> >>> That would probably be undesirable because it would mean having to >>> special case things in the ports tree and/or duplicate code. >> I'm confused. How is it different from having >> a build-time dependency on GNU tar? I thought >> I remembered a few cases where ports installed >> GNU tar (as a build dependency) and then extracted >> with GNU tar. >> This case would seem no different. But I'm far >> less familiar with the details than you are, so >> I'll happily bow to your expertise in the matter. >> Tim Kientzle > > These ports currently obtain the unzip port dependency by setting USE_ZIP, > and then everything just works, i.e. there is logic in bsd.port.mk to > handle things like distfile extraction. > > If we have to special case ports to deal with variant zipfiles that cannot > be processed by /usr/bin/unzip then it gets messier because we have to > account for some ports being satisfied with USE_ZIP=yes meaning > /usr/bin/unzip and some still requiring /usr/ports/archivers/unzip. I'd > prefer not to have to add those workarounds. This seems quite easy... For those four-ish ports 's/USE_ZIP/USE_INFOZIP/' Index: bsd.commands.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.commands.mk,v retrieving revision 1.1 diff -u -p -r1.1 bsd.commands.mk --- bsd.commands.mk 4 Aug 2007 11:37:23 -0000 1.1 +++ bsd.commands.mk 14 Jan 2008 18:08:05 -0000 @@ -83,7 +83,11 @@ TR?= LANG=C /usr/bin/tr TRUE?= true # Shell builtin UMOUNT?= /sbin/umount UNAME?= /usr/bin/uname +.if defined(USE_INFOZIP) UNZIP_CMD?= ${LOCALBASE}/bin/unzip +.else +UNZIP_CMD?= /usr/bin/unzip +.endif WHICH?= /usr/bin/which XARGS?= /usr/bin/xargs YACC?= /usr/bin/yacc Index: bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.589 diff -u -p -r1.589 bsd.port.mk --- bsd.port.mk 17 Oct 2007 10:12:24 -0000 1.589 +++ bsd.port.mk 14 Jan 2008 18:08:55 -0000 @@ -1339,6 +1345,10 @@ X_WINDOW_SYSTEM ?= xfree86-4 . endif .endif +.if defined(USE_INFOZIP) +USE_ZIP= yes +.endif + .if defined(USE_BZIP2) EXTRACT_SUFX?= .tar.bz2 .elif defined(USE_ZIP) @@ -1657,7 +1669,7 @@ LIB32DIR= lib .endif PLIST_SUB+= LIB32DIR=${LIB32DIR} -.if defined(USE_ZIP) +.if defined(USE_INFOZIP) EXTRACT_DEPENDS+= unzip:${PORTSDIR}/archivers/unzip .endif .if defined(USE_MAKESELF)