mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-19 03:52:17 +00:00
69f43aff5e
It is practically impossible to use any of the unzip slave ports. This is because archivers/unzip is used by the ports infrastruction (via USES=zip, USES=zip:infozip) and each slave port conflicts with it. If you install the slave port first, then the port infrastructure can't install archivers/unzip (although if attempted, the extracts dependency might be satisfied by the slave port so it might actually work). In any case, this change: * Adds "iconv" support as an non-default option * Add a localization group that can have zero or one selection * That group contains Chinese, Korean, or Russian support * WITH_UNZIP_UNREDUCE support was removed (I'm not sure it even worked) * Makefile was simplified (several loops removed) * Removes unzip-iconv, Chinese, Korean, Russian slave ports PR: 190349 Reported by: Mikhail Rokhin Unzip overhaul: marino Approved by: maintainer (ehaupt@)
113 lines
3.1 KiB
Makefile
113 lines
3.1 KiB
Makefile
# Created by: jmz
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= unzip
|
|
PORTVERSION= 6.0
|
|
PORTREVISION= 2
|
|
CATEGORIES= archivers
|
|
MASTER_SITES= SF/infozip/UnZip%206.x%20%28latest%29/UnZip%20${PORTVERSION}/:main \
|
|
SF/infozip/UnZip%205.x%20and%20earlier/5.51/:unreduce
|
|
DISTNAME= ${PORTNAME}60
|
|
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:main
|
|
|
|
MAINTAINER= ehaupt@FreeBSD.org
|
|
COMMENT= List, test, and extract compressed files from a ZIP archive
|
|
|
|
LICENSE= Info-ZIP
|
|
LICENSE_NAME= Info-ZIP license
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
|
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
|
|
|
|
ALL_TARGET= bsd
|
|
MAKEFILE= unix/Makefile
|
|
MAKE_ARGS= LF2="${STRIP}"
|
|
.if defined(INSTALL_AS_INFOUNZIP)
|
|
UNZIP_NAME= info-unzip
|
|
.else
|
|
UNZIP_NAME= unzip
|
|
.endif
|
|
PORTDOCS= README WHERE
|
|
MANPAGES= ${UNZIP_NAME}.1 funzip.1 unzipsfx.1 zipgrep.1 zipinfo.1
|
|
PLIST_FILES= bin/${UNZIP_NAME} bin/funzip bin/unzipsfx bin/zipgrep \
|
|
bin/zipinfo
|
|
PLIST_FILES+= ${MANPAGES:C|^(.*)\.([1-9])$|man/man\2/\1.\2.gz|}
|
|
|
|
LOCAL_UNZIP= ${CFLAGS} -DACORN_FTYPE_NFS -DWILD_STOP_AT_DIR \
|
|
-DUNICODE_SUPPORT -DUTF8_MAYBE_NATIVE -D_MBCS \
|
|
-DLARGE_FILE_SUPPORT
|
|
|
|
MAKE_ENV= LOCAL_UNZIP="${LOCAL_UNZIP}" \
|
|
D_USE_BZ2=-DUSE_BZIP2 L_BZ2=-lbz2
|
|
|
|
.ifdef USE_UNZIP
|
|
.error You have "USE_UNZIP" variable defined in environment or in \
|
|
make(1) arguments. Please undefine and try again.
|
|
.endif
|
|
|
|
OPTIONS_DEFINE= DOCS ICONV
|
|
OPTIONS_RADIO= RG1
|
|
OPTIONS_RADIO_RG1= CHINESE KOREAN RUSSIAN
|
|
|
|
RG1_DESC= Localization
|
|
CHINESE_DESC= Chinese language support
|
|
KOREAN_DESC= Korean language support
|
|
RUSSIAN_DESC= CP866 and KOI8-R support
|
|
|
|
ICONV_USES= iconv
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
.if ${ARCH} == i386
|
|
ALL_TARGET= freebsd
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MICONV}
|
|
CFLAGS+= -I${LOCALBASE}/include -DNATIVE
|
|
MAKE_ARGS+= LFLAGS1="-L${LOCALBASE}/lib ${ICONV_LIB}"
|
|
EXTRA_PATCHES+= ${FILESDIR}/extra-iconv-patch-unix_unix.c \
|
|
${FILESDIR}/extra-iconv-patch-unix_unxcfg.h \
|
|
${FILESDIR}/extra-iconv-patch-unzip.c \
|
|
${FILESDIR}/extra-iconv-patch-unzpriv.h \
|
|
${FILESDIR}/extra-iconv-patch-zipinfo.c
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MCHINESE}
|
|
CATEGORES+= chinese
|
|
EXTRA_PATCHES+= ${FILESDIR}/extra-zh-patch-fileio.c
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MKOREAN}
|
|
CATEGORIES+= korean
|
|
EXTRA_PATCHES+= ${FILESDIR}/extra-ko-patch-fileio.c \
|
|
${FILESDIR}/extra-ko-patch-unzip.c \
|
|
${FILESDIR}/extra-ko-patch-unzip.h
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MRUSSIAN}
|
|
CATEGORIES+= russian
|
|
EXTRA_PATCHES+= ${FILESDIR}/extra-ru-patch-ebcdic.h
|
|
.endif
|
|
|
|
.if !defined(INSTALL_AS_INFOUNZIP)
|
|
pre-fetch:
|
|
@${ECHO} ""
|
|
@${ECHO} "Use INSTALL_AS_INFOUNZIP=yes to install Info Unzip as ${PREFIX}/bin/info-unzip"
|
|
@${ECHO} ""
|
|
.endif
|
|
|
|
do-install:
|
|
${INSTALL_PROGRAM} ${WRKSRC}/unzip \
|
|
${STAGEDIR}${PREFIX}/bin/${UNZIP_NAME}
|
|
cd ${WRKSRC} && \
|
|
${INSTALL_PROGRAM} funzip unzipsfx ${STAGEDIR}${PREFIX}/bin
|
|
${LN} -sf ${UNZIP_NAME} ${STAGEDIR}${PREFIX}/bin/zipinfo
|
|
${INSTALL_SCRIPT} ${WRKSRC}/unix/zipgrep ${STAGEDIR}${PREFIX}/bin
|
|
${INSTALL_MAN} ${WRKSRC}/man/unzip.1 \
|
|
${STAGEDIR}${MAN1PREFIX}/man/man1/${UNZIP_NAME}.1
|
|
cd ${WRKSRC}/man && ${INSTALL_MAN} ${MANPAGES:Nunzip.1:Ninfo-unzip.1} \
|
|
${STAGEDIR}${MAN1PREFIX}/man/man1
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
|
|
|
|
.include <bsd.port.mk>
|