From owner-svn-ports-head@freebsd.org Tue Apr 12 17:47:02 2016 Return-Path: Delivered-To: svn-ports-head@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 B2276B0D5EE; Tue, 12 Apr 2016 17:47:02 +0000 (UTC) (envelope-from adamw@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 765A31EFC; Tue, 12 Apr 2016 17:47:02 +0000 (UTC) (envelope-from adamw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3CHl1Tk081711; Tue, 12 Apr 2016 17:47:01 GMT (envelope-from adamw@FreeBSD.org) Received: (from adamw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3CHl1pY081709; Tue, 12 Apr 2016 17:47:01 GMT (envelope-from adamw@FreeBSD.org) Message-Id: <201604121747.u3CHl1pY081709@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adamw set sender to adamw@FreeBSD.org using -f From: Adam Weinberger Date: Tue, 12 Apr 2016 17:47:01 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r413150 - head/databases/tokyocabinet X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2016 17:47:02 -0000 Author: adamw Date: Tue Apr 12 17:47:01 2016 New Revision: 413150 URL: https://svnweb.freebsd.org/changeset/ports/413150 Log: Fix build, install, and package in multiple situations, and use OPTIONS helpers to do so. 1) FASTEST option build fails because -fforce-addr doesn't exist, so just remove it from CFLAGS. 2) disabling SHARED broke build The post-install, as well as the plist, never handled the case when SHARED was disabled. By using OPTIONS_SUB and post-install-SHARED-on, it now works. 3) DEBUG and LZMA were incompatible Building with debugging symbols against the external liblzma from ports caused the build to fail. Mark these as incompatible with each other. 4) PROFILE prevents .so from being built Building with profiling enabled disables shared objects from being built, so simply mark these as mutually exclusive. 5) The extra patching for the DOCS option is not needed, so just remove that whole business. It would be advisable to have better descriptions for the LZMA and LZO options, because lzma and lzo support are still enabled with those options deselected: it just uses the libraries from base instead. All of this is comitted under just-fix-it. Modified: head/databases/tokyocabinet/Makefile head/databases/tokyocabinet/pkg-plist Modified: head/databases/tokyocabinet/Makefile ============================================================================== --- head/databases/tokyocabinet/Makefile Tue Apr 12 17:41:04 2016 (r413149) +++ head/databases/tokyocabinet/Makefile Tue Apr 12 17:47:01 2016 (r413150) @@ -17,8 +17,12 @@ GNU_CONFIGURE= yes USES= gmake USE_LDCONFIG= yes +PORTDOCS= * + OPTIONS_DEFINE= DEBUG DEVEL FASTEST LZMA LZO PTHREAD PROFILE SHARED SWAB UYIELD DOCS OPTIONS_DEFAULT= PTHREAD SHARED +OPTIONS_SUB= yes + DEBUG_DESC= Debugging support DEVEL_DESC= Development build FASTEST_DESC= Fastest run @@ -30,51 +34,32 @@ SHARED_DESC= Shared build SWAB_DESC= Swapping byte-orders build UYIELD_DESC= Detecting race conditions -.include +DEBUG_CONFIGURE_ENABLE= debug +DEBUG_PREVENTS= LZMA + +DEVEL_CONFIGURE_ENABLE= devel + +FASTEST_CONFIGURE_ENABLE= fastest -.if ${PORT_OPTIONS:MDOCS} -PORTDOCS= * -.else -EXTRA_PATCHES= ${FILESDIR}/extra-patch-Makefile.in -.endif - -.if ${PORT_OPTIONS:MDEBUG} -CONFIGURE_ARGS+= --enable-debug -.endif -.if ${PORT_OPTIONS:MDEVEL} -CONFIGURE_ARGS+= --enable-devel -.endif -.if ${PORT_OPTIONS:MFASTEST} -CONFIGURE_ARGS+= --enable-fastest -.endif # to not confuse with system liblzma -.if ${PORT_OPTIONS:MLZMA} -CONFIGURE_ARGS+= --enable-exlzma -LIB_DEPENDS+= liblzma.so.1:archivers/lzmalib -.else -CONFIGURE_ARGS+= --disable-exlzma -.endif -.if ${PORT_OPTIONS:MLZO} -CONFIGURE_ARGS+= --enable-exlzo -LIB_DEPENDS+= liblzo2.so:archivers/lzo2 -.else -CONFIGURE_ARGS+= --disable-exlzo -.endif -.if ! ${PORT_OPTIONS:MPTHREAD} -CONFIGURE_ARGS+= --disable-pthread -.endif -.if ${PORT_OPTIONS:MPROFILE} -CONFIGURE_ARGS+= --enable-profile -.endif -.if ! ${PORT_OPTIONS:MSHARED} -CONFIGURE_ARGS+= --disable-shared -.endif -.if ${PORT_OPTIONS:MSWAB} -CONFIGURE_ARGS+= --enable-swab -.endif -.if ${PORT_OPTIONS:MUYIELD} -CONFIGURE_ARGS+= --enable-uyield -.endif +LZMA_CONFIGURE_ENABLE= exlzma +LZMA_LIB_DEPENDS= liblzma.so.1:archivers/lzmalib +LZMA_PREVENTS= DEBUG + +LZO_CONFIGURE_ENABLE= exlzo +LZO_LIB_DEPENDS= liblzo2.so:archivers/lzo2 + +PTHREAD_CONFIGURE_ENABLE= pthread + +PROFILE_CONFIGURE_ENABLE= profile +PROFILE_PREVENTS= SHARED + +SHARED_CONFIGURE_ENABLE= shared +SHARED_PREVENTS= PROFILE + +SWAB_CONFIGURE_ENABLE= swab + +UYIELD_CONFIGURE_ENABLE= uyield SHLIB_VER= 9.11.0 SHLIB_VER_MAJ= 9 @@ -88,8 +73,13 @@ post-patch: -e 's|@datarootdir@|@datarootdir@/doc|' \ ${WRKSRC}/Makefile.in +post-patch-FASTEST-on: + ${REINPLACE_CMD} -e 's|-fforce-addr||' ${WRKSRC}/configure + post-install: - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/* ${STAGEDIR}${PREFIX}/lib/*.so \ - ${STAGEDIR}${PREFIX}/libexec/tcawmgr.cgi + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/* ${STAGEDIR}${PREFIX}/libexec/tcawmgr.cgi + +post-install-SHARED-on: + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so .include Modified: head/databases/tokyocabinet/pkg-plist ============================================================================== --- head/databases/tokyocabinet/pkg-plist Tue Apr 12 17:41:04 2016 (r413149) +++ head/databases/tokyocabinet/pkg-plist Tue Apr 12 17:47:01 2016 (r413150) @@ -23,9 +23,9 @@ include/tchdb.h include/tcutil.h include/tctdb.h lib/libtokyocabinet.a -lib/libtokyocabinet.so -lib/libtokyocabinet.so.%%SHLIB_VER_MAJ%% -lib/libtokyocabinet.so.%%SHLIB_VER%% +%%SHARED%%lib/libtokyocabinet.so +%%SHARED%%lib/libtokyocabinet.so.%%SHLIB_VER_MAJ%% +%%SHARED%%lib/libtokyocabinet.so.%%SHLIB_VER%% libdata/pkgconfig/tokyocabinet.pc libexec/tcawmgr.cgi man/man1/tcamgr.1.gz