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 +++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 29 deletions(-) (limited to 'patches/php/php.SlackBuild') 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 -- cgit v1.2.3