svn commit: r440469 - in head/devel/ccache: . files
Bryan Drewery
bdrewery at FreeBSD.org
Tue May 9 03:52:04 UTC 2017
Author: bdrewery
Date: Tue May 9 03:52:02 2017
New Revision: 440469
URL: https://svnweb.freebsd.org/changeset/ports/440469
Log:
Fix ccache-memcached-static build with libmemcached+sasl support.
Now that libmemcached supports/requires sasl, we must link it and its
dependencies in. Use an awful hack due to the lack of sane pkgconf
files.
Modified:
head/devel/ccache/Makefile
head/devel/ccache/files/extra-patch-memcached-configure.ac
Modified: head/devel/ccache/Makefile
==============================================================================
--- head/devel/ccache/Makefile Tue May 9 03:37:22 2017 (r440468)
+++ head/devel/ccache/Makefile Tue May 9 03:52:02 2017 (r440469)
@@ -43,6 +43,8 @@ MEMCACHED_LIB_DEPENDS= libmemcached.so:
MEMCACHED_LDFLAGS= -L${LOCALBASE}/lib
MEMCACHED_CFLAGS= -I${LOCALBASE}/include
+STATIC_CONFIGURE_ENABLE= static
+
.if defined(WITH_CCACHE_BUILD) && empty(OPTIONS_SLAVE:MMEMCACHED) && \
!defined(NO_CCACHE_DEPEND)
# Don't allow autoreconf. We want no dependencies on this to keep
@@ -59,8 +61,6 @@ NO_CCACHE_DEPEND= yes
OPTIONS_SUB= yes
-STATIC_LDFLAGS= -static
-
.include <bsd.port.pre.mk>
. if ${COMPILER_TYPE} == clang
Modified: head/devel/ccache/files/extra-patch-memcached-configure.ac
==============================================================================
--- head/devel/ccache/files/extra-patch-memcached-configure.ac Tue May 9 03:37:22 2017 (r440468)
+++ head/devel/ccache/files/extra-patch-memcached-configure.ac Tue May 9 03:52:02 2017 (r440469)
@@ -1,5 +1,5 @@
---- configure.ac.orig 2017-03-09 12:57:19.209816000 -0800
-+++ configure.ac 2017-03-09 13:00:24.478539000 -0800
+--- configure.ac.orig 2017-05-08 20:36:24.922407000 -0700
++++ configure.ac 2017-05-08 20:39:41.725107000 -0700
@@ -28,6 +28,10 @@ AC_PROG_CC_C99
if test "$ac_cv_prog_cc_c99" = no; then
AC_MSG_ERROR(cannot find a C99-compatible compiler)
@@ -11,7 +11,7 @@
AC_PROG_CPP
AC_PROG_INSTALL
-@@ -97,6 +101,9 @@ AC_ARG_ENABLE(memcached,
+@@ -97,19 +101,36 @@ AC_ARG_ENABLE(memcached,
[AS_HELP_STRING([--enable-memcached],
[enable memcached as a cache backend])])
@@ -20,9 +20,34 @@
+AC_LANG(C++)
dnl enable-memcached: Check if -lmemcached is needed.
if test x${enable_memcached} != x; then
- if test x${enable_static} != x; then
-@@ -110,6 +117,7 @@ if test x${enable_memcached} != x; then
- ])
+- if test x${enable_static} != x; then
++ if false && test x${enable_static} != x; then
+ AC_CHECK_LIB(stdc++, __gxx_personality_v0,[])
+ fi
+ AC_CHECK_LIB(pthread, pthread_once)
+- AC_CHECK_LIB(memcached, memcached,[],[
+- echo ' WARNING: recent version libmemcached not found'
+- echo ' please install libmemcached > 1.0 with development files'
+- exit 1
+- ])
++ if test x${enable_static} != x; then
++ AC_CHECK_LIB(sasl2, sasl_version, ac_cv_have_libsasl2=yes,
++ ac_cv_have_libsasl2=no, -lcrypto -lopie -lmd)
++ fi
++ if test x$ac_cv_have_libsasl2 = xyes; then
++ AC_CHECK_LIB(memcached, memcached,[],[
++ echo ' WARNING: recent version libmemcached not found'
++ echo ' please install libmemcached > 1.0 with development files'
++ exit 1
++ ], -lsasl2 -lcrypto -lopie -lmd)
++ extra_ldflags="${extra_ldflags} -lcrypto -lopie -lmd"
++ else
++ AC_CHECK_LIB(memcached, memcached,[],[
++ echo ' WARNING: recent version libmemcached not found'
++ echo ' please install libmemcached > 1.0 with development files'
++ exit 1
++ ])
++ fi
ccache_memcached='CCACHE_MEMCACHED=1 '
fi
+AC_LANG(C)
More information about the svn-ports-head
mailing list