From owner-freebsd-current@FreeBSD.ORG Fri May 2 00:14:24 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 18A5B37B401; Fri, 2 May 2003 00:14:24 -0700 (PDT) Received: from dragon.nuxi.com (trang.nuxi.com [66.93.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4064E43F93; Fri, 2 May 2003 00:14:23 -0700 (PDT) (envelope-from obrien@NUXI.com) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.12.9/8.12.9) with ESMTP id h427E8m2003325; Fri, 2 May 2003 00:14:08 -0700 (PDT) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.12.9/8.12.9/Submit) id h427E7lb003324; Fri, 2 May 2003 00:14:07 -0700 (PDT) Date: Fri, 2 May 2003 00:14:07 -0700 From: "David O'Brien" To: Kris Kennaway Message-ID: <20030502071407.GB3258@dragon.nuxi.com> Mail-Followup-To: David O'Brien , Kris Kennaway , Ruslan Ermilov , current@freebsd.org References: <20030502011307.GA82420@sunbay.com> <20030502014308.GA92123@rot13.obsecurity.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20030502014308.GA92123@rot13.obsecurity.org> User-Agent: Mutt/1.4i X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD Group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 cc: current@freebsd.org Subject: Re: HEADS UP: bzip2(1) compression for manpages, Groff and Texinfo docs X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: current@freebsd.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2003 07:14:24 -0000 On Thu, May 01, 2003 at 06:43:08PM -0700, Kris Kennaway wrote: > On Fri, May 02, 2003 at 04:13:07AM +0300, Ruslan Ermilov wrote: > > This is just an announcement that I'm going to add bzip2(1) > > support to man(1) and makewhatis(1) (catman(1) already has > > it), and then switch the default compression method from > > gzip(1) to bzip2(1), for manpages, Groff and Texinfo docs. > > (The latest 4.5 texinfo supports bzip2.) >=20 > I believe this will break the ports collection, which expect (and > handles specially) gzipped manpages. No problem, all my build ports have .bz2 manpages instead of bzip ones. Index: bsd.port.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.447 diff -u -r1.447 bsd.port.mk --- bsd.port.mk 19 Apr 2003 22:35:28 -0000 1.447 +++ bsd.port.mk 21 Apr 2003 08:13:39 -0000 @@ -2145,7 +2151,13 @@ MANLANG?=3D "" # english only by default =20 .if !defined(NOMANCOMPRESS) -MANEXT=3D .gz +.if defined(WANT_GZPKG) +MCOMPRESS_CMD=3D ${GZIP_CMD} +MCOMPRESS_EXT=3D .gz +.else +MCOMPRESS_CMD=3D ${BZIP2_CMD} +MCOMPRESS_EXT=3D .bz2 +.endif .endif =20 .if (defined(MLINKS) || defined(_MLINKS_PREPEND)) && !defined(_MLINKS) @@ -2159,7 +2171,7 @@ else \ { print "broken"; exit; } \ } \ - }' | ${SED} -e 's=08 \([^/ ][^ ]*\.\(.\)[^. ]*\)=08 $${MAN\2PREFIX}/man/= $$$$$$$${__lang}/man\2/\1${MANEXT}=08g' -e 's/ /=08/g' -e 's/MANlPREFIX/MAN= LPREFIX/g' -e 's/MANnPREFIX/MANNPREFIX/g' + }' | ${SED} -e 's=08 \([^/ ][^ ]*\.\(.\)[^. ]*\)=08 $${MAN\2PREFIX}/man/= $$$$$$$${__lang}/man\2/\1${MCOMPRESS_EXT}=08g' -e 's/ /=08/g' -e 's/MANlPRE= FIX/MANLPREFIX/g' -e 's/MANnPREFIX/MANNPREFIX/g' .if ${__pmlinks:Mbroken} =3D=3D "broken" .BEGIN: @${ECHO_CMD} "${PKGNAME}: Unable to parse MLINKS." @@ -2209,11 +2221,11 @@ .if defined(_MANPAGES) && defined(NOMANCOMPRESS) __MANPAGES:=3D ${_MANPAGES:S^${PREFIX}/^^:S/""//:S^//^/^g} .elif defined(_MANPAGES) -__MANPAGES:=3D ${_MANPAGES:S^${PREFIX}/^^:S/""//:S^//^/^g:S/$/.gz/} +__MANPAGES:=3D ${_MANPAGES:S^${PREFIX}/^^:S/""//:S^//^/^g:S/$/${MCOMPRESS_= EXT}/} .endif =20 .if defined(_MANPAGES) && ${MANCOMPRESSED} =3D=3D "yes" -_MANPAGES:=3D ${_MANPAGES:S/$/.gz/} +_MANPAGES:=3D ${_MANPAGES:S/$/${MCOMPRESS_EXT}/} .endif =20 .if ${XFREE86_VERSION} =3D=3D 3 @@ -3817,7 +3833,6 @@ fi; \ checked=3D"${PARENT_CHECKED}"; \ for dir in $$(${ECHO_CMD} "${LIB_DEPENDS} ${RUN_DEPENDS}" | ${TR} '\040' = '\012' | ${SED} -e 's/^[^:]*://' -e 's/:.*//') $$(${ECHO_CMD} ${DEPENDS} | = ${TR} '\040' '\012' | ${SED} -e 's/:.*//'); do \ - dir=3D$$(${REALPATH} $$dir); \ if [ -d $$dir ]; then \ if (${ECHO_CMD} $$checked | ${GREP} -qwv "$$dir"); then \ childout=3D$$(cd $$dir; ${MAKE} CHILD_DEPENDS=3Dyes PARENT_CHECKED=3D"= $$checked" package-depends-list); \ @@ -3995,7 +4010,7 @@ @${ECHO_CMD} '@cwd ${PREFIX}' >> ${TMPPLIST} .endif @for i in $$(${ECHO} ${__MANPAGES} ${_TMLINKS:M${_PREFIX}*:S,^${_PREFIX}/= ,,:S,//,/,g} ' ' | ${SED} -E -e 's,man([1-9ln])/([^/ ]+) ,cat\1/\2 ,g'); do= \ - ${ECHO} "@unexec rm -f %D/$${i%.gz} %D/$${i%.gz}.gz" >> ${TMPPLIST}; \ + ${ECHO} "@unexec rm -f %D/$${i%${MCOMPRESS_EXT}} %D/$${i%${MCOMPRESS_EXT= }}${MCOMPRESS_EXT}" >> ${TMPPLIST}; \ done .if ${XFREE86_HTML_MAN} =3D=3D "yes" .for mansect in 1 2 3 4 5 6 7 8 9 L N @@ -4034,16 +4049,16 @@ .if defined(_MANPAGES) || defined(_MLINKS) .if ${MANCOMPRESSED} =3D=3D yes && defined(NOMANCOMPRESS) @${ECHO_MSG} "=3D=3D=3D> Uncompressing manual pages for ${PKGNAME}" - @_manpages=3D'${_MANPAGES:S/'/'\''/g}' && [ "$${_manpages}" !=3D "" ] && = ( eval ${GUNZIP_CMD} $${_manpages} ) || ${TRUE} + @_manpages=3D'${_MANPAGES:S/'/'\''/g}' && [ "$${_manpages}" !=3D "" ] && = ( eval ${MCOMPRESS_CMD} -d $${_manpages} ) || ${TRUE} .elif ${MANCOMPRESSED} =3D=3D no && !defined(NOMANCOMPRESS) @${ECHO_MSG} "=3D=3D=3D> Compressing manual pages for ${PKGNAME}" - @_manpages=3D'${_MANPAGES:S/'/'\''/g}' && [ "$${_manpages}" !=3D "" ] && = ( eval ${GZIP_CMD} $${_manpages} ) || ${TRUE} + _manpages=3D'${_MANPAGES:S/'/'\''/g}' && [ "$${_manpages}" !=3D "" ] && (= eval ${MCOMPRESS_CMD} -f $${_manpages} ) || ${TRUE} .endif .if defined(_MLINKS) @set ${_MLINKS:S,"",,g:S,//,/,g}; \ while :; do \ [ $$# -eq 0 ] && break || ${TRUE}; \ - ${RM} -f $${2%.gz}; ${RM} -f $$2.gz; \ + ${RM} -f $${2%${MCOMPRESS_EXT}}; ${RM} -f $$2${MCOMPRESS_EXT}; \ ${LN} -fs `${ECHO_CMD} $$1 $$2 | ${AWK} '{ \ z=3Dsplit($$1, a, /\//); x=3Dsplit($$2, b, /\//); \ while (a[i] =3D=3D b[i]) i++; \