diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2011-06-10 18:00:51 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2011-06-10 18:00:51 +0000 |
commit | edb0d95c1d6f4d3a1f25fe8741be977cb6eb2895 (patch) | |
tree | ee6a877ab8c8a2d623d024efa480cbcca40fbc7d /net-proxy/c-icap | |
parent | Version bump (diff) | |
download | gentoo-2-edb0d95c1d6f4d3a1f25fe8741be977cb6eb2895.tar.gz gentoo-2-edb0d95c1d6f4d3a1f25fe8741be977cb6eb2895.tar.bz2 gentoo-2-edb0d95c1d6f4d3a1f25fe8741be977cb6eb2895.zip |
Version bump; add cross-compilation patch, thanks to Bertrand Jacquin in bug #370945.
(Portage version: 2.2.0_alpha38/cvs/Linux x86_64)
Diffstat (limited to 'net-proxy/c-icap')
-rw-r--r-- | net-proxy/c-icap/ChangeLog | 10 | ||||
-rw-r--r-- | net-proxy/c-icap/c-icap-0.1.6.ebuild | 111 | ||||
-rw-r--r-- | net-proxy/c-icap/files/c-icap-0.1.4-crosscompile.patch | 72 | ||||
-rw-r--r-- | net-proxy/c-icap/files/c-icap-0.1.6-implicit.patch | 12 |
4 files changed, 204 insertions, 1 deletions
diff --git a/net-proxy/c-icap/ChangeLog b/net-proxy/c-icap/ChangeLog index 23a1ca6c076a..f7c31bee1175 100644 --- a/net-proxy/c-icap/ChangeLog +++ b/net-proxy/c-icap/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-proxy/c-icap # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/c-icap/ChangeLog,v 1.4 2011/02/18 02:27:22 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-proxy/c-icap/ChangeLog,v 1.5 2011/06/10 18:00:51 flameeyes Exp $ + +*c-icap-0.1.6 (10 Jun 2011) + + 10 Jun 2011; Diego E. Pettenò <flameeyes@gentoo.org> + +files/c-icap-0.1.4-crosscompile.patch, +c-icap-0.1.6.ebuild, + +files/c-icap-0.1.6-implicit.patch: + Version bump; add cross-compilation patch, thanks to Bertrand Jacquin in bug + #370945. *c-icap-0.1.4 (18 Feb 2011) diff --git a/net-proxy/c-icap/c-icap-0.1.6.ebuild b/net-proxy/c-icap/c-icap-0.1.6.ebuild new file mode 100644 index 000000000000..2b6c7f5e9b68 --- /dev/null +++ b/net-proxy/c-icap/c-icap-0.1.6.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/c-icap/c-icap-0.1.6.ebuild,v 1.1 2011/06/10 18:00:51 flameeyes Exp $ + +EAPI=2 + +inherit eutils multilib flag-o-matic autotools + +MY_PN=${PN/-/_} +MY_P=${MY_PN}-${PV} + +DESCRIPTION="C Implementation of an ICAP server" +HOMEPAGE="http://c-icap.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="berkdb ldap ipv6 ldap" + +RDEPEND="berkdb? ( sys-libs/db ) + ldap? ( net-nds/openldap ) + sys-libs/zlib" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + epatch "${FILESDIR}/${PN}-0.1.3-asneeded.patch" + epatch "${FILESDIR}/${PN}-0.1.3-implicit.patch" + epatch "${FILESDIR}/${PN}-0.1.3+db-5.0.patch" + epatch "${FILESDIR}/${PN}-0.1.4-crosscompile.patch" + epatch "${FILESDIR}/${PN}-0.1.6-implicit.patch" + eautoreconf +} + +src_configure() { + # some void *** pointers get casted around and can be troublesome to + # fix properly. + append-flags -fno-strict-aliasing + + econf \ + --sysconfdir=/etc/${PN} \ + --disable-dependency-tracking \ + --disable-maintainer-mode \ + --disable-static \ + --enable-large-files \ + $(use_enable ipv6) \ + $(use_with berkdb bdb) \ + $(use_with ldap) +} + +src_compile() { + emake LOGDIR="/var/log" || die +} + +src_install() { + emake \ + LOGDIR="/var/log" \ + DESTDIR="${D}" install || die + + find "${D}" -name '*.la' -delete || die + + # Move the daemon out of the way + dodir /usr/libexec + mv "${D}"/usr/bin/c-icap "${D}"/usr/libexec || die + + # Remove the default configuration files since we have etc-update to + # take care of it for us. + rm "${D}"/etc/${PN}/c-icap.*.default || die + + # Fix the configuration file; for some reason it's a bit messy + # around. + sed -i \ + -e 's:/usr/var/:/var/:g' \ + -e 's:/var/log/:/var/log/c-icap/:g' \ + -e 's:/usr/etc/:/etc/c-icap/:g' \ + -e 's:/usr/local/c-icap/etc/:/etc/c-icap/:g' \ + -e 's:/usr/lib/:/usr/'$(get_libdir)'/:g' \ + "${D}"/etc/${PN}/c-icap.conf \ + || die + + dodoc AUTHORS README TODO ChangeLog || die + + newinitd "${FILESDIR}/${PN}.init" ${PN} || die + keepdir /var/log/c-icap || die + + insopts -m0644 + insinto /etc/logrotate.d + newins "${FILESDIR}"/${PN}.logrotate ${PN} +} + +pkg_postinst() { + elog "To enable Squid to call the ICAP modules from a local server you should set" + elog "the following in your squid.conf:" + elog "" + elog " icap_enable on" + elog "" + elog " # not strictly needed, but some modules might make use of these" + elog " icap_send_client_ip on" + elog " icap_send_client_username on" + elog "" + elog " icap_service service_req reqmod_precache bypass=1 icap://localhost:1344/service" + elog " adaptation_access service_req allow all" + elog "" + elog " icap_service service_resp respmod_precache bypass=0 icap://localhost:1344/service" + elog " adaptation_access service_resp allow all" + elog "" + elog "You obviously will have to replace \"service\" with the actual ICAP service to" + elog "use." +} diff --git a/net-proxy/c-icap/files/c-icap-0.1.4-crosscompile.patch b/net-proxy/c-icap/files/c-icap-0.1.4-crosscompile.patch new file mode 100644 index 000000000000..2e2a325989bb --- /dev/null +++ b/net-proxy/c-icap/files/c-icap-0.1.4-crosscompile.patch @@ -0,0 +1,72 @@ +--- a/configure.in 2010-12-21 17:50:08.000000000 +0100 ++++ b/configure.in 2011-06-10 00:24:06.000000000 +0200 +@@ -423,10 +423,8 @@ + ) + + dnl Checking if interprocess posix semaphores works.... +-POSIX_SEMAPHORES="0" +-AC_MSG_CHECKING(if posix 1003.1b interprocess semaphores works) +-AC_TRY_RUN( +-[ ++AC_CACHE_CHECK([if posix 1003.1b interprocess semaphores works], ac_cv_10031b_ipc_sem, ++[AC_TRY_RUN([ + #include <semaphore.h> + #include <sys/wait.h> + +@@ -452,18 +450,24 @@ + exit(0); + } + ], +-AC_DEFINE(HAVE_POSIX_SEMAPHORES,1,[Define HAVE_POSIX_SEMAPHORES if posix 1003.1b semaphores works]) +-POSIX_SEMAPHORES="1" +-AC_MSG_RESULT(yes), +-AC_MSG_RESULT(no) ++ac_cv_10031b_ipc_sem=yes, ++ac_cv_10031b_ipc_sem=no, ++[AC_MSG_ERROR([cross-compiling, ++ presetting ac_cv_10031b_ipc_sem=(yes|no) will help])] + ) ++]) ++AS_IF( ++ [test $ac_cv_10031b_ipc_sem = yes], ++ [AC_DEFINE(HAVE_POSIX_SEMAPHORES,1,[Define HAVE_POSIX_SEMAPHORES if posix 1003.1b semaphores works]) ++ POSIX_SEMAPHORES="1" ++ ],[ ++ POSIX_SEMAPHORES="0" ++ ]) + AC_SUBST(POSIX_SEMAPHORES) + + dnl Checking for file locking +-POSIX_FILE_LOCK="0" +-AC_MSG_CHECKING(if fcntl file locking works) +-AC_TRY_RUN( +-[ ++AC_CACHE_CHECK([if fcntl file locking works], ac_cv_fcntl, ++[AC_TRY_RUN([ + #include <unistd.h> + #include <fcntl.h> + +@@ -487,11 +491,19 @@ + return 0; + } + ], +-AC_DEFINE(HAVE_POSIX_FILE_LOCK,1,[Define HAVE_POSIX_FILE_LOCK if posix fcntl file locking works]) +-POSIX_FILE_LOCK="1" +-AC_MSG_RESULT(yes), +-AC_MSG_RESULT(no) ++ac_cv_fcntl=yes, ++ac_cv_fcntl=no, ++[AC_MSG_ERROR([cross-compiling, ++ presetting ac_cv_fcntl=(yes|no) will help])] + ) ++]) ++AS_IF( ++ [test $ac_cv_fcntl = yes], ++ [AC_DEFINE(HAVE_POSIX_FILE_LOCK,1,[Define HAVE_POSIX_FILE_LOCK if posix fcntl file locking works]) ++ POSIX_FILE_LOCK="1" ++ ],[ ++ POSIX_FILE_LOCK="0" ++ ]) + AC_SUBST(POSIX_FILE_LOCK) + + #pthread_rwlock diff --git a/net-proxy/c-icap/files/c-icap-0.1.6-implicit.patch b/net-proxy/c-icap/files/c-icap-0.1.6-implicit.patch new file mode 100644 index 000000000000..aabffea7dc53 --- /dev/null +++ b/net-proxy/c-icap/files/c-icap-0.1.6-implicit.patch @@ -0,0 +1,12 @@ +Index: c_icap-0.1.6/txtTemplate.c +=================================================================== +--- c_icap-0.1.6.orig/txtTemplate.c ++++ c_icap-0.1.6/txtTemplate.c +@@ -27,6 +27,7 @@ + #include <sys/param.h> + #include <assert.h> + #include <stdlib.h> ++#include <ctype.h> + + #include "body.h" + #include "c-icap.h" |