summaryrefslogtreecommitdiffstats
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.SlackBuild42
1 files changed, 26 insertions, 16 deletions
diff --git a/source/n/php/php.SlackBuild b/source/n/php/php.SlackBuild
index 2e8748ce9..f7d80825e 100755
--- a/source/n/php/php.SlackBuild
+++ b/source/n/php/php.SlackBuild
@@ -1,9 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# 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, 2011, 2012, 2013, 2015 Patrick Volkerding, Sebeka, MN, USA
+# Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2017 Patrick Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,9 +23,11 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+PKGNAM=php
VERSION=${VERSION:-$(echo php-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-ALPINE=2.20
+ALPINE=2.21
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
@@ -38,9 +40,16 @@ if [ -z "$ARCH" ]; then
esac
fi
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
NUMJOBS=${NUMJOBS:-" -j7 "}
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-php/
rm -rf $PKG
@@ -73,7 +82,7 @@ if [ -r $IMAPLIBDIR/lib${LIBDIRSUFFIX}/c-client.a ]; then
ls -l $IMAPLIBDIR/lib${LIBDIRSUFFIX}/c-client.a
sleep 5
else
- ( cd $CWD/../alpine ; ./alpine.SlackBuild || exit 1 ) || exit 1
+ ( cd $CWD/../alpine ; VERSION=${ALPINE} ; ./alpine.SlackBuild || exit 1 ) || exit 1
( cd $TMP/alpine-${ALPINE}/imap/c-client
strip -g c-client.a
mkdir -p $IMAPLIBDIR/lib${LIBDIRSUFFIX}
@@ -95,8 +104,8 @@ fi
cd $TMP
rm -rf php-$VERSION
-tar xvf $CWD/php-$VERSION.tar.?z* || exit 1
-cd php-$VERSION
+tar xvf $CWD/php-$VERSION.tar.xz || exit 1
+cd php-$VERSION || exit 1
# cleanup:
find . -name "*.orig" -delete
@@ -136,10 +145,15 @@ zcat $CWD/php-fpm.conf.diff.gz | patch -p1 --verbose || exit 1
sed -i "s|build$|php/build|" scripts/Makefile.frag
sed -i "s|build\"$|php/build\"|" scripts/phpize.in
+# NOTE: Added -DU_USING_ICU_NAMESPACE=1 to CXXFLAGS, which should be a temporary
+# requirement. See the link below:
+# http://site.icu-project.org/download/61#TOC-Migration-Issues
+
# Generic "kitchen sink" configure function, with as many things as possible (and
# maybe then some ;-) compiled as shared extensions:
EXTENSION_DIR=/usr/lib${LIBDIRSUFFIX}/php/extensions \
CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS -DU_USING_ICU_NAMESPACE=1" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
@@ -160,11 +174,11 @@ CFLAGS="$SLKCFLAGS" \
--enable-tokenizer=shared \
--with-config-file-scan-dir=/etc/php.d \
--with-config-file-path=/etc \
- --enable-mod_charset \
--with-layout=PHP \
--disable-sigchild \
--enable-xml \
--with-libxml-dir=/usr \
+ --with-xmlrpc=shared \
--enable-simplexml \
--enable-xmlreader=shared \
--enable-dom=shared \
@@ -178,7 +192,6 @@ CFLAGS="$SLKCFLAGS" \
--enable-calendar=shared \
--enable-ctype=shared \
--with-curl=shared \
- --with-mcrypt=/usr \
--enable-dba=shared \
--with-gdbm=/usr \
--with-db4=/usr \
@@ -187,12 +200,9 @@ CFLAGS="$SLKCFLAGS" \
--with-gd=shared \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
- --with-vpx-dir=/usr \
--with-zlib-dir=/usr \
--with-xpm-dir=/usr \
--with-freetype-dir=/usr \
- --with-t1lib=/usr \
- --enable-gd-native-ttf \
--with-gettext=shared,/usr \
--with-gmp=shared,/usr \
--with-iconv=shared \
@@ -201,7 +211,7 @@ CFLAGS="$SLKCFLAGS" \
--with-ldap=shared \
--enable-mbstring=shared \
--enable-hash \
- --with-mysql=shared,mysqlnd \
+ --enable-mysqlnd=shared \
--with-mysqli=shared,mysqlnd \
--with-mysql-sock=/var/run/mysql/mysql.sock \
--with-iodbc=shared,/usr \
@@ -216,7 +226,6 @@ CFLAGS="$SLKCFLAGS" \
--enable-soap=shared \
--enable-sockets \
--with-sqlite3=shared \
- --with-regex=php \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
@@ -231,7 +240,8 @@ CFLAGS="$SLKCFLAGS" \
--with-gnu-ld \
--with-pic \
--enable-phpdbg \
- --build=$ARCH-slackware-linux
+ --with-sodium \
+ --build=$ARCH-slackware-linux || exit 1
# I am told this option is worse than nothing. :-)
# --enable-safe-mode
@@ -276,7 +286,7 @@ chmod 644 $PKG/usr/doc/php-$VERSION/UPGRADING*
mkdir -p $PKG/etc/httpd
cat $CWD/mod_php.conf.example | sed -e "s#lib/httpd#lib${LIBDIRSUFFIX}/httpd#" \
- > $PKG/etc/httpd/mod_php.conf.example
+ > $PKG/etc/httpd/mod_php.conf.new
chmod 644 $PKG/etc/httpd/*
chown root:root $PKG/etc/httpd/*