From 38bc9a541d7f28a24703a57264efa6bd0469cc9c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alin=20N=C4=83stac?= Date: Wed, 6 Sep 2006 20:16:12 +0000 Subject: [PATCH] Replace old db4* patches with a better one, which fixes broken compilation on a system with db-4.3 or above (#146460). Package-Manager: portage-2.1-r2 --- net-proxy/squidguard/ChangeLog | 10 +++- .../files/digest-squidguard-1.2.0-r1 | 2 + .../files/squidguard-1.2.0-db4.patch | 48 ++++++++++--------- .../squidguard/squidguard-1.2.0-r1.ebuild | 8 +--- 4 files changed, 37 insertions(+), 31 deletions(-) diff --git a/net-proxy/squidguard/ChangeLog b/net-proxy/squidguard/ChangeLog index eca7644cd0ab..811b9ada804b 100644 --- a/net-proxy/squidguard/ChangeLog +++ b/net-proxy/squidguard/ChangeLog @@ -1,6 +1,12 @@ # 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 + 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 squidguard-1.2.0-r1.ebuild: Remove COPYING and GPL files from docs. diff --git a/net-proxy/squidguard/files/digest-squidguard-1.2.0-r1 b/net-proxy/squidguard/files/digest-squidguard-1.2.0-r1 index d941cb9c00f7..96e5c2d7ecec 100644 --- a/net-proxy/squidguard/files/digest-squidguard-1.2.0-r1 +++ b/net-proxy/squidguard/files/digest-squidguard-1.2.0-r1 @@ -1 +1,3 @@ MD5 c6e2e9112fdbda0602656f94c1ce31fd squidGuard-1.2.0.tar.gz 1852737 +RMD160 7c8d0f612b4e6bf459bf367fa56f309ce5cfe6e3 squidGuard-1.2.0.tar.gz 1852737 +SHA256 6e88025d2906d635d170c53bf6ae7cc13e06839dfa2a6e5d92b5e6bb38e6ec6d squidGuard-1.2.0.tar.gz 1852737 diff --git a/net-proxy/squidguard/files/squidguard-1.2.0-db4.patch b/net-proxy/squidguard/files/squidguard-1.2.0-db4.patch index 37da3f1bfded..d5ef5540fa66 100644 --- a/net-proxy/squidguard/files/squidguard-1.2.0-db4.patch +++ b/net-proxy/squidguard/files/squidguard-1.2.0-db4.patch @@ -1,23 +1,25 @@ -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)); + } + } diff --git a/net-proxy/squidguard/squidguard-1.2.0-r1.ebuild b/net-proxy/squidguard/squidguard-1.2.0-r1.ebuild index ac4756157d5a..f2b292e2db77 100644 --- a/net-proxy/squidguard/squidguard-1.2.0-r1.ebuild +++ b/net-proxy/squidguard/squidguard-1.2.0-r1.ebuild @@ -1,6 +1,6 @@ # 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 @@ -23,12 +23,8 @@ S="${WORKDIR}/squidGuard-${PV}" 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() { -- 2.26.2