diff options
Diffstat (limited to 'net-proxy/squidguard')
-rw-r--r-- | net-proxy/squidguard/ChangeLog | 10 | ||||
-rw-r--r-- | net-proxy/squidguard/files/digest-squidguard-1.2.1-r1 (renamed from net-proxy/squidguard/files/digest-squidguard-1.2.1) | 0 | ||||
-rw-r--r-- | net-proxy/squidguard/files/squidguard-1.2.1-db4.patch | 54 | ||||
-rw-r--r-- | net-proxy/squidguard/files/squidguard-1.2.1-gentoo.patch | 134 | ||||
-rw-r--r-- | net-proxy/squidguard/files/squidguard-1.2.1-makefile.patch | 40 | ||||
-rw-r--r-- | net-proxy/squidguard/squidguard-1.2.1-r1.ebuild (renamed from net-proxy/squidguard/squidguard-1.2.1.ebuild) | 11 |
6 files changed, 149 insertions, 100 deletions
diff --git a/net-proxy/squidguard/ChangeLog b/net-proxy/squidguard/ChangeLog index 8d325ec86120..b95152bc0554 100644 --- a/net-proxy/squidguard/ChangeLog +++ b/net-proxy/squidguard/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-proxy/squidguard # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/squidguard/ChangeLog,v 1.9 2007/06/17 15:59:01 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-proxy/squidguard/ChangeLog,v 1.10 2007/06/24 10:43:34 mrness Exp $ + +*squidguard-1.2.1-r1 (24 Jun 2007) + + 24 Jun 2007; Alin Năstac <mrness@gentoo.org> + -files/squidguard-1.2.1-db4.patch, +files/squidguard-1.2.1-gentoo.patch, + -files/squidguard-1.2.1-makefile.patch, -squidguard-1.2.1.ebuild, + +squidguard-1.2.1-r1.ebuild: + Add ldap USE flag (#182725). *squidguard-1.2.1 (17 Jun 2007) diff --git a/net-proxy/squidguard/files/digest-squidguard-1.2.1 b/net-proxy/squidguard/files/digest-squidguard-1.2.1-r1 index b8df36f399bf..b8df36f399bf 100644 --- a/net-proxy/squidguard/files/digest-squidguard-1.2.1 +++ b/net-proxy/squidguard/files/digest-squidguard-1.2.1-r1 diff --git a/net-proxy/squidguard/files/squidguard-1.2.1-db4.patch b/net-proxy/squidguard/files/squidguard-1.2.1-db4.patch deleted file mode 100644 index 25cb495bca42..000000000000 --- a/net-proxy/squidguard/files/squidguard-1.2.1-db4.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff -Nru squidGuard-1.2.1.orig/configure.in squidGuard-1.2.1/configure.in ---- squidGuard-1.2.1.orig/configure.in 2007-06-17 11:24:29.000000000 +0300 -+++ squidGuard-1.2.1/configure.in 2007-06-17 11:24:55.000000000 +0300 -@@ -85,7 +85,7 @@ - AC_HEADER_STDC - AC_CHECK_HEADERS(db.h regex.h unistd.h) - --+AC_CHECK_HEADER(db.h,,[ -+AC_CHECK_HEADER(db.h,,[ - echo - echo "** No db.h found" - echo " The Berkley DB library is required for squidGuard" -@@ -141,15 +141,7 @@ - ]) - - dnl Check DB --AC_CHECK_LIB(db,db_version,,[ -- echo -- echo "** The Berkley DB library is required for squidGuard" -- echo " to compile. Get it from http://www.sleepycat.com" -- echo " use --with-db=DIR or --with-db-lib=DIR to specify" -- echo " its location. (default is $dbprefix/BerkeleyDB)" -- echo -- exit 1 -- ]) -+LIBS="$LIBS -ldb" - AC_RUN_IFELSE([ - #include <db.h> - int main() -diff -Nru squidGuard-1.2.1.orig/src/sgDb.c squidGuard-1.2.1/src/sgDb.c ---- squidGuard-1.2.1.orig/src/sgDb.c 2007-06-17 11:24:29.000000000 +0300 -+++ squidGuard-1.2.1/src/sgDb.c 2007-06-17 11:15:27.000000000 +0300 -@@ -101,13 +101,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/files/squidguard-1.2.1-gentoo.patch b/net-proxy/squidguard/files/squidguard-1.2.1-gentoo.patch new file mode 100644 index 000000000000..3258cb8ab4e3 --- /dev/null +++ b/net-proxy/squidguard/files/squidguard-1.2.1-gentoo.patch @@ -0,0 +1,134 @@ +diff -Nru squidGuard-1.2.1.orig/configure.in squidGuard-1.2.1/configure.in +--- squidGuard-1.2.1.orig/configure.in 2007-06-24 13:19:45.000000000 +0300 ++++ squidGuard-1.2.1/configure.in 2007-06-24 13:17:36.000000000 +0300 +@@ -85,7 +85,7 @@ + AC_HEADER_STDC + AC_CHECK_HEADERS(db.h regex.h unistd.h) + +-+AC_CHECK_HEADER(db.h,,[ ++AC_CHECK_HEADER(db.h,,[ + echo + echo "** No db.h found" + echo " The Berkley DB library is required for squidGuard" +@@ -110,13 +110,24 @@ + dnl + + dnl Check ldap +-AC_CHECK_LIB(ldap,ldap_init,,[ +- echo +- echo "LDAP library not found" +- echo +- exit 1 +- ]) +-AC_RUN_IFELSE([ ++AC_ARG_WITH(ldap, ++ AC_HELP_STRING([--with-ldap], [use ldap (default=yes)])) ++if test "$with_ldap" = "no" -o "$with_ldap" = "false" ++then ++ with_ldap=no ++else ++ AC_CHECK_LIB( ldap, ldap_init, ++ [ ++ with_ldap=yes ++ LIBS="$LIBS -lldap" ++ ],[ ++ AC_MSG_WARN([Cannot find LDAP libraries. LDAP support disabled]) ++ with_ldap=no ++ ]) ++fi ++if test "$with_ldap" = "yes"; then ++ AC_DEFINE(HAVE_LIBLDAP) ++ AC_RUN_IFELSE([ + #include <ldap.h> + int main() + { +@@ -130,6 +141,7 @@ + echo + exit 1 + ],) ++fi + + dnl Check threads... ok if it fails + AC_CHECK_LIB(pthread,pthread_create,,[ +@@ -141,15 +153,7 @@ + ]) + + dnl Check DB +-AC_CHECK_LIB(db,db_version,,[ +- echo +- echo "** The Berkley DB library is required for squidGuard" +- echo " to compile. Get it from http://www.sleepycat.com" +- echo " use --with-db=DIR or --with-db-lib=DIR to specify" +- echo " its location. (default is $dbprefix/BerkeleyDB)" +- echo +- exit 1 +- ]) ++LIBS="$LIBS -ldb" + AC_RUN_IFELSE([ + #include <db.h> + int main() +diff -Nru squidGuard-1.2.1.orig/Makefile.in squidGuard-1.2.1/Makefile.in +--- squidGuard-1.2.1.orig/Makefile.in 2007-06-24 13:09:47.000000000 +0300 ++++ squidGuard-1.2.1/Makefile.in 2007-06-24 12:55:17.000000000 +0300 +@@ -40,7 +40,7 @@ + # Dependencies for installing + # + +-install: install-build install-conf ++install: install-build + + install-conf: + @echo Installing configuration file +@@ -67,10 +67,10 @@ + + install-build: + @echo Installing squidGuard +- @if [ ! -d $(bindir) ]; then \ +- $(MKINSTALLDIRS) $(bindir) ; \ ++ @if [ ! -d "$(INSTDIR)"/$(bindir) ]; then \ ++ $(MKINSTALLDIRS) "$(INSTDIR)"/$(bindir) ; \ + fi ; \ +- cp src/squidGuard $(bindir) || exit 1 ; \ ++ cp src/squidGuard "$(INSTDIR)"/$(bindir) || exit 1 ; \ + echo Done. ; + + clean:: +diff -Nru squidGuard-1.2.1.orig/src/Makefile.in squidGuard-1.2.1/src/Makefile.in +--- squidGuard-1.2.1.orig/src/Makefile.in 2007-06-24 13:09:47.000000000 +0300 ++++ squidGuard-1.2.1/src/Makefile.in 2007-06-24 12:55:17.000000000 +0300 +@@ -103,8 +103,8 @@ + + install.bin:: squidGuard + @echo making $@ in `basename \`pwd\`` +- @$(MKDIR) $(bindir) $(logdir) $(cfgdir) +- $(INSTALL_PROGRAM) squidGuard $(bindir)/squidGuard ++ @$(MKDIR) "$(INSTDIR)"/$(bindir) "$(INSTDIR)"/$(logdir) "$(INSTDIR)"/$(cfgdir) ++ $(INSTALL_PROGRAM) squidGuard "$(INSTDIR)"/$(bindir)/squidGuard + + uninstall.bin:: + @echo making $@ in `basename \`pwd\`` +diff -Nru squidGuard-1.2.1.orig/src/sgDb.c squidGuard-1.2.1/src/sgDb.c +--- squidGuard-1.2.1.orig/src/sgDb.c 2007-06-24 13:19:45.000000000 +0300 ++++ squidGuard-1.2.1/src/sgDb.c 2007-06-24 12:55:17.000000000 +0300 +@@ -101,13 +101,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/files/squidguard-1.2.1-makefile.patch b/net-proxy/squidguard/files/squidguard-1.2.1-makefile.patch deleted file mode 100644 index 9ffa99971bef..000000000000 --- a/net-proxy/squidguard/files/squidguard-1.2.1-makefile.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -Nru squidGuard-1.2.1.orig/Makefile.in squidGuard-1.2.1/Makefile.in ---- squidGuard-1.2.1.orig/Makefile.in 2006-12-29 11:03:53.000000000 +0200 -+++ squidGuard-1.2.1/Makefile.in 2007-06-17 18:47:13.000000000 +0300 -@@ -40,7 +40,7 @@ - # Dependencies for installing - # - --install: install-build install-conf -+install: install-build - - install-conf: - @echo Installing configuration file -@@ -67,10 +67,10 @@ - - install-build: - @echo Installing squidGuard -- @if [ ! -d $(bindir) ]; then \ -- $(MKINSTALLDIRS) $(bindir) ; \ -+ @if [ ! -d "$(INSTDIR)"/$(bindir) ]; then \ -+ $(MKINSTALLDIRS) "$(INSTDIR)"/$(bindir) ; \ - fi ; \ -- cp src/squidGuard $(bindir) || exit 1 ; \ -+ cp src/squidGuard "$(INSTDIR)"/$(bindir) || exit 1 ; \ - echo Done. ; - - clean:: -diff -Nru squidGuard-1.2.1.orig/src/Makefile.in squidGuard-1.2.1/src/Makefile.in ---- squidGuard-1.2.1.orig/src/Makefile.in 2007-03-16 17:58:37.000000000 +0200 -+++ squidGuard-1.2.1/src/Makefile.in 2007-06-17 18:41:35.000000000 +0300 -@@ -103,8 +103,8 @@ - - install.bin:: squidGuard - @echo making $@ in `basename \`pwd\`` -- @$(MKDIR) $(bindir) $(logdir) $(cfgdir) -- $(INSTALL_PROGRAM) squidGuard $(bindir)/squidGuard -+ @$(MKDIR) "$(INSTDIR)"/$(bindir) "$(INSTDIR)"/$(logdir) "$(INSTDIR)"/$(cfgdir) -+ $(INSTALL_PROGRAM) squidGuard "$(INSTDIR)"/$(bindir)/squidGuard - - uninstall.bin:: - @echo making $@ in `basename \`pwd\`` diff --git a/net-proxy/squidguard/squidguard-1.2.1.ebuild b/net-proxy/squidguard/squidguard-1.2.1-r1.ebuild index 4dd625ce1ff9..0a6fd1985845 100644 --- a/net-proxy/squidguard/squidguard-1.2.1.ebuild +++ b/net-proxy/squidguard/squidguard-1.2.1-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/squidguard/squidguard-1.2.1.ebuild,v 1.1 2007/06/17 15:59:01 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-proxy/squidguard/squidguard-1.2.1-r1.ebuild,v 1.1 2007/06/24 10:43:34 mrness Exp $ inherit eutils autotools @@ -11,10 +11,11 @@ SRC_URI="http://www.squidguard.org/Downloads/squidGuard-${PV}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" -IUSE="" +IUSE="ldap" RDEPEND="net-proxy/squid - >=sys-libs/db-2" + >=sys-libs/db-2 + ldap? ( net-nds/openldap )" DEPEND="${RDEPEND} sys-devel/bison sys-devel/flex" @@ -25,14 +26,14 @@ src_unpack() { unpack ${A} || die "unpack problem" cd "${S}" - epatch "${FILESDIR}/${P}-db4.patch" + epatch "${FILESDIR}/${P}-gentoo.patch" epatch "${FILESDIR}/${P}-tests.patch" - epatch "${FILESDIR}/${P}-makefile.patch" eautoconf } src_compile() { econf \ + $(use_with ldap) \ --with-sg-config=/etc/squidGuard/squidGuard.conf \ --with-sg-logdir=/var/log/squidGuard \ || die "configure has failed" |