mirror of
https://github.com/netbirdio/FreeBSD-ports.git
synced 2026-05-22 18:42:42 -07:00
Modernize Makefile and chase new requisites.
* Modernize Makefile [1]. * The Tcl changes suggested in the PR [1] are applied but commented out because the code causes scary "warning: the value of the size argument in 'strncat' is too large, might lead to a buffer overflow [-Wstrncat-size]" in lang/tcl/tcl_*.c on FreeBSD 10.3 amd64. * Other than what is suggested in the PR, refuse to add the TCL option, and leave --disable-tcl in. * JAVA option: restrict to Java versions 1.6 and 1.7 because the port fails to compile with JAVA option enabled and openjdk8 (IllegalArgument exception). portlint cleanups: * Set PATCH_WRKSRC, and refresh patches with "make makepatch". * Use Space (not HTab) after WWW: tag in pkg-descr * Drop "The" from COMMENT. PR: 208740 [1] Submitted by: gahr@ [1]
This commit is contained in:
+41
-52
@@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= db5
|
||||
PORTVERSION= 5.3.28
|
||||
PORTREVISION= 3
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= databases java
|
||||
MASTER_SITES= http://download.oracle.com/berkeley-db/
|
||||
PKGNAMEPREFIX?=
|
||||
@@ -13,7 +13,7 @@ DISTNAME= db-${PORTVERSION}
|
||||
DIST_SUBDIR= bdb
|
||||
|
||||
MAINTAINER= mandree@FreeBSD.org
|
||||
COMMENT= The Oracle Berkeley DB, revision ${BDBVER}
|
||||
COMMENT= Oracle Berkeley DB, revision ${BDBVER}
|
||||
|
||||
BDBVER= ${PORTVERSION:R}
|
||||
BDBMAJ= ${BDBVER:R}
|
||||
@@ -28,87 +28,68 @@ GNU_CONFIGURE= yes
|
||||
USES= gmake libtool
|
||||
INSTALL_TARGET= install_include install_lib install_utilities
|
||||
WRKSRC= ${WRKDIR}/${DISTNAME}/build_unix
|
||||
PATCH_WRKSRC= ${WRKDIR}/${DISTNAME}
|
||||
USE_LDCONFIG= yes
|
||||
PLIST_SUB= BDBMAJ=${BDBMAJ} BDBVER=${BDBVER}
|
||||
MAKE_ARGS+= docdir=${DOCSDIR}
|
||||
|
||||
OPTIONS_DEFINE= CRYPTO L10N SQL JAVA DOCS
|
||||
# WARNING: DO NOT ADD TCL TO OPTIONS:
|
||||
# On FreeBSD 10.3 this causes a heap of warnings of the following kind
|
||||
# and is deemed unsafe.
|
||||
# ./lang/tcl/tcl_*.c:*:*: warning: the value of the size argument in 'strncat' is too large, might lead to a buffer overflow [-Wstrncat-size]
|
||||
OPTIONS_DEFAULT=CRYPTO
|
||||
OPTIONS_SUB= yes
|
||||
CRYPTO_DESC= Cryptography support
|
||||
L10N_DESC= Localization support (EXPERIMENTAL)
|
||||
SQL_DESC= Enable SQL API (EXPERIMENTAL)
|
||||
|
||||
PORTDOCS= *
|
||||
|
||||
DBLIBS= libdb libdb_cxx libdb_stl
|
||||
|
||||
DEBUG_CONFIGURE_ENABLE= debug umrw
|
||||
CRYPTO_CONFIGURE_WITH= cryptography=yes
|
||||
L10N_CONFIGURE_ENABLE= localization
|
||||
SQL_CONFIGURE_ENABLE= sql sql_codegen
|
||||
SQL_VARS= DBLIBS+=libdb_sql
|
||||
JAVA_USE= java
|
||||
# db5 is incompatible with openjdk8 and causes IllegalArgument
|
||||
# exceptions during build
|
||||
JAVA_VARS= DBLIBS+=libdb_java JAVA_VERSION="1.6 1.7"
|
||||
JAVA_CONFIGURE_ENABLE= java
|
||||
JAVA_CPPFLAGS= -I"${JAVA_HOME}/include"
|
||||
JAVA_CONFIGURE_ENV= JAVAC="${JAVAC}" JAR="${JAR}" JAVA="${JAVA}" JAVACFLAGS="-Xlint:unchecked"
|
||||
#TCL_CONFIGURE_ENABLE= tcl
|
||||
#TCL_USES= tcl:85+
|
||||
#TCL_CONFIGURE_WITH= tcl=${TCL_LIBDIR}
|
||||
#TCL_VARS= DBLIBS+=libdb_tcl
|
||||
DOCS_INSTALL_TARGET= install_docs
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${ARCH} == "aarch64" || ${ARCH:Marmv6*}
|
||||
# db5 uses a deprecated instruction for mutexes on ARM, fbsd bug#197227
|
||||
# also bug#205001
|
||||
# and also bug#205001
|
||||
CONFIGURE_ARGS+= --enable-posixmutexes
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
INSTALL_TARGET+=install_docs docdir=${DOCSDIR}
|
||||
PORTDOCS= *
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MSQL}
|
||||
CONFIGURE_ARGS+= --enable-sql_codegen --enable-sql
|
||||
PLIST_SUB+= SQL=""
|
||||
libdb_sql= libdb_sql
|
||||
.else
|
||||
PLIST_SUB+= SQL="@comment "
|
||||
libdb_sql=
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MJAVA}
|
||||
USE_JAVA= yes
|
||||
JAVA_VERSION= 1.6+
|
||||
CONFIGURE_ARGS+= --enable-java
|
||||
CPPFLAGS+= "-I${JAVA_HOME}/include"
|
||||
CONFIGURE_ENV= JAVAC="${JAVAC}" JAR="${JAR}" JAVA="${JAVA}"
|
||||
PLIST_SUB+= JAVA=""
|
||||
libdb_java= libdb_java
|
||||
.else
|
||||
PLIST_SUB+= JAVA="@comment "
|
||||
libdb_java=
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MCRYPTO}
|
||||
CONFIGURE_ARGS+= --with-cryptography=yes
|
||||
.else
|
||||
CONFIGURE_ARGS+= --with-cryptography=no
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:ML10N}
|
||||
CONFIGURE_ARGS+= --enable-localization
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MDEBUG}
|
||||
CONFIGURE_ARGS+= --enable-debug --enable-umrw
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} -e '/^DOCLIST/{s/csharp//;}' ${WRKSRC}/../dist/Makefile.in
|
||||
${REINPLACE_CMD} -Ee 's/[[:<:]]atomic_init[[:>:]]/db_atomic_init/g' ${WRKSRC}/../src/mp/mp* ${WRKSRC}/../src/mutex/mut_*
|
||||
|
||||
post-install:
|
||||
.for i in libdb libdb_cxx libdb_stl ${libdb_sql} ${libdb_java}
|
||||
.for i in ${DBLIBS}
|
||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/${i}-${BDBVER}.so.0
|
||||
${LN} -s -f ${PORTNAME}/${i}-${BDBVER}.so.0 ${STAGEDIR}${PREFIX}/lib
|
||||
${LN} -s -f ${PORTNAME}/${i}-${BDBMAJ}.so ${STAGEDIR}${PREFIX}/lib
|
||||
${LN} -s -f ${i}-${BDBVER}.so.0 ${STAGEDIR}${PREFIX}/lib/${i}-${BDBVER}.so
|
||||
${LN} -s -f ${i}-${BDBVER}.so.0 ${STAGEDIR}${PREFIX}/lib/${i}-${BDBMAJ}.so.0
|
||||
${LN} -s -f ${i}-${BDBVER}.a ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/${i}.a
|
||||
${CHMOD} a-w ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/${i}-${BDBVER}.so.0 \
|
||||
${STAGEDIR}${PREFIX}/lib/${PORTNAME}/${i}-${BDBVER}.a \
|
||||
${STAGEDIR}${PREFIX}/lib/${PORTNAME}/${i}-${BDBVER}.la
|
||||
.endfor
|
||||
cd ${STAGEDIR}${PREFIX}/bin/${PORTNAME}; \
|
||||
for i in *; do ${LN} -s -f ${PORTNAME}/$$i ../$$i-${BDBVER} ; \
|
||||
${LN} -s -f ${PORTNAME}/$$i ../$$i-${BDBMAJ} ; done
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
.for i in api_reference/TCL
|
||||
${RM} -r -f ${STAGEDIR}${DOCSDIR}/${i}
|
||||
.endfor
|
||||
.if empty(PORT_OPTIONS:MJAVA)
|
||||
${RM} -r -f ${STAGEDIR}${DOCSDIR}/java
|
||||
.for i in gsg gsg_db_rep gsg_txn
|
||||
@@ -118,6 +99,14 @@ post-install:
|
||||
.if empty(PORT_OPTIONS:MSQL)
|
||||
${RM} -r -f ${STAGEDIR}${DOCSDIR}/bdb-sql
|
||||
.endif
|
||||
.if !empty(PORT_OPTIONS:MTCL)
|
||||
echo "package ifneeded Db_tcl ${BDBVER} \
|
||||
[list load [file join $$dir libdb_tcl-${BDBVER}.so]] \
|
||||
" > ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/pkgIndex.tcl
|
||||
.else
|
||||
.for i in api_reference/TCL
|
||||
${RM} -r -f ${STAGEDIR}${DOCSDIR}/${i}
|
||||
.endfor
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
--- ../src/dbinc/mutex_int.h.orig 2010-04-12 13:25:22.000000000 -0700
|
||||
+++ ../src/dbinc/mutex_int.h 2014-06-28 01:16:48.321255725 -0700
|
||||
@@ -596,7 +596,7 @@
|
||||
: "=&r" (__r), "+r" (tsl)
|
||||
:
|
||||
: "cr0", "memory");
|
||||
- return (int)tsl;
|
||||
+ return (tsl != 0);
|
||||
}
|
||||
|
||||
static inline int
|
||||
@@ -1,6 +1,7 @@
|
||||
--- ../dist/configure.orig Wed Dec 5 13:14:02 2001
|
||||
+++ ../dist/configure Wed Dec 5 13:24:01 2001
|
||||
@@ -20867,8 +20867,8 @@
|
||||
--- dist/configure.orig 2013-09-09 15:35:02 UTC
|
||||
+++ dist/configure
|
||||
@@ -17712,10 +17712,10 @@ LIBTOOL="./libtool"
|
||||
INSTALLER="\$(LIBTOOL) --mode=install cp -p"
|
||||
|
||||
MAKEFILE_CC="\$(LIBTOOL) --mode=compile ${MAKEFILE_CC}"
|
||||
-MAKEFILE_SOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CCLINK} -avoid-version"
|
||||
@@ -11,3 +12,4 @@
|
||||
+MAKEFILE_XSOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK} -version-info 0:0:0"
|
||||
MAKEFILE_CXXLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK}"
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--- ../src/dbinc/atomic.h.orig 2012-02-29 19:48:38.000000000 +0100
|
||||
+++ ../src/dbinc/atomic.h 2012-05-04 22:39:32.000000000 +0200
|
||||
--- src/dbinc/atomic.h.orig 2013-09-09 15:35:08 UTC
|
||||
+++ src/dbinc/atomic.h
|
||||
@@ -70,7 +70,7 @@ typedef struct {
|
||||
* These have no memory barriers; the caller must include them when necessary.
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- src/dbinc/mutex_int.h.orig 2013-09-09 15:35:08 UTC
|
||||
+++ src/dbinc/mutex_int.h
|
||||
@@ -596,7 +596,7 @@ MUTEX_SET(int *tsl) {
|
||||
: "=&r" (__r), "+r" (tsl)
|
||||
:
|
||||
: "cr0", "memory");
|
||||
- return (int)tsl;
|
||||
+ return (tsl != 0);
|
||||
}
|
||||
|
||||
static inline int
|
||||
@@ -123,3 +123,15 @@ lib/libdb_stl-%%BDBMAJ%%.so
|
||||
lib/libdb_stl-%%BDBMAJ%%.so.0
|
||||
lib/libdb_stl-%%BDBVER%%.so
|
||||
lib/libdb_stl-%%BDBVER%%.so.0
|
||||
@comment %%TCL%%lib/db5/libdb_tcl-%%BDBVER%%.a
|
||||
@comment %%TCL%%lib/db5/libdb_tcl-%%BDBVER%%.so
|
||||
@comment %%TCL%%lib/db5/libdb_tcl-%%BDBVER%%.so.0
|
||||
@comment %%TCL%%lib/db5/libdb_tcl-%%BDBVER%%.so.0.0.0
|
||||
@comment %%TCL%%lib/db5/libdb_tcl-5.so
|
||||
@comment %%TCL%%lib/db5/libdb_tcl.a
|
||||
@comment %%TCL%%lib/db5/libdb_tcl.so
|
||||
@comment %%TCL%%lib/db5/pkgIndex.tcl
|
||||
@comment %%TCL%%lib/libdb_tcl-%%BDBVER%%.so
|
||||
@comment %%TCL%%lib/libdb_tcl-%%BDBVER%%.so.0
|
||||
@comment %%TCL%%lib/libdb_tcl-5.so
|
||||
@comment %%TCL%%lib/libdb_tcl-5.so.0
|
||||
|
||||
Reference in New Issue
Block a user