summaryrefslogtreecommitdiffstats
path: root/source/n/php
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/php')
-rw-r--r--source/n/php/channels/pear.php.net.reg1
-rw-r--r--source/n/php/channels/pecl.php.net.reg1
-rw-r--r--source/n/php/mod_php.conf.example15
-rwxr-xr-xsource/n/php/php.SlackBuild44
-rw-r--r--source/n/php/php.gd_libpng-1.4.diff12
-rw-r--r--source/n/php/php.gmp5.diff11
6 files changed, 65 insertions, 19 deletions
diff --git a/source/n/php/channels/pear.php.net.reg b/source/n/php/channels/pear.php.net.reg
deleted file mode 100644
index f836b1a22..000000000
--- a/source/n/php/channels/pear.php.net.reg
+++ /dev/null
@@ -1 +0,0 @@
-a:5:{s:4:"name";s:12:"pear.php.net";s:14:"suggestedalias";s:4:"pear";s:7:"summary";s:40:"PHP Extension and Application Repository";s:7:"servers";a:1:{s:7:"primary";a:2:{s:6:"xmlrpc";a:1:{s:8:"function";a:10:{i:0;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:9:"logintest";}i:1;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:26:"package.listLatestReleases";}i:2;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:15:"package.listAll";}i:3;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:12:"package.info";}i:4;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:22:"package.getDownloadURL";}i:5;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.1";}s:8:"_content";s:22:"package.getDownloadURL";}i:6;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:25:"package.getDepDownloadURL";}i:7;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.1";}s:8:"_content";s:25:"package.getDepDownloadURL";}i:8;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:14:"package.search";}i:9;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:15:"channel.listAll";}}}s:4:"rest";a:1:{s:7:"baseurl";a:2:{i:0;a:2:{s:7:"attribs";a:1:{s:4:"type";s:7:"REST1.0";}s:8:"_content";s:25:"http://pear.php.net/rest/";}i:1;a:2:{s:7:"attribs";a:1:{s:4:"type";s:7:"REST1.1";}s:8:"_content";s:25:"http://pear.php.net/rest/";}}}}}s:13:"_lastmodified";s:31:"Sat, 04 Apr 2009 17:17:11 -0500";} \ No newline at end of file
diff --git a/source/n/php/channels/pecl.php.net.reg b/source/n/php/channels/pecl.php.net.reg
deleted file mode 100644
index ea6eaa146..000000000
--- a/source/n/php/channels/pecl.php.net.reg
+++ /dev/null
@@ -1 +0,0 @@
-a:6:{s:4:"name";s:12:"pecl.php.net";s:14:"suggestedalias";s:4:"pecl";s:7:"summary";s:31:"PHP Extension Community Library";s:7:"servers";a:1:{s:7:"primary";a:2:{s:6:"xmlrpc";a:1:{s:8:"function";a:10:{i:0;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:9:"logintest";}i:1;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:26:"package.listLatestReleases";}i:2;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:15:"package.listAll";}i:3;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:12:"package.info";}i:4;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:22:"package.getDownloadURL";}i:5;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.1";}s:8:"_content";s:22:"package.getDownloadURL";}i:6;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:25:"package.getDepDownloadURL";}i:7;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.1";}s:8:"_content";s:25:"package.getDepDownloadURL";}i:8;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:14:"package.search";}i:9;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:15:"channel.listAll";}}}s:4:"rest";a:1:{s:7:"baseurl";a:2:{i:0;a:2:{s:7:"attribs";a:1:{s:4:"type";s:7:"REST1.0";}s:8:"_content";s:25:"http://pecl.php.net/rest/";}i:1;a:2:{s:7:"attribs";a:1:{s:4:"type";s:7:"REST1.1";}s:8:"_content";s:25:"http://pecl.php.net/rest/";}}}}}s:15:"validatepackage";a:2:{s:8:"_content";s:19:"PEAR_Validator_PECL";s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}}s:13:"_lastmodified";s:31:"Sat, 04 Apr 2009 17:17:11 -0500";} \ No newline at end of file
diff --git a/source/n/php/mod_php.conf.example b/source/n/php/mod_php.conf.example
index 7a678b90c..670eb7135 100644
--- a/source/n/php/mod_php.conf.example
+++ b/source/n/php/mod_php.conf.example
@@ -7,8 +7,10 @@ LoadModule php5_module lib/httpd/modules/libphp5.so
# Tell Apache to feed all *.php files through PHP. If you'd like to
# parse PHP embedded in files with different extensions, comment out
-# this line and see the example below.
-AddType application/x-httpd-php .php
+# these lines and see the example below.
+<FilesMatch \.php$>
+ SetHandler application/x-httpd-php
+</FilesMatch>
# Tell Apache to feed all *.php, *.html, and *.htm files through
# the PHP module. Add or subtract extensions here as desired. Please
@@ -16,7 +18,12 @@ AddType application/x-httpd-php .php
# and insecure, so be sure to know what you're doing. It's a convenient
# shortcut, but probably isn't suitible for high-traffic sites if you
# write any of your pages in straight HTML.
-#AddType application/x-httpd-php .php .html .htm
+#<FilesMatch "\.(php|html|htm)$">
+# SetHandler application/x-httpd-php
+#</FilesMatch>
# This will display PHP files in colored syntax form. Use with caution.
-#AddType application/x-httpd-php-source .phps
+#<FilesMatch "\.phps$">
+# SetHandler application/x-httpd-php-source
+#</FilesMatch>
+
diff --git a/source/n/php/php.SlackBuild b/source/n/php/php.SlackBuild
index 5f8e2d351..dc0b74bbd 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
diff --git a/source/n/php/php.gd_libpng-1.4.diff b/source/n/php/php.gd_libpng-1.4.diff
new file mode 100644
index 000000000..a591b7331
--- /dev/null
+++ b/source/n/php/php.gd_libpng-1.4.diff
@@ -0,0 +1,12 @@
+diff -ru php-5.2.13.orig/ext/gd/libgd/gd_png.c php-5.2.13/ext/gd/libgd/gd_png.c
+--- php-5.2.13.orig/ext/gd/libgd/gd_png.c 2009-03-14 12:48:42.000000000 -0500
++++ php-5.2.13/ext/gd/libgd/gd_png.c 2010-03-21 02:17:03.000000000 -0500
+@@ -139,7 +139,7 @@
+ return NULL;
+ }
+
+- if (!png_check_sig (sig, 8)) { /* bad signature */
++ if (png_sig_cmp (sig, 0, 8)) { /* bad signature */
+ return NULL;
+ }
+
diff --git a/source/n/php/php.gmp5.diff b/source/n/php/php.gmp5.diff
new file mode 100644
index 000000000..f77dd33a1
--- /dev/null
+++ b/source/n/php/php.gmp5.diff
@@ -0,0 +1,11 @@
+--- ./ext/gmp/gmp.c.orig 2010-01-03 03:23:27.000000000 -0600
++++ ./ext/gmp/gmp.c 2010-03-05 21:27:46.000000000 -0600
+@@ -1396,7 +1396,7 @@
+
+ GMPG(rand_initialized) = 1;
+ }
+- mpz_urandomb(*gmpnum_result, GMPG(rand_state), GMP_ABS (limiter) * __GMP_BITS_PER_MP_LIMB);
++ mpz_urandomb(*gmpnum_result, GMPG(rand_state), GMP_ABS (limiter) * GMP_LIMB_BITS);
+
+ ZEND_REGISTER_RESOURCE(return_value, gmpnum_result, le_gmp);
+ }