2012-10-07 15:59:39 +02:00
|
|
|
# Created by: Juergen Lock <nox@jelal.kn-bremen.de>
|
2004-08-11 20:07:36 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= p7zip
|
2011-03-17 20:56:29 +01:00
|
|
|
PORTVERSION= 9.20.1
|
2004-08-11 20:07:36 +02:00
|
|
|
CATEGORIES= archivers
|
2006-09-24 08:41:33 +02:00
|
|
|
MASTER_SITES= SF
|
2007-07-17 09:10:19 +02:00
|
|
|
DISTNAME= ${PORTNAME}_${DISTVERSION}_src_all
|
2004-08-11 20:07:36 +02:00
|
|
|
|
2011-08-28 20:04:48 +02:00
|
|
|
MAINTAINER= rakuco@FreeBSD.org
|
2006-06-10 00:58:35 +02:00
|
|
|
COMMENT= File archiver with high compression ratio
|
2010-06-26 17:06:28 +02:00
|
|
|
|
2012-11-25 23:49:35 +01:00
|
|
|
OPTIONS_DEFINE= MINIMAL MODULES
|
|
|
|
OPTIONS_DEFAULT= MODULES
|
|
|
|
|
|
|
|
MINIMAL_DESC= Support only .7z file format
|
|
|
|
MODULES_DESC= Build modules
|
2004-08-11 20:07:36 +02:00
|
|
|
|
2013-09-20 15:11:20 +02:00
|
|
|
NO_STAGE= yes
|
2004-08-11 20:07:36 +02:00
|
|
|
USE_BZIP2= yes
|
|
|
|
MAKEFILE= makefile
|
2004-11-26 02:19:10 +01:00
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}_${PORTVERSION}
|
2004-10-28 06:59:12 +02:00
|
|
|
|
2009-11-26 22:02:41 +01:00
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
2012-11-25 23:49:35 +01:00
|
|
|
.if ${PORT_OPTIONS:MMINIMAL}
|
2009-11-26 22:02:41 +01:00
|
|
|
MAN1= 7zr.1
|
|
|
|
MLINKS= 7zr.1 7z.1
|
2004-12-28 03:46:57 +01:00
|
|
|
PLIST_SUB= MODULES="@comment "
|
2009-11-26 22:02:41 +01:00
|
|
|
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
|
2006-05-02 10:52:05 +02:00
|
|
|
ALL_TARGET= 7za 7zr sfx
|
|
|
|
7ZBIN= 7za 7zr 7zCon.sfx
|
2009-11-26 22:02:41 +01:00
|
|
|
PLIST_FILES= bin/7z \
|
|
|
|
bin/7za \
|
|
|
|
bin/7zr \
|
|
|
|
bin/p7zip \
|
|
|
|
libexec/p7zip/7za \
|
|
|
|
libexec/p7zip/7zr \
|
|
|
|
libexec/p7zip/7zCon.sfx
|
2012-11-25 23:49:35 +01:00
|
|
|
.if ${PORT_OPTIONS:MMODULES}
|
2009-11-26 22:02:41 +01:00
|
|
|
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
|
2004-12-28 03:46:57 +01:00
|
|
|
.endif
|
|
|
|
|
2004-08-11 20:07:36 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2005-04-30 06:43:20 +02:00
|
|
|
.if ${ARCH} == "amd64" || ${ARCH} == "ia64"
|
|
|
|
CFLAGS+= -fPIC
|
|
|
|
.endif
|
|
|
|
|
2004-10-28 06:59:12 +02:00
|
|
|
post-patch:
|
2013-02-07 14:04:29 +01:00
|
|
|
${SED} -e 's!-O!${CFLAGS}!' \
|
2005-01-30 13:23:53 +01:00
|
|
|
-e 's!g\+\+!${CXX}!' \
|
|
|
|
-e 's!gcc!${CC}!' \
|
2005-04-29 00:49:04 +02:00
|
|
|
-e 's/-D_LARGEFILE_SOURCE//' \
|
|
|
|
-e 's/-D_FILE_OFFSET_BITS=64//' \
|
2011-03-17 20:56:29 +01:00
|
|
|
${WRKSRC}/makefile.freebsd6 > ${WRKSRC}/makefile.machine
|
2011-01-01 18:31:57 +01:00
|
|
|
${REINPLACE_CMD} -e 's|{DEST_SHARE_DOC}|${DOCSDIR}|' \
|
2005-10-15 14:44:30 +02:00
|
|
|
${WRKSRC}/man1/*
|
2007-04-22 09:27:15 +02:00
|
|
|
${MV} ${WRKSRC}/README ${WRKSRC}/DOCS/readme.unix
|
2007-07-26 22:36:09 +02:00
|
|
|
${MV} ${WRKSRC}/contrib/gzip-like_CLI_wrapper_for_7z/man1/p7zip.1 ${WRKSRC}/man1/
|
2004-10-28 06:59:12 +02:00
|
|
|
|
2004-08-11 20:07:36 +02:00
|
|
|
do-install:
|
2009-11-26 22:02:41 +01:00
|
|
|
.if defined(WITH_MINIMAL)
|
|
|
|
cd ${WRKSRC}/bin/&&${INSTALL_PROGRAM} ${7ZBIN} ${PREFIX}/bin/
|
|
|
|
${LN} -sf ${PREFIX}/bin/7zr ${PREFIX}/bin/7z
|
|
|
|
.else
|
2007-04-22 09:27:15 +02:00
|
|
|
${INSTALL} -d ${DLLDIR}/
|
2007-09-01 13:54:27 +02:00
|
|
|
cd ${WRKSRC}/bin/&&${INSTALL_PROGRAM} ${7ZBIN} ${DLLDIR}/
|
2006-05-02 10:52:05 +02:00
|
|
|
${INSTALL_SCRIPT} ${FILESDIR}/7z ${PREFIX}/bin/
|
2004-12-28 03:46:57 +01:00
|
|
|
${LN} -sf 7z ${PREFIX}/bin/7za
|
2006-05-02 10:52:05 +02:00
|
|
|
${LN} -sf 7z ${PREFIX}/bin/7zr
|
2007-01-26 23:59:03 +01:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/contrib/gzip-like_CLI_wrapper_for_7z/p7zip ${PREFIX}/bin/
|
2004-12-28 03:46:57 +01:00
|
|
|
.if !defined(WITHOUT_MODULES)
|
2007-04-22 09:27:15 +02:00
|
|
|
${INSTALL} -d ${DLLDIR}/Codecs/
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/bin/Codecs/Rar29.so ${DLLDIR}/Codecs/
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/bin/7z.so ${DLLDIR}/
|
2004-12-28 03:46:57 +01:00
|
|
|
.endif
|
2009-11-26 22:02:41 +01:00
|
|
|
.endif
|
2004-11-26 02:19:10 +01:00
|
|
|
.if !defined(NOPORTDOCS)
|
2007-07-26 22:36:09 +02:00
|
|
|
@cd ${WRKSRC}/DOCS/&&${COPYTREE_SHARE} . ${DOCSDIR}/
|
2004-11-26 02:19:10 +01:00
|
|
|
.endif
|
2007-09-01 13:54:27 +02:00
|
|
|
@cd ${WRKSRC}/man1/&&${INSTALL_MAN} ${MAN1} ${MAN1PREFIX}/man/man1/
|
2004-08-11 20:07:36 +02:00
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|