diff options
author | rakuco <rakuco@FreeBSD.org> | 2014-01-02 08:20:19 +0800 |
---|---|---|
committer | rakuco <rakuco@FreeBSD.org> | 2014-01-02 08:20:19 +0800 |
commit | 0a0e5d37a88e0448fb3813670d36c34dda14266d (patch) | |
tree | 5ce92ac54f09dcaf3708cd40344a353775dcfd63 /archivers | |
parent | 9e2cf337ec218bc7e03e9509e78e0f06b41ecf9d (diff) | |
download | freebsd-ports-gnome-0a0e5d37a88e0448fb3813670d36c34dda14266d.tar.gz freebsd-ports-gnome-0a0e5d37a88e0448fb3813670d36c34dda14266d.tar.zst freebsd-ports-gnome-0a0e5d37a88e0448fb3813670d36c34dda14266d.zip |
- 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@gmx.de> [1]
Diffstat (limited to 'archivers')
-rw-r--r-- | archivers/Makefile | 1 | ||||
-rw-r--r-- | archivers/p7zip-codec-rar/Makefile | 25 | ||||
-rw-r--r-- | archivers/p7zip-codec-rar/pkg-descr | 3 | ||||
-rw-r--r-- | archivers/p7zip-codec-rar/pkg-plist | 3 | ||||
-rw-r--r-- | archivers/p7zip/Makefile | 92 | ||||
-rw-r--r-- | archivers/p7zip/files/7z | 5 | ||||
-rw-r--r-- | archivers/p7zip/pkg-plist | 11 |
7 files changed, 69 insertions, 71 deletions
diff --git a/archivers/Makefile b/archivers/Makefile index 885a399ca4be..8bf2d916561c 100644 --- a/archivers/Makefile +++ b/archivers/Makefile @@ -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 diff --git a/archivers/p7zip-codec-rar/Makefile b/archivers/p7zip-codec-rar/Makefile new file mode 100644 index 000000000000..0348bec10616 --- /dev/null +++ b/archivers/p7zip-codec-rar/Makefile @@ -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" diff --git a/archivers/p7zip-codec-rar/pkg-descr b/archivers/p7zip-codec-rar/pkg-descr new file mode 100644 index 000000000000..cc3d463a1e8c --- /dev/null +++ b/archivers/p7zip-codec-rar/pkg-descr @@ -0,0 +1,3 @@ +A codec for uncompressing RAR files using the p7zip archiver. + +WWW: http://p7zip.sourceforge.net/ diff --git a/archivers/p7zip-codec-rar/pkg-plist b/archivers/p7zip-codec-rar/pkg-plist new file mode 100644 index 000000000000..5facab024d28 --- /dev/null +++ b/archivers/p7zip-codec-rar/pkg-plist @@ -0,0 +1,3 @@ +libexec/p7zip/Codecs/Rar29.so +@dirrm libexec/p7zip/Codecs +@dirrmtry libexec/p7zip diff --git a/archivers/p7zip/Makefile b/archivers/p7zip/Makefile index d1153222c4d9..acb69b97e789 100644 --- a/archivers/p7zip/Makefile +++ b/archivers/p7zip/Makefile @@ -3,67 +3,31 @@ PORTNAME= p7zip PORTVERSION= 9.20.1 +PORTREVISION?= 1 CATEGORIES= archivers MASTER_SITES= SF DISTNAME= ${PORTNAME}_${DISTVERSION}_src_all MAINTAINER= rakuco@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> diff --git a/archivers/p7zip/files/7z b/archivers/p7zip/files/7z index c2c5ba19f17e..579e4f619122 100644 --- a/archivers/p7zip/files/7z +++ b/archivers/p7zip/files/7z @@ -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" "$@" diff --git a/archivers/p7zip/pkg-plist b/archivers/p7zip/pkg-plist index 2892d4a27ed8..26976f7a0e1e 100644 --- a/archivers/p7zip/pkg-plist +++ b/archivers/p7zip/pkg-plist @@ -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%% +@dirrmtry libexec/p7zip |