Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 May 2016 22:07:24 +0000 (UTC)
From:      Matthias Andree <mandree@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r415749 - in head/databases/db5: . files
Message-ID:  <201605232207.u4NM7OEi006761@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mandree
Date: Mon May 23 22:07:24 2016
New Revision: 415749
URL: https://svnweb.freebsd.org/changeset/ports/415749

Log:
  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]

Added:
  head/databases/db5/files/patch-src_dbinc_mutex__int.h   (contents, props changed)
Deleted:
  head/databases/db5/files/patch-dbinc_mutex_int.h
Modified:
  head/databases/db5/Makefile
  head/databases/db5/files/patch-dist_configure
  head/databases/db5/files/patch-src_dbinc_atomic.h
  head/databases/db5/pkg-plist

Modified: head/databases/db5/Makefile
==============================================================================
--- head/databases/db5/Makefile	Mon May 23 21:56:38 2016	(r415748)
+++ head/databases/db5/Makefile	Mon May 23 22:07:24 2016	(r415749)
@@ -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,62 +28,50 @@ 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)
 
-.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
-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
+DBLIBS=	libdb libdb_cxx libdb_stl
 
-.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
+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
 
-.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
+.include <bsd.port.options.mk>
 
-.if ${PORT_OPTIONS:MDEBUG}
-CONFIGURE_ARGS+=	--enable-debug --enable-umrw
+.if ${ARCH} == "aarch64" || ${ARCH:Marmv6*}
+# db5 uses a deprecated instruction for mutexes on ARM, fbsd bug#197227
+# and also bug#205001
+CONFIGURE_ARGS+=	--enable-posixmutexes
 .endif
 
 post-patch:
@@ -91,24 +79,17 @@ post-patch:
 	${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>

Modified: head/databases/db5/files/patch-dist_configure
==============================================================================
--- head/databases/db5/files/patch-dist_configure	Mon May 23 21:56:38 2016	(r415748)
+++ head/databases/db5/files/patch-dist_configure	Mon May 23 22:07:24 2016	(r415749)
@@ -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}"
  
+ 

Modified: head/databases/db5/files/patch-src_dbinc_atomic.h
==============================================================================
--- head/databases/db5/files/patch-src_dbinc_atomic.h	Mon May 23 21:56:38 2016	(r415748)
+++ head/databases/db5/files/patch-src_dbinc_atomic.h	Mon May 23 22:07:24 2016	(r415749)
@@ -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.
   */

Added: head/databases/db5/files/patch-src_dbinc_mutex__int.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/db5/files/patch-src_dbinc_mutex__int.h	Mon May 23 22:07:24 2016	(r415749)
@@ -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

Modified: head/databases/db5/pkg-plist
==============================================================================
--- head/databases/db5/pkg-plist	Mon May 23 21:56:38 2016	(r415748)
+++ head/databases/db5/pkg-plist	Mon May 23 22:07:24 2016	(r415749)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605232207.u4NM7OEi006761>