diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2006-12-27 06:06:49 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2006-12-27 06:06:49 +0000 |
commit | 987b61de779047cb8ff229b28ab80d36ae63d596 (patch) | |
tree | b6fc5d71c444bd4da520ad2cc27e9f4c96631d79 /www-servers/cherokee | |
parent | add --enable-secureplt by default (diff) | |
download | gentoo-2-987b61de779047cb8ff229b28ab80d36ae63d596.tar.gz gentoo-2-987b61de779047cb8ff229b28ab80d36ae63d596.tar.bz2 gentoo-2-987b61de779047cb8ff229b28ab80d36ae63d596.zip |
Add patches to allow crosscompiling cherokee (submitted upstream as tickets #121, #123 and #124); enable epoll on Linux kernel; use -j1 in install; discover gnutls via pkg-config (upstream ticket #122) and make gnutls useflag subordinate to ssl.
(Portage version: 2.1.2_rc4-r1)
Diffstat (limited to 'www-servers/cherokee')
6 files changed, 133 insertions, 8 deletions
diff --git a/www-servers/cherokee/ChangeLog b/www-servers/cherokee/ChangeLog index 509f2d289e5c..56202271465c 100644 --- a/www-servers/cherokee/ChangeLog +++ b/www-servers/cherokee/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for www-servers/cherokee # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/cherokee/ChangeLog,v 1.33 2006/12/27 05:02:31 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/cherokee/ChangeLog,v 1.34 2006/12/27 06:06:49 flameeyes Exp $ + + 27 Dec 2006; Diego Pettenò <flameeyes@gentoo.org> + +files/cherokee-0.5.6-epoll-crosscompile.patch, + +files/cherokee-0.5.6-gnutls-pkgconfig.patch, + +files/cherokee-0.5.6-replace-with-sed.patch, + +files/cherokee-0.5.6-sendfile-crosscompile.patch, cherokee-0.5.6.ebuild: + Add patches to allow crosscompiling cherokee (submitted upstream as tickets + #121, #123 and #124); enable epoll on Linux kernel; use -j1 in install; + discover gnutls via pkg-config (upstream ticket #122) and make gnutls + useflag subordinate to ssl. 27 Dec 2006; Diego Pettenò <flameeyes@gentoo.org> cherokee-0.5.6.ebuild: Add threads useflag to disable pthread support and also remove images diff --git a/www-servers/cherokee/cherokee-0.5.6.ebuild b/www-servers/cherokee/cherokee-0.5.6.ebuild index 56011a8cc165..00c9eb8e3754 100644 --- a/www-servers/cherokee/cherokee-0.5.6.ebuild +++ b/www-servers/cherokee/cherokee-0.5.6.ebuild @@ -1,8 +1,11 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/cherokee/cherokee-0.5.6.ebuild,v 1.3 2006/12/27 05:02:31 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/cherokee/cherokee-0.5.6.ebuild,v 1.4 2006/12/27 06:06:49 flameeyes Exp $ -inherit eutils pam versionator libtool +WANT_AUTOCONF="latest" +WANT_AUTOMAKE="latest" + +inherit eutils pam versionator libtool autotools DESCRIPTION="An extremely fast and tiny web server." SRC_URI="http://www.cherokee-project.com/download/$(get_version_component_range 1-2)/${PV}/${P}.tar.gz" @@ -11,17 +14,27 @@ HOMEPAGE="http://www.cherokee-project.com/" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~ppc ~sparc ~x86" -IUSE="ipv6 ssl gnutls static pam coverpage threads" +IUSE="ipv6 ssl gnutls static pam coverpage threads kernel_linux" RDEPEND=">=sys-libs/zlib-1.1.4-r1 - gnutls? ( net-libs/gnutls ) - ssl? ( dev-libs/openssl ) + ssl? ( + gnutls? ( net-libs/gnutls ) + !gnutls? ( dev-libs/openssl ) + ) pam? ( virtual/pam )" +DEPEND="${RDEPEND} + dev-util/pkgconfig" src_unpack() { unpack ${A} - elibtoolize + cd "${S}" + epatch "${FILESDIR}/${P}-epoll-crosscompile.patch" + epatch "${FILESDIR}/${P}-sendfile-crosscompile.patch" + epatch "${FILESDIR}/${P}-gnutls-pkgconfig.patch" + epatch "${FILESDIR}/${P}-replace-with-sed.patch" + + AT_M4DIR="m4" eautoreconf # use cherokee user/group sed -i -e 's|^#\(User \).*$|\1cherokee|' \ @@ -63,6 +76,7 @@ src_compile() { $(use_enable pam) \ $(use_enable ipv6) \ $(use_enable threads pthread) \ + $(use_enable kernel_linux epoll) \ --disable-dependency-tracking \ --enable-os-string="Gentoo ${os}" \ --with-wwwroot=/var/www/localhost/htdocs \ @@ -72,7 +86,7 @@ src_compile() { } src_install () { - emake DESTDIR="${D}" docdir="/usr/share/doc/${PF}/html" install || die "make install failed" + emake -j1 DESTDIR="${D}" docdir="/usr/share/doc/${PF}/html" install || die "make install failed" dodoc AUTHORS ChangeLog TODO newpamd pam.d_cherokee ${PN} || die "newpamd failed" diff --git a/www-servers/cherokee/files/cherokee-0.5.6-epoll-crosscompile.patch b/www-servers/cherokee/files/cherokee-0.5.6-epoll-crosscompile.patch new file mode 100644 index 000000000000..9a34a5dcd2b9 --- /dev/null +++ b/www-servers/cherokee/files/cherokee-0.5.6-epoll-crosscompile.patch @@ -0,0 +1,43 @@ +Index: cherokee-0.5.6/configure.in +=================================================================== +--- cherokee-0.5.6.orig/configure.in ++++ cherokee-0.5.6/configure.in +@@ -274,13 +274,20 @@ fi + dnl + dnl Epoll + dnl +-AC_CHECK_HEADER(sys/epoll.h, have_epoll_include=yes, have_epoll_include=no) + +-have_epoll=no +-if test "x$have_epoll_include" = "xyes"; then +- AC_MSG_CHECKING(for epoll system call) ++AC_ARG_ENABLE([epoll], AC_HELP_STRING([--disable-epoll], [Disable epoll system call usage, default: check])) + +- AC_TRY_RUN([ ++have_epoll=no ++if test "x$enable_epoll" != "xno"; then ++ AC_CHECK_HEADER(sys/epoll.h, have_epoll_include=yes, have_epoll_include=no) ++ if test "x$have_epoll_include" = "xyes"; then ++ AC_MSG_CHECKING(for epoll system call) ++ ++ if test "$host" != "$build"; then ++ AC_MSG_RESULT([crosscompile, assuming yes]) ++ have_epoll=yes ++ else ++ AC_TRY_RUN([ + #include <stdint.h> + #include <sys/param.h> + #include <sys/types.h> +@@ -297,8 +304,10 @@ if test "x$have_epoll_include" = "xyes"; + epfd = epoll_create(256); + exit (epfd == -1 ? 1 : 0); + } +- ], have_epoll=yes) +- AC_MSG_RESULT($have_epoll) ++ ], have_epoll=yes) ++ AC_MSG_RESULT($have_epoll) ++ fi ++ fi + fi + + dnl diff --git a/www-servers/cherokee/files/cherokee-0.5.6-gnutls-pkgconfig.patch b/www-servers/cherokee/files/cherokee-0.5.6-gnutls-pkgconfig.patch new file mode 100644 index 000000000000..258779762214 --- /dev/null +++ b/www-servers/cherokee/files/cherokee-0.5.6-gnutls-pkgconfig.patch @@ -0,0 +1,17 @@ +Index: cherokee-0.5.6/configure.in +=================================================================== +--- cherokee-0.5.6.orig/configure.in ++++ cherokee-0.5.6/configure.in +@@ -861,11 +861,9 @@ then + dnl + dnl GNUTLS + dnl +- AM_PATH_LIBGNUTLS(1.0.4, [have_gnutls=yes], [have_gnutls=no]) ++ PKG_CHECK_MODULES([TLS], [gnutls >= 1.0.4], [have_gnutls=yes], [have_gnutls=no]) + if test "$have_gnutls" = "yes" + then +- TLS_LIBS="$LIBGNUTLS_LIBS" +- TLS_CFLAGS="$LIBGNUTLS_CFLAGS" + AC_SUBST(TLS_LIBS) + AC_SUBST(TLS_CFLAGS) + diff --git a/www-servers/cherokee/files/cherokee-0.5.6-replace-with-sed.patch b/www-servers/cherokee/files/cherokee-0.5.6-replace-with-sed.patch new file mode 100644 index 000000000000..e880320c1e25 --- /dev/null +++ b/www-servers/cherokee/files/cherokee-0.5.6-replace-with-sed.patch @@ -0,0 +1,21 @@ +Index: cherokee-0.5.6/Makefile.am +=================================================================== +--- cherokee-0.5.6.orig/Makefile.am ++++ cherokee-0.5.6/Makefile.am +@@ -19,15 +19,11 @@ cherokee_logrotate.1 + pkgconfigdir = $(libdir)/pkgconfig + pkgconfig_DATA = cherokee.pc + +-# Replacement utility +-noinst_PROGRAMS = cherokee_replace +-cherokee_replace_SOURCES = cherokee_replace.c +- + # Configuration files + cherokeeconfdir = $(sysconfdir)/cherokee + + .sample.pre.sample: +- $(top_builddir)/cherokee_replace $< $@ "%sysconfdir%" "${sysconfdir}" "%datadir%" "${datadir}" "%prefix%" "${prefix}" "%wwwroot%" "${WWW_ROOT}" ++ sed -e "s|%sysconfdir%|${sysconfdir}|g; s|%datadir%|${datadir}|g; s|%prefix%|${prefix}|g; s|%wwwroot%|${WWW_ROOT}|g" $< > $@ + + CONFS_PRE = \ + mods-ssl.sample.pre \ diff --git a/www-servers/cherokee/files/cherokee-0.5.6-sendfile-crosscompile.patch b/www-servers/cherokee/files/cherokee-0.5.6-sendfile-crosscompile.patch new file mode 100644 index 000000000000..dedeab0ea791 --- /dev/null +++ b/www-servers/cherokee/files/cherokee-0.5.6-sendfile-crosscompile.patch @@ -0,0 +1,20 @@ +Index: cherokee-0.5.6/configure.in +=================================================================== +--- cherokee-0.5.6.orig/configure.in ++++ cherokee-0.5.6/configure.in +@@ -634,6 +634,7 @@ ETR_SOCKET_NSL + SENDFILE_CHECK + + # Is sendfile broken? ++if test "$host" = "$build"; then + AC_MSG_CHECKING(if sendfile works) + AC_TRY_RUN([#include <errno.h> + int main() { +@@ -644,6 +645,7 @@ AC_TRY_RUN([#include <errno.h> + AC_MSG_RESULT(yes), + [ AC_MSG_RESULT(no) + AC_DEFINE([HAVE_SENDFILE_BROKEN], [1], [broken sendfile]) ]) ++fi + + # readdir_r() + LIBWWW_READDIR_R_TYPE |