# ChangeLog for net-proxy/squidguard
-# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-proxy/squidguard/ChangeLog,v 1.3 2005/10/04 21:26:29 mrness Exp $
+# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/squidguard/ChangeLog,v 1.4 2006/09/06 20:16:12 mrness Exp $
+
+ 06 Sep 2006; Alin Nastac <mrness@gentoo.org>
+ files/squidguard-1.2.0-db4.patch, -files/squidguard-1.2.0-db41.patch,
+ -files/squidguard-1.2.0-db42.patch, squidguard-1.2.0-r1.ebuild:
+ Replace old db4* patches with a better one, which fixes broken compilation
+ on a system with db-4.3 or above (#146460).
04 Oct 2005; Alin Nastac <mrness@gentoo.org> squidguard-1.2.0-r1.ebuild:
Remove COPYING and GPL files from docs.
-diff -urN squidGuard-1.2.0.orig/configure.in squidGuard-1.2.0/configure.in
---- squidGuard-1.2.0.orig/configure.in 2001-12-18 11:16:36.000000000 +0100
-+++ squidGuard-1.2.0/configure.in 2003-05-28 09:57:42.000000000 +0200
-@@ -71,7 +71,9 @@
-
- dnl Checks for libraries.
-
--AC_CHECK_LIB(db,db_version,,[
-+AC_CHECK_LIB(db,db_version,,
-+AC_CHECK_LIB(db,db_version_4000,,
-+AC_CHECK_LIB(db,db_version_4001,,[
- echo
- echo "** The Berkley DB library is required for squidGuard"
- echo " to compile. Get it from http://www.sleepycat.com"
-@@ -79,7 +81,7 @@
- echo " its location. (default is $dbprefix/BerkeleyDB)"
- echo
- exit 1
-- ])
-+ ])))
-
- dnl Checks for header files.
- AC_HEADER_STDC
+diff -Nru squidGuard-1.2.0.orig/src/sgDb.c squidGuard-1.2.0/src/sgDb.c
+--- squidGuard-1.2.0.orig/src/sgDb.c 2001-05-14 16:40:12.000000000 +0300
++++ squidGuard-1.2.0/src/sgDb.c 2006-09-06 23:07:49.756347000 +0300
+@@ -98,13 +98,21 @@
+ if(createdb)
+ flag = flag | DB_TRUNCATE;
+ if ((ret =
++#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
++ Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) {
++#else
+ Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) {
++#endif
+ (void) Db->dbp->close(Db->dbp, 0);
+ sgLogFatalError("Error db_open: %s", strerror(ret));
+ }
+ } else {
+ if ((ret =
++#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
++ Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
++#else
+ Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
++#endif
+ sgLogFatalError("Error db_open: %s", strerror(ret));
+ }
+ }
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-proxy/squidguard/squidguard-1.2.0-r1.ebuild,v 1.3 2006/03/06 21:27:46 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/squidguard/squidguard-1.2.0-r1.ebuild,v 1.4 2006/09/06 20:16:12 mrness Exp $
inherit eutils
src_unpack() {
unpack ${A} || die "unpack problem"
- cd "${S}"
- epatch "${FILESDIR}/${P}-db4.patch"
- epatch "${FILESDIR}/${P}-db41.patch"
- epatch "${FILESDIR}/${P}-db42.patch"
- autoconf || die "autoconf problem"
+ epatch "${FILESDIR}/${P}-db4.patch"
}
src_compile() {