diff options
author | leeym <leeym@FreeBSD.org> | 2006-12-19 09:27:09 +0800 |
---|---|---|
committer | leeym <leeym@FreeBSD.org> | 2006-12-19 09:27:09 +0800 |
commit | f9c51286a7dc6ef33119f071b39626920ca4a44c (patch) | |
tree | d2dc72ce3286a9d1829b66ac17f0b182e4daa3bf /www | |
parent | 825b643b61dc198626079bfff9afe45a40df03ef (diff) | |
download | freebsd-ports-gnome-f9c51286a7dc6ef33119f071b39626920ca4a44c.tar.gz freebsd-ports-gnome-f9c51286a7dc6ef33119f071b39626920ca4a44c.tar.zst freebsd-ports-gnome-f9c51286a7dc6ef33119f071b39626920ca4a44c.zip |
- utilize USE_BDB
PR: 89023
Diffstat (limited to 'www')
-rw-r--r-- | www/squidguard/Makefile | 14 | ||||
-rw-r--r-- | www/squidguard/files/patch-ab | 28 | ||||
-rw-r--r-- | www/squidguard/files/patch-src_main.c | 14 | ||||
-rw-r--r-- | www/squidguard/files/patch-src_sgDB.c | 27 |
4 files changed, 52 insertions, 31 deletions
diff --git a/www/squidguard/Makefile b/www/squidguard/Makefile index a054e2380916..58c893300a41 100644 --- a/www/squidguard/Makefile +++ b/www/squidguard/Makefile @@ -16,12 +16,12 @@ MASTER_SITES= http://ftp.teledanmark.no/pub/www/proxy/squidGuard/ \ MAINTAINER= ports@tyfon.net COMMENT= A fast redirector for squid -LIB_DEPENDS= db3.3:${PORTSDIR}/databases/db3 RUN_DEPENDS= ${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid +USE_BDB= 3+ HAS_CONFIGURE= yes -CONFIGURE_ARGS= --with-db-inc=${LOCALBASE}/include/db3 \ - --with-db-lib=${LOCALBASE}/lib \ +CONFIGURE_ARGS= --with-db-inc=${BDB_INCLUDE_DIR} \ + --with-db-lib=${BDB_LIB_DIR} \ --with-sg-config=${PREFIX}/etc/squid/${PORTNAME}.conf \ --with-sg-dbhome=${DATADIR} \ --with-sg-logdir=${LOGDIR} \ @@ -45,6 +45,14 @@ pre-fetch: ${ECHO_MSG} " make SQUID_UID=squid SQUID_GID=squid" ; \ fi +post-patch: + @${REINPLACE_CMD} \ + -e 's,-ldb,-l${BDB_LIB_NAME},' ${WRKSRC}/configure + @if [ "${BDB_LIB_NAME}" = "db-4.2" ] ; then \ + ${REINPLACE_CMD} -E -e 's,(db_version),\1_4002,g' \ + ${WRKSRC}/configure ; \ + fi + pre-install: @${CP} ${PKGDIR}/pkg-plist ${PLIST} diff --git a/www/squidguard/files/patch-ab b/www/squidguard/files/patch-ab deleted file mode 100644 index a771cdbe5dd7..000000000000 --- a/www/squidguard/files/patch-ab +++ /dev/null @@ -1,28 +0,0 @@ ---- configure.orig Tue Dec 18 11:16:53 2001 -+++ configure Thu Dec 27 01:46:53 2001 -@@ -2402,13 +2402,13 @@ - CPPFLAGS="$CPPFLAGS $db_inc" - LDFLAGS="$LDFLAGS $db_lib" - --echo "$as_me:2405: checking for db_version in -ldb" >&5 --echo $ECHO_N "checking for db_version in -ldb... $ECHO_C" >&6 -+echo "$as_me:2405: checking for db_version in -ldb3" >&5 -+echo $ECHO_N "checking for db_version in -ldb3... $ECHO_C" >&6 - if test "${ac_cv_lib_db_db_version+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-ldb $LIBS" -+LIBS="-ldb3 $LIBS" - cat >conftest.$ac_ext <<_ACEOF - #line 2413 "configure" - #include "confdefs.h" -@@ -2456,7 +2456,7 @@ - #define HAVE_LIBDB 1 - EOF - -- LIBS="-ldb $LIBS" -+ LIBS="-ldb3 $LIBS" - - else - diff --git a/www/squidguard/files/patch-src_main.c b/www/squidguard/files/patch-src_main.c new file mode 100644 index 000000000000..29e243171aa8 --- /dev/null +++ b/www/squidguard/files/patch-src_main.c @@ -0,0 +1,14 @@ +--- src/main.c.orig Thu Jun 14 01:56:54 2001 ++++ src/main.c Sun Jan 1 17:04:13 2006 +@@ -108,7 +108,11 @@ + globalUpdate = 1; + break; + case 'v': ++#if DB_VERSION_MAJOR * 10 + DB_VERSION_MINOR == 42 ++ fprintf(stderr, "SquidGuard: %s %s\n", VERSION,db_version_4002(NULL,NULL,NULL)); ++#else + fprintf(stderr, "SquidGuard: %s %s\n", VERSION,db_version(NULL,NULL,NULL)); ++#endif + exit(0); + break; + case 't': diff --git a/www/squidguard/files/patch-src_sgDB.c b/www/squidguard/files/patch-src_sgDB.c new file mode 100644 index 000000000000..6044fd221b4d --- /dev/null +++ b/www/squidguard/files/patch-src_sgDB.c @@ -0,0 +1,27 @@ +--- src/sgDb.c.orig Mon May 14 08:40:12 2001 ++++ src/sgDb.c Thu Dec 29 23:31:32 2005 +@@ -97,14 +97,20 @@ + flag = DB_CREATE; + if(createdb) + flag = flag | DB_TRUNCATE; +- if ((ret = +- Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) { ++ if ((ret = Db->dbp->open(Db->dbp, ++#if DB_VERSION_MAJOR * 10 + DB_VERSION_MINOR >= 41 ++ NULL, ++#endif ++ dbfile, NULL, DB_BTREE, flag, 0664)) != 0) { + (void) Db->dbp->close(Db->dbp, 0); + sgLogFatalError("Error db_open: %s", strerror(ret)); + } + } else { +- if ((ret = +- Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) { ++ if ((ret = Db->dbp->open(Db->dbp, ++#if DB_VERSION_MAJOR * 10 + DB_VERSION_MINOR >= 41 ++ NULL, ++#endif ++ dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) { + sgLogFatalError("Error db_open: %s", strerror(ret)); + } + } |