From fa36b588e5dc77d080e5fe42fb76fccdc1b6a730 Mon Sep 17 00:00:00 2001 From: Luca Longinotti Date: Mon, 15 Jan 2007 19:59:55 +0000 Subject: [PATCH] Cleanup. Package-Manager: portage-2.1.2_rc4-r8 --- dev-python/mod_python/ChangeLog | 8 +++- .../mod_python/files/16_mod_python.conf | 40 +++++++++++++++++ dev-python/mod_python/metadata.xml | 2 +- .../mod_python/mod_python-2.7.11.ebuild | 45 +++++++++---------- .../mod_python/mod_python-3.1.4-r1.ebuild | 39 ++++++++-------- .../mod_python/mod_python-3.2.10.ebuild | 35 +++++++-------- 6 files changed, 105 insertions(+), 64 deletions(-) create mode 100644 dev-python/mod_python/files/16_mod_python.conf diff --git a/dev-python/mod_python/ChangeLog b/dev-python/mod_python/ChangeLog index b106550e5b56..6b391ac0369e 100644 --- a/dev-python/mod_python/ChangeLog +++ b/dev-python/mod_python/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-python/mod_python # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/mod_python/ChangeLog,v 1.49 2007/01/13 18:43:55 chtekk Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/mod_python/ChangeLog,v 1.50 2007/01/15 19:59:55 chtekk Exp $ + + 15 Jan 2007; Luca Longinotti + +files/16_mod_python.conf, -files/16_mod_python-r1.conf, metadata.xml, + mod_python-2.7.11.ebuild, mod_python-3.1.4-r1.ebuild, + mod_python-3.2.10.ebuild: + Cleanup. 13 Jan 2007; Luca Longinotti -files/16_mod_python.conf, -files/publisher-2.diff, diff --git a/dev-python/mod_python/files/16_mod_python.conf b/dev-python/mod_python/files/16_mod_python.conf new file mode 100644 index 000000000000..c2df73cf8ff2 --- /dev/null +++ b/dev-python/mod_python/files/16_mod_python.conf @@ -0,0 +1,40 @@ + + + LoadModule python_module modules/mod_python.so + + + + +# +# Mod_python is a module that embeds the Python language interpreter +# within the server, allowing Apache handlers to be written in Python. +# + +# This will cause files beneath /home/httpd/htdocs with the extension .spam +# to be handled by the Python script /home/httpd/htdocs/eggs.py +# +# +# +# AddHandler python-program .spam +# +# PythonHandler eggs +# + +# This will cause all requests to the /python heirachy of your +# webserver to be handled by the python script /path/to/myhandler.py +# +# +# SetHandler python-program +# PythonPath "sys.path + ['/path/to']" +# PythonHandler myhandler +# + +# This will cause all requests to the /python heirachy of your +# webserver to be handled by mod_python's Publisher handler +# +# +# SetHandler python-program +# PythonHandler mod_python.publisher +# + + diff --git a/dev-python/mod_python/metadata.xml b/dev-python/mod_python/metadata.xml index 65fe83770a56..3c00e8a9126e 100644 --- a/dev-python/mod_python/metadata.xml +++ b/dev-python/mod_python/metadata.xml @@ -1,8 +1,8 @@ -python apache +python Mod_python is an Apache module that embeds the Python interpreter within the server. With mod_python you can write web-based applications in Python diff --git a/dev-python/mod_python/mod_python-2.7.11.ebuild b/dev-python/mod_python/mod_python-2.7.11.ebuild index 0c4e69dc23f6..a6c75dac3c86 100644 --- a/dev-python/mod_python/mod_python-2.7.11.ebuild +++ b/dev-python/mod_python/mod_python-2.7.11.ebuild @@ -1,19 +1,22 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/mod_python/mod_python-2.7.11.ebuild,v 1.5 2007/01/11 19:25:40 phreak Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/mod_python/mod_python-2.7.11.ebuild,v 1.6 2007/01/15 19:59:55 chtekk Exp $ -inherit python apache-module +inherit python apache-module multilib -DESCRIPTION="Python module for Apache 1.x, not for Apache 2.x" -SRC_URI="mirror://apache/httpd/modpython/${P}.tgz" -HOMEPAGE="http://www.modpython.org/" +KEYWORDS="~amd64 x86" +DESCRIPTION="An Apache1 module providing an embedded Python interpreter." +HOMEPAGE="http://www.modpython.org/" +SRC_URI="mirror://apache/httpd/modpython/${P}.tgz" LICENSE="as-is" -KEYWORDS="x86 ~amd64" SLOT="0" IUSE="" -#APACHE1_MOD_CONF="16_${PN}-r1" +DEPEND="dev-lang/python" +RDEPEND="${DEPEND}" + +APACHE1_MOD_CONF="16_${PN}" APACHE1_MOD_DEFINE="PYTHON" DOCFILES="COPYRIGHT CREDITS NEWS README" @@ -25,34 +28,30 @@ src_compile() { # because the last task (make depend) is somehow borked echo 'echo "configure done"' >> configure - sed -ie 's:OPT=:OPT=$(OPTFLAGS):' ${S}/src/Makefile.in - sed -ie 's/\(\\"thread\\" in sys.builtin_module_names\)/int(\1)/' ${S}/configure + sed -ie 's:OPT=:OPT=$(OPTFLAGS):' "${S}/src/Makefile.in" + sed -ie 's/\(\\"thread\\" in sys.builtin_module_names\)/int(\1)/' "${S}/configure" export OPTFLAGS="`/usr/sbin/apxs -q CFLAGS` -fPIC" - econf --with-apxs=${APXS1} + econf --with-apxs=${APXS1} || die "econf failed" - sed -ie 's:LIBEXECDIR=:LIBEXECDIR=${D}:' Makefile - sed -ie 's:PY_STD_LIB=:PY_STD_LIB=${D}:' Makefile - sed -ie 's:CFLAGS=$(OPT) $(INCLUDES):CFLAGS=$(OPT) $(INCLUDES) -DEAPI -O0:' ${S}/src/Makefile + sed -ie 's:LIBEXECDIR=:LIBEXECDIR=${D}:' "Makefile" + sed -ie 's:PY_STD_LIB=:PY_STD_LIB=${D}:' "Makefile" + sed -ie 's:CFLAGS=$(OPT) $(INCLUDES):CFLAGS=$(OPT) $(INCLUDES) -DEAPI -O0:' "${S}/src/Makefile" emake || die "emake failed" } src_install() { python_version - PY_LIBPATH="/usr/lib/python${PYVER}" - - dodir ${APACHE1_MODULESDIR} - dodir ${PY_LIBPATH} + PY_LIBPATH="/usr/$(get_libdir)/python${PYVER}" + dodir "${PY_LIBPATH}" # compileall.py is needed or make install will fail - cp ${PY_LIBPATH}/compileall.py ${D}${PY_LIBPATH} - emake install || die - rm ${D}${PY_LIBPATH}/compileall.py + cp -f "${PY_LIBPATH}/compileall.py" "${D}${PY_LIBPATH}/compileall.py" + emake DESTDIR="${D}" install || die "emake install failed" + rm -f "${D}${PY_LIBPATH}/compileall.py" - insinto /usr/share/doc/${PF}/html + insinto "/usr/share/doc/${PF}/html" doins -r doc-html/* apache-module_src_install - insinto ${APACHE1_MODULES_CONFDIR} - newins ${FILESDIR}/16_${PN}-r1.conf 16_${PN}.conf } diff --git a/dev-python/mod_python/mod_python-3.1.4-r1.ebuild b/dev-python/mod_python/mod_python-3.1.4-r1.ebuild index 55ae9095584c..d5985ed15b3b 100644 --- a/dev-python/mod_python/mod_python-3.1.4-r1.ebuild +++ b/dev-python/mod_python/mod_python-3.1.4-r1.ebuild @@ -1,21 +1,22 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/mod_python/mod_python-3.1.4-r1.ebuild,v 1.11 2007/01/11 19:25:40 phreak Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/mod_python/mod_python-3.1.4-r1.ebuild,v 1.12 2007/01/15 19:59:55 chtekk Exp $ -inherit python eutils apache-module autotools +inherit python eutils apache-module multilib autotools -DESCRIPTION="An Apache2 DSO providing an embedded Python interpreter" +KEYWORDS="alpha amd64 ia64 ppc sparc x86" + +DESCRIPTION="An Apache2 module providing an embedded Python interpreter." HOMEPAGE="http://www.modpython.org/" SRC_URI="mirror://apache/httpd/modpython/${P}.tgz" - LICENSE="Apache-1.1" SLOT="0" -KEYWORDS="alpha amd64 ia64 ppc sparc x86" IUSE="" + DEPEND="dev-lang/python" RDEPEND="${DEPEND}" -#APACHE2_MOD_CONF="2.7.11/16_${PN}" +APACHE2_MOD_CONF="16_${PN}" APACHE2_MOD_DEFINE="PYTHON" DOCFILES="README NEWS CREDITS COPYRIGHT" @@ -23,40 +24,36 @@ DOCFILES="README NEWS CREDITS COPYRIGHT" need_apache2 src_unpack() { - unpack ${A} || die "unpack failed" - cd ${S} || die "cd \$S failed" + unpack ${A} + cd "${S}" - # remove optimisations, we do that outside portage - sed -ie 's:--optimize 2:--no-compile:' dist/Makefile.in + # Remove optimisations, we do that outside Portage + sed -ie 's:--optimize 2:--no-compile:' "dist/Makefile.in" - # Fix compilation when using Python-2.3 - if has_version ">=dev-lang/python-2.3"; then + # Fix compilation when using Python 2.3 or newer + if has_version ">=dev-lang/python-2.3" ; then sed -ie 's:LONG_LONG:PY_LONG_LONG:g' "${S}/src/requestobject.c" fi - # fix configure with bash 3.1 + # Fix configure with Bash 3.1 epatch "${FILESDIR}/${P}-configure-bash-3.1.patch" eautoconf } src_compile() { - econf --with-apxs=${APXS2} || die - emake OPT="`apxs2 -q CFLAGS` -fPIC" || die + econf --with-apxs=${APXS2} || die "econf failed" + emake OPT="`apxs2 -q CFLAGS` -fPIC" || die "emake failed" } src_install() { - emake DESTDIR=${D} install || die - + emake DESTDIR="${D}" install || die "emake install failed" dohtml -r doc-html/* - apache-module_src_install - insinto ${APACHE2_MODULES_CONFDIR} - newins ${FILESDIR}/16_${PN}-r1.conf 16_${PN}.conf } pkg_postinst() { python_version - python_mod_optimize /usr/lib/python${PYVER}/site-packages/mod_python + python_mod_optimize "/usr/$(get_libdir)/python${PYVER}/site-packages/mod_python" apache-module_pkg_postinst } diff --git a/dev-python/mod_python/mod_python-3.2.10.ebuild b/dev-python/mod_python/mod_python-3.2.10.ebuild index 03f80c64d086..70e3513ea403 100644 --- a/dev-python/mod_python/mod_python-3.2.10.ebuild +++ b/dev-python/mod_python/mod_python-3.2.10.ebuild @@ -1,19 +1,22 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/mod_python/mod_python-3.2.10.ebuild,v 1.2 2007/01/11 19:25:40 phreak Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/mod_python/mod_python-3.2.10.ebuild,v 1.3 2007/01/15 19:59:55 chtekk Exp $ -inherit python eutils apache-module autotools +inherit python apache-module multilib autotools -DESCRIPTION="An Apache2 DSO providing an embedded Python interpreter" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sparc ~x86" + +DESCRIPTION="An Apache2 module providing an embedded Python interpreter." HOMEPAGE="http://www.modpython.org/" SRC_URI="mirror://apache/httpd/modpython/${P}.tgz" LICENSE="Apache-1.1" SLOT="0" -KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sparc ~x86" IUSE="" + DEPEND="dev-lang/python" RDEPEND="${DEPEND}" +APACHE2_MOD_CONF="16_${PN}" APACHE2_MOD_DEFINE="PYTHON" DOCFILES="README NEWS CREDITS COPYRIGHT" @@ -21,14 +24,14 @@ DOCFILES="README NEWS CREDITS COPYRIGHT" need_apache2 src_unpack() { - unpack ${A} || die "unpack failed" - cd ${S} || die "cd \$S failed" + unpack ${A} + cd "${S}" - # remove optimisations, we do that outside portage - sed -ie 's:--optimize 2:--no-compile:' dist/Makefile.in + # Remove optimisations, we do that outside Portage + sed -ie 's:--optimize 2:--no-compile:' "dist/Makefile.in" - # Fix compilation when using Python-2.3 - if has_version ">=dev-lang/python-2.3"; then + # Fix compilation when using Python 2.3 or newer + if has_version ">=dev-lang/python-2.3" ; then sed -ie 's:LONG_LONG:PY_LONG_LONG:g' "${S}/src/requestobject.c" fi @@ -36,23 +39,19 @@ src_unpack() { } src_compile() { - econf --with-apxs=${APXS2} || die - emake OPT="`apxs2 -q CFLAGS` -fPIC" || die + econf --with-apxs=${APXS2} || die "econf failed" + emake OPT="`apxs2 -q CFLAGS` -fPIC" || die "econf failed" } src_install() { - emake DESTDIR=${D} install || die - + emake DESTDIR="${D}" install || die "emake install failed" dohtml -r doc-html/* - apache-module_src_install - insinto ${APACHE2_MODULES_CONFDIR} - newins ${FILESDIR}/16_${PN}-r1.conf 16_${PN}.conf } pkg_postinst() { python_version - python_mod_optimize /usr/lib/python${PYVER}/site-packages/mod_python + python_mod_optimize "/usr/$(get_libdir)/python${PYVER}/site-packages/mod_python" apache-module_pkg_postinst } -- 2.26.2