1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-25 00:51:21 +00:00
freebsd-ports/shells/zsh/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

128 lines
3.5 KiB
Makefile

PORTNAME= zsh
DISTVERSION= 5.9
PORTREVISION= 1
CATEGORIES= shells
MASTER_SITES= https://www.zsh.org/pub/ \
SF \
https://www.zsh.org/pub/:doc \
SF/${PORTNAME}/${PORTNAME}-doc/${PORTVERSION}:doc
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= bapt@FreeBSD.org
COMMENT= The Z shell
WWW= https://www.zsh.org/
LICENSE= ZSH
LICENSE_NAME= ZSH license
LICENSE_FILE= ${WRKSRC}/LICENCE
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
MAKE_JOBS_UNSAFE= yes
USES= cpe iconv localbase:ldflags ncurses perl5 shebangfix tar:xz
USE_PERL5= build
SHEBANG_LANG= zsh
zsh_OLD_CMD= zsh # shebang appears as /bin/zsh and just zsh
SHEBANG_FILES= Functions/Calendar/* \
Functions/Misc/*
CONFIGURE_ARGS= --with-tcsetpgrp \
--enable-function-subdirs \
--enable-maildir-support \
--enable-multibyte \
--enable-zsh-secure-free \
--sysconfdir=${PREFIX}/etc
# fix PREFIX != LOCALBASE
CONFIGURE_ARGS+=--disable-site-fndir \
--enable-additional-fpath=${DATADIR}/site-functions
CONFIGURE_ENV+= zsh_cv_sys_path_dev_fd=no \
ac_cv_header_sys_capability_h=no
GNU_CONFIGURE= yes
CPPFLAGS+= -DBOOL_DEFINED
LDFLAGS+= -Wl,--as-needed
TEST_TARGET= test
OPTIONS_DEFINE= DEBUG ETCDIR GDBM PCRE STATIC \
DOCS EXAMPLES
OPTIONS_SUB= yes
ETCDIR_DESC= System-wide defaults in /etc (instead of $${PREFIX}/etc)
GDBM_DESC= Enable GDBM support (GPL)
GDBM_LIB_DEPENDS= libgdbm.so:databases/gdbm
PCRE_LIB_DEPENDS= libpcre.so:devel/pcre
DEBUG_CONFIGURE_ENABLE= zsh-debug
ETCDIR_CONFIGURE_OFF= --enable-etcdir=${PREFIX}/etc
GDBM_CONFIGURE_ENABLE= gdbm
PCRE_CONFIGURE_ENABLE= pcre
## Some modules can only be built as a shared library.
## If you enable STATIC, you may get strange errors if you, a script,
## or a plugin tries to use the regex module.
STATIC_LDFLAGS= -static
STATIC_CONFIGURE_ON= --disable-dynamic --with-term-lib="tinfow tinfo"
STATIC_CONFIGURE_OFF= --enable-dynamic --with-term-lib="ncursesw ncurses"
DOCS= LICENCE META-FAQ README \
Etc/BUGS Etc/CONTRIBUTORS Etc/FAQ Etc/completion-style-guide \
Doc/zsh*.html Doc/zsh.dvi
DOCS_DISTFILES= ${DISTNAME}-doc${EXTRACT_SUFX}:doc
PORTDOCS= *
PORTEXAMPLES= zlogin zshenv zshrc
ZSH_VER= ${PORTVERSION}
PLIST_SUB+= ZSH_VER="${ZSH_VER}"
SUB_FILES= pkg-message
.include <bsd.port.pre.mk>
.if empty(ICONV_LIB)
CONFIGURE_ENV+= ac_cv_lib_iconv_libiconv=no
.endif
post-patch:
@${REINPLACE_CMD} -e "s|/etc/|${LOCALBASE}/etc/|" \
${WRKSRC}/Functions/MIME/zsh-mime-setup
${RM} ${WRKSRC}/Doc/help.txt
post-patch-STATIC-on:
@${REINPLACE_CMD} -e "s|link=dynamic|link=either|" \
${WRKSRC}/Src/Modules/*.mdd
post-build:
# Fix ".so" macro problem by using "soelim" command.
# soelim needs the manpages in man1/
${LN} -sf ${WRKSRC}/Doc ${WRKSRC}/man1
${MV} ${WRKSRC}/Doc/zshall.1 ${WRKSRC}/Doc/zshall.1.source
(cd ${WRKSRC} && ${SOELIM} -r ${WRKSRC}/Doc/zshall.1.source > \
${WRKSRC}/Doc/zshall.1)
post-install:
${MKDIR} ${STAGEDIR}${DATADIR}/site-functions
${LN} -f ${STAGEDIR}${PREFIX}/bin/zsh ${STAGEDIR}${PREFIX}/bin/rzsh
# Precompile completions and functions
(${STAGEDIR}${PREFIX}/bin/zsh -fc ' \
setopt extendedglob nomark_dirs; \
cd ${STAGEDIR}/${DATADIR}/${ZSH_VER} ; \
rm -f functions/**/*.orig ; \
for i in functions/**/*(/) ; do \
zcompile -U -M $$i.zwc $$i/*~*.zwc(^/) ; \
${CHMOD} 644 $$i.zwc ; \
done')
post-install-EXAMPLES-on:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
(cd ${WRKSRC}/StartupFiles && ${INSTALL_DATA} ${PORTEXAMPLES} ${STAGEDIR}${EXAMPLESDIR})
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
(cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR})
.include <bsd.port.post.mk>