summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2003-10-29 07:07:01 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2003-10-29 07:07:01 +0000
commitafd9f7f280d74052231d7ec2672fc5e30c66d455 (patch)
tree0f140b02b6e1f29ae72e63e1e42d1482511337a7 /net-www/mod_pcgi2
parentmetalog fix0r (diff)
downloadhistorical-afd9f7f280d74052231d7ec2672fc5e30c66d455.tar.gz
historical-afd9f7f280d74052231d7ec2672fc5e30c66d455.tar.bz2
historical-afd9f7f280d74052231d7ec2672fc5e30c66d455.zip
fix compile issues with patch, needs to be sent upstream
Diffstat (limited to 'net-www/mod_pcgi2')
-rw-r--r--net-www/mod_pcgi2/ChangeLog6
-rw-r--r--net-www/mod_pcgi2/Manifest9
-rw-r--r--net-www/mod_pcgi2/files/20_mod_pcgi.conf2
-rw-r--r--net-www/mod_pcgi2/files/mod_pcgi2-2.0.1-macrofix.patch33
-rw-r--r--net-www/mod_pcgi2/metadata.xml4
-rw-r--r--net-www/mod_pcgi2/mod_pcgi2-2.0.1.ebuild81
6 files changed, 116 insertions, 19 deletions
diff --git a/net-www/mod_pcgi2/ChangeLog b/net-www/mod_pcgi2/ChangeLog
index 0f9569e21dd4..7cf76799e15f 100644
--- a/net-www/mod_pcgi2/ChangeLog
+++ b/net-www/mod_pcgi2/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-www/mod_pcgi2
# Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-www/mod_pcgi2/ChangeLog,v 1.2 2003/08/15 06:25:09 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-www/mod_pcgi2/ChangeLog,v 1.3 2003/10/29 07:06:59 robbat2 Exp $
+
+ 28 Oct 2003; Robin H. Johnson <robbat2@gentoo.org> metadata.xml,
+ mod_pcgi2-2.0.1.ebuild, files/20_mod_pcgi.conf:
+ fix compile issues with patch, needs to be sent upstream
14 Aug 2003; Robin H. Johnson <robbat2@gentoo.org> mod_pcgi2-2.0.1.ebuild:
add net-www/pcgi depend
diff --git a/net-www/mod_pcgi2/Manifest b/net-www/mod_pcgi2/Manifest
index f750d7b35529..e3141278fbeb 100644
--- a/net-www/mod_pcgi2/Manifest
+++ b/net-www/mod_pcgi2/Manifest
@@ -1,5 +1,6 @@
-MD5 47730d6481d31ecf867a6117742b61cc ChangeLog 488
-MD5 60e3a7ee1268e32bce296a6076f736c6 metadata.xml 252
-MD5 cc714238cda1085884889749915fad78 mod_pcgi2-2.0.1.ebuild 1188
-MD5 1c7ef801fc579e656a632a1d874c31d1 files/20_mod_pcgi.conf 274
+MD5 fa73120fe71ea58a5ebc3c2925ce7621 mod_pcgi2-2.0.1.ebuild 2960
+MD5 641b69728b8d466113f6a30ab1f0fbe0 ChangeLog 664
+MD5 0c1ffc3eff281366ee07df94a66166e6 metadata.xml 160
+MD5 247a6f4e65181d477578aaf0d9f381fa files/20_mod_pcgi.conf 271
+MD5 1a8eca96144ae6ea1ca0fb9b099c66e8 files/mod_pcgi2-2.0.1-macrofix.patch 1328
MD5 40eeec73ead705f5c91d71cd1a79681a files/digest-mod_pcgi2-2.0.1 70
diff --git a/net-www/mod_pcgi2/files/20_mod_pcgi.conf b/net-www/mod_pcgi2/files/20_mod_pcgi.conf
index 69114015a82c..efccdeabe2ae 100644
--- a/net-www/mod_pcgi2/files/20_mod_pcgi.conf
+++ b/net-www/mod_pcgi2/files/20_mod_pcgi.conf
@@ -1,4 +1,4 @@
-<IfDefine MODPCGI>
+<IfDefine PCGI>
<IfModule !mod_pcgi2.c>
LoadModule mod_pcgi2 extramodules/mod_pcgi2.so
</IfModule>
diff --git a/net-www/mod_pcgi2/files/mod_pcgi2-2.0.1-macrofix.patch b/net-www/mod_pcgi2/files/mod_pcgi2-2.0.1-macrofix.patch
new file mode 100644
index 000000000000..5a3e17f6103a
--- /dev/null
+++ b/net-www/mod_pcgi2/files/mod_pcgi2-2.0.1-macrofix.patch
@@ -0,0 +1,33 @@
+diff -ur pcgi2.old/mod_pcgi2.c pcgi2/mod_pcgi2.c
+--- pcgi2.old/mod_pcgi2.c 2002-05-08 05:15:01.000000000 -0700
++++ pcgi2/mod_pcgi2.c 2003-10-28 23:02:33.000000000 -0800
+@@ -166,12 +166,12 @@
+
+
+ /* Merge resource records */
+-#define CREATE_pcgi_mergef(name, addr, maxsz) static void pcgi_merge_##name##(pcgiResource *r, pcgiResource *base, pcgiResource *overrides) \
++#define CREATE_pcgi_mergef(name, addr, maxsz) static void pcgi_merge_##name(pcgiResource *r, pcgiResource *base, pcgiResource *overrides) \
+ { \
+- if (overrides->##addr##[0]) { \
+- strncpy(r->##addr##, overrides->##addr##, maxsz); \
+- } else if (base->##addr##[0]) { \
+- strncpy(r->##addr##, base->##addr##, maxsz); \
++ if (overrides->addr[0]) { \
++ strncpy(r->addr, overrides->addr, maxsz); \
++ } else if (base->addr[0]) { \
++ strncpy(r->addr, base->addr, maxsz); \
+ } \
+ }
+
+@@ -314,9 +314,9 @@
+
+
+ /* Parse command parameters */
+-#define CREATE_pcgi_setf(name, addr, maxsz) static const char *pcgi_set_##name##(cmd_parms *parms, void *r, const char *arg) \
++#define CREATE_pcgi_setf(name, addr, maxsz) static const char *pcgi_set_##name(cmd_parms *parms, void *r, const char *arg) \
+ { \
+- strncpy(((pcgiResource *)r)->##addr##, arg, maxsz); \
++ strncpy(((pcgiResource *)r)->addr, arg, maxsz); \
+ return NULL; \
+ }
+
diff --git a/net-www/mod_pcgi2/metadata.xml b/net-www/mod_pcgi2/metadata.xml
index 243bb419b1ee..631fc921d87a 100644
--- a/net-www/mod_pcgi2/metadata.xml
+++ b/net-www/mod_pcgi2/metadata.xml
@@ -2,8 +2,4 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>net-www</herd>
-<maintainer>
- <email>robbat2@gentoo.org</email>
- <name>Robin Johnson</name>
-</maintainer>
</pkgmetadata>
diff --git a/net-www/mod_pcgi2/mod_pcgi2-2.0.1.ebuild b/net-www/mod_pcgi2/mod_pcgi2-2.0.1.ebuild
index 54a1322d0910..439ceb48b3bf 100644
--- a/net-www/mod_pcgi2/mod_pcgi2-2.0.1.ebuild
+++ b/net-www/mod_pcgi2/mod_pcgi2-2.0.1.ebuild
@@ -1,16 +1,46 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-www/mod_pcgi2/mod_pcgi2-2.0.1.ebuild,v 1.3 2003/09/06 01:54:08 msterret Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-www/mod_pcgi2/mod_pcgi2-2.0.1.ebuild,v 1.4 2003/10/29 07:06:59 robbat2 Exp $
-apachedir='1'
-apache=''
-use apache2 && apache=2 apachedir=2
+detectapache() {
+ local domsg=
+ [ -n "$1" ] && domsg=1
+ HAVE_APACHE1=
+ HAVE_APACHE2=
+ has_version '=net-www/apache-1*' && HAVE_APACHE1=1
+ has_version '=net-www/apache-2*' && HAVE_APACHE2=1
+
+ [ -n "${HAVE_APACHE1}" ] && APACHEVER=1
+ [ -n "${HAVE_APACHE2}" ] && APACHEVER=2
+ [ -n "${HAVE_APACHE1}" ] && [ -n "${HAVE_APACHE2}" ] && APACHEVER='both'
+
+ case "${APACHEVER}" in
+ 1) [ -n "${domsg}" ] && einfo 'Apache1 only detected' ;;
+ 2) [ -n "${domsg}" ] && einfo 'Apache2 only detected';;
+ both)
+ if [ "`use apache2`" ]; then
+ [ -n "${domsg}" ] && einfo "Multiple Apache versions detected, using Apache2 (USE=apache2)"
+ APACHEVER=2
+ else
+ [ -n "${domsg}" ] && einfo 'Multiple Apache versions detected, using Apache1 (USE=-apache2)'
+ APACHEVER=1
+ fi ;;
+ *) if [ -n "${domsg}" ]; then
+ MSG="Unknown Apache version!"; eerror $MSG ; die $MSG
+ else
+ APACHEVER=0
+ fi; ;;
+ esac
+}
+detectapache
+SLOT="${APACHEVER}"
+[ "${APACHEVER}" -eq '2' ] && USE_APACHE2='2' || USE_APACHE2=''
DESCRIPTION="An Apache module to talk to Zope Corporation's PCGI"
HOMEPAGE="http://www.zope.org/Members/phd/${PN}/"
SRC_URI="http://zope.org/Members/phd/${PN}/${PV}/${P}-src.tar.gz"
LICENSE="GPL-2"
-SLOT="${apachedir}"
+SLOT="${APACHEVER}"
KEYWORDS="~x86"
IUSE="apache2"
@@ -21,13 +51,20 @@ DEPEND="${DEPEND}
#RDEPEND=""
S=${WORKDIR}/${PN/mod_}
+src_unpack() {
+ unpack ${A}
+ epatch ${FILESDIR}/${PN}-2.0.1-macrofix.patch
+}
+
src_compile() {
- if use apache2; then
+ detectapache true
+ if [ -n "${USE_APACHE2}" ]; then
apxs2 \
-n pcgi2 \
-DUNIX -DAPACHE2 -DMOD_PCGI2 \
- -c mod_pcgi2.c pcgi-wrapper.c parseinfo.c
- #-o mod_pcgi.so \
+ -c mod_pcgi2.c pcgi-wrapper.c parseinfo.c \
+ || die "axps2 failed!"
+ #-o mod_pcgi2.so \
else
apxs \
-Wc,-DMOD_PCGI2 \
@@ -35,14 +72,40 @@ src_compile() {
-Wc,-DHAVE_UNION_SEMUN \
-I./ \
-o mod_pcgi2.so \
- -c mod_pcgi2.c parseinfo.c pcgi-wrapper.c
+ -c mod_pcgi2.c parseinfo.c pcgi-wrapper.c \
+ || die "axps failed!"
fi
}
src_install() {
+ detectapache
dodoc NEWS README TODO ChangeLog
exeinto /usr/lib/apache${apache}-extramodules
doexe .libs/${PN}.so
insinto /etc/apache${apache}/conf/modules.d
doins ${FILESDIR}/20_mod_pcgi.conf
}
+
+pkg_postinst() {
+ detectapache
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Add '-D PCGI' to your APACHE2_OPTS in /etc/conf.d/apache2"
+ else
+ einfo "1. Execute the command:"
+ einfo " \"ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config\""
+ einfo "2. Edit /etc/conf.d/apache and add \"-D PCGI\" to APACHE_OPTS"
+ fi
+}
+
+pkg_config() {
+ detectapache
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Add '-D PCGI' to your APACHE2_OPTS in /etc/conf.d/apache2"
+ else
+ ${ROOT}/usr/sbin/apacheaddmod \
+ ${ROOT}/etc/apache/conf/apache.conf \
+ extramodules/mod_pcgi2.so mod_pcgi2.c pcgi_module \
+ before=perl define=pcgi addconf=conf/modules.d/20_mod_pcgi.conf
+ :;
+ fi
+}