diff --git a/databases/kyototycoon/Makefile b/databases/kyototycoon/Makefile index 924e439b2052..b7b505e66191 100644 --- a/databases/kyototycoon/Makefile +++ b/databases/kyototycoon/Makefile @@ -1,68 +1,64 @@ PORTNAME= kyototycoon PORTVERSION= 0.9.56 PORTREVISION= 6 CATEGORIES= databases MASTER_SITES= https://dbmx.net/kyototycoon/pkg/ \ LOCAL/sunpoet MAINTAINER= sunpoet@FreeBSD.org COMMENT= Handy cache/storage server WWW= https://dbmx.net/kyototycoon/ LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libkyotocabinet.so:databases/kyotocabinet USES= gmake pkgconfig CONFIGURE_ARGS= --enable-uyield CPPFLAGS+= -fPIC GNU_CONFIGURE= yes INSTALL_TARGET= install-strip MAKE_ARGS= PCDIR=${PREFIX}/libdata/pkgconfig -REINPLACE_ARGS= -i '' TEST_TARGET= check USE_CXXSTD= gnu++98 USE_LDCONFIG= yes USE_RC_SUBR= kyototycoon USERS= ${KYOTOTYCOON_USER} GROUPS= ${KYOTOTYCOON_GROUP} PLIST_SUB= KYOTOTYCOON_USER=${KYOTOTYCOON_USER} \ KYOTOTYCOON_GROUP=${KYOTOTYCOON_GROUP} \ KYOTOTYCOON_DBDIR=${KYOTOTYCOON_DBDIR} \ KYOTOTYCOON_LOGDIR=${KYOTOTYCOON_LOGDIR} \ KYOTOTYCOON_PIDFILE=${KYOTOTYCOON_PIDFILE} PORTDOCS= * SUB_FILES= kyototycoon SUB_LIST= KYOTOTYCOON_USER=${KYOTOTYCOON_USER} \ KYOTOTYCOON_GROUP=${KYOTOTYCOON_GROUP} \ KYOTOTYCOON_DBDIR=${KYOTOTYCOON_DBDIR} \ KYOTOTYCOON_LOGDIR=${KYOTOTYCOON_LOGDIR} \ KYOTOTYCOON_PIDFILE=${KYOTOTYCOON_PIDFILE} KYOTOTYCOON_USER?= kyototycoon KYOTOTYCOON_GROUP?= kyototycoon KYOTOTYCOON_DBDIR?= /var/db/kyototycoon KYOTOTYCOON_LOGDIR?= /var/log/kyototycoon KYOTOTYCOON_PIDFILE?= /var/run/kyototycoon.pid OPTIONS_DEFINE= DOCS LZO LZO_CONFIGURE_OFF= ac_cv_lib_lzo2_main=no LZO_CONFIGURE_ON= ac_cv_lib_lzo2_main=yes LZO_LIB_DEPENDS= liblzo2.so:archivers/lzo2 -post-patch: - @${REINPLACE_CMD} -e 's|-lstdc++ ||g' ${WRKSRC}/configure ${WRKSRC}/doc/spex.html ${WRKSRC}/example/Makefile - post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libkyototycoon.so ${STAGEDIR}${PREFIX}/libexec/*.so post-install-DOCS-on: ${FIND} ${STAGEDIR}${DOCSDIR}/ -type d -exec ${CHMOD} ${BINMODE} {} + ${FIND} ${STAGEDIR}${DOCSDIR}/ -type f -exec ${CHMOD} ${DOCMODE} {} + .include diff --git a/databases/kyototycoon/files/patch-configure b/databases/kyototycoon/files/patch-configure index 2ac536c3a2ea..ad1c1a719508 100644 --- a/databases/kyototycoon/files/patch-configure +++ b/databases/kyototycoon/files/patch-configure @@ -1,16 +1,34 @@ ---- configure.orig 2020-03-19 09:12:04 UTC +--- configure.orig 2012-05-02 13:04:11 UTC +++ configure -@@ -3389,10 +3389,10 @@ fi +@@ -3389,10 +3389,10 @@ then if test "$enable_opt" != "no" then printf 'checking for CPU optimization availability... ' - if printf 'main() {}' | $CC -xc -march=native -o config.tmp - >config.tmp 2>&1 + if printf 'main() {}' | $CC -xc -O3 -o config.tmp - >config.tmp 2>&1 then - MYCFLAGS="-march=native $MYCFLAGS" - MYCXXFLAGS="-march=native $MYCXXFLAGS" + MYCFLAGS="-O3 $MYCFLAGS" + MYCXXFLAGS="-O3 $MYCXXFLAGS" printf 'yes\n' else printf 'no\n' +@@ -3729,7 +3729,7 @@ else + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lstdc++ $LIBS" ++LIBS="$LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -3758,7 +3758,7 @@ _ACEOF + #define HAVE_LIBSTDC__ 1 + _ACEOF + +- LIBS="-lstdc++ $LIBS" ++ LIBS="$LIBS" + + fi + diff --git a/databases/kyototycoon/files/patch-doc-spex.html b/databases/kyototycoon/files/patch-doc-spex.html new file mode 100644 index 000000000000..3332e501815c --- /dev/null +++ b/databases/kyototycoon/files/patch-doc-spex.html @@ -0,0 +1,11 @@ +--- doc/spex.html.orig 2012-05-24 17:44:23 UTC ++++ doc/spex.html +@@ -160,7 +160,7 @@ +

Kyoto Tycoon provides API of the C++ language and it is available by programs conforming to the C++03 standard. As the header files of Kyoto Tycoon are provided as `ktutil.h', `ktremotedb.h', and so on, applications should include one or more of them accordingly to use the API. As the library is provided as `libkyototycoon.a' and `libkyototycoon.so' and they depends on underlying system libraries, linker options corresponding to them are required by the build command. The typical build command is the following.

+ +
$ g++ -I/usr/local/include example.cc -o example \
+-  -L/usr/local/lib -lkyototycoon -lkyotocabinet -lz -lstdc++ \
++  -L/usr/local/lib -lkyototycoon -lkyotocabinet -lz \
+   -lresolv -lnsl -ldl -lrt -lpthread -lm -lc
+ 
+ diff --git a/databases/kyototycoon/files/patch-example-Makefile b/databases/kyototycoon/files/patch-example-Makefile new file mode 100644 index 000000000000..ae9276e598c2 --- /dev/null +++ b/databases/kyototycoon/files/patch-example-Makefile @@ -0,0 +1,11 @@ +--- example/Makefile.orig 2010-10-21 15:38:49 UTC ++++ example/Makefile +@@ -19,7 +19,7 @@ LDFLAGS = + CFLAGS = -I. -I.. -Wall -ansi -pedantic -fsigned-char -O2 + CXXFLAGS = -I. -I.. -Wall -fsigned-char -O2 + LDFLAGS = +-LIBS = -L. -L.. -lkyototycoon -lkyotocabinet -lstdc++ -lz -lrt -lpthread -lm -lc ++LIBS = -L. -L.. -lkyototycoon -lkyotocabinet -lz -lrt -lpthread -lm -lc + LDENV = LD_RUN_PATH=/lib:/usr/lib:$(HOME)/lib:/usr/local/lib:.:.. + RUNENV = LD_LIBRARY_PATH=/lib:/usr/lib:$(HOME)/lib:/usr/local/lib:.:.. +