diff --git a/devel/ccache/Makefile b/devel/ccache/Makefile index 672823f09511..27fbeab47611 100644 --- a/devel/ccache/Makefile +++ b/devel/ccache/Makefile @@ -1,91 +1,91 @@ PORTNAME= ccache PORTVERSION= 3.7.12 -PORTREVISION= 8 +PORTREVISION= 9 CATEGORIES= devel MASTER_SITES= https://github.com/ccache/ccache/releases/download/v${DISTVERSION}/ \ LOCAL/bdrewery # anyone may update Makefile.compilers - bdrewery 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 CONFLICTS_INSTALL?= ccache-static ccache-memcached ccache-memcached-static ccache4 GNU_CONFIGURE= yes 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= compiler STATIC_CONFIGURE_ENABLE= static STATIC_LDFLAGS+= -static # Support WITH_CCACHE_BUILD but don't depend on it. NO_CCACHE_DEPEND= yes .include . if ${COMPILER_TYPE} == clang CPPFLAGS+= -DCC_IS_CLANG . elif ${COMPILER_TYPE} == gcc CPPFLAGS+= -DCC_IS_GCC . endif .include "${MASTERDIR}/Makefile.compilers" SUB_LIST+= HOWTO="${HOWTO}" post-patch: @${REINPLACE_CMD} \ -e 's,_XOPEN_SOURCE 600,_XOPEN_SOURCE 700,' \ -e 's,_POSIX_C_SOURCE 200112L,_POSIX_C_SOURCE 200809L,' \ ${WRKSRC}/configure 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. ${INSTALL_MAN} ${WRKSRC}/doc/ccache.1 ${STAGEDIR}${PREFIX}/share/man/man1 ${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 diff --git a/devel/ccache/files/ccache-howto-freebsd.txt.in b/devel/ccache/files/ccache-howto-freebsd.txt.in index c86c552c7707..a845d5383496 100644 --- a/devel/ccache/files/ccache-howto-freebsd.txt.in +++ b/devel/ccache/files/ccache-howto-freebsd.txt.in @@ -1,66 +1,66 @@ To use ccache for ports and base, just add WITH_CCACHE_BUILD=yes to /etc/make.conf. The rest of this guide is for building /usr/src and other checkouts. Refer to src.conf(5) for more information specific to base builds. ------------------------------------------------------------------------------- For older releases, before 11.0, add the following to /etc/make.conf. You can replace cc and c++ with the compilers of your choice. (remember that only GCC and Clang can build world and kernel) .if (!empty(.CURDIR:M/usr/src*) || !empty(.CURDIR:M/usr/obj*)) .if !defined(NOCCACHE) && exists(%%PREFIX%%/%%CCLINKDIR%%/world/cc) CC:=${CC:C,^cc,%%PREFIX%%/%%CCLINKDIR%%/world/cc,1} CXX:=${CXX:C,^c\+\+,%%PREFIX%%/%%CCLINKDIR%%/world/c++,1} .endif .endif For Korn/Bourne shells Add the following to /etc/profile: export PATH=%%PREFIX%%/%%CCLINKDIR%%:$PATH export CCACHE_PATH=/usr/bin:%%LOCALBASE%%/bin For csh/tcsh Add the following to /etc/csh.cshrc: setenv PATH %%PREFIX%%/%%CCLINKDIR%%:$PATH setenv CCACHE_PATH /usr/bin:%%LOCALBASE%%/bin For icc users: Add %%ICCPREFIX%% to CCACHE_PATH ------------------------------------------------------------------------------- To use distcc: For Korn/Bourne shells Add the following to /etc/profile: export CCACHE_PREFIX=distcc export DISTCC_HOSTS="localhost host1 host2" For csh/tcsh Add the following to /etc/csh.cshrc: setenv CCACHE_PREFIX distcc setenv DISTCC_HOSTS "localhost host1 host2" -- If you have a problem building world define NOCCACHE and try again. If you have a problem building a port reset PATH=$CCACHE_PATH and try again. -- Make sure you run 'ccache-update-links' after you install/uninstall additional compilers in order to create/remove compiler links. -- -Ccache's default cache size is 1GB and this is larger than the default size of +Ccache's default cache size is 5GB and this is larger than the default size of the root partition (/) on FreeBSD. To over come this you may specify a new cache location on a different partition with the following examples. For Korn/Bourne shells Add the following to /etc/profile: export CCACHE_DIR=/usr/.ccache For csh/tcsh Add the following to /etc/csh.cshrc setenv CCACHE_DIR "/usr/.ccache"