- utilize USE_BDB

This commit is contained in:
Yen-Ming Lee 2006-12-13 09:32:38 +00:00
parent 8f5d975314
commit 86bfbfa6c4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=179641
3 changed files with 20 additions and 3 deletions

View File

@ -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

View File

@ -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;

View File

@ -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 \