diff options
author | Stuart Herbert <stuart@gentoo.org> | 2003-07-25 10:42:59 +0000 |
---|---|---|
committer | Stuart Herbert <stuart@gentoo.org> | 2003-07-25 10:42:59 +0000 |
commit | 1a3d7fba7c9022fe489921c9e2c792183a8a0e1f (patch) | |
tree | 7b68557634b906eebf7fb596bd119a5754108455 /eclass | |
parent | fixed foomatic dep (diff) | |
download | gentoo-2-1a3d7fba7c9022fe489921c9e2c792183a8a0e1f.tar.gz gentoo-2-1a3d7fba7c9022fe489921c9e2c792183a8a0e1f.tar.bz2 gentoo-2-1a3d7fba7c9022fe489921c9e2c792183a8a0e1f.zip |
Update for fixing bugs in handling source-based PHP extensions
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/php-ext-base.eclass | 22 | ||||
-rw-r--r-- | eclass/php-ext-source.eclass | 16 |
2 files changed, 23 insertions, 15 deletions
diff --git a/eclass/php-ext-base.eclass b/eclass/php-ext-base.eclass index 2f35dc4fcdf9..da1ae6109508 100644 --- a/eclass/php-ext-base.eclass +++ b/eclass/php-ext-base.eclass @@ -1,11 +1,15 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-base.eclass,v 1.2 2003/07/24 19:06:50 stuart Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-base.eclass,v 1.3 2003/07/25 10:42:59 stuart Exp $ # # Author: Tal Peer <coredumb@gentoo.org> +# Author: Stuart Herbert <stuart@gentoo.org> # -# The php-ext eclass provides a unified interface for compiling and -# installing standalone PHP extensions ('modules'). +# The php-ext-base eclass provides a unified interface for adding standalone +# PHP extensions ('modules') to the php.ini files on your system. +# +# Combined with php-ext-source, we have a standardised solution for supporting +# PHP extensions ECLASS=php-ext-base INHERITED="$INHERITED $ECLASS" @@ -62,18 +66,21 @@ php-ext-base_buildinilist () { php-ext-base_src_install() { if [ "$PHP_EXT_INI" = "yes" ] ; then php-ext-base_buildinilist - php-ext-base_addextension "${EXT_DIR}/${PHP_EXT_NAME}.so" + php-ext-base_addextension "${PHP_EXT_NAME}.so" fi } php-ext-base_addextension () { if [ "${PHP_EXT_ZENDEXT}" = "yes" ]; then - ext="zend_extension" + ext_type="zend_extension" + ext_file="${EXT_DIR}/$1" else - ext="extension" + # we do *not* add the full path for the extension! + ext_type="extension" + ext_file="$1" fi - php-ext-base_addtoinifiles "$ext" "$1" "Extension added" + php-ext-base_addtoinifiles "$ext_type" "$ext_file" "Extension added" } php-ext-base_setting_is_present () { @@ -99,7 +106,6 @@ php-ext-base_addtoinifile () { php-ext-base_inifileinimage $3 - echo "output to `pwd`/$3" echo "$1=$2" >> $3 if [ -z "$4" ]; then diff --git a/eclass/php-ext-source.eclass b/eclass/php-ext-source.eclass index 52fd1984a007..3724d7f8740d 100644 --- a/eclass/php-ext-source.eclass +++ b/eclass/php-ext-source.eclass @@ -1,14 +1,16 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-source.eclass,v 1.1 2003/07/24 15:15:50 stuart Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-source.eclass,v 1.2 2003/07/25 10:42:59 stuart Exp $ # # Author: Tal Peer <coredumb@gentoo.org> # Author: Stuart Herbert <stuart@gentoo.org> # -# The php-ext eclass provides a unified interface for compiling and -# installing standalone PHP extensions ('modules'). - -inherit php-ext-base +# The php-ext-source eclass provides a unified interface for compiling and +# installing standalone PHP extensions ('modules') from source code +# +# To use this eclass, you must add the following to your ebuild: +# +# inherit php-ext-source php-ext-base ECLASS=php-ext-source INHERITED="$INHERITED $ECLASS" @@ -28,14 +30,14 @@ DEPEND="${DEPEND} =sys-devel/m4-1.4 >=sys-devel/libtool-1.4.3" -php-ext-base_src_compile() { +php-ext-source_src_compile() { #phpize creates configure out of config.m4 phpize econf $myconf emake || die } -php-ext-base_src_install() { +php-ext-source_src_install() { chmod +x build/shtool #this will usually be /usr/lib/php/extensions/no-debug-no-zts-20020409/ #but i prefer not taking this risk |