From dda36349496e0987f0ccf4f23929f7870ba11813 Mon Sep 17 00:00:00 2001 From: rhatto Date: Wed, 3 Sep 2008 03:50:43 +0000 Subject: merging with changes made since 21th May git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1903 370017ae-e619-0410-ac65-c121f96126d4 --- patches/php/php.SlackBuild | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) (limited to 'patches/php/php.SlackBuild') diff --git a/patches/php/php.SlackBuild b/patches/php/php.SlackBuild index 4240d7a1..4cf904f0 100755 --- a/patches/php/php.SlackBuild +++ b/patches/php/php.SlackBuild @@ -26,18 +26,31 @@ # Changed by rhatto at riseup.net to fit slack.sarava.org needs # -# needs a function from simplepkg, but slightly changed +# needs a function from simplepkg function default_version { # get version from /etc/slackware-version - if [ -f "$1/etc/slackware-version" ]; then # TODO: this changes :/ - cat $1/etc/slackware-version | awk '{ print $2 }' | sed -e 's/.0$//' | tr -d . + if [ -f "$1/etc/slackware-version" ]; then + cat $1/etc/slackware-version | awk '{ print $2 }' | sed -e 's/.0$//' + elif [ -f "$1/etc/slamd64-version" ]; then + cat $1/etc/slamd64-version | awk '{ print $2 }' | sed -e 's/.0$//' + elif [ -f "$1/etc/bluewhite64-version" ]; then + cat $1/etc/bluewhite64-version | awk '{ print $2 }' | sed -e 's/.0$//' + elif [ -f "$1/etc/sflack-version" ]; then + cat $1/etc/sflack-version | awk '{ print $2 }' | sed -e 's/.0$//' else - echo "none" + aaa_base="`basename $(ls $1/var/log/packages/aaa_base-[0-9]* 2> /dev/null)`" + echo `package_version $aaa_base` fi } +function distro_version { + + default_version | tr -d . + +} + if [ -s "slack-required" ]; then echo Recomended and required packages for building php are: cat slack-required | sed -e 's/^/\t/' @@ -60,7 +73,7 @@ fi PACKAGE="php" PHP_SERIES=${PHP_SERIES:=5} -VERSION=${VERSION:=5.2.5} +VERSION=${VERSION:=5.2.6} PINE=${PINE:=4.64} ARCH=${ARCH:=i486} BUILD=${BUILD:=1rha} @@ -81,15 +94,15 @@ SRC="$PACKAGE-$VERSION.tar.bz2" URL="http://br.php.net/distributions/$SRC" # pear modules -DB="DB-1.7.11.tgz" +DB="DB-1.7.13.tgz" HTTP="HTTP-1.4.0.tgz" MAIL="Mail-1.1.14.tgz" -SMTP="Net_SMTP-1.2.10.tgz" -SOCKET="Net_Socket-1.0.8.tgz" +SMTP="Net_SMTP-1.3.1.tgz" +SOCKET="Net_Socket-1.0.9.tgz" PARSER="XML_Parser-1.2.8.tgz" RPC="XML_RPC-1.5.1.tgz" TAR="Archive_Tar-1.3.2.tgz" -GETOPT="Console_Getopt-1.2.2.tgz" +GETOPT="Console_Getopt-1.2.3.tgz" TEMPLATE="HTML_Template_IT-1.2.1.tgz" PEAR="http://pear.php.net/get" @@ -177,7 +190,7 @@ mkdir -p $TMP cd $TMP # changed since slackware 12.0 -if (( `default_version` >= 120 )); then +if (( `distro_version` >= 120 )); then mkdir -p $PKG/etc/httpd mkdir -p $PKG/etc/php # A trick from DaMouse to enable building php into $PKG. @@ -277,7 +290,7 @@ php_configure() { if [ "$PHP_SERIES" == "5" ]; then - if (( `default_version` >= 120 )); then + if (( `distro_version` >= 120 )); then $CONFIG_FILES="--with-config-file-scan-dir=/etc/php --with-config-file-path=/etc/httpd" $SNMP="--with-snmp=shared,/usr" $MBSTRING="--enable-mbstring=shared" @@ -451,7 +464,7 @@ php_configure() { # Make the Apache module version of PHP: echo "***START APACHE MODULE***" -if (( `default_version` >= 120 )); then +if (( `distro_version` >= 120 )); then php_configure --with-apxs2=/usr/sbin/apxs || exit $ERROR_CONF else php_configure --disable-static --with-apxs=/usr/sbin/apxs --enable-discard-path || exit $ERROR_CONF @@ -540,7 +553,7 @@ mkdir -p $PKG/etc/apache cp -a php.ini-dist php.ini-recommended $PKG/etc/apache if [ "$PHP_SERIES" == "5" ]; then - if (( `default_version` >= 120 )); then + if (( `distro_version` >= 120 )); then cp -a $CWD/mod_php$PHP_SERIES-apache2.conf.example $PKG/etc/apache/mod_php.conf.example else cp -a $CWD/mod_php$PHP_SERIES-apache1.3.conf.example $PKG/etc/apache/mod_php.conf.example @@ -555,7 +568,7 @@ chown root:root $PKG/etc/apache/* # This can go now. rm -f $PKG/etc/apache/httpd* -if (( `default_version` >= 120 )); then +if (( `distro_version` >= 120 )); then # Session directory for PHP: mkdir -p $PKG/var/lib/php chmod 770 $PKG/var/lib/php -- cgit v1.2.3