b7f05445c0
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)
109 lines
3.1 KiB
Makefile
109 lines
3.1 KiB
Makefile
PORTNAME= ccache
|
|
PKGNAMESUFFIX?= -memcached
|
|
PORTVERSION= 3.5.dev.20180926
|
|
PORTREVISION= 5
|
|
CATEGORIES= devel
|
|
MASTER_SITES= LOCAL/bdrewery \
|
|
GH
|
|
|
|
MAINTAINER= bdrewery@FreeBSD.org
|
|
COMMENT= Tool to minimize the compile time of C/C++ programs
|
|
WWW= https://ccache.samba.org/
|
|
|
|
LICENSE= GPLv3+
|
|
LICENSE_FILE= ${WRKSRC}/GPL-3.0.txt
|
|
|
|
USE_GITHUB= yes
|
|
GH_TAGNAME= f7712082106bef085515f86ae47e7dbbd2a48b57
|
|
|
|
CONFLICTS_INSTALL?= ccache ccache-static ccache-memcached-static
|
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
# Some files shared with devel/ccache
|
|
CCACHEDIR?= ${MASTERDIR}/../ccache
|
|
|
|
HOWTO= ccache-howto-freebsd.txt
|
|
SUB_FILES= ${HOWTO} world-ccache pkg-message ccache-update-links.sh
|
|
|
|
PORTDOCS= ccache-howto-freebsd.txt MANUAL.html MANUAL.adoc NEWS.adoc \
|
|
NEWS.html
|
|
|
|
OPTIONS_DEFINE= CLANGLINK LLVMLINK STATIC DOCS TINDERBOX
|
|
OPTIONS_DEFAULT=CLANGLINK LLVMLINK
|
|
OPTIONS_SUB= yes
|
|
|
|
CLANGLINK_DESC= Create clang compiler links if clang is installed
|
|
LLVMLINK_DESC= Create llvm compiler links if llvm is installed
|
|
TINDERBOX_DESC= Create tarball for tinderbox usage
|
|
|
|
USES= autoreconf compiler gmake pkgconfig
|
|
|
|
CONFIGURE_ARGS+= --enable-memcached
|
|
LIB_DEPENDS+= libmemcached.so:databases/libmemcached
|
|
LDFLAGS+= -L${LOCALBASE}/lib
|
|
CFLAGS+= -I${LOCALBASE}/include
|
|
|
|
STATIC_CONFIGURE_ENABLE= static
|
|
STATIC_LDFLAGS+= -static
|
|
# Hack for libsasl2.a requiring HMAC_CTX_reset from hidden libntlm.a.
|
|
STATIC_LDFLAGS+= -L${LOCALBASE}/lib/sasl2
|
|
|
|
# While this works in theory it breaks due to install conflict in Poudriere
|
|
NO_CCACHE_DEPEND= yes
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
# Extra dependencies needed for generating manpage
|
|
.if ${PORT_OPTIONS:MDOCS}
|
|
BUILD_DEPENDS+= ${LOCALBASE}/bin/a2x:textproc/asciidoc
|
|
ALL_TARGET= all docs
|
|
.endif
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
. if ${COMPILER_TYPE} == clang
|
|
CPPFLAGS+= -DCC_IS_CLANG
|
|
. elif ${COMPILER_TYPE} == gcc
|
|
CPPFLAGS+= -DCC_IS_GCC
|
|
. endif
|
|
|
|
.include "${CCACHEDIR}/Makefile.compilers"
|
|
|
|
SUB_LIST+= HOWTO="${HOWTO}"
|
|
|
|
post-build-TINDERBOX-on:
|
|
@${MKDIR} ${WRKDIR}/tb/opt
|
|
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${WRKDIR}/tb/opt
|
|
.for l in ${CCACHE_COMPILERS}
|
|
@${LN} -sf ${PORTNAME} ${WRKDIR}/tb/opt/${l}
|
|
.endfor
|
|
@${TAR} -C ${WRKDIR}/tb -cpf ${WRKSRC}/${PORTNAME}.tar opt
|
|
|
|
do-install:
|
|
${INSTALL_PROGRAM} ${WRKSRC}/ccache ${STAGEDIR}${PREFIX}/bin
|
|
# Memcached uses the 3.5 dev branch which requires asciidoc to generate
|
|
# ccache.1.
|
|
.if ${PORT_OPTIONS:MDOCS}
|
|
${INSTALL_MAN} ${WRKSRC}/doc/ccache.1 ${STAGEDIR}${PREFIX}/man/man1
|
|
.endif
|
|
${MKDIR} ${STAGEDIR}${PREFIX}/${CCLINKDIR}/world
|
|
${INSTALL_SCRIPT} ${WRKDIR}/world-ccache \
|
|
${STAGEDIR}${PREFIX}/${CCLINKDIR}/world/ccache
|
|
${INSTALL_SCRIPT} ${WRKDIR}/ccache-update-links.sh \
|
|
${STAGEDIR}${PREFIX}/bin/ccache-update-links
|
|
|
|
do-install-TINDERBOX-on:
|
|
${MKDIR} ${STAGEDIR}${DATADIR}
|
|
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.tar ${STAGEDIR}${DATADIR}
|
|
|
|
do-install-DOCS-on:
|
|
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
${INSTALL_DATA} ${WRKSRC}/doc/MANUAL.html ${STAGEDIR}${DOCSDIR}
|
|
${INSTALL_DATA} ${WRKSRC}/doc/MANUAL.adoc ${STAGEDIR}${DOCSDIR}
|
|
${INSTALL_DATA} ${WRKSRC}/doc/NEWS.adoc ${STAGEDIR}${DOCSDIR}
|
|
${INSTALL_DATA} ${WRKSRC}/doc/NEWS.html ${STAGEDIR}${DOCSDIR}
|
|
${INSTALL_DATA} ${WRKDIR}/${HOWTO} ${STAGEDIR}${DOCSDIR}
|
|
|
|
.include <bsd.port.post.mk>
|