Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 May 2016 20:18: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: r415741 - in head: . Mk/Uses databases/db6 databases/db6/files
Message-ID:  <201605232018.u4NKIOeF069786@repo.freebsd.org>

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

Log:
  Update to 6.2.23. Add TCL option. Cleanup.
  
  Changes submitted by gahr@:
  Enable a new TCL option, adding a pkgIndex.tcl file.
  Modernize Makefile. [1]
  
  Changes by mandree@:
  Fix installation of TCL API docs if TCL option is enabled.
  Update to new upstream release 6.2.23.
  Install the upgrade61.sh script if SQL option is enabled, with
  additional fixes distributed as a patch to avoid licensing concerns.
  Add an UPDATING entry.
  Add changes in Mk/Uses/bdb.mk.
  
  db5 parts of PR 208740 to be committed in a separate transaction later.
  
  PR:		208740
  Submitted by:	gahr@

Added:
  head/databases/db6/files/patch-lang_sql_upgrade61.sh   (contents, props changed)
Modified:
  head/Mk/Uses/bdb.mk
  head/UPDATING
  head/databases/db6/Makefile
  head/databases/db6/distinfo
  head/databases/db6/pkg-plist

Modified: head/Mk/Uses/bdb.mk
==============================================================================
--- head/Mk/Uses/bdb.mk	Mon May 23 19:45:48 2016	(r415740)
+++ head/Mk/Uses/bdb.mk	Mon May 23 20:18:24 2016	(r415741)
@@ -77,7 +77,7 @@ _DB_DEFAULTS+=	6
 # Dependency lines for different db versions
 db48_DEPENDS=	libdb-4.8.so:databases/db48
 db5_DEPENDS=	libdb-5.3.so:databases/db5
-db6_DEPENDS=	libdb-6.1.so:databases/db6
+db6_DEPENDS=	libdb-6.2.so:databases/db6
 # Detect db versions by finding some files
 db48_FIND=	${LOCALBASE}/include/db48/db.h
 db5_FIND=	${LOCALBASE}/include/db5/db.h
@@ -196,8 +196,8 @@ BDB_LIB_NAME=		db-5.3
 BDB_LIB_CXX_NAME=	db_cxx-5.3
 BDB_LIB_DIR=		${LOCALBASE}/lib/db5
 . elif ${_BDB_VER} == 6
-BDB_LIB_NAME=		db-6.1
-BDB_LIB_CXX_NAME=	db_cxx-6.1
+BDB_LIB_NAME=		db-6.2
+BDB_LIB_CXX_NAME=	db_cxx-6.2
 BDB_LIB_DIR=		${LOCALBASE}/lib/db6
 . endif
 BDB_LIB_NAME?=		db${_BDB_VER}

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Mon May 23 19:45:48 2016	(r415740)
+++ head/UPDATING	Mon May 23 20:18:24 2016	(r415741)
@@ -5,6 +5,36 @@ they are unavoidable.
 You should get into the habit of checking this file for changes each time
 you update your ports collection, before attempting any port upgrades.
 
+20160523:
+  AFFECTS: Users of databases/db6
+  AUTHOR: mandree@FreeBSD.org
+
+  The databases/db6 port has been updated to release 6.2.23.
+
+  This requires manual action in two places:
+    1. dependent applications need to be recompiled,
+    2. SQL databases, if any, need to be reindexed.
+
+  To obtain a list of ports needing a recompilation,
+  the following command should provide it:
+
+  # pkg info -r db6
+
+  Then rebuild db6 and the dependent ports.  For pkg users, this should
+  be transparent.
+
+  Portmaster users:
+  #  portmaster -r databases/db6
+  Portupgrade users:
+  #  portupgrade -fr databases/db6
+
+  In order to reindex SQL databases, a db6-upgrade61.sh script is
+  provided in ${PREFIX}/bin, if and only if the port's SQL option is
+  enabled.  For detailed reindexing instructions, see
+  http://docs.oracle.com/cd/E17076_05/html/installation/sqlite_ver61.html
+  and note that the FreeBSD port installs the upgrade61.sh script with a
+  db6- prefix that you need to add.
+
 20160511:
   AFFECTS: Users of audio/clementine-player
   AUTHOR: sbruno@FreeBSD.org

Modified: head/databases/db6/Makefile
==============================================================================
--- head/databases/db6/Makefile	Mon May 23 19:45:48 2016	(r415740)
+++ head/databases/db6/Makefile	Mon May 23 20:18:24 2016	(r415741)
@@ -2,10 +2,11 @@
 # $FreeBSD$
 
 PORTNAME=	db6
-PORTVERSION=	6.1.26
+PORTVERSION=	6.2.23
 CATEGORIES=	databases java
 MASTER_SITES=	http://download.oracle.com/berkeley-db/
 PKGNAMEPREFIX?=
+#
 # the distfiles aren't named db6-* but db-*:
 DISTNAME=	db-${PORTVERSION}
 DIST_SUBDIR=	bdb
@@ -19,7 +20,6 @@ BDBVER=		${PORTVERSION:R}
 BDBMAJ=		${BDBVER:R}
 CONFIGURE_ARGS=	--enable-cxx --enable-stl \
 		--enable-compat185 --enable-dump185 \
-		--disable-tcl \
 		--includedir=${PREFIX}/include/${PORTNAME} \
 		--libdir=${PREFIX}/lib/${PORTNAME} \
 		--bindir=${PREFIX}/bin/${PORTNAME}
@@ -32,12 +32,33 @@ USE_LDCONFIG=	yes
 PLIST_SUB=	BDBMAJ=${BDBMAJ} BDBVER=${BDBVER}
 MAKE_ARGS+=	docdir=${DOCSDIR}
 
-OPTIONS_DEFINE=	CRYPTO L10N SQL JAVA DOCS
+OPTIONS_DEFINE=	CRYPTO L10N SQL JAVA TCL DOCS
 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
+JAVA_VARS=		DBLIBS+=libdb_java JAVA_VERSION=1.6+
+JAVA_CONFIGURE_ENABLE=	java
+JAVA_CPPFLAGS=		-I"${JAVA_HOME}/include"
+JAVA_CONFIGURE_ENV=	JAVAC="${JAVAC}" JAR="${JAR}" JAVA="${JAVA}"
+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*}
@@ -46,65 +67,21 @@ SQL_DESC=	Enable SQL API (EXPERIMENTAL)
 CONFIGURE_ARGS+=	--enable-posixmutexes
 .endif
 
-.if ${PORT_OPTIONS:MDOCS}
-INSTALL_TARGET+=install_docs
-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_* \
 	    ${WRKSRC}/../src/dbinc/atomic.h
+	${REINPLACE_CMD} -e 's/%%BDBVER%%/${BDBVER}/' ${WRKSRC}/../lang/sql/upgrade61.sh
 
 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
 	${LN} -s -f ${PORTNAME}/${i}-${BDBVER}.so ${STAGEDIR}${PREFIX}/lib
 	${LN} -s -f ${i}-${BDBVER}.a ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/${i}.a
 .endfor
 	cd ${STAGEDIR}${PREFIX}/bin/${PORTNAME}; \
 	for i in *; do ${LN} -s -f ${PORTNAME}/$$i ../$$i-${BDBVER} ; 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
@@ -114,6 +91,18 @@ 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
 
+post-install-SQL-on:
+	${INSTALL_SCRIPT} ${WRKSRC}/../lang/sql/upgrade61.sh \
+	    ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-upgrade61.sh
+
 .include <bsd.port.mk>

Modified: head/databases/db6/distinfo
==============================================================================
--- head/databases/db6/distinfo	Mon May 23 19:45:48 2016	(r415740)
+++ head/databases/db6/distinfo	Mon May 23 20:18:24 2016	(r415741)
@@ -1,2 +1,3 @@
-SHA256 (bdb/db-6.1.26.tar.gz) = dd1417af5443f326ee3998e40986c3c60e2a7cfb5bfa25177ef7cadb2afb13a6
-SIZE (bdb/db-6.1.26.tar.gz) = 37495772
+TIMESTAMP = 1464030344
+SHA256 (bdb/db-6.2.23.tar.gz) = 47612c8991aa9ac2f6be721267c8d3cdccf5ac83105df8e50809daea24e95dc7
+SIZE (bdb/db-6.2.23.tar.gz) = 44305964

Added: head/databases/db6/files/patch-lang_sql_upgrade61.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/db6/files/patch-lang_sql_upgrade61.sh	Mon May 23 20:18:24 2016	(r415741)
@@ -0,0 +1,27 @@
+--- ../lang/sql/upgrade61.sh	2016-03-28 21:45:53.000000000 +0200
++++ ../../db6-upgrade61.sh	2016-05-23 21:55:49.741020000 +0200
+@@ -1,12 +1,19 @@
+ #!/bin/sh
+ # This script upgrades SQL databases from BDB 5.0 to early 6.1
+ # to late 6.1 and up by reindexing them.
++# 
++# Originally provided by Oracle as part of the Oracle BerkeleyDB
++# 12.1.6.* tarballs.
+ #
++# Bugfixed for proper quoting and error checking
++# by Matthias Andree <mandree@FreeBSD.org>
+ 
+-for var in $@
++rc=0
++for var in "$@"
+ do
+-    echo Recovering database $var
+-    db_recover -f -h ${var}-journal
+-    echo Reindexing database $var
+-    echo .quit | dbsql -cmd REINDEX  $var
++    echo "Recovering database $var"
++    db_recover-%%BDBVER%% -f -h "${var}-journal" || { rc=1 ; continue ; }
++    echo "Reindexing database $var"
++    echo .quit | dbsql-%%BDBVER%% -cmd REINDEX "$var" || rc=1
+ done
++exit $rc

Modified: head/databases/db6/pkg-plist
==============================================================================
--- head/databases/db6/pkg-plist	Mon May 23 19:45:48 2016	(r415740)
+++ head/databases/db6/pkg-plist	Mon May 23 20:18:24 2016	(r415741)
@@ -14,6 +14,7 @@ bin/db%%BDBMAJ%%/db_stat
 bin/db%%BDBMAJ%%/db_tuner
 bin/db%%BDBMAJ%%/db_upgrade
 bin/db%%BDBMAJ%%/db_verify
+%%SQL%%bin/db%%BDBMAJ%%-upgrade61.sh
 %%SQL%%bin/db%%BDBMAJ%%/dbsql
 bin/db_archive-%%BDBVER%%
 bin/db_checkpoint-%%BDBVER%%
@@ -81,3 +82,10 @@ lib/libdb_cxx-%%BDBVER%%.so
 %%JAVA%%lib/libdb_java-%%BDBVER%%.so
 %%SQL%%lib/libdb_sql-%%BDBVER%%.so
 lib/libdb_stl-%%BDBVER%%.so
+%%TCL%%lib/db6/libdb_tcl-%%BDBVER%%.a
+%%TCL%%lib/db6/libdb_tcl-%%BDBVER%%.so
+%%TCL%%lib/db6/libdb_tcl-6.so
+%%TCL%%lib/db6/libdb_tcl.a
+%%TCL%%lib/db6/libdb_tcl.so
+%%TCL%%lib/db6/pkgIndex.tcl
+%%TCL%%lib/libdb_tcl-%%BDBVER%%.so



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