summaryrefslogtreecommitdiff
path: root/source/n/php/php.SlackBuild
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2018-05-28 19:12:29 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 23:39:35 +0200
commit646a5c1cbfd95873950a87b5f75d52073a967023 (patch)
treeb8b8d2ab3b0d432ea69ad1a64d1c789649d65020 /source/n/php/php.SlackBuild
parentd31c50870d0bee042ce660e445c9294a59a3a65b (diff)
downloadcurrent-646a5c1cbfd95873950a87b5f75d52073a967023.tar.gz
Mon May 28 19:12:29 UTC 201820180528191229
a/pkgtools-15.0-noarch-13.txz: Rebuilt. installpkg: default line length for --terselength is the number of columns. removepkg: added --terse mode. upgradepkg: default line length for --terselength is the number of columns. upgradepkg: accept -option in addition to --option. ap/vim-8.1.0026-x86_64-1.txz: Upgraded. d/bison-3.0.5-x86_64-1.txz: Upgraded. e/emacs-26.1-x86_64-1.txz: Upgraded. kde/kopete-4.14.3-x86_64-8.txz: Rebuilt. Recompiled against libidn-1.35. n/conntrack-tools-1.4.5-x86_64-1.txz: Upgraded. n/libnetfilter_conntrack-1.0.7-x86_64-1.txz: Upgraded. n/libnftnl-1.1.0-x86_64-1.txz: Upgraded. n/links-2.16-x86_64-2.txz: Rebuilt. Rebuilt to enable X driver for -g mode. n/lynx-2.8.9dev.19-x86_64-1.txz: Upgraded. n/nftables-0.8.5-x86_64-1.txz: Upgraded. n/p11-kit-0.23.11-x86_64-1.txz: Upgraded. n/ulogd-2.0.7-x86_64-1.txz: Upgraded. n/whois-5.3.1-x86_64-1.txz: Upgraded. xap/network-manager-applet-1.8.12-x86_64-1.txz: Upgraded. xap/vim-gvim-8.1.0026-x86_64-1.txz: Upgraded.
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 2e8748ce..f7d80825 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/*