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.SlackBuild60
1 files changed, 20 insertions, 40 deletions
diff --git a/source/n/php/php.SlackBuild b/source/n/php/php.SlackBuild
index dc0b74bb..7a1fc1fd 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, 2010 Patrick Volkerding, Sebeka, MN, USA
+# Copyright 2007, 2008, 2009, 2010, 2011 Patrick Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,9 +24,9 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=5.2.13
+VERSION=5.3.6
ALPINE=2.00
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-6}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -95,8 +95,8 @@ rm -rf php-$VERSION
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
+# cleanup:
+find . -name "*.orig" -delete
# Add missing(?) PEAR modules back:
if [ -d php-$VERSION/pear/packages ]; then
@@ -124,12 +124,9 @@ find . -name "*.h" -exec chmod 644 {} \;
find . -name "*.orig" -exec rm {} \;
# Patch ini files:
-zcat $CWD/php.ini.diff.gz \
- | sed -e "s#usr/lib/php#usr/lib${LIBDIRSUFFIX}/php#" \
- | patch -p1 --verbose --backup --suffix=.orig || exit 1
-zcat $CWD/php.recommended.ini.diff.gz \
- | sed -e "s#usr/lib/php#usr/lib${LIBDIRSUFFIX}/php#" \
- | patch -p1 --verbose --backup --suffix=.orig || exit 1
+zcat $CWD/php.ini-development.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/php.ini-development.diff.gz | patch -p1 --verbose php.ini-production || exit 1
+zcat $CWD/php.session.save_path.diff.gz | patch -p1 --verbose || exit 1
# Generic "kitchen sink" configure function, with as many things as possible (and
# maybe then some ;-) compiled as shared extensions:
@@ -155,7 +152,6 @@ CFLAGS="$SLKCFLAGS" \
--enable-xml \
--with-libxml-dir=/usr \
--enable-simplexml \
- --enable-spl \
--enable-filter \
--disable-debug \
--with-openssl=shared \
@@ -171,7 +167,6 @@ CFLAGS="$SLKCFLAGS" \
--enable-dba=shared \
--with-gdbm=/usr \
--with-db4=/usr \
- --enable-dbase=shared \
--enable-exif=shared \
--enable-ftp=shared \
--with-gd=shared \
@@ -191,19 +186,21 @@ CFLAGS="$SLKCFLAGS" \
--with-ldap=shared \
--enable-mbstring=shared \
--enable-hash \
- --with-mhash=shared,/usr \
- --with-mysql=shared,/usr \
- --with-mysqli=shared,/usr/bin/mysql_config \
+ --with-mysql=shared,mysqlnd \
+ --with-mysqli=shared,mysqlnd \
+ --with-mysql-sock=/var/run/mysql/mysql.sock \
--enable-pdo=shared \
- --with-pdo-mysql=shared,/usr \
+ --with-pdo-mysql=shared,mysqlnd \
--with-pdo-sqlite=shared,/usr \
--with-pspell=shared,/usr \
+ --with-enchant=shared,/usr \
--with-mm=/usr \
--enable-shmop=shared \
--with-snmp=shared,/usr \
--enable-soap=shared \
--enable-sockets \
--with-sqlite=shared \
+ --with-sqlite3=shared \
--enable-sqlite-utf8 \
--with-regex=php \
--enable-sysvmsg \
@@ -232,44 +229,26 @@ php_configure \
make $NUMJOBS || make || exit 1
make install INSTALL_ROOT=$PKG || exit 1
-# Make the CLI version of PHP:
+# Make the CLI/CGI version of PHP:
make distclean
php_configure \
- --enable-force-cgi-redirect \
--enable-pcntl \
--enable-sigchild
make $NUMJOBS || make || exit 1
mkdir -p $PKG/usr/bin
cat ./sapi/cli/php > $PKG/usr/bin/php
+cat ./sapi/cgi/php-cgi > $PKG/usr/bin/php-cgi
chmod 755 $PKG/usr/bin/php
-
-# Make the FastCGI interpreter:
-make distclean
-php_configure \
- --enable-fastcgi \
- --enable-pcntl \
- --enable-sigchild
-make $NUMJOBS || make || exit 1
-mkdir -p $PKG/usr/bin
-cat sapi/cgi/php-cgi > $PKG/usr/bin/php-cgi
chmod 755 $PKG/usr/bin/php-cgi
# PHP (used to) install Pear with some strange permissions.
chmod 755 $PKG/usr/bin/pear
-
+
# PHP sometimes puts junk in the root directory:
( cd $PKG
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 $PKG/usr/lib/php perms:
( cd $PKG/usr/lib${LIBDIRSUFFIX}/php
find . \
@@ -281,13 +260,14 @@ chmod 755 $PKG/usr/bin/pear
mkdir -p $PKG/usr/doc/php-$VERSION
cp -a \
- CODING_STANDARDS CREDITS EXTENSIONS INSTALL LICENSE NEWS README* TODO* \
+ CODING_STANDARDS CREDITS EXTENSIONS INSTALL LICENSE NEWS README* TODO* UPGRADING* \
sapi/cgi/README.FastCGI \
$PKG/usr/doc/php-$VERSION
chown -R root:root $PKG/usr/doc/php-$VERSION
+chmod 644 $PKG/usr/doc/php-$VERSION/UPGRADING*
mkdir -p $PKG/etc/httpd
-cp -a php.ini-dist php.ini-recommended $PKG/etc/httpd
+cp -a php.ini-development php.ini-production $PKG/etc/httpd
cat $CWD/mod_php.conf.example | sed -e "s#lib/httpd#lib${LIBDIRSUFFIX}/httpd#" \
> $PKG/etc/httpd/mod_php.conf.example
chmod 644 $PKG/etc/httpd/*