summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorYen-Ming Lee <leeym@FreeBSD.org>2006-12-13 09:32:38 +0000
committerYen-Ming Lee <leeym@FreeBSD.org>2006-12-13 09:32:38 +0000
commit86bfbfa6c46ae87b335b9b4f4c2f0431699ad85d (patch)
treec3ba7c36ad095db4d6c9ce15d7a0547f3351e9d1 /databases
parentrcNG is not 'Next' anymore. s/rcNG/rc.d/ in net/smokeping entry. (diff)
- utilize USE_BDB
Notes
Notes: svn path=/head/; revision=179641
Diffstat (limited to 'databases')
-rw-r--r--databases/rdfdb/Makefile5
-rw-r--r--databases/rdfdb/files/patch-librdf::db.c14
-rw-r--r--databases/rdfdb/files/patch-makefile4
3 files changed, 20 insertions, 3 deletions
diff --git a/databases/rdfdb/Makefile b/databases/rdfdb/Makefile
index 7bd78ef91ba1..c28746e16d12 100644
--- a/databases/rdfdb/Makefile
+++ b/databases/rdfdb/Makefile
@@ -15,7 +15,8 @@ DISTNAME= rdfdb_src
MAINTAINER= ports@FreeBSD.org
COMMENT= A lightweight RDF database
-LIB_DEPENDS= db3.3:${PORTSDIR}/databases/db3
+USE_BDB= 3+
+INVALID_BDB_VER=2
WRKSRC= ${WRKDIR}/rdfdb
USE_GMAKE= yes
@@ -30,6 +31,8 @@ PLIST_SUB= RDFDB_DIR=${RDFDB_DIR}
post-patch:
@${SED} -e 's,%%LOCALBASE%%,${LOCALBASE},g' \
-e 's,%%PTHREAD_LIBS%%,${PTHREAD_LIBS:S/"//g},g' \
+ -e 's,%%BDB_INCLUDE_DIR%%,${BDB_INCLUDE_DIR},g'\
+ -e 's,%%BDB_LIB_NAME%%,${BDB_LIB_NAME},g' \
< ${WRKSRC}/makefile > ${WRKSRC}/makefile.new
@${MV} ${WRKSRC}/makefile.new ${WRKSRC}/makefile
diff --git a/databases/rdfdb/files/patch-librdf::db.c b/databases/rdfdb/files/patch-librdf::db.c
new file mode 100644
index 000000000000..28f7c9bfc4dd
--- /dev/null
+++ b/databases/rdfdb/files/patch-librdf::db.c
@@ -0,0 +1,14 @@
+--- librdf/db.c.orig Tue Oct 3 20:23:27 2000
++++ librdf/db.c Mon Jan 2 12:06:39 2006
+@@ -169,7 +169,11 @@
+ }
+ }
+
++#if DB_VERSION_MAJOR * 10 + DB_VERSION_MINOR > 40
++ err = (*db)->open(*db, NULL, name, NULL, type, DB_CREATE | DB_THREAD , 0664);
++#else
+ err = (*db)->open(*db, name, NULL, type, DB_CREATE | DB_THREAD , 0664);
++#endif
+ if (err) {
+ printf("Problems opening %s : %s\n", name, db_strerror(err));
+ return err;
diff --git a/databases/rdfdb/files/patch-makefile b/databases/rdfdb/files/patch-makefile
index 4dfb4dce04b2..4ed14543f31f 100644
--- a/databases/rdfdb/files/patch-makefile
+++ b/databases/rdfdb/files/patch-makefile
@@ -8,8 +8,8 @@ $FreeBSD$
-LIBS = -ldb -lpthread
-CPPFLAGS = $(INCLUDES) -L /usr/local/BerkeleyDB.3.1/lib/
+CC ?= gcc -g
-+INCLUDES = -I /usr/local/include/db3 -I expat/xmltok -I expat/xmlparse
-+LIBS = -ldb3 %%PTHREAD_LIBS%%
++INCLUDES = -I %%BDB_INCLUDE_DIR%% -I expat/xmltok -I expat/xmlparse
++LIBS = -l%%BDB_LIB_NAME%% %%PTHREAD_LIBS%%
+CPPFLAGS += ${CFLAGS} $(INCLUDES) -L /usr/local/lib
OBJS = utils/hash.o \