summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Popov <pinkbyte@gentoo.org>2017-05-12 12:19:24 +0300
committerSergey Popov <pinkbyte@gentoo.org>2017-05-12 12:20:46 +0300
commite5d53d7d4b90920f3b30a88536a4fa65694aca62 (patch)
tree3542ff3ad9bdaa19dd22ae9213aba71e47166eba /net-proxy/squidguard
parentwww-client/chromium: dev channel bump (60.0.3095.5) (diff)
downloadgentoo-e5d53d7d4b90920f3b30a88536a4fa65694aca62.tar.gz
gentoo-e5d53d7d4b90920f3b30a88536a4fa65694aca62.tar.bz2
gentoo-e5d53d7d4b90920f3b30a88536a4fa65694aca62.zip
net-proxy/squidguard: revision bump
Bump EAPI to 6, restrict linking with unsupported versions of sys-libs/db Committing straight to stable Gentoo-Bug: 528858 Package-Manager: Portage-2.3.5, Repoman-2.3.1 RepoMan-Options: --force
Diffstat (limited to 'net-proxy/squidguard')
-rw-r--r--net-proxy/squidguard/squidguard-1.5_beta-r2.ebuild (renamed from net-proxy/squidguard/squidguard-1.5_beta-r1.ebuild)37
1 files changed, 31 insertions, 6 deletions
diff --git a/net-proxy/squidguard/squidguard-1.5_beta-r1.ebuild b/net-proxy/squidguard/squidguard-1.5_beta-r2.ebuild
index 408711ab9972..235a6ac00ed2 100644
--- a/net-proxy/squidguard/squidguard-1.5_beta-r1.ebuild
+++ b/net-proxy/squidguard/squidguard-1.5_beta-r2.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI="5"
+EAPI=6
WANT_AUTOMAKE=none
-inherit eutils autotools user
+inherit autotools db-use eutils user
MY_P="squidGuard-${PV/_/-}"
@@ -19,7 +19,15 @@ KEYWORDS="amd64 ~arm ppc ppc64 sparc x86"
IUSE="ldap"
-RDEPEND=">=sys-libs/db-2:*
+RDEPEND="|| (
+ sys-libs/db:4.8
+ sys-libs/db:4.7
+ sys-libs/db:4.6
+ sys-libs/db:4.5
+ sys-libs/db:4.4
+ sys-libs/db:4.3
+ sys-libs/db:4.2
+ )
ldap? ( net-nds/openldap:0 )"
DEPEND="${RDEPEND}
@@ -28,6 +36,17 @@ DEPEND="${RDEPEND}
S="${WORKDIR}/${MY_P}"
+suitable_db_version() {
+ local tested_slots="4.8 4.7 4.6 4.5 4.4 4.3 4.2"
+ for ver in ${tested_slots}; do
+ if [[ -n $(db_findver sys-libs/db:${ver}) ]]; then
+ echo ${ver}
+ return 0
+ fi
+ done
+ die "No suitable BerkDB versions found, aborting"
+}
+
pkg_setup() {
enewgroup squid
enewuser squid -1 -1 /var/cache/squid squid
@@ -39,13 +58,18 @@ src_prepare() {
"${FILESDIR}/${P}-gentoo.patch" \
"${FILESDIR}/${P}-protocol.patch"
- epatch_user
+ # Link only with specific BerkDB versions
+ db_version="$(suitable_db_version)"
+ sed -i -e "/\$LIBS -ldb/s/-ldb/-l$(db_libname ${db_version})/" configure.ac || die
+
+ eapply_user
eautoreconf
}
src_configure() {
econf \
$(use_with ldap) \
+ --with-db-inc="$(db_includedir ${db_version})" \
--with-sg-config=/etc/squidGuard/squidGuard.conf \
--with-sg-logdir=/var/log/squidGuard
}
@@ -62,7 +86,8 @@ src_install() {
doins "${FILESDIR}"/blockedsites
dodoc ANNOUNCE CHANGELOG README
- dohtml doc/*.html
+ docinto html
+ dodoc doc/*.html
docinto text
dodoc doc/*.txt
}