summaryrefslogtreecommitdiff
path: root/source/n/php/php.SlackBuild
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2020-01-22 22:53:32 +0000
committerEric Hameleers <alien@slackware.com>2020-01-23 08:59:50 +0100
commit4f9273afa49a94b04bccc088fb87fec9d80a3fc6 (patch)
tree4d72218eb61e88572100270416cc562159676018 /source/n/php/php.SlackBuild
parent24375111b1a4c62f9b704108e98f53002f8c448a (diff)
downloadcurrent-4f9273afa49a94b04bccc088fb87fec9d80a3fc6.tar.gz
Wed Jan 22 22:53:32 UTC 202020200122225332
a/kernel-firmware-20200122_1eb2408-noarch-1.txz: Upgraded. a/pciutils-3.6.3-x86_64-1.txz: Upgraded. a/pkgtools-15.0-noarch-30.txz: Rebuilt. removepkg: prevent upgradepkg noise when a directory turns into a symlink. setup.vi-ex: don't make symlinks if the targets don't exist. d/cmake-3.16.3-x86_64-1.txz: Upgraded. d/distcc-3.3.3-x86_64-3.txz: Rebuilt. Move symlink tree into /usr/lib/distcc/, and make a link in /usr/lib64/ if needed. Seems like this is how everyone else sets it up. Thanks to hpfeil. Recompiled against krb5-1.17.1 (--with-auth). d/parallel-20200122-noarch-1.txz: Upgraded. l/python-urllib3-1.25.8-x86_64-1.txz: Upgraded. n/bind-9.14.10-x86_64-1.txz: Upgraded. This is a bugfix release: With some libmaxminddb versions, named could erroneously match an IP address not belonging to any subnet defined in a given GeoIP2 database to one of the existing entries in that database. [GL #1552] Fix line spacing in `rndc secroots`. Thanks to Tony Finch. [GL #2478] Recompiled against krb5-1.17.1 (--with-gssapi). n/dhcp-4.4.2-x86_64-1.txz: Upgraded. n/p11-kit-0.23.19-x86_64-1.txz: Upgraded. n/php-7.4.2-x86_64-2.txz: Rebuilt. Patched for c-client library API change. Thanks to ecd102. Recompiled against krb5-1.17.1 (--with-kerberos).
Diffstat (limited to 'source/n/php/php.SlackBuild')
-rwxr-xr-xsource/n/php/php.SlackBuild28
1 files changed, 26 insertions, 2 deletions
diff --git a/source/n/php/php.SlackBuild b/source/n/php/php.SlackBuild
index e61f021e..b46f9429 100755
--- a/source/n/php/php.SlackBuild
+++ b/source/n/php/php.SlackBuild
@@ -3,7 +3,7 @@
# 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, 2017, 2019 Patrick Volkerding, Sebeka, MN, USA
+# Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2017, 2019, 2020 Patrick Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -28,7 +28,7 @@ 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.22
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -75,6 +75,19 @@ else
LIBDIRSUFFIX=""
fi
+# Look for Kerberos on the machine and in any precompiled c-client.a:
+if /bin/ls /lib${LIBDIRSUFFIX}/libkrb5.so.? 1> /dev/null 2> /dev/null ; then
+ # Remove the c-client library if it doesn't contain Kerberos support:
+ if ! grep -q krb5_ /usr/local/lib${LIBDIRSUFFIX}/c-client/lib${LIBDIRSUFFIX}/c-client.a 2> /dev/null ; then
+ rm -rf /usr/local/lib${LIBDIRSUFFIX}/c-client
+ fi
+else
+ # Remove the c-client library if it contains Kerberos support:
+ if grep -q krb5_ /usr/local/lib${LIBDIRSUFFIX}/c-client/lib${LIBDIRSUFFIX}/c-client.a 2> /dev/null ; then
+ rm -rf /usr/local/lib${LIBDIRSUFFIX}/c-client
+ fi
+fi
+
# we need to compile alpine to get c-client.a for IMAP support:
IMAPLIBDIR=/usr/local/lib${LIBDIRSUFFIX}/c-client
if [ -r $IMAPLIBDIR/lib${LIBDIRSUFFIX}/c-client.a ]; then
@@ -92,6 +105,13 @@ else
)
fi
+# Set Kerberos build option:
+if /bin/ls /lib${LIBDIRSUFFIX}/libkrb5.so.? 1> /dev/null 2> /dev/null ; then
+ KRB5_OPTION="--with-kerberos"
+else
+ unset KRB5_OPTION
+fi
+
mkdir -p $PKG/etc/httpd
mkdir -p $PKG/etc/php.d
# A trick from DaMouse to enable building php into $PKG.
@@ -132,6 +152,9 @@ zcat $CWD/php.ini-development.diff.gz | patch -p1 --verbose || exit 1
zcat $CWD/php.ini-development.diff.gz | patch -p1 --verbose php.ini-production || exit 1
zcat $CWD/php-fpm.conf.diff.gz | patch -p1 --verbose || exit 1
+# Fix for imap API change:
+zcat $CWD/php.imap.api.diff.gz | patch -p1 --verbose || exit 1
+
# Install the build folder into /usr/lib$LIBDIRSUFFIX/php/build
# and adapt phpize accordingly:
sed -i "s|build$|php/build|" scripts/Makefile.frag
@@ -177,6 +200,7 @@ CXXFLAGS="$SLKCFLAGS -DU_USING_ICU_NAMESPACE=1" \
--enable-filter \
--disable-debug \
--with-openssl=shared \
+ $KRB5_OPTION \
--with-external-pcre \
--with-zlib=shared,/usr \
--enable-bcmath=shared \