Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Sep 2001 14:54:34 +0200 (CEST)
From:      Cyrille Lefevre <clefevre@citeweb.net>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        obrien@freebsd.org
Subject:   ports/30336: archivers/bzip2: only install symlinks if OSVERSION >= 4.3.2
Message-ID:  <200109051254.f85CsYq35295@gits.dyndns.org>

next in thread | raw e-mail | index | archive | help

>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:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 05 06:00:01 PDT 2001
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109051254.f85CsYq35295>