svn commit: r338410 - in head: . archivers archivers/p7zip archivers/p7zip-codec-rar archivers/p7zip/files

Raphael Kubo da Costa rakuco at FreeBSD.org
Thu Jan 2 00:20:21 UTC 2014


Author: rakuco
Date: Thu Jan  2 00:20:19 2014
New Revision: 338410
URL: http://svnweb.freebsd.org/changeset/ports/338410

Log:
  - Modernize and simplify the archivers/p7zip port's Makefile by getting rid
    of some sed calls, supporting staging.
  - Set LICENSE for the port. [1]
  - Get rid of the MINIMAL and MODULES options. They were not very useful and
    its handling was needlessly complicating the Makefile logic. We now always
    build as if MINIMAL was unset.
  - Stop installing the p7zip and Client7z wrappers.
  - Move the installation of the RAR decompression codec to
    archivers/p7zip-codec-rar, as its source code uses a more restrictive
    license than the LGPL21 used for the rest of the code base.
  
  PR:		ports/185238 [1]
  Submitted by:	Hardy Schumacher <hardy.schumacher at gmx.de> [1]

Added:
  head/archivers/p7zip-codec-rar/
  head/archivers/p7zip-codec-rar/Makefile   (contents, props changed)
  head/archivers/p7zip-codec-rar/pkg-descr   (contents, props changed)
  head/archivers/p7zip-codec-rar/pkg-plist   (contents, props changed)
Modified:
  head/UPDATING
  head/archivers/Makefile
  head/archivers/p7zip/Makefile
  head/archivers/p7zip/files/7z
  head/archivers/p7zip/pkg-plist

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Thu Jan  2 00:15:02 2014	(r338409)
+++ head/UPDATING	Thu Jan  2 00:20:19 2014	(r338410)
@@ -5,6 +5,18 @@ they are unavoidable.
 You should get into the habit of checking this file for changes each time
 you update your ports collection, before attempting any port upgrades.
 
+20140102:
+  AFFECTS: users of archivers/p7zip
+  AUTHOR: rakuco at FreeBSD.org
+
+  The MINIMAL and MODULES options have been removed from archivers/p7zip,
+  which now unconditionally installs the 7z, 7za and 7zr, as if the MINIMAL
+  option was previously unset.
+
+  The RAR decompression codec, whose source code has a more restrictive
+  license that forbids its use for creating RAR archives, has been moved to
+  a separate port, archivers/p7zip-codec-rar.
+
 20131230:
   AFFECTS: ports using Apache Software License 2.0
   AUTHOR: ohauer at FreeBSD.org

Modified: head/archivers/Makefile
==============================================================================
--- head/archivers/Makefile	Thu Jan  2 00:15:02 2014	(r338409)
+++ head/archivers/Makefile	Thu Jan  2 00:20:19 2014	(r338410)
@@ -120,6 +120,7 @@
     SUBDIR += p5-PerlIO-gzip
     SUBDIR += p5-PerlIO-via-Bzip2
     SUBDIR += p7zip
+    SUBDIR += p7zip-codec-rar
     SUBDIR += packddir
     SUBDIR += paq
     SUBDIR += par

Added: head/archivers/p7zip-codec-rar/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/archivers/p7zip-codec-rar/Makefile	Thu Jan  2 00:20:19 2014	(r338410)
@@ -0,0 +1,25 @@
+# $FreeBSD$
+
+PKGNAMESUFFIX=	-codec-rar
+PORTREVISION=	0
+
+COMMENT=	RAR decoder codec for p7zip
+
+LICENSE=		LGPL21 UNRAR
+LICENSE_COMB=		multi
+LICENSE_NAME_UNRAR=	unRAR usage restriction license
+LICENSE_FILE_UNRAR=	${WRKSRC}/DOCS/unRarLicense.txt
+LICENSE_PERMS_UNRAR=	dist-mirror dist-sell pkg-mirror pkg-sell
+
+MASTERDIR=	${.CURDIR}/../p7zip
+ALL_TARGET=	common7z
+DESCR=		${.CURDIR}/pkg-descr
+PLIST=		${.CURDIR}/pkg-plist
+
+OPTIONS_EXCLUDE=	DOCS
+
+do-install:
+	${MKDIR} ${STAGEDIR}${PREFIX}/libexec/p7zip/Codecs
+	${INSTALL_LIB} ${WRKSRC}/bin/Codecs/Rar29.so ${STAGEDIR}${PREFIX}/libexec/p7zip/Codecs
+
+.include "${MASTERDIR}/Makefile"

Added: head/archivers/p7zip-codec-rar/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/archivers/p7zip-codec-rar/pkg-descr	Thu Jan  2 00:20:19 2014	(r338410)
@@ -0,0 +1,3 @@
+A codec for uncompressing RAR files using the p7zip archiver.
+
+WWW: http://p7zip.sourceforge.net/

Added: head/archivers/p7zip-codec-rar/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/archivers/p7zip-codec-rar/pkg-plist	Thu Jan  2 00:20:19 2014	(r338410)
@@ -0,0 +1,3 @@
+libexec/p7zip/Codecs/Rar29.so
+ at dirrm libexec/p7zip/Codecs
+ at dirrmtry libexec/p7zip

Modified: head/archivers/p7zip/Makefile
==============================================================================
--- head/archivers/p7zip/Makefile	Thu Jan  2 00:15:02 2014	(r338409)
+++ head/archivers/p7zip/Makefile	Thu Jan  2 00:20:19 2014	(r338410)
@@ -3,67 +3,31 @@
 
 PORTNAME=	p7zip
 PORTVERSION=	9.20.1
+PORTREVISION?=	1
 CATEGORIES=	archivers
 MASTER_SITES=	SF
 DISTNAME=	${PORTNAME}_${DISTVERSION}_src_all
 
 MAINTAINER=	rakuco at FreeBSD.org
-COMMENT=	File archiver with high compression ratio
+COMMENT?=	File archiver with high compression ratio
 
-OPTIONS_DEFINE=        MINIMAL MODULES
-OPTIONS_DEFAULT=       MODULES
+LICENSE?=	LGPL21
 
-MINIMAL_DESC=  Support only .7z file format
-MODULES_DESC=  Build modules
-
-NO_STAGE=	yes
+ALL_TARGET?=	all3
 USE_BZIP2=	yes
 MAKEFILE=	makefile
+MAKE_ARGS=	OPTFLAGS="${CXXFLAGS}"
 WRKSRC=		${WRKDIR}/${PORTNAME}_${PORTVERSION}
 
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MMINIMAL}
-MAN1=		7zr.1
-MLINKS=		7zr.1 7z.1
-PLIST_SUB=	MODULES="@comment "
-ALL_TARGET=	7zr
-7ZBIN=		7zr
-PLIST_FILES=	bin/7zr \
-		bin/7z
-.else
-MAN1=		7z.1 7za.1 7zr.1 p7zip.1
-DLLDIR=		${PREFIX}/libexec/p7zip
-ALL_TARGET=	7za 7zr sfx
-7ZBIN=		7za 7zr 7zCon.sfx
-PLIST_FILES=	bin/7z \
-		bin/7za \
-		bin/7zr \
-		bin/p7zip \
-		libexec/p7zip/7za \
-		libexec/p7zip/7zr \
-		libexec/p7zip/7zCon.sfx
-.if ${PORT_OPTIONS:MMODULES}
-ALL_TARGET=	7z 7za 7zr Client7z sfx
-7ZBIN=		7z 7za 7zr Client7z 7zCon.sfx
-PLIST_DIRS+=	libexec/p7zip/Codecs
-PLIST_FILES+=	libexec/p7zip/7z \
-		libexec/p7zip/7z.so \
-		libexec/p7zip/Client7z \
-		libexec/p7zip/Codecs/Rar29.so
-.endif
-PLIST_DIRS+=	libexec/p7zip
-.endif
+CFLAGS_amd64=	-fPIC
+CFLAGS_ia64=	-fPIC
 
-.include <bsd.port.pre.mk>
+OPTIONS_DEFINE=	DOCS
 
-.if ${ARCH} == "amd64" || ${ARCH} == "ia64"
-CFLAGS+=	-fPIC
-.endif
+.include <bsd.port.options.mk>
 
 post-patch:
-	${SED} -e 's!-O!${CFLAGS}!' \
-	       -e 's!g\+\+!${CXX}!' \
+	${SED} -e 's!g\+\+!${CXX}!' \
 	       -e 's!gcc!${CC}!' \
 	       -e 's/-D_LARGEFILE_SOURCE//' \
 	       -e 's/-D_FILE_OFFSET_BITS=64//' \
@@ -71,28 +35,22 @@ post-patch:
 	${REINPLACE_CMD} -e 's|{DEST_SHARE_DOC}|${DOCSDIR}|' \
 		${WRKSRC}/man1/*
 	${MV} ${WRKSRC}/README ${WRKSRC}/DOCS/readme.unix
-	${MV} ${WRKSRC}/contrib/gzip-like_CLI_wrapper_for_7z/man1/p7zip.1 ${WRKSRC}/man1/
 
+.if ${SLAVE_PORT} == "no"
 do-install:
-.if defined(WITH_MINIMAL)
-	cd ${WRKSRC}/bin/&&${INSTALL_PROGRAM} ${7ZBIN} ${PREFIX}/bin/
-	${LN} -sf ${PREFIX}/bin/7zr ${PREFIX}/bin/7z
-.else
-	${INSTALL} -d ${DLLDIR}/
-	cd ${WRKSRC}/bin/&&${INSTALL_PROGRAM} ${7ZBIN} ${DLLDIR}/
-	${INSTALL_SCRIPT} ${FILESDIR}/7z ${PREFIX}/bin/
-	${LN} -sf 7z ${PREFIX}/bin/7za
-	${LN} -sf 7z ${PREFIX}/bin/7zr
-	${INSTALL_SCRIPT} ${WRKSRC}/contrib/gzip-like_CLI_wrapper_for_7z/p7zip ${PREFIX}/bin/
-.if !defined(WITHOUT_MODULES)
-	${INSTALL} -d ${DLLDIR}/Codecs/
-	${INSTALL_PROGRAM} ${WRKSRC}/bin/Codecs/Rar29.so ${DLLDIR}/Codecs/
-	${INSTALL_PROGRAM} ${WRKSRC}/bin/7z.so ${DLLDIR}/
-.endif
-.endif
-.if !defined(NOPORTDOCS)
-	@cd ${WRKSRC}/DOCS/&&${COPYTREE_SHARE} . ${DOCSDIR}/
+	${MKDIR} ${STAGEDIR}${PREFIX}/libexec/p7zip
+.for BINARY in 7z 7za 7zr 7zCon.sfx
+	${INSTALL_PROGRAM} ${WRKSRC}/bin/${BINARY} ${STAGEDIR}${PREFIX}/libexec/p7zip
+.endfor
+
+	${INSTALL_SCRIPT} ${FILESDIR}/7z ${STAGEDIR}${PREFIX}/bin/
+	${LN} -sf 7z ${STAGEDIR}${PREFIX}/bin/7za
+	${LN} -sf 7z ${STAGEDIR}${PREFIX}/bin/7zr
+
+	cd ${WRKSRC}/DOCS && \
+		${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
+	cd ${WRKSRC}/man1 && \
+		${INSTALL_MAN} 7z*.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
 .endif
-	@cd ${WRKSRC}/man1/&&${INSTALL_MAN} ${MAN1} ${MAN1PREFIX}/man/man1/
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/archivers/p7zip/files/7z
==============================================================================
--- head/archivers/p7zip/files/7z	Thu Jan  2 00:15:02 2014	(r338409)
+++ head/archivers/p7zip/files/7z	Thu Jan  2 00:20:19 2014	(r338410)
@@ -1,9 +1,6 @@
-#! /bin/sh
+#!/bin/sh
 
 PROGNAME=${0##*/}
 BINPATH=$(dirname $(realpath $0))/../libexec/p7zip
-if [ $PROGNAME = "7z" -a ! -x "$BINPATH/7z" -a -x "$BINPATH/7za" ]; then
-	PROGNAME=7za
-fi
 
 exec "$BINPATH/$PROGNAME" "$@"

Modified: head/archivers/p7zip/pkg-plist
==============================================================================
--- head/archivers/p7zip/pkg-plist	Thu Jan  2 00:15:02 2014	(r338409)
+++ head/archivers/p7zip/pkg-plist	Thu Jan  2 00:20:19 2014	(r338410)
@@ -1,3 +1,13 @@
+bin/7z
+bin/7za
+bin/7zr
+libexec/p7zip/7za
+libexec/p7zip/7zr
+libexec/p7zip/7zCon.sfx
+libexec/p7zip/7z
+man/man1/7z.1.gz
+man/man1/7za.1.gz
+man/man1/7zr.1.gz
 %%PORTDOCS%%%%DOCSDIR%%/7zC.txt
 %%PORTDOCS%%%%DOCSDIR%%/7zFormat.txt
 %%PORTDOCS%%%%DOCSDIR%%/License.txt
@@ -51,3 +61,4 @@
 %%PORTDOCS%%@dirrm %%DOCSDIR%%/MANUAL/switches
 %%PORTDOCS%%@dirrm %%DOCSDIR%%/MANUAL
 %%PORTDOCS%%@dirrm %%DOCSDIR%%
+ at dirrmtry libexec/p7zip


More information about the svn-ports-all mailing list