2004-08-11 20:07:36 +02:00
|
|
|
# New ports collection makefile for: p7zip
|
|
|
|
# Date created: Sun Jul 18 15:07:26 CEST 2004
|
|
|
|
# Whom: Juergen Lock <nox@jelal.kn-bremen.de>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= p7zip
|
2009-09-30 22:35:33 +02:00
|
|
|
PORTVERSION= 9.04
|
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
|
|
|
|
2006-12-23 18:42:42 +01:00
|
|
|
MAINTAINER= nox@FreeBSD.org
|
2006-06-10 00:58:35 +02:00
|
|
|
COMMENT= File archiver with high compression ratio
|
2009-11-26 22:02:41 +01:00
|
|
|
OPTIONS= MINIMAL "Support only .7z file format" off
|
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}
|
2009-03-23 21:56:43 +01:00
|
|
|
MAKE_JOBS_UNSAFE= yes
|
2004-10-28 06:59:12 +02:00
|
|
|
|
2009-11-26 22:02:41 +01:00
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
|
|
|
.if defined(WITH_MINIMAL)
|
|
|
|
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
|
|
|
|
.if !defined(WITHOUT_MODULES)
|
|
|
|
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:
|
2007-02-09 22:08:02 +01:00
|
|
|
${SED} -e 's!-O!${CFLAGS} ${PTHREAD_CFLAGS}!' \
|
2005-01-30 13:23:53 +01:00
|
|
|
-e 's!g\+\+!${CXX}!' \
|
|
|
|
-e 's!gcc!${CC}!' \
|
2004-11-26 02:19:10 +01:00
|
|
|
-e '/LITTLE_ENDIAN/d' \
|
2005-04-29 00:49:04 +02:00
|
|
|
-e 's/-D_LARGEFILE_SOURCE//' \
|
|
|
|
-e 's/-D_FILE_OFFSET_BITS=64//' \
|
2004-11-26 02:19:10 +01:00
|
|
|
-e 's/-lc_r/${PTHREAD_LIBS}/' \
|
2005-04-29 00:49:04 +02:00
|
|
|
${WRKSRC}/makefile.freebsd > ${WRKSRC}/makefile.machine
|
2005-10-15 14:44:30 +02:00
|
|
|
${REINPLACE_CMD} -e 's|/usr/share/doc/p7zip/DOCS|${DOCSDIR}|' \
|
|
|
|
${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>
|