From eb94ba5c6093e33dc6a240d599b7b7e6fa172103 Mon Sep 17 00:00:00 2001 From: rhatto Date: Sat, 4 Nov 2006 15:16:58 +0000 Subject: php update git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@579 370017ae-e619-0410-ac65-c121f96126d4 --- patches/php/php.SlackBuild | 65 +++++++++++++++++++---------------- patches/php/php4-snapshot.SlackBuild | 48 +++++++++++++++++++------- patches/php/php4.utf8.diff.gz | Bin 0 -> 447 bytes patches/php/slack-required | 1 + 4 files changed, 72 insertions(+), 42 deletions(-) create mode 100644 patches/php/php4.utf8.diff.gz create mode 100644 patches/php/slack-required (limited to 'patches') diff --git a/patches/php/php.SlackBuild b/patches/php/php.SlackBuild index b899ba0e..accc353f 100755 --- a/patches/php/php.SlackBuild +++ b/patches/php/php.SlackBuild @@ -7,19 +7,16 @@ # Small changes by rhatto # -cat << EOCAT -Recomended and required packages for building icecast are: - - libiconv - -EOCAT - -if [ "$INTERACT" != "no" ]; then - echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. - read crap -else - echo sleeping 3 seconds... - sleep 3 +if [ -s "slack-required" ]; then + echo Recomended and required packages for building cairo are: + cat slack-required | sed -e 's/^/\t/' + if [ "$INTERACT" != "no" ]; then + echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. + read crap + else + echo Sleeping 3 seconds... + sleep 3 + fi fi CWD="`pwd`" @@ -36,11 +33,17 @@ PACKAGE="php" VERSION=${VERSION:=4.4.4} PINE=${PINE:=4.64} ARCH=${ARCH:=i486} -BUILD=${BUILD:=1rha} +BUILD=${BUILD:=2rha} TMP=${TMP:=/tmp} SRC_DIR=${SRC:=$CWD} REPOS=${REPOS:=$TMP} +# ------- error codes for createpkg -------------- +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40 + RTOOL="wget" SRC="$PACKAGE-$VERSION.tar.bz2" @@ -78,7 +81,7 @@ if [ "$RTOOL" == "wget" ]; then mkdir -p $SRC_DIR/pear-4.4.2-bad-md5sums for pear in $TAR $GETOPT $TEMPLATE; do if [ ! -f "$SRC_DIR/pear-4.4.2-bad-md5sums/$pear" ]; then - wget "$PEAR/$pear" -O "$SRC_DIR/pear-4.4.2-bad-md5sums/$pear" + wget "$PEAR/$pear" -O "$SRC_DIR/pear-4.4.2-bad-md5sums/$pear" || exit $ERROR_WGET fi done else @@ -87,7 +90,7 @@ if [ "$RTOOL" == "wget" ]; then for pear in $pearlist; do if [ ! -f "$SRC_DIR/pear/$pear" ]; then - wget "$PEAR/$pear" -O "$SRC_DIR/pear/$pear" + wget "$PEAR/$pear" -O "$SRC_DIR/pear/$pear" || exit $ERROR_WGET fi done @@ -188,7 +191,7 @@ CFLAGS="$SLKCFLAGS" \ --with-tsrm-pthreads \ --enable-shared \ --disable-debug \ - --with-zlib=/usr $ADD_FLAGS + --with-zlib=/usr $ADD_FLAGS || exit $ERROR_CONF # --with-mod_charset # only for Russian patched Apache # --with-readline=/usr # this is only for the CGI version # --with-ttf # this links with the shlib, need X for that @@ -208,7 +211,7 @@ mkdir -p $PKG/etc/apache cat /etc/apache/httpd.conf.default > $PKG/etc/apache/httpd.conf cd $TMP rm -rf php-$VERSION -tar xjvf $SRC_DIR/$SRC +tar xjvf $SRC_DIR/$SRC || exit $ERROR_TAR # Add missing(?) PEAR modules back: ( cd php-$VERSION/pear/packages @@ -231,8 +234,8 @@ cd php-$VERSION if [ "$ARCH" == "x86_64" ]; then # Fix lib64 - thanks SuSE - echo patchin with $CWD/php-with-_lib-$VERSION.diff.gz... - zcat $CWD/php-with-_lib-$VERSION.diff.gz | patch -p1 --verbose + echo patching with $CWD/php-with-_lib-$VERSION.diff.gz... + zcat $CWD/php-with-_lib-$VERSION.diff.gz | patch -p1 --verbose || exit $ERROR_PATCH autoconf fi @@ -245,22 +248,26 @@ find . -perm 664 -exec chmod 644 {} \; find . -name "*.h" -exec chmod 644 {} \; # Sometimes they ship a few of these: find . -name "*.orig" -exec rm {} \; + +# Fix a UTF-8 parsing overflow: +zcat $CWD/php4.utf8.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit $ERROR_PATCH + # Patch ini files: if [ "$ARCH" == "x86_64" ]; then - zcat $CWD/php.ini-x86_64.diff.gz | patch -p1 --verbose --backup --suffix=.orig + zcat $CWD/php.ini-x86_64.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit $ERROR_PATCH # Fix an issue introduced in PHP 4.4.1 that breaks SquirrelMail and # probably some other PHP applications: #zcat $CWD/php.squirrel.diff.gz | patch -p1 --verbose || exit else - zcat $CWD/php.ini.diff.gz | patch -p1 --verbose --backup --suffix=.orig + zcat $CWD/php.ini.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit $ERROR_PATCH fi # Make the Apache module version of PHP: echo "***START APACHE MODULE***" -php_configure --disable-static --with-apxs=/usr/sbin/apxs -make -j3 -make install INSTALL_ROOT=$PKG +php_configure --disable-static --with-apxs=/usr/sbin/apxs || exit $ERROR_CONF +make -j3 || exit $ERROR_MAKE +make install INSTALL_ROOT=$PKG || exit $ERROR_INSTALL make distclean echo "***END APACHE MODULE***" @@ -268,9 +275,9 @@ echo "***END APACHE MODULE***" chmod 755 $PKG/usr/bin/pear # Make the standalone interpreter: -php_configure --enable-force-cgi-redirect --enable-fastcgi --enable-pcntl --enable-sigchild -make -j3 -make install-cli INSTALL_ROOT=$PKG +php_configure --enable-force-cgi-redirect --enable-fastcgi --enable-pcntl --enable-sigchild || exit $ERROR_CONF +make -j3 || exit $ERROR_MAKE +make install-cli INSTALL_ROOT=$PKG || exit $ERROR_INSTALL chmod 755 $PKG/usr/bin/php chown root.bin $PKG/usr/bin/php @@ -325,7 +332,7 @@ if [ -d "$IMAPLIBDIR" ]; then fi cd $PKG -makepkg -l y -c n $REPOS/php-$VERSION-$ARCH-$BUILD.tgz +makepkg -l y -c n $REPOS/php-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG if [ "$CLEANUP" == "yes" ]; then rm -rf $TMP diff --git a/patches/php/php4-snapshot.SlackBuild b/patches/php/php4-snapshot.SlackBuild index 53de5221..a75e6afe 100755 --- a/patches/php/php4-snapshot.SlackBuild +++ b/patches/php/php4-snapshot.SlackBuild @@ -8,6 +8,18 @@ # Use this script if you want a cvs snapshot. # +if [ -s "slack-required" ]; then + echo Recomended and required packages for building cairo are: + cat slack-required | sed -e 's/^/\t/' + if [ "$INTERACT" != "no" ]; then + echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. + read crap + else + echo Sleeping 3 seconds... + sleep 3 + fi +fi + CWD="`pwd`" if [ -f "/etc/slackbuildrc" ]; then @@ -25,6 +37,12 @@ PINE=${PINE:=4.64} ARCH=${ARCH:=i486} BUILD=${BUILD:=1rha} +# ------- error codes for createpkg -------------- +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40 + TMP=${TMP:=/tmp} PKG=$TMP/package-php SRC_DIR=${SRC:=$CWD} @@ -62,7 +80,7 @@ if [ "$RTOOL" == "wget" ]; then mkdir -p $SRC_DIR/pear-4.4.2-bad-md5sums for pear in $TAR $GETOPT $TEMPLATE; do if [ ! -f "$SRC_DIR/pear-4.4.2-bad-md5sums/$pear" ]; then - wget "$PEAR/$pear" -O "$SRC_DIR/pear-4.4.2-bad-md5sums/$pear" + wget "$PEAR/$pear" -O "$SRC_DIR/pear-4.4.2-bad-md5sums/$pear" || exit $ERROR_WGET fi done else @@ -71,7 +89,7 @@ if [ "$RTOOL" == "wget" ]; then for pear in $pearlist; do if [ ! -f "$SRC_DIR/pear/$pear" ]; then - wget "$PEAR/$pear" -O "$SRC_DIR/pear/$pear" + wget "$PEAR/$pear" -O "$SRC_DIR/pear/$pear" || exit $ERROR_WGET fi done @@ -170,7 +188,7 @@ CFLAGS="$SLKCFLAGS" \ --with-tsrm-pthreads \ --enable-shared \ --disable-debug \ - --with-zlib=/usr $ADD_FLAGS + --with-zlib=/usr $ADD_FLAGS || exit $ERROR_CONF # --with-mod_charset # only for Russian patched Apache # --with-readline=/usr # this is only for the CGI version # --with-ttf # this links with the shlib, need X for that @@ -190,7 +208,7 @@ mkdir -p $PKG/etc/apache cat /etc/apache/httpd.conf.default > $PKG/etc/apache/httpd.conf cd $TMP rm -rf php-$SNAP_VERSION -tar xjvf $SRC_DIR/$SRC +tar xjvf $SRC_DIR/$SRC || exit $ERROR_TAR # Add missing(?) PEAR modules back: ( cd php4-STABLE-$SNAP_VERSION/pear/packages @@ -230,19 +248,19 @@ find . -name "*.orig" -exec rm {} \; # Patch ini files: if [ "$ARCH" == "x86_64" ]; then - zcat $CWD/php.ini-x86_64.diff.gz | patch -p1 --verbose --backup --suffix=.orig + zcat $CWD/php.ini-x86_64.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit $ERROR_PATCH # Fix an issue introduced in PHP 4.4.1 that breaks SquirrelMail and # probably some other PHP applications: #zcat $CWD/php.squirrel.diff.gz | patch -p1 --verbose || exit else - zcat $CWD/php.ini.diff.gz | patch -p1 --verbose --backup --suffix=.orig + zcat $CWD/php.ini.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit $ERROR_PATCH fi # Make the Apache module version of PHP: echo "***START APACHE MODULE***" -php_configure --disable-static --with-apxs=/usr/sbin/apxs -make -j3 -make install INSTALL_ROOT=$PKG +php_configure --disable-static --with-apxs=/usr/sbin/apxs || exit $ERROR_CONF +make -j3 || exit $ERROR_MAKE +make install INSTALL_ROOT=$PKG || exit $ERROR_INSTALL make distclean echo "***END APACHE MODULE***" @@ -250,9 +268,9 @@ echo "***END APACHE MODULE***" chmod 755 $PKG/usr/bin/pear # Make the standalone interpreter: -php_configure --enable-force-cgi-redirect --enable-fastcgi --enable-pcntl --enable-sigchild -make -j3 -make install-cli INSTALL_ROOT=$PKG +php_configure --enable-force-cgi-redirect --enable-fastcgi --enable-pcntl --enable-sigchild || exit $ERROR_CONF +make -j3 || exit $ERROR_MAKE +make install-cli INSTALL_ROOT=$PKG || exit $ERROR_INSTALL chmod 755 $PKG/usr/bin/php chown root.bin $PKG/usr/bin/php @@ -307,5 +325,9 @@ cat $CWD/slack-desc > $PKG/install/slack-desc #fi cd $PKG -makepkg -l y -c n $TMP/php-$SNAP_VERSION-$ARCH-$BUILD.tgz +makepkg -l y -c n $TMP/php-$SNAP_VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG + +if [ "$CLEANUP" == "yes" ]; then + rm -rf $TMP +fi diff --git a/patches/php/php4.utf8.diff.gz b/patches/php/php4.utf8.diff.gz new file mode 100644 index 00000000..f23382eb Binary files /dev/null and b/patches/php/php4.utf8.diff.gz differ diff --git a/patches/php/slack-required b/patches/php/slack-required new file mode 100644 index 00000000..788f2359 --- /dev/null +++ b/patches/php/slack-required @@ -0,0 +1 @@ +libiconv -- cgit v1.2.3