diff options
author | Alin Năstac <mrness@gentoo.org> | 2008-12-01 21:08:01 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2008-12-01 21:08:01 +0000 |
commit | 690917bdc596ac221195edefd6566a370cea77fa (patch) | |
tree | 6371ee4a2659a9ce811ae9ddad069593c6395f90 /net-proxy/dansguardian | |
parent | Automated update of use.local.desc (diff) | |
download | gentoo-2-690917bdc596ac221195edefd6566a370cea77fa.tar.gz gentoo-2-690917bdc596ac221195edefd6566a370cea77fa.tar.bz2 gentoo-2-690917bdc596ac221195edefd6566a370cea77fa.zip |
Fix broken build when compiled using uclibc++, thanks to Natanael Copa <natanael dot copa at gmail dot com> (#247547).
(Portage version: 2.1.4.4)
Diffstat (limited to 'net-proxy/dansguardian')
-rw-r--r-- | net-proxy/dansguardian/ChangeLog | 9 | ||||
-rw-r--r-- | net-proxy/dansguardian/dansguardian-2.10-r2.ebuild | 111 | ||||
-rw-r--r-- | net-proxy/dansguardian/files/dansguardian-2.10-uclibc++.patch | 11 |
3 files changed, 130 insertions, 1 deletions
diff --git a/net-proxy/dansguardian/ChangeLog b/net-proxy/dansguardian/ChangeLog index 06107321c46e..e24fe9af75a7 100644 --- a/net-proxy/dansguardian/ChangeLog +++ b/net-proxy/dansguardian/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-proxy/dansguardian # Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/dansguardian/ChangeLog,v 1.41 2008/11/13 00:42:14 ranger Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-proxy/dansguardian/ChangeLog,v 1.42 2008/12/01 21:08:01 mrness Exp $ + +*dansguardian-2.10-r2 (01 Dec 2008) + + 01 Dec 2008; Alin Năstac <mrness@gentoo.org> + +files/dansguardian-2.10-uclibc++.patch, +dansguardian-2.10-r2.ebuild: + Fix broken build when compiled using uclibc++, thanks to Natanael Copa + <natanael dot copa at gmail dot com> (#247547). 13 Nov 2008; Brent Baude <ranger@gentoo.org> dansguardian-2.10-r1.ebuild: stable ppc64, bug 245680 diff --git a/net-proxy/dansguardian/dansguardian-2.10-r2.ebuild b/net-proxy/dansguardian/dansguardian-2.10-r2.ebuild new file mode 100644 index 000000000000..0fe1aa70e9c5 --- /dev/null +++ b/net-proxy/dansguardian/dansguardian-2.10-r2.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/dansguardian/dansguardian-2.10-r2.ebuild,v 1.1 2008/12/01 21:08:01 mrness Exp $ + +inherit eutils + +DESCRIPTION="Web content filtering via proxy" +HOMEPAGE="http://dansguardian.org" +SRC_URI="http://dansguardian.org/downloads/2/Stable/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="clamav kaspersky debug ntlm pcre" + +RDEPEND="sys-libs/zlib + pcre? ( dev-libs/libpcre ) + clamav? ( >=app-antivirus/clamav-0.93 )" +DEPEND="${RDEPEND} + dev-util/pkgconfig" + +pkg_setup() { + if has_version "<${CATEGORY}/${PN}-2.9" ; then + ewarn "This version introduces brand new USE flags:" + ewarn " clamav kaspersky ntlm pcre" + echo + + local f="${ROOT}/etc/dansguardian" + f=${f//\/\///} + if [ -d "${f}" ] ; then + eerror "The structure of ${f} has changed in this version!" + eerror "For avoiding confusion, you must either move or delete the old ${f}," + eerror "then continue with the upgrade:" + eerror " mv '${f}' '${f}.old'" + eerror " emerge --resume" + die "Obsolete config files detected" + fi + fi +} + +src_unpack() { + unpack ${A} + + epatch "${FILESDIR}"/${P}-uclibc++.patch +} + +src_compile() { + local myconf="--with-logdir=/var/log/dansguardian + --with-piddir=/var/run + --docdir=/usr/share/doc/${PF} + --htmldir=/usr/share/doc/${PF}/html + $(use_enable pcre) + $(use_enable ntlm) + --enable-fancydm + --enable-email" + if use clamav; then + myconf="${myconf} --enable-clamd --enable-clamav + --with-proxyuser=clamav + --with-proxygroup=clamav" + fi + if use kaspersky; then + myconf="${myconf} --enable-kavd" + fi + if use debug; then + myconf="${myconf} --with-dgdebug=on" + fi + + econf ${myconf} || die "configure failed" + + emake OPTIMISE="${CFLAGS}" || die "emake failed" +} + +src_install() { + make "DESTDIR=${D}" install || die "make install failed" + + # Move html documents to html dir + mkdir "${D}"/usr/share/doc/${PF}/html \ + && mv "${D}"/usr/share/doc/${PF}/*.html "${D}"/usr/share/doc/${PF}/html \ + || die "no html docs found in docdir" + + # Copying init script + newinitd "${FILESDIR}/dansguardian.init" dansguardian + + if use clamav; then + sed -r -i -e 's/[ \t]+use dns/& clamd/' "${D}/etc/init.d/dansguardian" + sed -r -i -e 's/^#( *contentscanner *=.*clamdscan[.]conf.*)/\1/' "${D}/etc/dansguardian/dansguardian.conf" + sed -r -i -e 's/^#( *clamdudsfile *=.*)/\1/' "${D}/etc/dansguardian/contentscanners/clamdscan.conf" + elif use kaspersky; then + sed -r -i -e 's/^#( *contentscanner *=.*kavdscan[.]conf.*)/\1/' "${D}/etc/dansguardian/dansguardian.conf" + fi + + # Copying logrotation file + insinto /etc/logrotate.d + newins "${FILESDIR}/dansguardian.logrotate" dansguardian + + keepdir /var/log/dansguardian + fperms o-rwx /var/log/dansguardian +} + +pkg_postinst() { + local runas="nobody:nobody" + if use clamav ; then + runas="clamav:clamav" + fi + einfo "The dansguardian daemon will run by default as ${runas}" + + if [ -d "${ROOT}/var/log/dansguardian" ] ; then + chown -R ${runas} "${ROOT}/var/log/dansguardian" + chmod o-rwx "${ROOT}/var/log/dansguardian" + fi +} diff --git a/net-proxy/dansguardian/files/dansguardian-2.10-uclibc++.patch b/net-proxy/dansguardian/files/dansguardian-2.10-uclibc++.patch new file mode 100644 index 000000000000..27b4177172aa --- /dev/null +++ b/net-proxy/dansguardian/files/dansguardian-2.10-uclibc++.patch @@ -0,0 +1,11 @@ +--- dansguardian-2.10/src/IPList.cpp.orig 2008-11-19 07:45:54 +0000 ++++ dansguardian-2.10/src/IPList.cpp 2008-11-19 07:46:44 +0000 +@@ -81,7 +81,7 @@ + hostnames.reset(new std::deque<String>); + hostnames->push_back(*host); + } +- for (std::deque<String>::const_iterator i = hostnames->begin(); i != hostnames->end(); ++i) ++ for (std::deque<String>::iterator i = hostnames->begin(); i != hostnames->end(); ++i) + { + if (std::binary_search(hostlist.begin(), hostlist.end(), *i)) + { |