Commit 80fbb61f authored by bdrewery's avatar bdrewery
Browse files

Add a patch for memcached to ccache along with a slave devel/ccache-memcached port.

This patch is not safe for WITH_CCACHE_BUILD support yet as that causes all
ports to depend on devel/ccache.  Enabling that patch would then cause the
new devel/libmemcached dependency to require devel/ccache which is a cyclic
dependency.  The autoconf dependency also causes issues.

Add a devel/ccache-memcached slave port that would allow a user to use
the ccache+memcached package manually with ports without WITH_CCACHE_BUILD.

This patch comes from https://github.com/ccache/ccache/pull/58 and has been
an ongoing effort over a few years to be merged into the mainline of ccache.
Documenation for it can be found in the MANUAL file at:

  /usr/local/share/doc/ccache/MANUAL.txt

Sponsored by:	Dell EMC Isilon
parent c1f95d13
...@@ -234,6 +234,7 @@ ...@@ -234,6 +234,7 @@
SUBDIR += cbrowser SUBDIR += cbrowser
SUBDIR += cc65 SUBDIR += cc65
SUBDIR += ccache SUBDIR += ccache
SUBDIR += ccache-memcached
SUBDIR += cccc SUBDIR += cccc
SUBDIR += ccdoc SUBDIR += ccdoc
SUBDIR += ccons SUBDIR += ccons
......
# $FreeBSD$
PKGNAMESUFFIX= -memcached
MASTERDIR= ${.CURDIR}/../ccache
OPTIONS_SLAVE= MEMCACHED
CONFLICTS_INSTALL= ccache-[0-9]*
.include "${MASTERDIR}/Makefile"
...@@ -13,26 +13,43 @@ COMMENT= Tool to minimize the compile time of C/C++ programs ...@@ -13,26 +13,43 @@ COMMENT= Tool to minimize the compile time of C/C++ programs
LICENSE= GPLv3 LICENSE= GPLv3
CONFLICTS_INSTALL= ccache-memcached-[0-9]*
GNU_CONFIGURE= yes GNU_CONFIGURE= yes
HOWTO= ccache-howto-freebsd.txt HOWTO= ccache-howto-freebsd.txt
CCLINKDIR= libexec/ccache CCLINKDIR= libexec/ccache
SUB_FILES= ${HOWTO} world-ccache pkg-message ccache-update-links.sh SUB_FILES= ${HOWTO} world-ccache pkg-message ccache-update-links.sh
PORTDOCS= ccache-howto-freebsd.txt MANUAL.html PORTDOCS= ccache-howto-freebsd.txt MANUAL.html MANUAL.txt
OPTIONS_DEFINE= CLANGLINK LLVMLINK STATIC DOCS TINDERBOX OPTIONS_DEFINE= CLANGLINK LLVMLINK STATIC DOCS TINDERBOX MEMCACHED
OPTIONS_DEFAULT=CLANGLINK LLVMLINK OPTIONS_DEFAULT=CLANGLINK LLVMLINK
CLANGLINK_DESC= Create clang compiler links if clang is installed CLANGLINK_DESC= Create clang compiler links if clang is installed
LLVMLINK_DESC= Create llvm compiler links if llvm is installed LLVMLINK_DESC= Create llvm compiler links if llvm is installed
TINDERBOX_DESC= Create tarball for tinderbox usage TINDERBOX_DESC= Create tarball for tinderbox usage
MEMCACHED_DESC= Build in experimental Memcached support
USES= compiler USES= compiler
MEMCACHED_EXTRA_PATCHES= ${FILESDIR}/extra-patch-memcached:-p1
MEMCACHED_CONFIGURE_ENABLE= memcached
MEMCACHED_USES= autoreconf pkgconfig
MEMCACHED_LIB_DEPENDS= libmemcached.so:databases/libmemcached
MEMCACHED_LDFLAGS= -L${LOCALBASE}/lib
MEMCACHED_CFLAGS= -I${LOCALBASE}/include
.if defined(WITH_CCACHE_BUILD) && empty(OPTIONS_SLAVE:MMEMCACHED)
# Don't allow autoreconf. We want no dependencies on this to keep # Don't allow autoreconf. We want no dependencies on this to keep
# WITH_CCACHE_BUILD working. # WITH_CCACHE_BUILD working.
USES:= ${USES:Nautoreconf} USES:= ${USES:Nautoreconf}
MEMCACHED_IGNORE= MEMCACHED cannot be combined with WITH_CCACHE_BUILD. Use devel/ccache-memcached
# XXX: This needs more testing with Poudriere before enabling. Also bsd.options.mk support.
#MEMCACHED_DEPENDS_ARGS+= NO_CCACHE=1
.endif
OPTIONS_SUB= yes OPTIONS_SUB= yes
STATIC_LDFLAGS= -static STATIC_LDFLAGS= -static
...@@ -93,6 +110,7 @@ do-install-TINDERBOX-on: ...@@ -93,6 +110,7 @@ do-install-TINDERBOX-on:
do-install-DOCS-on: do-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR} ${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/MANUAL.html ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/MANUAL.html ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/MANUAL.txt ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKDIR}/${HOWTO} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKDIR}/${HOWTO} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.post.mk> .include <bsd.port.post.mk>
This diff is collapsed.
--- m4/feature_macros.m4.orig 2017-02-13 15:05:54.405968000 -0800
+++ m4/feature_macros.m4 2017-02-13 15:16:32.931104000 -0800
@@ -120,7 +120,7 @@
Define to the level of X/Open that your system supports)
;;
*)
- AC_DEFINE(_XOPEN_SOURCE, 600,
+ AC_DEFINE(_XOPEN_SOURCE, 700,
Define to the level of X/Open that your system supports)
;;
esac
@@ -142,6 +142,6 @@
;;
esac
- AC_DEFINE(_POSIX_C_SOURCE, 200112L, Define to activate features from IEEE Stds 1003.1-2001)
+ AC_DEFINE(_POSIX_C_SOURCE, 200809L, Define to activate features from IEEE Stds 1003.1-2001)
fi
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment