summaryrefslogtreecommitdiff
path: root/source/n/php/php.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/php/php.SlackBuild')
-rwxr-xr-xsource/n/php/php.SlackBuild44
1 files changed, 31 insertions, 13 deletions
diff --git a/source/n/php/php.SlackBuild b/source/n/php/php.SlackBuild
index 5f8e2d35..dc0b74bb 100755
--- a/source/n/php/php.SlackBuild
+++ b/source/n/php/php.SlackBuild
@@ -3,7 +3,7 @@
# Build and package mod_php on Slackware.
# by: David Cantrell <david@slackware.com>
# Modified for PHP 4-5 by volkerdi@slackware.com
-# Copyright 2007, 2008, 2009 Patrick Volkerding, Sebeka, MN, USA
+# Copyright 2007, 2008, 2009, 2010 Patrick Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,11 +24,20 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=5.2.10
+VERSION=5.2.13
ALPINE=2.00
-ARCH=${ARCH:-x86_64}
BUILD=${BUILD:-2}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
NUMJOBS=${NUMJOBS:-" -j7 "}
CWD=$(pwd)
@@ -37,7 +46,10 @@ PKG=$TMP/package-php/
rm -rf $PKG
mkdir -p $TMP $PKG
-if [ "$ARCH" = "i486" ]; then
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
@@ -46,6 +58,9 @@ elif [ "$ARCH" = "s390" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
# we need to compile alpine to get c-client.a for IMAP support:
@@ -77,9 +92,12 @@ fi
cd $TMP
rm -rf php-$VERSION
-tar xvf $CWD/php-$VERSION.tar.bz2 || exit 1
+tar xvf $CWD/php-$VERSION.tar.?z* || exit 1
cd php-$VERSION
+zcat $CWD/php.gmp5.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/php.gd_libpng-1.4.diff.gz | patch -p1 --verbose || exit 1
+
# Add missing(?) PEAR modules back:
if [ -d php-$VERSION/pear/packages ]; then
( cd php-$VERSION/pear/packages
@@ -178,7 +196,7 @@ CFLAGS="$SLKCFLAGS" \
--with-mysqli=shared,/usr/bin/mysql_config \
--enable-pdo=shared \
--with-pdo-mysql=shared,/usr \
- --with-pdo-sqlite=shared \
+ --with-pdo-sqlite=shared,/usr \
--with-pspell=shared,/usr \
--with-mm=/usr \
--enable-shmop=shared \
@@ -244,13 +262,13 @@ chmod 755 $PKG/usr/bin/pear
rm -rf .channels .depdb .depdblock .filemap .lock .registry
)
-# Fix a couple broken .reg files in php-5.2.10:
-if ! grep -q Download $PKG/usr/lib${LIBDIRSUFFIX}/php/.channels/pear.php.net.reg ; then
- cat $CWD/channels/pear.php.net.reg > $PKG/usr/lib${LIBDIRSUFFIX}/php/.channels/pear.php.net.reg
-fi
-if ! grep -q Download $PKG/usr/lib${LIBDIRSUFFIX}/php/.channels/pecl.php.net.reg ; then
- cat $CWD/channels/pecl.php.net.reg > $PKG/usr/lib${LIBDIRSUFFIX}/php/.channels/pecl.php.net.reg
-fi
+## Fix a couple broken .reg files in php-5.2.10:
+#if ! grep -q Download $PKG/usr/lib${LIBDIRSUFFIX}/php/.channels/pear.php.net.reg ; then
+# cat $CWD/channels/pear.php.net.reg > $PKG/usr/lib${LIBDIRSUFFIX}/php/.channels/pear.php.net.reg
+#fi
+#if ! grep -q Download $PKG/usr/lib${LIBDIRSUFFIX}/php/.channels/pecl.php.net.reg ; then
+# cat $CWD/channels/pecl.php.net.reg > $PKG/usr/lib${LIBDIRSUFFIX}/php/.channels/pecl.php.net.reg
+#fi
# Fix $PKG/usr/lib/php perms:
( cd $PKG/usr/lib${LIBDIRSUFFIX}/php