diff options
author | adamw <adamw@FreeBSD.org> | 2016-04-13 01:47:01 +0800 |
---|---|---|
committer | adamw <adamw@FreeBSD.org> | 2016-04-13 01:47:01 +0800 |
commit | 113696e18fe11939f635329aea972c3c0c225638 (patch) | |
tree | 68ba43ea3b8c6c951b79e35453ce6912c9780ee5 /databases | |
parent | 75e559ab84bb0e3f579719d8f94233d6e9a48cc6 (diff) | |
download | freebsd-ports-gnome-113696e18fe11939f635329aea972c3c0c225638.tar.gz freebsd-ports-gnome-113696e18fe11939f635329aea972c3c0c225638.tar.zst freebsd-ports-gnome-113696e18fe11939f635329aea972c3c0c225638.zip |
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.
Diffstat (limited to 'databases')
-rw-r--r-- | databases/tokyocabinet/Makefile | 80 | ||||
-rw-r--r-- | databases/tokyocabinet/pkg-plist | 6 |
2 files changed, 38 insertions, 48 deletions
diff --git a/databases/tokyocabinet/Makefile b/databases/tokyocabinet/Makefile index 7d871d124012..297382d39716 100644 --- a/databases/tokyocabinet/Makefile +++ b/databases/tokyocabinet/Makefile @@ -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> diff --git a/databases/tokyocabinet/pkg-plist b/databases/tokyocabinet/pkg-plist index 05b0d4eedd42..5a5870b37444 100644 --- a/databases/tokyocabinet/pkg-plist +++ b/databases/tokyocabinet/pkg-plist @@ -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 |