freebsd-ports/archivers/unzip/Makefile
Stefan Eßer b7f05445c0 Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.

Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.

There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.

This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.

There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.

The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.

Approved by:		portmgr (tcberner)
2022-09-07 23:10:59 +02:00

100 lines
2.9 KiB
Makefile

PORTNAME= unzip
PORTVERSION= 6.0
PORTREVISION= 8
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
WWW= http://infozip.sourceforge.net/UnZip.html
LICENSE= Info-ZIP
LICENSE_NAME= Info-ZIP license
LICENSE_FILE= ${WRKSRC}/LICENSE
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
USES= cpe
CPE_VENDOR= info-zip
ALL_TARGET= bsd
MAKEFILE= unix/Makefile
MAKE_ARGS= LF2="${STRIP}"
PORTDOCS= README WHERE
MANPAGES= unzip.1 funzip.1 unzipsfx.1 zipgrep.1 zipinfo.1
PLIST_FILES= bin/unzip bin/funzip bin/unzipsfx bin/zipgrep \
bin/zipinfo
PLIST_FILES+= ${MANPAGES:C|^(.*)\.([1-9])$|share/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}
CATEGORIES+= 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
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/unzip \
${STAGEDIR}${PREFIX}/bin
cd ${WRKSRC} && \
${INSTALL_PROGRAM} funzip unzipsfx ${STAGEDIR}${PREFIX}/bin
${LN} -sf unzip ${STAGEDIR}${PREFIX}/bin/zipinfo
${INSTALL_SCRIPT} ${WRKSRC}/unix/zipgrep ${STAGEDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/man/unzip.1 \
${STAGEDIR}${PREFIX}/share/man/man1
cd ${WRKSRC}/man && ${INSTALL_MAN} ${MANPAGES:Nunzip.1:Ninfo-unzip.1} \
${STAGEDIR}${PREFIX}/share/man/man1
@${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>