Index: head/databases/db5/Makefile =================================================================== --- head/databases/db5/Makefile (revision 415811) +++ head/databases/db5/Makefile (revision 415812) @@ -1,112 +1,113 @@ # Created by: Matthias Andree # $FreeBSD$ PORTNAME= db5 PORTVERSION= 5.3.28 PORTREVISION= 4 CATEGORIES= databases java MASTER_SITES= http://download.oracle.com/berkeley-db/ PKGNAMEPREFIX?= # # the distfiles aren't named db5-* but db-*: DISTNAME= db-${PORTVERSION} DIST_SUBDIR= bdb MAINTAINER= mandree@FreeBSD.org COMMENT= Oracle Berkeley DB, revision ${BDBVER} 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} CONFIGURE_SCRIPT= ../dist/configure 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} +CFLAGS+= -Wall -Wextra -OPTIONS_DEFINE= CRYPTO L10N SQL JAVA DOCS +OPTIONS_DEFINE= CRYPTO L10N SQL JAVA DOCS TCL # 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 +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 .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: ${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 ${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 .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 empty(PORT_OPTIONS:MJAVA) ${RM} -r -f ${STAGEDIR}${DOCSDIR}/java .for i in gsg gsg_db_rep gsg_txn ${RM} -r -f ${STAGEDIR}${DOCSDIR}/${i}/JAVA .endfor .endif .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 Index: head/databases/db5/files/patch-lang_tcl_tcl__db.c =================================================================== --- head/databases/db5/files/patch-lang_tcl_tcl__db.c (nonexistent) +++ head/databases/db5/files/patch-lang_tcl_tcl__db.c (revision 415812) @@ -0,0 +1,30 @@ +--- lang/tcl/tcl_db.c.orig 2013-09-09 15:35:07 UTC ++++ lang/tcl/tcl_db.c +@@ -3708,9 +3708,10 @@ tcl_DbGetFlags(interp, objc, objv, dbp) + for (i = 0; db_flags[i].flag != 0; i++) + if (LF_ISSET(db_flags[i].flag)) { + if (strlen(buf) > 0) +- (void)strncat(buf, " ", sizeof(buf)); +- (void)strncat( +- buf, db_flags[i].arg, sizeof(buf)); ++ (void)strncat(buf, " ", ++ sizeof(buf) - (strlen(buf) + 1)); ++ (void)strncat(buf, db_flags[i].arg, ++ sizeof(buf) - (strlen(buf) + 1)); + } + + res = NewStringObj(buf, strlen(buf)); +@@ -3764,9 +3765,10 @@ tcl_DbGetOpenFlags(interp, objc, objv, d + for (i = 0; open_flags[i].flag != 0; i++) + if (LF_ISSET(open_flags[i].flag)) { + if (strlen(buf) > 0) +- (void)strncat(buf, " ", sizeof(buf)); +- (void)strncat( +- buf, open_flags[i].arg, sizeof(buf)); ++ (void)strncat(buf, " ", ++ sizeof(buf) - (strlen(buf) + 1)); ++ (void)strncat(buf, open_flags[i].arg, ++ sizeof(buf) - (strlen(buf) + 1)); + } + + res = NewStringObj(buf, strlen(buf)); Property changes on: head/databases/db5/files/patch-lang_tcl_tcl__db.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/databases/db5/files/patch-lang_tcl_tcl__env.c =================================================================== --- head/databases/db5/files/patch-lang_tcl_tcl__env.c (nonexistent) +++ head/databases/db5/files/patch-lang_tcl_tcl__env.c (revision 415812) @@ -0,0 +1,44 @@ +--- lang/tcl/tcl_env.c.orig 2016-05-24 08:19:08 UTC ++++ lang/tcl/tcl_env.c +@@ -2864,9 +2864,10 @@ env_GetFlags(interp, objc, objv, dbenv) + for (i = 0; open_flags[i].flag != 0; i++) + if (LF_ISSET(open_flags[i].flag)) { + if (strlen(buf) > 0) +- (void)strncat(buf, " ", sizeof(buf)); +- (void)strncat( +- buf, open_flags[i].arg, sizeof(buf)); ++ (void)strncat(buf, " ", ++ sizeof(buf) - (strlen(buf) + 1)); ++ (void)strncat(buf, open_flags[i].arg, ++ sizeof(buf) - (strlen(buf) + 1)); + } + + res = NewStringObj(buf, strlen(buf)); +@@ -2930,9 +2931,10 @@ env_GetOpenFlag(interp, objc, objv, dben + for (i = 0; open_flags[i].flag != 0; i++) + if (LF_ISSET(open_flags[i].flag)) { + if (strlen(buf) > 0) +- (void)strncat(buf, " ", sizeof(buf)); +- (void)strncat( +- buf, open_flags[i].arg, sizeof(buf)); ++ (void)strncat(buf, " ", ++ sizeof(buf) - (strlen(buf) + 1)); ++ (void)strncat(buf, open_flags[i].arg, ++ sizeof(buf) - (strlen(buf) + 1)); + } + + res = NewStringObj(buf, strlen(buf)); +@@ -2982,9 +2984,10 @@ tcl_EnvGetEncryptFlags(interp, objc, obj + for (i = 0; encrypt_flags[i].flag != 0; i++) + if (LF_ISSET(encrypt_flags[i].flag)) { + if (strlen(buf) > 0) +- (void)strncat(buf, " ", sizeof(buf)); +- (void)strncat( +- buf, encrypt_flags[i].arg, sizeof(buf)); ++ (void)strncat(buf, " ", ++ sizeof(buf) - (strlen(buf) + 1)); ++ (void)strncat(buf, encrypt_flags[i].arg, ++ sizeof(buf) - (strlen(buf) + 1)); + } + + res = NewStringObj(buf, strlen(buf)); Property changes on: head/databases/db5/files/patch-lang_tcl_tcl__env.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/databases/db5/files/patch-lang_tcl_tcl__seq.c =================================================================== --- head/databases/db5/files/patch-lang_tcl_tcl__seq.c (nonexistent) +++ head/databases/db5/files/patch-lang_tcl_tcl__seq.c (revision 415812) @@ -0,0 +1,16 @@ +--- lang/tcl/tcl_seq.c.orig 2016-05-24 08:18:03 UTC ++++ lang/tcl/tcl_seq.c +@@ -555,9 +555,10 @@ tcl_SeqGetFlags(interp, objc, objv, seq) + for (i = 0; seq_flags[i].flag != 0; i++) + if (LF_ISSET(seq_flags[i].flag)) { + if (strlen(buf) > 0) +- (void)strncat(buf, " ", sizeof(buf)); +- (void)strncat( +- buf, seq_flags[i].arg, sizeof(buf)); ++ (void)strncat(buf, " ", ++ sizeof(buf) - (strlen(buf) + 1)); ++ (void)strncat(buf, seq_flags[i].arg, ++ sizeof(buf) - (strlen(buf) + 1)); + } + + res = NewStringObj(buf, strlen(buf)); Property changes on: head/databases/db5/files/patch-lang_tcl_tcl__seq.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property