aboutsummaryrefslogtreecommitdiff
path: root/databases/libzdb
diff options
context:
space:
mode:
Diffstat (limited to 'databases/libzdb')
-rw-r--r--databases/libzdb/Makefile10
-rw-r--r--databases/libzdb/files/patch-configure44
-rw-r--r--databases/libzdb/files/patch-src_db_ConnectionPool.c13
-rw-r--r--databases/libzdb/files/patch-test-poolc19
4 files changed, 80 insertions, 6 deletions
diff --git a/databases/libzdb/Makefile b/databases/libzdb/Makefile
index 5988cdfb0038..6c3c420de54d 100644
--- a/databases/libzdb/Makefile
+++ b/databases/libzdb/Makefile
@@ -17,8 +17,7 @@ GNU_CONFIGURE= yes
USE_GMAKE= yes
USE_AUTOTOOLS= libtool:15
INSTALLS_SHLIB= yes
-CONFIGURE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
- PTHREAD_LIBS="${PTHREAD_LIBS}"
+CONFIGURE_ENV= CPPFLAGS="${PTHREAD_CFLAGS}"
OPTIONS= MYSQL "Add MySQL support" on \
SQLITE " Add Sqlite support" on
@@ -28,8 +27,8 @@ OPTIONS= MYSQL "Add MySQL support" on \
.if defined(WITH_MYSQL)
USE_MYSQL= yes
CONFIGURE_ARGS+= --with-mysql=${PREFIX}
-CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include/mysql" \
- LDFLAGS="-L${LOCALBASE}/lib/mysql"
+CONFIGURE_ENV+= CPPFLAGS+="-I${LOCALBASE}/include/mysql" \
+ LDFLAGS+="-L${LOCALBASE}/lib/mysql"
.else
CONFIGURE_ARGS+= --without-mysql
.endif
@@ -41,4 +40,7 @@ CONFIGURE_ARGS+= --with-sqlite=${PREFIX}
CONFIGURE_ARGS+= --without-sqlite
.endif
+post-patch:
+ ${REINPLACE_CMD} 's,%%PTHREAD_LIBS%%,${PTHREAD_LIBS},g' ${WRKSRC}/configure
+
.include <bsd.port.post.mk>
diff --git a/databases/libzdb/files/patch-configure b/databases/libzdb/files/patch-configure
index 5121b0f2c290..825e1dbc867b 100644
--- a/databases/libzdb/files/patch-configure
+++ b/databases/libzdb/files/patch-configure
@@ -1,5 +1,36 @@
---- configure.orig Fri Feb 17 12:20:06 2006
-+++ configure Fri Feb 17 12:21:32 2006
+--- configure.orig Fri Mar 17 01:22:59 2006
++++ configure Fri Jun 9 10:08:08 2006
+@@ -18909,10 +18909,10 @@
+
+
+ # This can be used to rebuild libtool when needed
+-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
++LIBTOOL_DEPS=" /usr/local/share/libtool/ltmain.sh"
+
+ # Always use our own libtool.
+-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
++LIBTOOL='$(SHELL) /usr/local/bin/libtool'
+
+ # Prevent multiple expansion
+
+@@ -18947,7 +18947,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lpthread $LIBS"
++LIBS="%%PTHREAD_LIBS%% $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -19010,7 +19010,7 @@
+ #define HAVE_LIBPTHREAD 1
+ _ACEOF
+
+- LIBS="-lpthread $LIBS"
++ LIBS="%%PTHREAD_LIBS%% $LIBS"
+
+ else
+ { { echo "$as_me:$LINENO: error: POSIX thread library is required" >&5
@@ -19185,7 +19185,7 @@
_ACEOF
@@ -9,3 +40,12 @@
DB_CPPFLAGS="$DB_CPPFLAGS -I$with_mysql/include"
DB_LDFLAGS="$DB_LDFLAGS -L$with_mysql/lib/ -lmysqlclient"
else
+@@ -20268,7 +20268,7 @@
+
+ # If the compiler is gcc, tune warnings and make the char type unsigned
+ if test "x$GCC" = "xyes"; then
+- CFLAGS="$CFLAGS -Wall -Wunused -Wno-unused-label -funsigned-char";
++ #CFLAGS="$CFLAGS -Wall -Wunused -Wno-unused-label -funsigned-char";
+ # does this compiler support -Wno-pointer-sign ?
+ svd_CFLAGS="$CFLAGS"
+ CFLAGS="-Wno-pointer-sign $CFLAGS"
diff --git a/databases/libzdb/files/patch-src_db_ConnectionPool.c b/databases/libzdb/files/patch-src_db_ConnectionPool.c
new file mode 100644
index 000000000000..2ad698d41253
--- /dev/null
+++ b/databases/libzdb/files/patch-src_db_ConnectionPool.c
@@ -0,0 +1,13 @@
+--- src/db/ConnectionPool.c.orig Fri Jun 9 10:11:12 2006
++++ src/db/ConnectionPool.c Fri Jun 9 10:11:19 2006
+@@ -319,8 +319,9 @@
+
+ static int fillPool(T P) {
+ int i;
+- P->error= NULL;
+ Connection_T con;
++
++ P->error= NULL;
+ for(i= 0; i < P->initialConnections; i++) {
+ if(! (con= Connection_new(P, &P->error))) {
+ if(i>0) {
diff --git a/databases/libzdb/files/patch-test-poolc b/databases/libzdb/files/patch-test-poolc
new file mode 100644
index 000000000000..7a5901ef1b56
--- /dev/null
+++ b/databases/libzdb/files/patch-test-poolc
@@ -0,0 +1,19 @@
+--- test/pool.c.orig Fri Jun 9 10:12:00 2006
++++ test/pool.c Fri Jun 9 10:12:17 2006
+@@ -270,7 +270,6 @@
+ int main(void) {
+ URL_T url;
+ char buf[BSIZE];
+- ZBDEBUG= TRUE;
+ char *help= "Please enter a valid database connection URL and press ENTER\n"
+ "E.g. sqlite:///tmp/sqlite.db?synchronous=off&show_datatypes=off\n"
+ "E.g. mysql://localhost:3306/test?user=root&password=root\n"
+@@ -278,6 +277,8 @@
+ printf("============> Start Connection Pool Tests\n\n");
+ printf("This test will create and drop a table called zild_t in the database\n");
+ printf("%s", help);
++
++ ZBDEBUG= TRUE;
+ while(fgets(buf, BSIZE, stdin)) {
+ if(*buf == '.')
+ break;