diff options
author | mandree <mandree@FreeBSD.org> | 2016-05-23 20:18:24 +0000 |
---|---|---|
committer | mandree <mandree@FreeBSD.org> | 2016-05-23 20:18:24 +0000 |
commit | 581a64ac608f8a28ef17c4b0cb597cc18ba8deb6 (patch) | |
tree | 67ef596f1dd4b613f0c2354f161e8cbc7dcd455c /databases | |
parent | cfd8005af821d7948fcd37d57ef16885cdb14a05 (diff) | |
download | FreeBSD-ports-581a64ac608f8a28ef17c4b0cb597cc18ba8deb6.zip FreeBSD-ports-581a64ac608f8a28ef17c4b0cb597cc18ba8deb6.tar.gz |
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@
Diffstat (limited to 'databases')
-rw-r--r-- | databases/db6/Makefile | 87 | ||||
-rw-r--r-- | databases/db6/distinfo | 5 | ||||
-rw-r--r-- | databases/db6/files/patch-lang_sql_upgrade61.sh | 27 | ||||
-rw-r--r-- | databases/db6/pkg-plist | 8 |
4 files changed, 76 insertions, 51 deletions
diff --git a/databases/db6/Makefile b/databases/db6/Makefile index b5edd15..4279e5b 100644 --- a/databases/db6/Makefile +++ b/databases/db6/Makefile @@ -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> diff --git a/databases/db6/distinfo b/databases/db6/distinfo index bca1bab..f1fd4f2 100644 --- a/databases/db6/distinfo +++ b/databases/db6/distinfo @@ -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 diff --git a/databases/db6/files/patch-lang_sql_upgrade61.sh b/databases/db6/files/patch-lang_sql_upgrade61.sh new file mode 100644 index 0000000..0867a8b --- /dev/null +++ b/databases/db6/files/patch-lang_sql_upgrade61.sh @@ -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 diff --git a/databases/db6/pkg-plist b/databases/db6/pkg-plist index a3f88cd..7d573fa 100644 --- a/databases/db6/pkg-plist +++ b/databases/db6/pkg-plist @@ -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 |