]> gitweb.fluxo.info Git - slackbuilds.git/commitdiff
php update
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>
Sat, 4 Nov 2006 15:16:58 +0000 (15:16 +0000)
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>
Sat, 4 Nov 2006 15:16:58 +0000 (15:16 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@579 370017ae-e619-0410-ac65-c121f96126d4

patches/php/php.SlackBuild
patches/php/php4-snapshot.SlackBuild
patches/php/php4.utf8.diff.gz [new file with mode: 0644]
patches/php/slack-required [new file with mode: 0644]

index b899ba0e366ef3c4d779c8b9edca5aabfd3d30fd..accc353f6fcda25a26a37db9d9658e11c2679c23 100755 (executable)
@@ -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
index 53de5221a0be63e4fbd31e2a3a0ead8acad17a81..a75e6afe433593279b5bb464af73fbd90c3e7fd7 100755 (executable)
@@ -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 (file)
index 0000000..f23382e
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 (file)
index 0000000..788f235
--- /dev/null
@@ -0,0 +1 @@
+libiconv