Index: Mk/bsd.ccache.mk =================================================================== --- Mk/bsd.ccache.mk +++ Mk/bsd.ccache.mk @@ -31,9 +31,10 @@ .if !defined(NO_CCACHE) && defined(WITH_CCACHE_BUILD) && !${CC:M*ccache*} && \ !defined(NO_BUILD) -# Avoid depends loops between ccache and pkg -. if !defined(NO_CCACHE_DEPEND) && \ - ${PKGORIGIN} != ${PKG_ORIGIN} +# Avoid depends loops between ccache, pkg and dependencies of ccache +. if defined(NO_CCACHE_DEPEND) +.MAKEFLAGS: NO_CCACHE_DEPEND=${NO_CCACHE_DEPEND:Q} +. elif ${PKGORIGIN} != ${PKG_ORIGIN} BUILD_DEPENDS+= ${LOCALBASE}/bin/ccache:devel/ccache . endif Index: devel/ccache/Makefile =================================================================== --- devel/ccache/Makefile +++ devel/ccache/Makefile @@ -16,8 +16,6 @@ CONFLICTS_INSTALL?= ccache-static-[0-9]* ccache-memcached-[0-9]* ccache-memcached-static-[0-9]* -GNU_CONFIGURE= yes - HOWTO= ccache-howto-freebsd.txt CCLINKDIR= libexec/ccache SUB_FILES= ${HOWTO} world-ccache pkg-message ccache-update-links.sh @@ -33,23 +31,20 @@ TINDERBOX_DESC= Create tarball for tinderbox usage MEMCACHED_DESC= Build in experimental Memcached support -USES= compiler - MEMCACHED_EXTRA_PATCHES= \ ${FILESDIR}/extra-patch-memcached-configure.ac \ ${FILESDIR}/extra-patch-memcached-Makefile.in MEMCACHED_CONFIGURE_ENABLE= memcached -MEMCACHED_USES= autoreconf gmake pkgconfig +MEMCACHED_USES= compiler autoreconf gmake pkgconfig +MEMCACHED_USES_OFF= compiler:c++11-lang cmake +MEMCACHED_BUILD_DEPENDS_OFF= zstd>=1.1.2:archivers/zstd MEMCACHED_LIB_DEPENDS= libmemcached.so:databases/libmemcached MEMCACHED_LDFLAGS= -L${LOCALBASE}/lib MEMCACHED_CFLAGS= -I${LOCALBASE}/include +MEMCACHED_CMAKE_OFF= -DZSTD_LIBRARY=${LOCALBASE}/lib/libzstd.a STATIC_CONFIGURE_ENABLE= static -.if empty(OPTIONS_SLAVE:MMEMCACHED) -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-Makefile.in -.endif - .if defined(WITH_CCACHE_BUILD) && empty(OPTIONS_SLAVE:MMEMCACHED) && \ !defined(NO_CCACHE_DEPEND) MEMCACHED_IGNORE= MEMCACHED cannot be combined with WITH_CCACHE_BUILD. Use devel/ccache-memcached @@ -66,6 +61,12 @@ .include +.if ${PORT_OPTIONS:MDOCS} +BUILD_DEPENDS+= a2x:textproc/asciidoc + +MEMCACHED_USES_OFF+= perl5 +.endif + .if ${PORT_OPTIONS:MMEMCACHED} # Hack for libsasl2.a requiring HMAC_CTX_reset from hidden libntlm.a. STATIC_LDFLAGS+= -L${LOCALBASE}/lib/sasl2 @@ -74,13 +75,23 @@ GH_TAGNAME= f7712082106bef085515f86ae47e7dbbd2a48b57 MASTER_SITES= DISTINFO_FILE= ${MASTERDIR}/distinfo.memcached + +GNU_CONFIGURE= yes +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src__ccache.c .if ${PORT_OPTIONS:MDOCS} -BUILD_DEPENDS+= ${LOCALBASE}/bin/a2x:textproc/asciidoc ALL_TARGET= all docs -PLIST_FILES+= man/man1/ccache.1.gz .endif .else -PORTVERSION= 3.7.1 +PORTVERSION= 4.1 + +#PATCH_SITES is set later due to depending on PORT_OPTIONS. +PATCH_SITES= https://github.com/ccache/ccache/commit/ +PATCHFILES+= 5504310039c09dd21919817aa93ef67647a5d758.patch:-p1 \ + 6426ae47c902f3061dbc3c4c816a4bbbe692fa92.patch:-p1 + +.if ${PORT_OPTIONS:MDOCS} +ALL_TARGET= all doc +.endif .endif .include @@ -119,12 +130,6 @@ ICCPREFIX="${LOCALBASE}/intel_cc_80/bin" \ HOWTO="${HOWTO}" -post-patch-MEMCACHED-off: - @${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 @@ -134,12 +139,7 @@ @${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:MMEMCACHED} || ${PORT_OPTIONS:MDOCS} - ${INSTALL_MAN} ${WRKSRC}/doc/ccache.1 ${STAGEDIR}${PREFIX}/man/man1 -.endif + ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/ccache ${STAGEDIR}${PREFIX}/bin ${MKDIR} ${STAGEDIR}${PREFIX}/${CCLINKDIR}/world ${INSTALL_SCRIPT} ${WRKDIR}/world-ccache \ ${STAGEDIR}${PREFIX}/${CCLINKDIR}/world/ccache @@ -152,10 +152,11 @@ do-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/doc/MANUAL.html ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${BUILD_WRKSRC}/doc/ccache.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 + ${INSTALL_DATA} ${BUILD_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} ${BUILD_WRKSRC}/doc/NEWS.html ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKDIR}/${HOWTO} ${STAGEDIR}${DOCSDIR} .include Index: devel/ccache/distinfo =================================================================== --- devel/ccache/distinfo +++ devel/ccache/distinfo @@ -1,3 +1,7 @@ -TIMESTAMP = 1558214189 -SHA256 (ccache-3.7.1.tar.gz) = e562fcdbe766406b6fe4bf97ce5c001d2be8a17465f33bcddefc9499bbb057d8 -SIZE (ccache-3.7.1.tar.gz) = 498581 +TIMESTAMP = 1607960439 +SHA256 (ccache-4.1.tar.gz) = cdeefb827b3eef3b42b5454858123881a4a90abbd46cc72cf8c20b3bd039deb7 +SIZE (ccache-4.1.tar.gz) = 525898 +SHA256 (5504310039c09dd21919817aa93ef67647a5d758.patch) = d9ce7b797063d6ce424bc0b16547690fea49c2f56fa4eed40a51dc39b23e956a +SIZE (5504310039c09dd21919817aa93ef67647a5d758.patch) = 5983 +SHA256 (6426ae47c902f3061dbc3c4c816a4bbbe692fa92.patch) = 67f9a1380f9f0a4ad09a8d60a6ca6bb9e389d9b6c1b7029d0ca54f281acf8f6f +SIZE (6426ae47c902f3061dbc3c4c816a4bbbe692fa92.patch) = 954 Index: devel/ccache/files/extra-patch-Makefile.in =================================================================== --- devel/ccache/files/extra-patch-Makefile.in +++ /dev/null @@ -1,13 +0,0 @@ ---- Makefile.in.orig 2019-05-20 14:04:00 UTC -+++ Makefile.in -@@ -126,10 +126,6 @@ install: ccache$(EXEEXT) @disable_man@ccache.1 - clean: - rm -rf $(files_to_clean) - --src/snprintf.o: CFLAGS += @no_implicit_fallthrough_warning@ --$(zlib_objs): CPPFLAGS += -include config.h --$(zlib_objs): CFLAGS += @no_implicit_fallthrough_warning@ -- - src/zlib/libz.a: $(zlib_objs) - $(if $(quiet),@echo " AR $@") - $(Q)$(AR) cr $@ $(zlib_objs) Index: devel/ccache/files/patch-src__ccache.c =================================================================== --- /dev/null +++ devel/ccache/files/patch-src__ccache.c @@ -1,56 +0,0 @@ -- Determine whether cc(1) is clang or gcc at compile-time. -- Don't hash -fcolor-diagnostics; make will auto use it while make -j will not. - There's no reason to not use the cache in either of these cases if it is - already available. --bdrewery - - ---- src/ccache.c.orig 2018-03-25 13:24:05.000000000 -0700 -+++ src/ccache.c 2018-06-26 11:44:03.336177000 -0700 -@@ -487,6 +487,16 @@ guess_compiler(const char *path) - } else if (str_eq(name, "pump") || str_eq(name, "distcc-pump")) { - result = GUESSED_PUMP; - } -+#if defined(CC_IS_CLANG) || defined(CC_IS_GCC) -+ if (result == GUESSED_UNKNOWN && -+ (strcmp(name, "cc") == 0 || strcmp(name, "CC") == 0 || -+ strcmp(name, "c++") == 0)) -+#if defined(CC_IS_CLANG) -+ result = GUESSED_CLANG; -+#elif defined(CC_IS_GCC) -+ result = GUESSED_GCC; -+#endif -+#endif - free(name); - return result; - } -@@ -1657,6 +1667,7 @@ calculate_common_hash(struct args *args, struct mdfour - free(p); - } - -+#if 0 - // Possibly hash GCC_COLORS (for color diagnostics). - if (guessed_compiler == GUESSED_GCC) { - const char *gcc_colors = getenv("GCC_COLORS"); -@@ -1665,6 +1676,7 @@ calculate_common_hash(struct args *args, struct mdfour - hash_string(hash, gcc_colors); - } - } -+#endif - } - - // Update a hash sum with information specific to the direct and preprocessor -@@ -1697,6 +1709,13 @@ calculate_object_hash(struct args *args, struct mdfour - - // -Wl,... doesn't affect compilation (except for clang). - if (str_startswith(args->argv[i], "-Wl,") && !is_clang) { -+ continue; -+ } -+ -+ /* Colors do not affect compilation. */ -+ if (str_startswith(args->argv[i], "-fcolor-diagnostics") || -+ str_eq(args->argv[i], "-fdiagnostics-color") || -+ str_eq(args->argv[i], "-fdiagnostics-color=always")) { - continue; - } - Index: devel/ccache/pkg-plist =================================================================== --- devel/ccache/pkg-plist +++ devel/ccache/pkg-plist @@ -1,6 +1,6 @@ bin/ccache bin/ccache-update-links -%%NO_MEMCACHED%%man/man1/ccache.1.gz +%%PORTDOCS%%man/man1/ccache.1.gz %%CCLINKDIR%%/world/ccache %%TINDERBOX%%%%DATADIR%%/ccache.tar @postexec echo "Create compiler links..."