From owner-svn-ports-all@freebsd.org Thu Mar 9 21:05:25 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F390D05C9B; Thu, 9 Mar 2017 21:05:25 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3184610EB; Thu, 9 Mar 2017 21:05:25 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v29L5OR8055622; Thu, 9 Mar 2017 21:05:24 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v29L5Onh055619; Thu, 9 Mar 2017 21:05:24 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201703092105.v29L5Onh055619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 9 Mar 2017 21:05:24 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r435800 - in head/devel/ccache: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Mar 2017 21:05:25 -0000 Author: bdrewery Date: Thu Mar 9 21:05:23 2017 New Revision: 435800 URL: https://svnweb.freebsd.org/changeset/ports/435800 Log: ccache-memcached: Fix STATIC build. Libmemcached is a C++ library, thus we need to use a C++ linker to link to it. This is only really a problem when building a static binary since we need to bring in various libc++ and libcxxrt symbols. The upstream ccache+memcached patch had support for this with --enable-static but only via a hack for GCC to force addding -lstdc++. The method in these patches works for either compiler by using CXX to check for -lmemcached, and later using CXX to link ccache. Added: head/devel/ccache/files/extra-patch-memcached-Makefile.in (contents, props changed) head/devel/ccache/files/extra-patch-memcached-configure.ac (contents, props changed) Modified: head/devel/ccache/Makefile Modified: head/devel/ccache/Makefile ============================================================================== --- head/devel/ccache/Makefile Thu Mar 9 20:29:24 2017 (r435799) +++ head/devel/ccache/Makefile Thu Mar 9 21:05:23 2017 (r435800) @@ -3,7 +3,7 @@ PORTNAME= ccache PORTVERSION= 3.3.4 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel MASTER_SITES= http://www.samba.org/ftp/ccache/ \ LOCAL/bdrewery @@ -34,7 +34,9 @@ MEMCACHED_DESC= Build in experimental Me USES= compiler MEMCACHED_EXTRA_PATCHES= ${FILESDIR}/extra-patch-memcached:-p1 \ - ${FILESDIR}/extra-patch-memcached-ccache.c + ${FILESDIR}/extra-patch-memcached-ccache.c \ + ${FILESDIR}/extra-patch-memcached-configure.ac \ + ${FILESDIR}/extra-patch-memcached-Makefile.in MEMCACHED_CONFIGURE_ENABLE= memcached MEMCACHED_USES= autoreconf pkgconfig MEMCACHED_LIB_DEPENDS= libmemcached.so:databases/libmemcached Added: head/devel/ccache/files/extra-patch-memcached-Makefile.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/ccache/files/extra-patch-memcached-Makefile.in Thu Mar 9 21:05:23 2017 (r435800) @@ -0,0 +1,11 @@ +--- Makefile.in.orig 2017-03-09 13:00:34.016595000 -0800 ++++ Makefile.in 2017-03-09 13:00:39.656086000 -0800 +@@ -74,7 +74,7 @@ files_to_distclean = Makefile config.h c + all: ccache$(EXEEXT) + + ccache$(EXEEXT): $(ccache_objs) $(extra_libs) +- $(CC) $(all_cflags) -o $@ $(ccache_objs) $(LDFLAGS) $(extra_libs) $(LIBS) ++ $(CXX) $(all_cflags) -o $@ $(ccache_objs) $(LDFLAGS) $(extra_libs) $(LIBS) + + .PHONY: install + install: all $(srcdir)/ccache.1 Added: head/devel/ccache/files/extra-patch-memcached-configure.ac ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/ccache/files/extra-patch-memcached-configure.ac Thu Mar 9 21:05:23 2017 (r435800) @@ -0,0 +1,31 @@ +--- configure.ac.orig 2017-03-09 12:57:19.209816000 -0800 ++++ configure.ac 2017-03-09 13:00:24.478539000 -0800 +@@ -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) + fi ++AC_PROG_CXX ++if test "$ac_cv_prog_cxx" = no; then ++ AC_MSG_ERROR(cannot find a C++-compatible compiler) ++fi + + AC_PROG_CPP + AC_PROG_INSTALL +@@ -97,6 +101,9 @@ AC_ARG_ENABLE(memcached, + [AS_HELP_STRING([--enable-memcached], + [enable memcached as a cache backend])]) + ++# Need to use C++ compiler for linking -lmemcached as static, rather than ++# hacking in GCC's -lstdc++, since we may be using Clang. ++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 + ]) + ccache_memcached='CCACHE_MEMCACHED=1 ' + fi ++AC_LANG(C) + + dnl Check for zlib + AC_ARG_WITH(bundled-zlib,