Date: Tue, 12 Apr 2016 17:47:01 +0000 (UTC) From: Adam Weinberger <adamw@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r413150 - head/databases/tokyocabinet Message-ID: <201604121747.u3CHl1pY081709@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <bsd.port.options.mk> +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 <bsd.port.mk> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604121747.u3CHl1pY081709>