From root@gits.dyndns.org  Wed Sep  5 05:54:38 2001
Return-Path: <root@gits.dyndns.org>
Received: from smtp.noos.fr (claudel.noos.net [212.198.2.83])
	by hub.freebsd.org (Postfix) with ESMTP id BE56B37B40B
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  5 Sep 2001 05:54:37 -0700 (PDT)
Received: (qmail 34798056 invoked by uid 0); 5 Sep 2001 12:54:35 -0000
Received: from unknown (HELO gits.dyndns.org) ([212.198.231.187]) (envelope-sender <root@gits.dyndns.org>)
          by 212.198.2.83 (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP
          for <obrien@freebsd.org>; 5 Sep 2001 12:54:35 -0000
Received: (from root@localhost)
	by gits.dyndns.org (8.11.6/8.11.6) id f85CsYq35295;
	Wed, 5 Sep 2001 14:54:34 +0200 (CEST)
	(envelope-from root)
Message-Id: <200109051254.f85CsYq35295@gits.dyndns.org>
Date: Wed, 5 Sep 2001 14:54:34 +0200 (CEST)
From: Cyrille Lefevre <clefevre@citeweb.net>
Reply-To: Cyrille Lefevre <clefevre@citeweb.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc: obrien@freebsd.org
Subject: archivers/bzip2: only install symlinks if OSVERSION >= 4.3.2
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         30336
>Category:       ports
>Synopsis:       archivers/bzip2: only install symlinks if OSVERSION >= 4.3.2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 05 06:00:01 PDT 2001
>Closed-Date:    Wed Sep 12 00:18:15 JST 2001
>Last-Modified:  Wed Sep 12 00:20:37 JST 2001
>Originator:     Cyrille Lefevre
>Release:        FreeBSD 4.4-RC i386
>Organization:
ACME
>Environment:

System: FreeBSD gits 4.4-RC FreeBSD 4.4-RC #29: Sat Aug 25 14:49:20 CEST 2001 root@gits:/disk2/4.x-stable/src/sys/compile/CUSTOM i386

>Description:
	like shells/tcsh, only install symlinks if OSVERSION >= 4.3.2
	since bzip2 has been integrated to the base os at 4.3.1.

	Makefile
		PORTREVISION= added.
		.if ${OSVERSION} >= 430002 added.
		PORTBINS, PORTLNKS and INSTALL_TARGETS added.
		PLIST_SUB added using PORTBINS and PORTLNKS.
		pre-everithing added.
		NO_PATCH and NO_CONFIGURE faked.
		do-install splitted using INSTALL_TARGETS.

	pkg-plist
		reworked as needed using PORTBINS and PORTLNKS.
		texinfo file removed.
		info file added.

>How-To-Repeat:
	n/a
>Fix:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/archivers/bzip2/Makefile,v
retrieving revision 1.33
diff -u -r1.33 Makefile
--- Makefile	2001/04/13 07:50:40	1.33
+++ Makefile	2001/09/05 12:51:51
@@ -8,33 +8,85 @@
 
 PORTNAME=	bzip2
 PORTVERSION=	1.0.1
+PORTREVISION=	1
 CATEGORIES=	archivers
 MASTER_SITES=	${MASTER_SITE_SOURCEWARE}
 MASTER_SITE_SUBDIR=	bzip2/v100
 
 MAINTAINER=	obrien@FreeBSD.org
 
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} >= 430002
+DISTFILES=	# empty
+NO_BUILD=	yes
+
+PORTBINS=	"@comment "
+PORTLNKS=
+INSTALL_TARGETS= install-links
+.else
+PORTBINS=
+PORTLNKS=	"@comment "
+INSTALL_TARGETS= install-bins install-mans install-infos install-docs
+
 INSTALLS_SHLIB=	yes
 
 MAN1=		bzip2.1
 MLINKS=		bzip2.1 bunzip2.1   bzip2.1 bzcat.1   bzip2.1 bz2cat.1 \
 		bzip2.1 bzip2recover.1
+
+INSTALL_INFO?=	install-info
+.endif
+
+PLIST_SUB=	PORTBINS=${PORTBINS} PORTLNKS=${PORTLNKS}
 
-do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/bzip2 ${PREFIX}/bin
-	${LN} -sf ${PREFIX}/bin/bzip2 ${PREFIX}/bin/bunzip2
-	${LN} -sf ${PREFIX}/bin/bzip2 ${PREFIX}/bin/bzcat
-	${LN} -sf ${PREFIX}/bin/bzip2 ${PREFIX}/bin/bz2cat
-	${INSTALL_PROGRAM} ${WRKSRC}/bzip2recover ${PREFIX}/bin
-	${INSTALL_DATA} ${WRKSRC}/bzlib.h ${PREFIX}/include
-	${INSTALL_DATA} ${WRKSRC}/libbz2.a ${PREFIX}/lib
-	${INSTALL_DATA} ${WRKSRC}/libbz2.so.1 ${PREFIX}/lib
-	${LN} -sf ${PREFIX}/lib/libbz2.so.1 ${PREFIX}/lib/libbz2.so
-	${INSTALL_MAN} ${WRKSRC}/bzip2.1 ${PREFIX}/man/man1
+.if ${OSVERSION} >= 430002
+pre-everything::
+	@${ECHO_MSG} "This port is just for making symlink from /usr/bin/bzip2, etc."
+	@${ECHO_MSG} "to ${PREFIX}/bin/bzip2, etc."
+
+# for instance, there is no more NO_PATCH nor NO_CONFIGURE :( so, fake them :P
+patch: extract
+	@${TOUCH} ${TOUCH_FLAGS} ${PATCH_COOKIE}
+configure: patch
+	@${TOUCH} ${TOUCH_FLAGS} ${CONFIGURE_COOKIE}
+.endif
+
+do-install: ${INSTALL_TARGETS} install-common-links
+
+install-links:
+	@${LN} -sf /usr/bin/bzip2 ${PREFIX}/bin/bzip2
+	@${LN} -sf /usr/bin/bzip2recover ${PREFIX}/bin/bzip2recover
+	@${LN} -sf /usr/include/bzlib.h ${PREFIX}/include/bzlib.h
+	@${LN} -sf /usr/lib/libbz2.a ${PREFIX}/lib/libbz2.a
+	@${LN} -sf /usr/lib/libbz2.so.1 ${PREFIX}/lib/libbz2.so.1
+
+install-bins:
+	@${INSTALL_PROGRAM} ${WRKSRC}/bzip2 ${PREFIX}/bin
+	@${INSTALL_PROGRAM} ${WRKSRC}/bzip2recover ${PREFIX}/bin
+	@${INSTALL_DATA} ${WRKSRC}/bzlib.h ${PREFIX}/include
+	@${INSTALL_DATA} ${WRKSRC}/libbz2.a ${PREFIX}/lib
+	@${INSTALL_DATA} ${WRKSRC}/libbz2.so.1 ${PREFIX}/lib
+
+install-mans:
+	@${INSTALL_MAN} ${WRKSRC}/bzip2.1 ${PREFIX}/man/man1
+
+install-infos:
+	@${INSTALL_MAN} ${WRKSRC}/bzip2.info ${PREFIX}/info
+	@${INSTALL_INFO} ${WRKSRC}/bzip2.info ${PREFIX}/info/dir
+
+install-docs:
 .if !defined(NOPORTDOCS)
-	${MKDIR} ${PREFIX}/share/doc/bzip2
-	${INSTALL_DATA} ${WRKSRC}/manual* ${PREFIX}/share/doc/bzip2
-	${PREFIX}/bin/bzip2 -f ${PREFIX}/share/doc/bzip2/manual.ps
+	@${MKDIR} ${DOCSDIR} ${DOCSDIR}/html
+	@${INSTALL_DATA} ${WRKSRC}/manual.ps ${DOCSDIR}
+	@${PREFIX}/bin/bzip2 -fq9 ${DOCSDIR}/manual.ps
+	@${INSTALL_DATA} ${WRKSRC}/manual_*.html ${DOCSDIR}/html
 .endif
+
+install-common-links:
+	@${LN} -sf bzip2 ${PREFIX}/bin/bunzip2
+	@${LN} -sf bzip2 ${PREFIX}/bin/bzcat
+	@${LN} -sf bzip2 ${PREFIX}/bin/bz2cat
+	@${LN} -sf libbz2.so.1 ${PREFIX}/lib/libbz2.so
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/archivers/bzip2/pkg-plist,v
retrieving revision 1.13
diff -u -r1.13 pkg-plist
--- pkg-plist	2001/04/09 23:28:44	1.13
+++ pkg-plist	2001/09/05 12:18:04
@@ -1,18 +1,35 @@
 @comment $FreeBSD: ports/archivers/bzip2/pkg-plist,v 1.13 2001/04/09 23:28:44 mi Exp $
-bin/bzip2
-bin/bunzip2
-bin/bzcat
-bin/bz2cat
-bin/bzip2recover
-include/bzlib.h
-lib/libbz2.a
-lib/libbz2.so
-lib/libbz2.so.1
-%%PORTDOCS%%share/doc/bzip2/manual.ps.bz2
-%%PORTDOCS%%share/doc/bzip2/manual.texi
-%%PORTDOCS%%share/doc/bzip2/manual_1.html
-%%PORTDOCS%%share/doc/bzip2/manual_2.html
-%%PORTDOCS%%share/doc/bzip2/manual_3.html
-%%PORTDOCS%%share/doc/bzip2/manual_4.html
-%%PORTDOCS%%share/doc/bzip2/manual_toc.html
-%%PORTDOCS%%@dirrm share/doc/bzip2
+%%PORTBINS%%bin/bzip2
+%%PORTLNKS%%@exec ln -sf /usr/bin/bzip2 %D/bin/bzip2
+%%PORTLNKS%%@unexec rm -f %D/bin/bzip2
+@exec ln -sf bzip2 %D/bin/bunzip2
+@unexec rm -f %D/bin/bunzip2
+@exec ln -sf bzip2 %D/bin/bzcat
+@unexec rm -f %D/bin/bzcat
+@exec ln -sf bzip2 %D/bin/bz2cat
+@unexec rm -f %D/bin/bz2cat
+%%PORTBINS%%bin/bzip2recover
+%%PORTLNKS%%@exec ln -sf /usr/bin/bzip2recover %D/bin/bzip2recover
+%%PORTLNKS%%@unexec rm -f %D/bin/bzip2recover
+%%PORTBINS%%include/bzlib.h
+%%PORTLNKS%%@exec ln -sf /usr/include/bzlib.h %D/include/bzlib.h
+%%PORTLNKS%%@unexec rm -f %D/include/bzlib.h
+%%PORTBINS%%lib/libbz2.a
+%%PORTLNKS%%@exec ln -sf /usr/lib/libbz2.a %D/lib/libbz2.a
+%%PORTLNKS%%@unexec rm -f %D/lib/libbz2.a
+%%PORTBINS%%lib/libbz2.so.1
+%%PORTLNKS%%@exec ln -sf /usr/lib/libbz2.so.1 %D/lib/libbz2.so.1
+%%PORTLNKS%%@unexec rm -f %D/lib/libbz2.so.1
+@exec ln -sf libbz2.so.1 %D/lib/libbz2.so
+@unexec rm -f %D/lib/libbz2.so
+%%PORTBINS%%@unexec install-info --quiet --delete %D/info/bzip2.info %D/info/dir
+%%PORTBINS%%info/bzip2.info
+%%PORTBINS%%@exec install-info %D/info/bzip2.info %D/info/dir
+%%PORTBINS%%%%PORTDOCS%%share/doc/bzip2/manual.ps.bz2
+%%PORTBINS%%%%PORTDOCS%%share/doc/bzip2/html/manual_1.html
+%%PORTBINS%%%%PORTDOCS%%share/doc/bzip2/html/manual_2.html
+%%PORTBINS%%%%PORTDOCS%%share/doc/bzip2/html/manual_3.html
+%%PORTBINS%%%%PORTDOCS%%share/doc/bzip2/html/manual_4.html
+%%PORTBINS%%%%PORTDOCS%%share/doc/bzip2/html/manual_toc.html
+%%PORTBINS%%%%PORTDOCS%%@dirrm share/doc/bzip2/html
+%%PORTBINS%%%%PORTDOCS%%@dirrm share/doc/bzip2
Index: files/patch-aa
===================================================================
RCS file: /home/ncvs/ports/archivers/bzip2/files/patch-aa,v
retrieving revision 1.9
diff -u -r1.9 patch-aa
--- files/patch-aa	2000/06/08 14:47:17	1.9
+++ files/patch-aa	2001/09/05 12:33:38
@@ -1,5 +1,5 @@
---- Makefile.orig	Wed May 17 00:31:04 2000
-+++ Makefile	Thu Jun  8 17:41:26 2000
+--- Makefile.orig	Fri Jun 23 22:34:47 2000
++++ Makefile	Wed Sep  5 14:33:15 2001
 @@ -1,8 +1,10 @@
  
  SHELL=/bin/sh
@@ -13,7 +13,7 @@
  
  OBJS= blocksort.o  \
        huffman.o    \
-@@ -12,10 +14,18 @@
+@@ -12,10 +14,19 @@
        decompress.o \
        bzlib.o
  
@@ -28,14 +28,15 @@
  
 -bzip2: libbz2.a bzip2.o
 -	$(CC) $(CFLAGS) -o bzip2 bzip2.o -L. -lbz2
-+all: libbz2.so.1 libbz2.a bzip2 bzip2recover test
++all: libbz2.so.1 libbz2.a bzip2 bzip2recover bzip2.info test
++all-doc: manual_toc.html manual.ps
 +
 +bzip2: libbz2.so.1 libbz2.a bzip2.o
 +	$(CC) $(CFLAGS) -o bzip2 bzip2.o libbz2.a
  
  bzip2recover: bzip2recover.o
  	$(CC) $(CFLAGS) -o bzip2recover bzip2recover.o
-@@ -29,6 +39,10 @@
+@@ -29,6 +40,26 @@
  		ranlib libbz2.a ; \
  	fi
  
@@ -43,10 +44,26 @@
 +	$(CC) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1 $(SO_OBJS)
 +	ln -sf libbz2.so.1 libbz2.so
 +
++bzip2.info: manual.texi
++	-@makeinfo --force --no-split manual.texi
++
++manual_toc.html: manual.texi
++	-@texi2html -split_chapter manual.texi
++
++manual.ps: manual.texi
++	-@tex \\nonstopmode \\input manual.texi
++	-@texindex manual.cp manual.fn manual.ky manual.tp manual.vr
++	-@tex \\nonstopmode \\input manual.texi
++	-@rm -f manual.aux manual.fn  manual.kys manual.toc manual.vr \
++		manual.cp  manual.fns manual.log manual.tp  manual.vrs \
++		manual.cps manual.ky  manual.pg  manual.tps
++	-@dvips -o manual.ps manual.dvi
++	-@rm -f manual.dvi
++
  test: bzip2
  	@cat words1
  	./bzip2 -1  < sample1.ref > sample1.rb2
-@@ -69,12 +83,27 @@
+@@ -69,12 +100,27 @@
  	chmod a+r $(PREFIX)/lib/libbz2.a
  
  clean: 
>Release-Note:
>Audit-Trail:

From: Cyrille Lefevre <clefevre@citeweb.net>
To: freebsd-gnats-submit@FreeBSD.org, clefevre@citeweb.net
Cc:  
Subject: Re: ports/30336: archivers/bzip2: only install symlinks if OSVERSION >= 
 4.3.2
Date: Fri, 07 Sep 2001 01:09:01 +0200

 please,
 could you replace PREFIX by MAN1PREFIX in install-mans target ?
 thanks.

From: "Akinori MUSHA" <knu@iDaemons.org>
To: Cyrille Lefevre <clefevre@citeweb.net>
Cc: FreeBSD-gnats-submit@freebsd.org, obrien@freebsd.org
Subject: Re: ports/30336: archivers/bzip2: only install symlinks if OSVERSION >= 4.3.2
Date: Fri, 07 Sep 2001 13:52:59 +0900

 At Wed, 5 Sep 2001 14:54:34 +0200 (CEST),
 Cyrille Lefevre wrote:
 > 	like shells/tcsh, only install symlinks if OSVERSION >= 4.3.2
 > 	since bzip2 has been integrated to the base os at 4.3.1.
 
 What's the point of having symlinks?  No ports depend on the location
 of the bzip2 command by now.
 
 I think we can just mark the port as broken for systems that have
 bzip2 is the base (/usr).
 
 Index: Makefile
 ===================================================================
 RCS file: /home/ncvs/ports/archivers/bzip2/Makefile,v
 retrieving revision 1.33
 diff -u -p -r1.33 Makefile
 --- Makefile	13 Apr 2001 07:50:40 -0000	1.33
 +++ Makefile	7 Sep 2001 04:44:59 -0000
 @@ -14,6 +14,10 @@ MASTER_SITE_SUBDIR=	bzip2/v100
  
  MAINTAINER=	obrien@FreeBSD.org
  
 +.if exists(/usr/bin/bzip2)
 +BROKEN=		bzip2 is in the base system
 +.endif
 +
  INSTALLS_SHLIB=	yes
  
  MAN1=		bzip2.1
 
 
 
 shells/tcsh has a bit different circumstances; it is a popular login
 shell and so many users have /usr/local/bin/tcsh in their passwd
 entries it is helpful to make the port create a symlink to offer them
 a seamless upgrade.
 
 -- 
                      /
                     /__  __            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"

From: Cyrille Lefevre <clefevre@citeweb.net>
To: Akinori MUSHA <knu@iDaemons.org>
Cc: FreeBSD-gnats-submit@freebsd.org, obrien@freebsd.org
Subject: Re: ports/30336: archivers/bzip2: only install symlinks if OSVERSION
 >= 4.3.2
Date: Sat, 8 Sep 2001 08:55:48 +0200 (CEST)

 Akinori MUSHA wrote:
 > At Wed, 5 Sep 2001 14:54:34 +0200 (CEST),
 > Cyrille Lefevre wrote:
 > > 	like shells/tcsh, only install symlinks if OSVERSION >= 4.3.2
 > > 	since bzip2 has been integrated to the base os at 4.3.1.
 > 
 > What's the point of having symlinks?  No ports depend on the location
 > of the bzip2 command by now.
 > 
 > I think we can just mark the port as broken for systems that have
 > bzip2 is the base (/usr).
 
 [snip]
 
 no, it can't be marked broken since too many ports rely on it.
 
 grep -c /usr/ports/INDEX
 -> 526
 
 maybe the symlinks aren't needed, but nobody can be sure. all ports
 depending directly or indirectly on it should be checked first...
 are you willing to do the job ? because, I'm not ;^)
 
 Cyrille.
 -- 
 Cyrille Lefevre                 mailto:clefevre@citeweb.net

From: "Akinori MUSHA" <knu@iDaemons.org>
To: Cyrille Lefevre <clefevre@citeweb.net>
Cc: FreeBSD-gnats-submit@freebsd.org, obrien@freebsd.org
Subject: Re: ports/30336: archivers/bzip2: only install symlinks if OSVERSION >= 4.3.2
Date: Sat, 08 Sep 2001 16:36:20 +0900

 At Sat, 8 Sep 2001 08:55:48 +0200 (CEST),
 Cyrille Lefevre wrote:
 > no, it can't be marked broken since too many ports rely on it.
 > 
 > grep -c /usr/ports/INDEX
 > -> 526
 
 You counted what?  When and on what version of FreeBSD did you produce
 the INDEX you grepped?
 
 With the latest INDEX, I can see this:
 
 knu@archon[2]% grep bzip2-1 /usr/ports/INDEX
 bzip2-1.0.1|/usr/ports/archivers/bzip2|/usr/local|A block-sorting file compressor|/usr/ports/archivers/bzip2/pkg-descr|ports@FreeBSD.org|archivers|||http://sourceware.cygnus.com/bzip2/
 knu@archon[2]% 
 
 > maybe the symlinks aren't needed, but nobody can be sure. all ports
 > depending directly or indirectly on it should be checked first...
 > are you willing to do the job ? because, I'm not ;^)
 
 I've checked already.  I removed all the bzip2 dependency from ports
 and the package building for the 4.4-RELEASE was done without a
 problem regarding bzip2.
 
 -- 
                      /
                     /__  __            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"

From: Cyrille Lefevre <clefevre@citeweb.net>
To: Akinori MUSHA <knu@iDaemons.org>
Cc: FreeBSD-gnats-submit@freebsd.org, obrien@freebsd.org
Subject: Re: ports/30336: archivers/bzip2: only install symlinks if OSVERSION
 >= 4.3.2
Date: Sat, 8 Sep 2001 15:12:55 +0200 (CEST)

 Akinori MUSHA wrote:
 > At Sat, 8 Sep 2001 08:55:48 +0200 (CEST),
 > Cyrille Lefevre wrote:
 > > no, it can't be marked broken since too many ports rely on it.
 > > 
 > > grep -c /usr/ports/INDEX
 > > -> 526
 > 
 > You counted what?  When and on what version of FreeBSD did you produce
 > the INDEX you grepped?
 
 oops, sorry :) it was bzip2 on a 2 days old INDEX file (Sep  6 15:44).
 
 > With the latest INDEX, I can see this:
 > 
 > knu@archon[2]% grep bzip2-1 /usr/ports/INDEX
 > bzip2-1.0.1|/usr/ports/archivers/bzip2|/usr/local|A block-sorting file compressor|/usr/ports/archivers/bzip2/pkg-descr|ports@FreeBSD.org|archivers|||http://sourceware.cygnus.com/bzip2/
 > knu@archon[2]% 
 > 
 > > maybe the symlinks aren't needed, but nobody can be sure. all ports
 > > depending directly or indirectly on it should be checked first...
 > > are you willing to do the job ? because, I'm not ;^)
 > 
 > I've checked already.  I removed all the bzip2 dependency from ports
 > and the package building for the 4.4-RELEASE was done without a
 > problem regarding bzip2.
 
 don't know about that.
 
 PS : as suggested by Maxim Sobolev, IGNORE would be better than BROKEN.
 
 Cyrille.
 -- 
 Cyrille Lefevre                 mailto:clefevre@citeweb.net
State-Changed-From-To: open->closed 
State-Changed-By: knu 
State-Changed-When: Wed Sep 12 00:18:15 JST 2001 
State-Changed-Why:  
Resolved by marking the port as IGNORE for systems with bzip2 
in the base.  If it turns out that something needs the symlinks, 
we'll reopen this PR and deal with the problem properly. 

Thanks for the reminder! 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30336 
>Unformatted:
