summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorEugene Lamskoy2022-01-21 14:04:54 +0200
committerEugene Lamskoy2022-01-21 14:04:54 +0200
commit79f899827c91c034ecaa83700e0c5be886a630fa (patch)
tree23792f53db0a6914464a12fdfe7b82791abf8125 /PKGBUILD
parentfe47b6363c7adaba6d1a164069f870f853b741ea (diff)
downloadaur-79f899827c91c034ecaa83700e0c5be886a630fa.tar.gz
PHP 5.4.45 pkrel=2
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD1751
1 files changed, 1097 insertions, 654 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 62550485710f..28facb023bef 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,272 +1,362 @@
-
+###############################################################################
+# Generated by arch-phpbs: https://github.com/lamskoy/arch-phpbs
+#
+# My packages on AUR: php81 php72 php54
+# Co-maintaining on AUR: php73
+#
+# Thanks to:
+#
+# AUR php73 Co-maintaner: Matt Harrison <matt@harrison.us.com>
+# AUR php73 Contirubutor: Pierre Schmitz <pierre@archlinux.de>
+###############################################################################
_phpbase="54"
_suffix=""
pkgver="5.4.45"
-pkgrel="1"
-pkgbase="php${_phpbase}${_suffix}"
-pkgdesc="PHP ${pkgver} compiled as to not conflict with mainline php"
+pkgrel="2"
+pkgbase="php54"
+pkgdesc="PHP 5.4.45 compiled as to not conflict with mainline php"
_cppflags=" -DU_USING_ICU_NAMESPACE=1 -DOPENSSL_NO_SSL3=1 -DOPENSSL_NO_SSL2=1 -DU_DEFINE_FALSE_AND_TRUE=1 "
-
+_build_apache_cfg="etc/httpd/conf/extra"
+_build_bundled_gd="1"
+_build_conf_d="etc/php54/conf.d"
+_build_fpm_name="php-fpm54"
+_build_fpm_service_name="php54-fpm"
+_build_icu_src_dir="icu/source"
+_build_ini_per_sapi="0"
+_build_mysql_socket="/run/mysqld/mysqld.sock"
+_build_openssl_v10_patch="1"
+_build_openssl_v11_patch="0"
+_build_per_sapi="0"
+_build_phpdbg="0"
+_build_sapi_ini_apache="etc/php54"
+_build_sapi_ini_cgi="etc/php54"
+_build_sapi_ini_cli="etc/php54"
+_build_sapi_ini_embed="etc/php54"
+_build_sapi_ini_fpm="etc/php54"
+_build_sapi_ini_phpdbg="etc/php54"
+_build_shared_gd="1"
+_build_shared_json="1"
+_build_shared_libedit="0"
+_build_shared_mysqlnd="1"
+_build_shared_openssl="0"
+_build_shared_pdo="1"
+_build_system_timezonedb="0"
+_build_update_sqlite="0"
+_build_uses_argon="0"
+_build_uses_lmdb="0"
+_build_with_custom_icu="1"
_pkgver_icu="64-1"
+_priority_default="20"
+_priority_dom="16"
+_priority_json="15"
+_priority_mysqlnd="10"
+_priority_opcache="10"
+_priority_openssl="05"
+_priority_pdo="10"
+_priority_xml="15"
_suffix=""
_suffix_so="5"
-
pkgname=(
- "${pkgbase}"
- "php${_phpbase}-cli${_suffix}"
- "php${_phpbase}-cgi${_suffix}"
- "php${_phpbase}-apache${_suffix}"
- "php${_phpbase}-fpm${_suffix}"
- "php${_phpbase}-embed${_suffix}"
- "php${_phpbase}-bz2${_suffix}"
- "php${_phpbase}-bcmath${_suffix}"
- "php${_phpbase}-curl${_suffix}"
- "php${_phpbase}-dblib${_suffix}"
- "php${_phpbase}-dba${_suffix}"
- "php${_phpbase}-enchant${_suffix}"
- "php${_phpbase}-gd${_suffix}"
- "php${_phpbase}-gmp${_suffix}"
- "php${_phpbase}-imap${_suffix}"
- "php${_phpbase}-intl${_suffix}"
- "php${_phpbase}-interbase${_suffix}"
- "php${_phpbase}-ldap${_suffix}"
- "php${_phpbase}-mysql${_suffix}"
- "php${_phpbase}-odbc${_suffix}"
- "php${_phpbase}-pgsql${_suffix}"
- "php${_phpbase}-pspell${_suffix}"
- "php${_phpbase}-snmp${_suffix}"
- "php${_phpbase}-soap${_suffix}"
- "php${_phpbase}-tidy${_suffix}"
- "php${_phpbase}-sqlite${_suffix}"
- "php${_phpbase}-xml${_suffix}"
- "php${_phpbase}-xsl${_suffix}"
- "php${_phpbase}-zip${_suffix}"
- "php${_phpbase}-mcrypt${_suffix}"
- "php${_phpbase}-pear${_suffix}"
- "php${_phpbase}-xmlrpc${_suffix}"
- "php${_phpbase}-recode${_suffix}"
- "php${_phpbase}-json${_suffix}"
+ "php54"
+ "php54-cli"
+ "php54-cgi"
+ "php54-fpm"
+ "php54-embed"
+ "php54-apache"
+ "php54-pear"
+ "php54-pecl"
+ "php54-xml"
+ "php54-xsl"
+ "php54-xmlreader"
+ "php54-xmlwriter"
+ "php54-wddx"
+ "php54-dom"
+ "php54-simplexml"
+ "php54-pdo"
+ "php54-mysql"
+ "php54-phar"
+ "php54-pcntl"
+ "php54-posix"
+ "php54-shmop"
+ "php54-sockets"
+ "php54-sysvmsg"
+ "php54-sysvsem"
+ "php54-sysvshm"
+ "php54-tokenizer"
+ "php54-dba"
+ "php54-pgsql"
+ "php54-odbc"
+ "php54-firebird"
+ "php54-interbase"
+ "php54-dblib"
+ "php54-sqlite"
+ "php54-mssql"
+ "php54-gd"
+ "php54-exif"
+ "php54-bcmath"
+ "php54-gmp"
+ "php54-zip"
+ "php54-bz2"
+ "php54-fileinfo"
+ "php54-ctype"
+ "php54-recode"
+ "php54-mbstring"
+ "php54-pspell"
+ "php54-enchant"
+ "php54-intl"
+ "php54-calendar"
+ "php54-gettext"
+ "php54-soap"
+ "php54-ftp"
+ "php54-curl"
+ "php54-snmp"
+ "php54-ldap"
+ "php54-imap"
+ "php54-mcrypt"
)
-
source=(
- "https://php.net/distributions/php-${pkgver}.tar.bz2"
"pear-config-patcher.php"
+ "php-makefile-patcher.php"
"php-apache.conf"
+ "https://php.net/distributions/php-${pkgver}.tar.bz2"
"https://github.com/unicode-org/icu/releases/download/release-${_pkgver_icu}/icu4c-${_pkgver_icu/-/_}-src.tgz"
+ "php54-phar-names.patch"
"openssl-1.0.patch"
"openssl-sslv3.patch"
+ "php-gd-vpx.patch"
"fpm-numeric-uid-gid.patch"
"fpm-reload-sighup.patch"
"mysql-socket-php5.3.patch"
"php-enchant-php5.3.patch"
"php-enchant-depr.patch"
"php-freetype-2.9.1.patch"
- "recode-php5.4.patch"
+ "recode-php5.3.patch"
"php-mysqlnd-charsets.patch"
"php-mysqlnd.patch"
"php-tests.patch"
"debian-php-5.4.45.patch"
"php-phpinfo.patch"
)
-
depends=(
)
-
checkdepends=(
- "procps-ng"
)
-
+makedepends=(
+ "acl"
+ "libtool"
+ "autoconf"
+ "automake"
+ "patchelf"
+ "gawk"
+ "sed"
+ "bash"
+ "python"
+ "libxml2"
+ "pam"
+ "krb5"
+ "zlib"
+ "libedit"
+ "smtp-forwarder"
+ "pcre"
+ "apache"
+ "ncurses"
+ "libxcrypt"
+ "systemd"
+ "systemd-libs"
+ "coreutils"
+ "findutils"
+ "libxslt"
+ "openssl"
+ "e2fsprogs"
+ "openssl-1.0"
+ "db"
+ "postgresql-libs"
+ "unixodbc"
+ "libfbclient"
+ "libfbclient"
+ "freetds"
+ "sqlite"
+ "gd"
+ "gmp"
+ "libzip"
+ "recode"
+ "aspell"
+ "enchant"
+ "curl"
+ "net-snmp"
+ "libsasl"
+ "libldap"
+ "c-client"
+ "pam"
+ "libmcrypt"
+)
arch=(
- "i686"
- "x86_64"
)
-
_patches=(
+ "php54-phar-names.patch"
"openssl-1.0.patch"
"openssl-sslv3.patch"
+ "php-gd-vpx.patch"
"fpm-numeric-uid-gid.patch"
"fpm-reload-sighup.patch"
"mysql-socket-php5.3.patch"
"php-enchant-php5.3.patch"
"php-enchant-depr.patch"
"php-freetype-2.9.1.patch"
- "recode-php5.4.patch"
+ "recode-php5.3.patch"
"php-mysqlnd-charsets.patch"
"php-mysqlnd.patch"
"php-tests.patch"
"debian-php-5.4.45.patch"
"php-phpinfo.patch"
)
-
-_build_apache_cfg="etc/httpd/conf/extra"
-_build_bundled_gd="1"
-_build_ffi="0"
-_build_fpm_group="http"
-_build_fpm_user="http"
-_build_icu_src_dir="icu/source"
-_build_interbase="1"
-_build_json="1"
-_build_mcrypt="1"
-_build_mssql="1"
-_build_opcache="0"
-_build_openssl_v10_patch="1"
-_build_openssl_v11_patch="0"
-_build_outdated_mysql="1"
-_build_pear="1"
-_build_per_sapi="0"
-_build_phpdbg="0"
-_build_recode="1"
-_build_shared_gd="1"
-_build_sodium="0"
-_build_static_pdo="0"
-_build_uses_autoconf="0"
-_build_wddx="1"
-_build_with_custom_icu="1"
-_build_xmlrpc="1"
-_priority_default="20"
-_priority_json="15"
-_priority_mysqlnd="10"
-_priority_opcache="10"
-_priority_pdo="10"
-_priority_xml="15"
-_phpextensions="\
- --enable-bcmath=shared \
- --with-bz2=shared,/usr \
- --with-gmp=shared,/usr \
- --enable-intl=shared \
- --with-pspell=shared,/usr \
- --with-snmp=shared,/usr \
- --with-tidy=shared,/usr \
+_sapi_depends=(
+ "libxml2"
+ "pcre2"
+ "libedit"
+)
+_phpconfig="\
+ --prefix=/usr \
+ --sbindir=/usr/bin \
+ --localstatedir=/var \
+ --with-layout=GNU \
+ --disable-debug \
+ --mandir=/usr/share/man \
+ --srcdir=../php-${pkgver} \
+ --libdir=/usr/lib/php${_phpbase}${_suffix} \
+ --datadir=/usr/share/php${_phpbase}${_suffix} \
+ --program-suffix=${_phpbase}${_suffix} \
+ --with-config-file-scan-dir=/${_build_conf_d}
--enable-filter \
- --with-readline \
- --enable-pcntl \
- --enable-calendar=shared \
- --enable-ctype=shared \
- --enable-exif=shared \
- --enable-fileinfo=shared \
- --enable-ftp=shared \
- --with-gettext=shared,/usr \
- --with-iconv=shared \
+ --with-pear \
+ --enable-session \
+ --with-mhash=/usr \
+ --with-kerberos \
+ --with-mysql-sock=${_build_mysql_socket} \
+ --enable-mysqlnd-compression-support \
+ --datarootdir=/usr/share/php${_phpbase}${_suffix} \
+ --with-zlib-dir=/usr \
+ --enable-libxml \
+ --with-pcre-regex=/usr \
+ --config-cache \
+ --with-openssl=/usr \
+ --with-libedit"
+_phpextensions="\
+ --enable-xml=shared \
+ --with-xsl=shared \
+ --enable-xmlreader=shared \
+ --enable-xmlwriter=shared \
+ --enable-wddx=shared \
+ --enable-dom=shared \
+ --enable-simplexml=shared \
+ --enable-pdo=shared \
+ --enable-mysqlnd=shared \
+ --with-mysql=shared,mysqlnd \
+ --with-mysqli=shared,mysqlnd \
+ --with-pdo-mysql=shared,mysqlnd \
--enable-phar=shared \
+ --enable-pcntl=shared \
--enable-posix=shared \
--enable-shmop=shared \
--enable-sockets=shared \
--enable-sysvmsg=shared \
--enable-sysvsem=shared \
--enable-sysvshm=shared \
- --enable-tokenizer=shared \
- --enable-mysqlnd=shared \
- --enable-mysqlnd-compression-support \
- --with-mysqli=shared,mysqlnd \
- --with-pdo-mysql=shared,mysqlnd \
- --with-mysql-sock=/run/mysqld/mysqld.sock \
- --enable-dom=shared \
- --enable-simplexml=shared \
- --enable-xml=shared \
- --enable-xmlreader=shared \
- --enable-xmlwriter=shared \
- --with-xsl=shared \
+ --enable-tokenizer=shared
--enable-dba=shared \
--with-db4=/usr \
- --with-gdbm \
- --enable-inifile \
- --enable-flatfile \
- --with-imap=shared,/usr \
- --with-kerberos \
- --with-imap-ssl=yes \
- --enable-json=shared \
- --with-recode=shared \
- --enable-zip=shared \
- --with-curl=shared,/usr \
- --with-enchant=shared,/usr \
- --with-pcre-regex=/usr \
- --with-openssl=/usr \
+ --without-gdbm \
+ --with-cdb \
+ --with-pgsql=shared,/usr \
+ --with-pdo-pgsql=shared,/usr \
--with-unixODBC=shared,/usr \
--with-pdo-odbc=shared,unixODBC,/usr \
- --with-ldap=shared,/usr \
- --with-ldap-sasl=/usr \
+ --with-pdo-firebird=shared,/usr \
+ --with-interbase=shared,/usr \
+ --with-pdo-dblib=shared,/usr \
--with-pdo-sqlite=shared,/usr \
--with-sqlite3=shared,/usr \
- --enable-hash \
- --with-mhash=/usr \
+ --with-mssql=shared,/usr \
--with-gd=shared \
- --enable-gd-native-ttf \
+ --enable-gd-native-ttf
--with-webp-dir=/usr \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-xpm-dir=/usr \
--with-freetype-dir=/usr \
- --enable-pdo=shared \
- --with-zlib-dir=/usr \
- --with-mysql=shared,mysqlnd \
- --enable-wddx=shared \
- --with-pdo-firebird=shared,/usr \
- --with-interbase=shared,/usr \
- --with-pgsql=shared,/usr \
- --with-pdo-pgsql=shared,/usr \
- --enable-soap=shared \
- --with-libxml-dir=/usr \
- --with-mcrypt=shared \
- --with-xmlrpc=shared \
+ --enable-exif=shared \
+ --enable-bcmath=shared \
+ --with-gmp=shared,/usr \
+ --enable-zip=shared \
+ --with-bz2=shared,/usr \
+ --enable-fileinfo=shared \
+ --enable-ctype=shared \
+ --with-recode=shared \
--enable-mbstring=shared \
--enable-mbregex \
--enable-mbregex-backtrack \
- --with-pdo-dblib=shared,/usr \
- --with-mssql=shared,/usr"
-
-_phpconfig="\
- --prefix=/usr \
- --sbindir=/usr/bin \
- --localstatedir=/var \
- --with-layout=GNU \
- --disable-debug \
- --mandir=/usr/share/man \
- --srcdir=../php-${pkgver} \
- --sysconfdir=/etc/php${_phpbase}${_suffix} \
- --libdir=/usr/lib/php${_phpbase}${_suffix} \
- --datadir=/usr/share/php${_phpbase}${_suffix} \
- --program-suffix=${_phpbase}${_suffix} \
- --with-config-file-path=/etc/php${_phpbase}${_suffix} \
- --with-config-file-scan-dir=/etc/php${_phpbase}${_suffix}/conf.d \
- --without-pear \
- --datarootdir=/usr/share/php${_phpbase}${_suffix} \
- --config-cache"
-
+ --with-pspell=shared,/usr \
+ --with-enchant=shared,/usr \
+ --enable-intl=shared \
+ --enable-calendar=shared \
+ --with-gettext=shared,/usr \
+ --enable-soap=shared \
+ --enable-ftp=shared \
+ --with-curl=shared,/usr \
+ --with-snmp=shared,/usr \
+ --with-ldap=shared,/usr \
+ --with-ldap-sasl=/usr \
+ --with-imap=shared,/usr \
+ --with-imap-ssl=yes \
+ --with-mcrypt=shared"
_phpextensions_fpm="\
- --with-fpm-user=${_build_fpm_user} \
- --with-fpm-group=${_build_fpm_group}"
+ --with-fpm-user=http \
+ --with-fpm-group=http"
-
-makedepends=(
- 'libtool' 'autoconf' 'automake' 'patchelf' 'gawk' 'sed' 'bash' 'python' 'libxml2' 'pam'
- 'openssl' 'openssl-1.0' 'argon2' 'libmcrypt' 'libsodium' 'libldap' 'libsasl' 'krb5'
- 'libxslt' 'libzip' 'freetds' 'apache' 'aspell' 'c-client' 'db' 'enchant' 'readline'
- 'gmp' 'icu' 'net-snmp' 'postgresql-libs' 'sqlite' 'systemd-libs' 'unixodbc' 'curl' 'ncurses'
- 'freetds' 'pcre' 'tidy' 'libfbclient' 'oniguruma' 'gd' 'recode' 'bzip2' 'gdbm' 'zlib'
-)
-arch=('i686' 'x86_64')
-checkdepends=('procps-ng')
+options=('!lto')
+arch=("$CARCH")
+checkdepends=('procps-ng' 'smtp-forwarder')
license=('PHP')
url='http://www.php.net'
+################################################################################
# Prepare it
+################################################################################
prepare() {
pushd "php-${pkgver}"
- echo "[SED] sapi/apache2handler/config.m4 and configure"
+
+ echo "[SED] scripts/phpize.in"
+ sed -E "s|(includedir[\t ]*=.*/php)|\1${_phpbase}${_suffix}|g" \
+ -i scripts/phpize.in
+
+ echo "[SED] scripts/phpize.m4"
+ sed -e "s|\[php-config\]|\[php-config${_phpbase}${_suffix}\]|g" \
+ -e "s|\(PHP_ARG_WITH(\[php-config\)${_phpbase}${_suffix}\]|\1]|g" \
+ -e "s|php-config, no|php-config${_phpbase}${_suffix}, no|g" \
+ -i "scripts/phpize.m4"
+
+ echo "[SED] scripts/Makefile.frag"
+ sed -E "s|(phpincludedir[\t ]*=.*/php)|\1${_phpbase}${_suffix}|g" \
+ -i scripts/Makefile.frag
+
+ echo "[SED] scripts/php-config.in"
+ sed -E "s|(include_dir[\t ]*=.*php)|\1${_phpbase}${_suffix}|g" \
+ -i scripts/php-config.in
+
+ echo "[SED] sapi/apache2handler/config.m4"
sed -e '/APACHE_THREADED_MPM=/d' \
- -i sapi/apache2handler/config.m4 \
- -i configure
+ -i sapi/apache2handler/config.m4
echo "[SED] sapi/fpm/Makefile.frag"
- sed -e 's#php-fpm\$(program_suffix)#php\$(program_suffix)-fpm#' \
- -e 's/.conf.default/.conf/g' \
+ # sed -e 's#php-fpm\$(program_suffix)#php\$(program_suffix)-fpm#'
+ sed -e 's/.conf.default/.conf/g' \
-i sapi/fpm/Makefile.frag
echo "[SED] sapi/fpm/php-fpm.service.in"
- sed -E "s|ExecStart[\s]?=[\s]?@([a-zA-Z_]+)@/php-fpm|ExecStart=@\1@/php${_phpbase}${_suffix}-fpm|g; \
- s|PIDFile[\s]?=[\s]?@([a-zA-Z_]+)@/run/php-fpm.pid|PIDFile=/run/php${_phpbase}${_suffix}-fpm/php-fpm.pid|g" \
+ sed -E "s|ExecStart[\s]?=[\s]?@([a-zA-Z_]+)@/php-fpm|ExecStart=@\1@/${_build_fpm_name}|g; \
+ s|PIDFile[\s]?=[\s]?@([a-zA-Z_]+)@/run/php-fpm.pid|PIDFile=/run/${_build_fpm_service_name}/php-fpm.pid|g" \
-i sapi/fpm/php-fpm.service.in
local _check_files=("sapi/fpm/www.conf.in" "sapi/fpm/php-fpm.conf.in");
@@ -275,8 +365,8 @@ prepare() {
continue;
fi
echo "[SED] ${file_conf}"
- sed -e "s#^listen =.*#listen = /run/php${_phpbase}${_suffix}-fpm/php-fpm.sock#" \
- -e "s#run/php-fpm.pid#/run/php${_phpbase}${_suffix}-fpm/php-fpm.pid#" \
+ sed -e "s#^listen =.*#listen = /run/${_build_fpm_service_name}/php-fpm.sock#" \
+ -e "s#run/php-fpm.pid#/run/${_build_fpm_service_name}/php-fpm.pid#" \
-e 's#^;*[ \t]*listen.owner =#listen.owner =#' \
-e 's#^;*[ \t]*listen.group =#listen.group =#' \
-e 's#^;*[ \t]*error_log =.*#error_log = syslog#' \
@@ -286,34 +376,73 @@ prepare() {
echo "[SED] php.ini-production"
sed -e 's#^;*[ \t]*extension_dir[\t ]*=.*/.*$#extension_dir = "___EXTENSIONDIR___"#' \
- -e "s#___EXTENSIONDIR___#/usr/lib/php${_phpbase}${_suffix}/modules#g" \
+ -e "s#___EXTENSIONDIR___#/usr/lib/${pkgbase}/modules#g" \
-e "s#^;*[ \t]*extension=#;extension=#g" \
+ -e "s#^;*[ \t]*session.save_path[\t ]*=.*#session.save_path=___SESSIONS___#g" \
+ -e "s#___SESSIONS___#/var/lib/${pkgbase}/sessions#g" \
-i php.ini-production
for patch_name in "${_patches[@]}"; do
echo "[PATCH] Applying source patch ${patch_name}";
patch -p1 -i "../${patch_name}"
done
- if ((_build_uses_autoconf)); then
- autoconf
+
+ if ((_phpbase <= 53)); then
+ PHP_AUTOCONF="/usr/bin/autoconf-2.13" ./buildconf --force
+ else
+ ./buildconf --force
fi
- echo "[SED] Sed for ${pkgdir}/usr/lib/php${_phpbase}${_suffix}/scripts/phpize.m4"
- sed -i "/^\[ --with-php-config=/c \[ --with-php-config=PATH Path to php-config [php-config${_phpbase}${_suffix}]], php-config${_phpbase}${_suffix}, no)" "scripts/phpize.m4"
rm -f tests/output/stream_isatty_*.phpt
rm -f Zend/tests/arginfo_zpp_mismatch*.phpt
popd
}
+_build_sapi() {
+ _sapi="${1}"
+ _commands="${2}"
+ if (( _sapi == "cli" )); then
+ if [[ ! -d "build-${_sapi}" ]]; then
+ mkdir "build-${_sapi}"
+ fi
+ pushd "build-${_sapi}"
+ if [[ -L configure ]]; then
+ rm configure
+ fi
+ ln -s "../php-${pkgver}/configure"
+ popd
+ else
+ cp -Ta "build-cli" "build-${_sapi}"
+ fi
+
+ pushd "build-${_sapi}"
+ ./configure ${_phpconfig} ${_commands}
+
+ if (($_sapi != "cli")); then
+ make clean
+ fi
+ if ((! _build_with_custom_icu)); then
+ sed -i -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
+ -e 's|^runpath_var=LD_RUN_PATH|runpath_var=LIBTOOL_IS_BROKED|g' \
+ libtool
+ fi
+ make
+ popd
+}
+
+################################################################################
# BUILD them all
+################################################################################
build() {
- export EXTENSION_DIR="/usr/lib/php${_phpbase}${_suffix}/modules"
+ export EXTENSION_DIR="/usr/lib/${pkgbase}/modules"
if ((_build_openssl_v10_patch)); then
export PHP_OPENSSL_DIR="/usr/lib/openssl-1.0"
fi
-
- if ((_build_with_custom_icu)); then
+ if [[ ! -z "${_cppflags}" ]]; then
+ CPPFLAGS+=" $_cppflags "
+ fi
+ if ((_build_with_custom_icu )); then
local _php5_icu_first="${srcdir}/${_build_icu_src_dir}/php${_phpbase}${suffix}-icu${_pkgver_icu}"
- _ldflags="-Wl,-rpath=$ORIGIN/usr/lib/php${_phpbase}${_suffix}/icu${_pkgver_icu}/lib"
+ LDFLAGS+="-Wl,-rpath=$ORIGIN/usr/lib/${pkgbase}/icu${_pkgver_icu}/lib"
_phpextensions+=" --with-icu-dir=${_php5_icu_first} "
if [[ ! -d $_php5_icu_first ]]; then
mkdir -p "${_php5_icu_first}"
@@ -327,163 +456,146 @@ build() {
--includedir="${_php5_icu_first}/include" \
--disable-tests \
--disable-debug
- make
+ make -j$(nproc)
make install
- ./configure --prefix="/usr/lib/php${_phpbase}${_suffix}/icu${_pkgver_icu}" \
- --sysconfdir="/usr/lib/php${_phpbase}${_suffix}/icu${_pkgver_icu}/etc" \
- --mandir="/usr/lib/php${_phpbase}${_suffix}/icu${_pkgver_icu}/share/man" \
- --sbindir="/usr/lib/php${_phpbase}${_suffix}/icu${_pkgver_icu}/bin" \
- --libdir="/usr/lib/php${_phpbase}${_suffix}/icu${_pkgver_icu}/lib" \
- --includedir="/usr/lib/php${_phpbase}${_suffix}/icu${_pkgver_icu}/include" \
+ ./configure --prefix="/usr/lib/${pkgbase}/icu${_pkgver_icu}" \
+ --sysconfdir="/usr/lib/${pkgbase}/icu${_pkgver_icu}/etc" \
+ --mandir="/usr/lib/${pkgbase}/icu${_pkgver_icu}/share/man" \
+ --sbindir="/usr/lib/${pkgbase}/icu${_pkgver_icu}/bin" \
+ --libdir="/usr/lib/${pkgbase}/icu${_pkgver_icu}/lib" \
+ --includedir="/usr/lib/${pkgbase}/icu${_pkgver_icu}/include" \
--disable-tests \
--disable-debug
- make
+ make -j$(nproc)
popd
fi
- if [[ ! -z "${_cppflags}" ]]; then
- CPPFLAGS+=" $_cppflags "
- fi
- if [[ ! -z "${_ldflags}" ]]; then
- LDFLAGS+=" $_ldflags "
- fi
+ if ((_build_ini_per_sapi || _build_per_sapi)); then
-
- echo "[DEBUG] CPPFLAGS ${_cppflags}"
- echo "[DEBUG] LDGFLAGS ${_ldflags}"
- echo "[DEBUG] PHPCONF ${_phpconfig}" | sed -E 's|[ \t]+|\n|g';
- echo "[DEBUG] PHPEXT ${_phpextensions}" | sed -E 's|[ \t]+|\n |g';
- echo "[DEBUG] FPMEXT ${_phpextensions_fpm}" | sed -E 's|[ \t]+|\n|g';
-
- if [[ ! -d "build" ]]; then
- mkdir "build"
+ # CLI
+ _cli_addons=''
+ if (( ! _build_per_sapi )); then
+ # CGI enabled here only for tests passing, then overriden later by cgi build
+ _cli_addons+=" --enable-cgi "
fi
-
- pushd "build"
- if [[ -L configure ]]; then
- rm configure
+ _build_sapi "cli" "\
+ --sysconfdir=/${_build_sapi_ini_cli} \
+ --with-config-file-path=/${_build_sapi_ini_cli} \
+ --enable-cli \
+ ${_phpextensions} \
+ ${_cli_addons} \
+ --disable-fpm \
+ --disable-embed \
+ --disable-phpdbg \
+ "
+
+ # phpdbg
+ if ((_build_phpdbg)); then
+ _sapi="phpdbg"
+ _build_sapi "phpdbg" "\
+ --sysconfdir=/${_build_sapi_ini_phpdbg} \
+ --with-config-file-path=/${_build_sapi_ini_phpdbg} \
+ --disable-all \
+ --enable-phpdbg \
+ --disable-cgi \
+ --disable-cli \
+ --disable-fpm \
+ --disable-embed \
+ "
fi
- ln -s "../php-${pkgver}/configure"
- popd
- if (( ! _build_per_sapi )); then
- # SAPIs: cli+cgi+fpm+embed
- pushd "build"
- ./configure ${_phpconfig} \
- --enable-cgi \
- --enable-fpm \
- ${_phpextensions_fpm} \
- --enable-embed=shared \
- ${_phpextensions}
- make
- popd
+ # embed
+ _build_sapi "embed" "\
+ --sysconfdir=/${_build_sapi_ini_embed} \
+ --with-config-file-path=/${_build_sapi_ini_embed} \
+ --disable-all \
+ --enable-embed=shared \
+ --disable-cgi \
+ --disable-cli \
+ --disable-fpm \
+ --disable-phpdbg \
+ "
+
+ # cgi
+ _build_sapi "cgi" "\
+ --sysconfdir=/${_build_sapi_ini_cgi} \
+ --with-config-file-path=/${_build_sapi_ini_cgi} \
+ --disable-all \
+ --enable-cgi \
+ --disable-cli \
+ --disable-fpm \
+ --disable-embed \
+ --disable-phpdbg \
+ "
+
+ # fpm
+ _build_sapi "fpm" "\
+ --sysconfdir=/${_build_sapi_ini_fpm} \
+ --with-config-file-path=/${_build_sapi_ini_fpm} \
+ --disable-all \
+ --enable-fpm \
+ ${_phpextensions_fpm} \
+ --disable-cli \
+ --disable-cgi \
+ --disable-embed \
+ --disable-phpdbg \
+ "
else
- # Per sapi build: cli,cgi,fpm,embed
-
- # cli
- pushd "build"
- ./configure ${_phpconfig} \
- --disable-cgi \
- ${_phpextensions}
- make
- popd
- # cgi
- cp -Ta build build-cgi
- pushd build-cgi
- ./configure ${_phpconfig} \
- --disable-cli \
- --enable-cgi \
- ${_phpextensions}
- make
- popd
-
- # fpm
- cp -Ta build build-fpm
- pushd build-fpm
- ./configure ${_phpconfig} \
- --disable-cli \
- --enable-fpm \
- ${_phpextensions_fpm} \
- ${_phpextensions}
- make
- popd
-
-
- # embed
- cp -Ta build build-embed
- pushd build-embed
- ./configure ${_phpconfig} \
- --disable-cli \
- --enable-embed=shared \
- ${_phpextensions}
- make
- popd
- fi
- # apache build
- cp -a "build" "build-apache"
- pushd "build-apache"
- ./configure ${_phpconfig} \
- --with-apxs2 \
- ${_phpextensions}
- make
- popd
-
- # phpdbg build
+ # CLI
if ((_build_phpdbg)); then
- cp -a "build" "build-phpdbg"
- pushd "build-phpdbg"
- ./configure ${_phpconfig} \
- --enable-phpdbg \
- ${_phpextensions}
- make
- popd
+ _cli_addons+=" --enable-phpdbg "
fi
-
- # PEAR build
- if ((_build_pear)); then
- cp -a "build" "build-pear"
- # Pear can't be built properly with shared xml
- local _ext_pear=$(echo ${_phpextensions} | sed 's/--enable-xml=shared/--enable-xml/g')
- export PEAR_INSTALLDIR="/usr/share/php${_phpbase}${_suffix}/pear"
- pushd "build-pear"
- ./configure ${_phpconfig} \
- --disable-cgi \
- --with-pear \
- ${_ext_pear}
- make
- popd
+ _build_sapi "cli" "\
+ --sysconfdir=/${_build_sapi_ini_cli} \
+ --with-config-file-path=/${_build_sapi_ini_cli} \
+ --enable-cli \
+ ${_phpextensions} \
+ ${_cli_addons} \
+ --enable-fpm \
+ --enable-cgi \
+ --enable-embed=shared \
+ --enable-fpm \
+ ${_phpextensions_fpm} \
+ "
fi
- unset EXTENSION_DIR
+
+ # apache
+ _build_sapi "apache" "\
+ --disable-all \
+ --disable-cli \
+ --disable-cgi \
+ --disable-fpm \
+ --disable-embed \
+ --disable-phpdbg \
+ --with-apxs2 \
+ --sysconfdir=/${_build_sapi_ini_apache} \
+ --with-config-file-path=/${_build_sapi_ini_apache} \
+ "
+
}
check() {
- pushd "php-${pkgver}"
+ pushd "build-cli"
# Check if sendmail was configured correctly (FS#47600)
- ../build/sapi/cli/php -n -r 'echo ini_get("sendmail_path");' | grep -q '/usr/bin/sendmail'
-
+ sapi/cli/php -n -r 'echo ini_get("sendmail_path");' | grep -q '/usr/bin/sendmail'
export REPORT_EXIT_STATUS=1
export NO_INTERACTION=1
export SKIP_ONLINE_TESTS=1
export SKIP_SLOW_TESTS=1
-
- if ((_phpbase <= 54)); then
- TEST_PHP_EXECUTABLE="../build/sapi/cli/php" \
- ../build/sapi/cli/php -n run-tests.php -n {tests,Zend}
- elif ((_phpbase >= 55 && _phpbase < 73)); then
- ../build/sapi/cli/php -n run-tests.php -n -P {tests,Zend}
- elif ((73 == _phpbase)); then
- export TESTS='tests Zend'
- make test
- elif ((_phpbase > 73)); then
+ export TESTS='tests Zend'
+ if ((_phpbase > 73)); then
export TEST_PHP_ARGS="-j$(nproc)"
- export TESTS='tests Zend'
- make test
fi
+ # Patch tests to run PHP modules in needed order
+ sapi/cli/php -n ../php-makefile-patcher.php Makefile
+ make test
popd
}
+################################################################################
# Custom code
+################################################################################
_install_module_ini() {
local extension=$(echo "${1}" | sed 's/\.so//')
local priority="${_priority_default}"
@@ -494,6 +606,9 @@ _install_module_ini() {
"xml")
priority="${_priority_xml}"
;;
+ "openssl")
+ priority="${_priority_openssl}"
+ ;;
"mysqlnd")
priority="${_priority_mysqlnd}"
;;
@@ -503,6 +618,9 @@ _install_module_ini() {
"opcache")
priority="${_priority_opcache}"
;;
+ "dom")
+ priority="${_priority_dom}"
+ ;;
esac
local extension_type="extension"
case "${extension}" in
@@ -514,140 +632,116 @@ _install_module_ini() {
;;
esac
- if [[ ! -d "${pkgdir}/etc/php${_phpbase}${_suffix}/conf.d" ]]; then
- mkdir -p "${pkgdir}/etc/php${_phpbase}${_suffix}/conf.d"
+ if [[ ! -d "${pkgdir}/${_build_conf_d}" ]]; then
+ mkdir -p "${pkgdir}/${_build_conf_d}"
fi
- echo "${extension_type}=${extension}.so" > "${pkgdir}/etc/php${_phpbase}${_suffix}/conf.d/${priority}-${extension}.ini"
- chmod 0644 "$pkgdir/etc/php${_phpbase}${_suffix}/conf.d/${priority}-${extension}.ini"
+ echo "${extension_type}=${extension}.so" > "${pkgdir}/${_build_conf_d}/${priority}-${extension}.ini"
+ chmod 0644 "$pkgdir/${_build_conf_d}/${priority}-${extension}.ini"
_last_priority=${priority}
_last_extension=${extension}
}
_install_module() {
- install -D -m755 "build/modules/${1}.so" "${pkgdir}/usr/lib/php${_phpbase}${_suffix}/modules/${1}.so";
- _install_module_ini "${1}"
+ if [[ -f "build-cli/modules/${1}.so" ]]; then
+ install -D -m755 "build-cli/modules/${1}.so" "${pkgdir}/usr/lib/${pkgbase}/modules/${1}.so";
+ _install_module_ini "${1}"
+ else
+ echo "[DEBUG]: Install_module can't find ${1}.so, skipped"
+ fi
}
-# Custom code end
+###############################################################################
+# PHP: SAPI's
+###############################################################################
+
+# Main package
package_php54() {
# Binary names
- pkgdesc='A general-purpose scripting language that is especially suited to web development'
- depends=('zlib' 'pcre' 'oniguruma' 'readline' 'argon2')
- if ((_build_openssl_v10_patch)); then
- depends+=("openssl-1.0")
- else
- depends+=("openssl")
- fi
- backup=("etc/php${_phpbase}${_suffix}/php.ini")
+ pkgdesc='PHP. A general-purpose scripting language that is especially suited to web development'
+ depends=('zlib' 'pcre' 'libedit')
if ((_build_with_custom_icu)); then
pushd "${_build_icu_src_dir}"
make DESTDIR="${pkgdir}" install
- make clean
popd
- pushd "${pkgdir}/usr/lib/php${_phpbase}${_suffix}/icu${_pkgver_icu}"
+ pushd "${pkgdir}/usr/lib/${pkgbase}/icu${_pkgver_icu}"
rm -rf bin include share
popd
fi
- pushd "build"
- make -j1 INSTALL_ROOT=${pkgdir} install-{modules,build,headers,programs,pharcmd}
- install -D -m644 "../php-${pkgver}/php.ini-production" "${pkgdir}/etc/php${_phpbase}${_suffix}/php.ini"
- install -d -m755 "${pkgdir}/etc/php${_phpbase}${_suffix}/conf.d/"
+ # Install session dir
+ install -d -m1733 "${pkgdir}/var/lib/${pkgbase}/sessions"
+
+ # conf.d dir with shared modules
+ install -d -m755 "${pkgdir}/${_build_conf_d}/"
+
+ pushd "build-cli"
+ make -j1 INSTALL_ROOT=${pkgdir} install-{modules,build,headers,programs}
+ # Cleanup for CGI"
+ rm -rf "${pkgdir}/usr/bin/${pkgbase}-cgi"
+ popd
- pushd "${pkgdir}/usr/lib/php${_phpbase}${_suffix}/modules/"
+ pushd "${pkgdir}/usr/lib/${pkgbase}/modules/"
# remove static modules
rm -f *.a
-
- # remove modules provided by sub packages
+ # remove modules provided by subpackages
rm -f {enchant,imap,intl,pspell,snmp,tidy,curl,ldap,bz2,bcmath,soap,zip,gmp,dba,opcache,json,gd,mcrypt,sodium,recode}.so
- # dblib package
- rm -rf {pdo_dblib,mssql}.so
- # xml package
+ rm -f {pdo_dblib,mssql}.so
rm -f {dom,simplexml,xml,xmlreader,xmlwriter,xsl,wddx,xmlrpc}.so
- # PostgreSQL
rm -f {pgsql,pdo_pgsql}.so
- # ODBC
rm -f {odbc,pdo_odbc}.so
- # SQLite
rm -f {pdo_sqlite,sqlite3}.so
- # pdo_firebird
rm -f {pdo_firebird.so,interbase.so}
- # MySQL modules
rm -f {mysqli,pdo_mysql,mysqlnd,mysql}.so
-
- # Install COMMON modules
- for i in *.so; do
- _install_module_ini "${i}"
- done
+ rm -f {openssl,ffi,pcntl,ftp,calendar,ctype,fileinfo,iconv,mbstring,exif,pdo,phar,posix,shmop}.so
+ rm -f {sockets,tokenizer,gettext,sysvmsg,sysvsem,sysvshm}.so
popd
-
- # remove empty directory
- rmdir "${pkgdir}/usr/include/php/include"
-
- # move include directory
- mv "${pkgdir}/usr/include/php" "${pkgdir}/usr/include/php${_phpbase}${_suffix}"
-
- # Link to phar
- ln -sf "phar${_phpbase}${_suffix}.phar" "${pkgdir}/usr/bin/phar${_phpbase}${_suffix}"
-
- # rename executables
- if [[ -f "${pkgdir}/usr/bin/phar.phar" ]]; then
- mv "${pkgdir}/usr/bin/phar.phar" "${pkgdir}/usr/bin/phar${_phpbase}${_suffix}.phar"
+ pushd build-cli
+ if (( ! _build_ini_per_sapi )); then
+ backup=("${_build_sapi_ini_cli}/php.ini")
+ install -d -m755 "${pkgdir}/${_build_sapi_ini_cli}"
+ install -D -m644 "../php-${pkgver}/php.ini-production" "${pkgdir}/${_build_sapi_ini_cli}/php.ini"
fi
-
- # rename man pages
- if [[ -f "${pkgdir}/usr/share/man/man1/phar.1" ]]; then
- mv "${pkgdir}/usr/share/man/man1/phar.1" \
- "${pkgdir}/usr/share/man/man1/phar${_phpbase}${_suffix}.1"
- fi
-
- if [[ -f "${pkgdir}/usr/share/man/man1/phar.phar.1" ]]; then
- mv "${pkgdir}/usr/share/man/man1/phar.phar.1" \
- "${pkgdir}/usr/share/man/man1/phar.phar${_phpbase}${_suffix}.1"
- fi
-
- # kill phar symlink in old php builds
- rm -f "${pkgdir}/usr/bin/phar"
-
- # fix paths in executables
- echo "[SED] ${pkgdir}/usr/bin/phpize${_phpbase}${_suffix}"
- sed -i "/^includedir=/c \includedir=/usr/include/php${_phpbase}${_suffix}" "${pkgdir}/usr/bin/phpize${_phpbase}${_suffix}"
- echo "[SED] ${pkgdir}/usr/bin/php-config${_phpbase}${_suffix}"
- sed -i "/^include_dir=/c \include_dir=/usr/include/php${_phpbase}${_suffix}" "${pkgdir}/usr/bin/php-config${_phpbase}${_suffix}"
-
- #sed -i "/^php_cli_binary=/c \include_dir=/usr/bin/php${_phpbase}${_suffix}" "${pkgdir}/usr/bin/php-config${_phpbase}${_suffix}"
- #sed -i "/^php_cgi_binary=/c \include_dir=/usr/bin/php-cgi${_phpbase}${_suffix}" "${pkgdir}/usr/bin/php-config${_phpbase}${_suffix}"
-
- echo "[SED] Sed for ${pkgdir}/usr/lib/php${_phpbase}${_suffix}/build/phpize.m4"
- sed -i "/^\[ --with-php-config=/c \[ --with-php-config=PATH Path to php-config [php-config${_phpbase}${_suffix}]], php-config${_phpbase}${_suffix}, no)" \
- "${pkgdir}/usr/lib/php${_phpbase}${_suffix}/build/phpize.m4"
- # popd
popd
}
-# End install common
-# Cli
+# Cli + phar
package_php54-cli() {
- pkgdesc="cli (command-line executable) version for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}")
- pushd "build"
+ _sapi="cli"
+ pkgdesc="cli (command-line executable) version for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
+ depends+=("${_sapi_depends[@]}")
+ pushd "build-${_sapi}"
make -j1 INSTALL_ROOT="${pkgdir}" install-cli
+ make -j1 INSTALL_ROOT="${pkgdir}" install-pharcmd
+ if ((_build_ini_per_sapi)); then
+ backup=("${_build_sapi_ini_cli}/php.ini")
+ install -d -m755 "${pkgdir}/${_build_sapi_ini_cli}"
+ install -D -m644 "../php-${pkgver}/php.ini-production" "${pkgdir}/${_build_sapi_ini_cli}/php.ini"
+ fi
+ # Cleanup for CGI
+ rm -rf "${pkgdir}/usr/bin/${pkgbase}-cgi"
popd
}
# End cli
# CGI
package_php54-cgi() {
- pkgdesc="CGI and FCGI SAPI for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}")
- if ((_build_per_sapi)); then
- pushd "build-cgi"
+ _sapi="cgi"
+ pkgdesc="CGI and FCGI SAPI for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
+ depends+=("${_sapi_depends[@]}")
+ if ((_build_ini_per_sapi || _build_per_sapi)); then
+ pushd "build-${_sapi}"
else
- pushd "build"
+ pushd "build-cli"
+ fi
+ if ((_build_ini_per_sapi)); then
+ install -D -m644 "../php-${pkgver}/php.ini-production" "${pkgdir}/${_build_sapi_ini_cgi}/php.ini"
+ backup=("${_build_sapi_ini_cgi}/php.ini")
fi
case "${_phpbase}" in
- 53)
- install -D -m755 sapi/cgi/php-cgi "${pkgdir}/usr/bin/php${_phpbase}${_suffix}-cgi"
+ 53 | 54)
+ install -D -m755 sapi/cgi/php-cgi "${pkgdir}/usr/bin/${pkgbase}-cgi"
;;
*)
make -j1 INSTALL_ROOT="${pkgdir}" install-cgi
@@ -655,369 +749,718 @@ package_php54-cgi() {
esac
popd
}
-# End CGI
+# CGI end
+# Apache
package_php54-apache() {
+ _sapi="apache"
_build_mod_php_so="libphp${_suffix_so}.so"
_build_mod_php_module="php_module${_suffix_so}"
_build_build_php_script_name="php${_suffix_so}-script"
_apache_module_conf="${pkgbase}-module.conf"
- pkgdesc="Apache SAPI for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" 'apache')
+ pkgdesc="Apache SAPI for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" 'apache')
+ depends+=("${_sapi_depends[@]}")
+ depends+=('libxcrypt');
+ depends+=('ncurses');
backup=("${_build_apache_cfg}/${_apache_module_conf}")
echo "# End of LoadModule in httpd.conf - see ArchWiki Apache HTTP Server"
- echo "LoadModule ${_build_mod_php_module} modules/libphp${_phpbase}${_suffix}.so"
+ echo "LoadModule ${_build_mod_php_module} modules/lib${pkgbase}.so"
echo "AddHandler ${_build_php_script_name} .php"
echo "# End of Include List"
echo "Include conf/extra/${_apache_module_conf}"
- install -D -m755 "build-apache/libs/${_build_mod_php_so}" "${pkgdir}/usr/lib/httpd/modules/libphp${_phpbase}${_suffix}.so"
+
+ pushd "build-${_sapi}"
+ if ((_build_ini_per_sapi)); then
+ backup+=("${_build_sapi_ini_apache}/php.ini")
+ install -d -m755 "${pkgdir}/${_build_sapi_ini_apache}"
+ install -D -m644 "../php-${pkgver}/php.ini-production" "${pkgdir}/${_build_sapi_ini_apache}/php.ini"
+ fi
+ install -D -m755 "libs/${_build_mod_php_so}" "${pkgdir}/usr/lib/httpd/modules/lib${pkgbase}.so"
+ patchelf --set-soname \
+ "lib${pkgbase}.so" \
+ "${pkgdir}/usr/lib/httpd/modules/lib${pkgbase}.so"
+ popd
+
install -D -m644 "php-apache.conf" "${pkgdir}/${_build_apache_cfg}/${_apache_module_conf}"
- echo "Sed for ${pkgdir}/${_build_apache_cfg}/${_apache_module_conf}"
+ echo "[SED] ${pkgdir}/${_build_apache_cfg}/${_apache_module_conf}"
sed -e "s#@MODULE@#${_build_mod_php_module}#" \
-i "${pkgdir}/${_build_apache_cfg}/${_apache_module_conf}"
}
+# Apache end
+# FPM
package_php54-fpm() {
- pkgdesc="FastCGI Process Manager for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" 'systemd-libs')
- backup=("etc/php${_phpbase}${_suffix}/php-fpm.conf")
- if ((_phpbase>=70)); then
- backup+=("etc/php${_phpbase}${_suffix}/php-fpm.d/www.conf")
+ _sapi="fpm"
+ install="php-fpm.install"
+ pkgdesc="FastCGI Process Manager for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" 'systemd-libs' 'acl')
+ depends+=("${_sapi_depends[@]}")
+ backup=("${_build_sapi_ini_fpm}/php-fpm.conf")
+ if ((_phpbase >= 70)); then
+ backup+=("${_build_sapi_ini_fpm}/php-fpm.d/www.conf")
fi
options=('!emptydirs')
-
- if ((_build_per_sapi)); then
- pushd "build-fpm"
+ if ((_build_ini_per_sapi || _build_per_sapi)); then
+ pushd "build-${_sapi}"
else
- pushd "build"
+ pushd "build-cli"
fi
- case "${_phpbase}" in
- 53)
- install -d -m755 "${pkgdir}/usr/bin"
- install -D -m755 sapi/fpm/php-fpm "${pkgdir}/usr/bin/php${_phpbase}${_suffix}-fpm"
- install -D -m644 sapi/fpm/php-fpm.8 "${pkgdir}/usr/share/man/man8/php${_phpbase}${_suffix}-fpm.8"
- install -D -m644 sapi/fpm/php-fpm.conf "${pkgdir}/etc/php${_phpbase}${_suffix}/php-fpm.conf"
- install -d -m755 "${pkgdir}/etc/php${_phpbase}${_suffix}/fpm.d"
- ;;
- *)
- make -j1 INSTALL_ROOT="${pkgdir}" install-fpm
- ;;
- esac
-
- install -D -m644 "sapi/fpm/php-fpm.service" "${pkgdir}/usr/lib/systemd/system/php${_phpbase}${_suffix}-fpm.service"
- echo "d /run/php${_phpbase}${_suffix}-fpm 755 root root" > php-fpm.tmpfiles
- install -D -m644 "php-fpm.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/php${_phpbase}${_suffix}-fpm.conf"
+ if ((_build_ini_per_sapi)); then
+ backup+=("${_build_sapi_ini_fpm}/php.ini")
+ install -d -m755 "${pkgdir}/${_build_sapi_ini_fpm}/"
+ install -D -m644 "../php-${pkgver}/php.ini-production" "${pkgdir}/${_build_sapi_ini_fpm}/php.ini"
+ fi
+ make -j1 INSTALL_ROOT="${pkgdir}" install-fpm
+ install -D -m644 "sapi/fpm/php-fpm.service" "${pkgdir}/usr/lib/systemd/system/${_build_fpm_service_name}.service"
+ echo "d /run/${_build_fpm_service_name} 755 root root" > php-fpm.tmpfiles
+ install -D -m644 "php-fpm.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${_build_fpm_service_name}.conf"
popd
}
+# FPM end
+# embed sapi
package_php54-embed() {
- pkgdesc="Embedded PHP SAPI library for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" 'ncurses' 'systemd-libs')
+ _sapi="embed"
+ pkgdesc="Embedded PHP SAPI library for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" 'ncurses' 'systemd-libs' 'libxcrypt' 'acl' 'ncurses')
+ depends+=("${_sapi_depends[@]}")
options=('!emptydirs')
- if ((_build_per_sapi)); then
- pushd "build-embed"
+ if ((_build_ini_per_sapi || _build_per_sapi)); then
+ pushd "build-${_sapi}"
else
- pushd "build"
+ pushd "build-cli"
fi
- patchelf --set-soname "libphp${_phpbase}${_suffix}.so" "libs/libphp${_suffix_so}.so"
- case "${_phpbase}" in
- 53)
- install -D -m755 "libs/libphp${_suffix_so}.so" "${pkgdir}/usr/lib/libphp${_phpbase}${_suffix}.so"
- install -D -m644 "../php-${pkgver}/sapi/embed/php_embed.h" "${pkgdir}/usr/include/php${_phpbase}${_suffix}/sapi/embed/php_embed.h"
- ;;
- *)
- make -j1 INSTALL_ROOT="${pkgdir}" PHP_SAPI=embed install-sapi
- mv "${pkgdir}/usr/lib/libphp${_suffix_so}.so" "${pkgdir}/usr/lib/libphp${_phpbase}${_suffix}.so"
- ;;
- esac
+ install -d -m755 "${pkgdir}/${_build_sapi_ini_embed}"
+ if ((_build_ini_per_sapi)); then
+ install -D -m644 "../php-${pkgver}/php.ini-production" "${pkgdir}/${_build_sapi_ini_embed}/php.ini"
+ backup=("${_build_sapi_ini_embed}/php.ini")
+ fi
+ make -j1 INSTALL_ROOT="${pkgdir}" PHP_SAPI=embed install-sapi
+ mv "${pkgdir}/usr/lib/libphp${_suffix_so}.so" "${pkgdir}/usr/lib/lib${pkgbase}.so"
popd
+ patchelf --set-soname "lib${pkgbase}.so" "${pkgdir}/usr/lib/lib${pkgbase}.so"
}
+# embed sapi end
+# phpdbg sapi
package_php54-phpdbg() {
- pkgdesc="Interactive PHP debugger for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}")
+ _sapi="phpdbg"
options=('!emptydirs')
- pushd "build-phpdbg"
- make -j1 INSTALL_ROOT="${pkgdir}" install-phpdbg
+ pkgdesc="Interactive PHP debugger for ${pkgbase} ($_sapi)"
+ depends=("${pkgbase}=${pkgver}")
+ depends+=("${_sapi_depends[@]}")
+ if ((_build_ini_per_sapi || _build_per_sapi)); then
+ pushd "build-${_sapi}"
+ else
+ pushd "build-cli"
+ fi
+ if ((_build_ini_per_sapi)); then
+ backup=("${_build_sapi_ini_phpdbg}/php.ini")
+ install -d -m755 "${pkgdir}/${_build_sapi_ini_phpdbg}"
+ install -D -m644 "../php-${pkgver}/php.ini-production" "${pkgdir}/${_build_sapi_ini_phpdbg}/php.ini"
+ fi
+ make -j1 INSTALL_ROOT="${pkgdir}" "install-${_sapi}"
popd
}
+# phpdbg sapi end
-package_php54-pear() {
- pkgdesc="PHP Extension and Application Repository for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" "php${_phpbase}-xml${_suffix}")
- backup=("etc/php${_phpbase}${_suffix}/pear.conf")
- #
- pushd "build-pear"
-
- make install-pear INSTALL_ROOT="${pkgdir}"
+###############################################################################
+# PEAR + PECL
+###############################################################################
+# PEAR
+package_php54-pear() {
+ pkgdesc="PHP Extension and Application Repository (PEAR) for ${pkgbase}"
+ depends=(
+ "${pkgbase}=${pkgver}"
+ "php${_phpbase}-xml${_suffix}=${pkgver}"
+ "php${_phpbase}-cli${_suffix}=${pkgver}"
+ "php${_phpbase}-phar${_suffix}=${pkgver}"
+ )
+ #backup=("${_build_sapi_ini_cli}/pear.conf")
+ install -d "${pkgdir}/usr/share/${pkgbase}/pear/htdocs"
+ install -d "${pkgdir}/usr/share/${pkgbase}/pear/data"
+ install -d "${pkgdir}/usr/share/${pkgbase}/pear/doc"
+ install -d "${pkgdir}/usr/share/${pkgbase}/pear/test"
+ install -d "${pkgdir}/usr/share/${pkgbase}/pear/cfg"
+ install -d "${pkgdir}/var/lib/${pkgbase}/pear/cache"
+ install -d "${pkgdir}/var/lib/${pkgbase}/pear/metadata"
+ install -d "${pkgdir}/var/lib/${pkgbase}/pear/download"
+ install -d "${pkgdir}/var/lib/${pkgbase}/pear/temp"
+ export PHP_PEAR_SYSCONF_DIR="${_build_sapi_ini_cli}"
+ pushd build-cli
+
+ cp "${srcdir}/php-${pkgver}/pear/install-pear-nozlib.phar" "pear/install-pear-nozlib.phar"
+
+ INSTALL_ROOT="${pkgdir}/" ./sapi/cli/php -n \
+ -d extension=modules/xml.so \
+ -d extension=modules/phar.so \
+ -d date.timezone=UTC -d memory_limit=64M -d short_open_tag=0 -d safe_mode=0 \
+ -d 'error_reporting=E_ALL&~E_DEPRECATED' -d detect_unicode=0 "pear/install-pear-nozlib.phar" \
+ -ds "${_phpbase}${_suffix}" \
+ --php "/usr/bin/${pkgbase}" \
+ --bin "/usr/bin" \
+ --man "/usr/share/man" \
+ --dir "/usr/share/${pkgbase}/pear" \
+ --data "/usr/share/${pkgbase}/pear/data" \
+ --doc "/usr/share/${pkgbase}/pear/doc" \
+ --test "/usr/share/${pkgbase}/pear/test" \
+ --www "/usr/share/${pkgbase}/pear/htdocs" \
+ --config "/usr/share/${pkgbase}/pear/cfg" \
+ --force
+ # fix pear.conf with unserialize
+ # first arg: path to pear.conf
+ # second arg: PEAR base /var path
+ ./sapi/cli/php -n ../pear-config-patcher.php \
+ "${pkgdir}/${_build_sapi_ini_cli}/pear.conf" \
+ "/var/lib/${pkgbase}/pear"
+ popd
# remove unneeded files
rm -rf "${pkgdir}"/.{channels,depdb,depdblock,filemap,lock,registry}
-
- # rename binaries
+ #rename binaries
for i in pear peardev pecl; do
- echo "Moving ${pkgdir}/usr/bin/${i} => ${pkgdir}/usr/bin/${pkgbase/php/$i}"
- mv "${pkgdir}/usr/bin/${i}" "${pkgdir}/usr/bin/${pkgbase/php/$i}"
- # fix hardcoded php paths in pear
- sed -i "s|/usr/bin/php|/usr/bin/php${_phpbase}${_suffix}|g" "${pkgdir}/usr/bin/${pkgbase/php/$i}"
- sed -i "s|PHP=php|PHP=${_phpbase}${_suffix}|g" "${pkgdir}/usr/bin/${pkgbase/php/$i}"
+ _target="${pkgbase/php/$i}"
+ # fix hardcoded paths
+ sed "s|PHP=php|PHP=\"/usr/bin/${pkgbase}\"|g; s|\"/usr/bin/php\"|\"/usr/bin/${pkgbase}\"|g; s| -n | |g" \
+ -i "${pkgdir}/usr/bin/${i}"
+ if [[ "$i" == "pecl" ]]; then
+ echo "Moving ${pkgdir}/usr/bin/${i} => ${srcdir}/${pkgbase}-pecl-bin/"
+ mkdir -p "${srcdir}/${pkgbase}-pecl-bin/"
+ mv "${pkgdir}/usr/bin/pecl" "${srcdir}/${pkgbase}-pecl-bin/"
+ else
+ echo "Moving ${pkgdir}/usr/bin/${i} => ${pkgdir}/usr/bin/${_target}"
+ mv "${pkgdir}/usr/bin/${i}" "${pkgdir}/usr/bin/${_target}"
+ fi
done
- # fix pear.conf with unserialize
- ./sapi/cli/php ../pear-config-patcher.php "${pkgdir}/etc/php${_phpbase}${_suffix}/pear.conf" "/usr/bin/php${_phpbase}${_suffix}" "${_phpbase}${_suffix}"
-
- #popd
- popd
}
+# PEAR end
+
+# PECL
+package_php54-pecl() {
+ pkgdesc="PHP Extension Community Library (PECL) for ${pkgbase}"
+ depends=("php${_phpbase}-pear${_suffix}=${pkgver}")
+ _target="${pkgbase/php/pecl}"
+ install -D -m755 "${srcdir}/${pkgbase}-pecl-bin/pecl" "${pkgdir}/usr/bin/${_target}"
+}
+# PECL end
-package_php54-dblib() {
- depends=("php${_phpbase}${_suffix}" 'freetds')
- provides=(
- "php${_phpbase}${_suffix}-sybase=${pkgver}"
- )
- _install_module pdo_dblib
- if ((_build_mssql)); then
- _install_module mssql
- provided+=("php${_phpbase}${_suffix}-mssql=${pkgver}")
- pkgdesc="pdo_dblib module for php${_phpbase}${_suffix}"
+###############################################################################
+# PHP Modules: First need
+###############################################################################
+
+# OpenSSL
+package_php54-openssl() {
+ pkgdesc="OpenSSL module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" "krb5" 'e2fsprogs')
+ if ((_build_openssl_v10_patch)); then
+ depends+=("openssl-1.0")
else
- pkgdesc="mssql and pdo_dblib modules for php${_phpbase}${_suffix}"
+ depends+=("openssl")
fi
+ _install_module openssl
}
-package_php54-enchant() {
- pkgdesc="enchant module for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" 'enchant')
- _install_module enchant
+# Json
+package_php54-json() {
+ pkgdesc="json module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
+ _install_module json
}
-package_php54-gd() {
- pkgdesc="gd module for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" 'gd')
- if ((_build_bundled_gd)); then
- depends+=('libxpm' 'libpng' 'libjpeg')
+# pdo
+package_php54-pdo() {
+ pkgdesc="pdo module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
+ _install_module pdo
+}
+
+
+# mbstring
+package_php54-mbstring() {
+ pkgdesc="mbstring module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
+ if ((_phpbase >= 74)); then
+ depends+=('oniguruma')
fi
- _install_module gd
+ _install_module mbstring
}
-package_php54-imap() {
- pkgdesc="imap module for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" 'pam' 'krb5' 'c-client')
- _install_module imap
+# phar
+package_php54-phar() {
+ pkgdesc="phar module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
+ _install_module phar
}
-package_php54-intl() {
- pkgdesc="intl module for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}")
- if ((_build_with_custom_icu)); then
- # Patch to proper path inside intl.so
- patchelf --set-rpath "/usr/lib/php${_phpbase}${_suffix}/icu${_pkgver_icu}/lib" "build/modules/intl.so"
- else
- depends+=('icu')
+
+###############################################################################
+# PHP modules: XML
+###############################################################################
+
+# XML modules combined package
+package_php54-xml() {
+ pkgdesc="xml modules for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" 'libxml2')
+ _install_module xml
+}
+
+package_php54-wddx() {
+ pkgdesc="wddx module for ${pkgbase}"
+ depends=("php${_phpbase}-xml${_suffix}=${pkgver}")
+ _install_module wddx
+}
+
+package_php54-simplexml() {
+ pkgdesc="simplexml module for ${pkgbase}"
+ depends=("php${_phpbase}-xml${_suffix}=${pkgver}")
+ _install_module simplexml
+}
+
+package_php54-dom() {
+ pkgdesc="dom module for ${pkgbase}"
+ depends=("php${_phpbase}-xml${_suffix}=${pkgver}")
+ _install_module dom
+}
+
+package_php54-xmlreader() {
+ pkgdesc="xmlreader module for ${pkgbase}"
+ depends=("php${_phpbase}-xml${_suffix}=${pkgver}")
+ _install_module xmlreader
+}
+
+package_php54-xmlwriter() {
+ pkgdesc="xmlwriter module for ${pkgbase}"
+ depends=("php${_phpbase}-xml${_suffix}=${pkgver}")
+ _install_module xmlwriter
+}
+
+# Tidy
+package_php54-tidy() {
+ pkgdesc="tidy module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" 'tidy')
+ _install_module tidy
+}
+
+# XSL
+package_php54-xsl() {
+ pkgdesc="xsl module for ${pkgbase}"
+ depends=("php${_phpbase}-xml${_suffix}=${pkgver}")
+ depends+=('libxslt')
+ _install_module xsl
+}
+
+###############################################################################
+# PHP modules: Databases
+###############################################################################
+
+# MySQL
+package_php54-mysql() {
+ pkgdesc="MySQL modules for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
+ if ((_build_shared_pdo)); then
+ depends+=("php${_phpbase}-pdo${_suffix}=${pkgver}")
fi
- _install_module intl
+ if ((_build_shared_openssl)); then
+ depends+=("php${_phpbase}-openssl${_suffix}=${pkgver}")
+ fi
+ _install_module mysqlnd
+ _install_module mysql
+ _install_module mysqli
+ _install_module pdo_mysql
}
-package_php54-mcrypt() {
- pkgdesc="mcrypt module for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" 'libmcrypt')
- _install_module mcrypt
+# pdo_sqlite + sqlite3
+package_php54-sqlite() {
+ pkgdesc="sqlite module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" 'sqlite')
+ if ((_build_shared_pdo)); then
+ depends+=("php${_phpbase}-pdo${_suffix}=${pkgver}")
+ fi
+ _install_module sqlite3
+ _install_module pdo_sqlite
}
+# ODBC
package_php54-odbc() {
- pkgdesc="ODBC modules for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" 'unixodbc')
+ pkgdesc="ODBC modules for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" 'unixodbc')
+ if ((_build_shared_pdo)); then
+ depends+=("php${_phpbase}-pdo${_suffix}=${pkgver}")
+ fi
_install_module odbc
_install_module pdo_odbc
}
+# PostgreSQL
package_php54-pgsql() {
- pkgdesc="PostgreSQL modules for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" 'postgresql-libs')
+ pkgdesc="PostgreSQL modules for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" 'postgresql-libs')
+ if ((_build_shared_pdo)); then
+ depends+=("php${_phpbase}-pdo${_suffix}=${pkgver}")
+ fi
_install_module pgsql
_install_module pdo_pgsql
}
-package_php54-pspell() {
- pkgdesc="pspell module for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" 'aspell')
- _install_module pspell
+# interbase
+package_php54-interbase() {
+ pkgdesc="interbase module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" "libfbclient")
+ _install_module interbase
}
-package_php54-snmp() {
- pkgdesc="snmp module for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" 'net-snmp')
- _install_module snmp
+# firebird
+package_php54-firebird() {
+ pkgdesc="pdo_firebird module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" "libfbclient")
+ if ((_build_shared_pdo)); then
+ depends+=("php${_phpbase}-pdo${_suffix}=${pkgver}")
+ fi
+ _install_module pdo_firebird
}
-package_php54-sqlite() {
- pkgdesc="sqlite module for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" 'sqlite')
- _install_module sqlite3
- _install_module pdo_sqlite
+# pdo_dblib
+package_php54-dblib() {
+ depends=("${pkgbase}=${pkgver}" 'freetds')
+ pkgdesc="pdo_dblib module for ${pkgbase}"
+ _install_module pdo_dblib
}
-package_php54-tidy() {
- pkgdesc="tidy module for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" 'tidy')
- _install_module tidy
+# mssql
+package_php54-mssql() {
+ depends=("${pkgbase}=${pkgver}" 'freetds')
+ pkgdesc="mssql module for ${pkgbase}"
+ _install_module mssql
}
-package_php54-xml() {
- pkgdesc="xml modules for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" 'libxml2')
- _install_module dom
- _install_module simplexml
- if ((_build_wddx)); then
- _install_module wddx
+# Dba
+package_php54-dba() {
+ pkgdesc="dba module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" 'db')
+ if ((_build_uses_lmdb)); then
+ depends+=('lmdb')
fi
- _install_module xml
- _install_module xmlreader
- _install_module xmlwriter
+ _install_module dba
}
-package_php54-xsl() {
- pkgdesc="xsl module for php${_phpbase}${_suffix}"
- depends=(
- "php${_phpbase}${_suffix}"
- "php${_phpbase}-xml${_suffix}=${pkgver}"
- 'libxslt'
- 'libxml2'
- )
- _install_module xsl
+###############################################################################
+# PHP Modules: internationalization, text, datetime
+###############################################################################
+
+# Intl
+package_php54-intl() {
+ pkgdesc="intl module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
+ if ((_build_with_custom_icu)); then
+ # Patch to proper path inside intl.so
+ patchelf --set-rpath "/usr/lib/${pkgbase}/icu${_pkgver_icu}/lib" "build-cli/modules/intl.so"
+ else
+ depends+=('icu')
+ fi
+ _install_module intl
}
-package_php54-xmlrpc() {
- pkgdesc="xmlrpc module for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}")
- _install_module xmlrpc
+# Recode
+package_php54-recode() {
+ pkgdesc="recode module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" 'recode')
+ _install_module recode
}
-package_php54-soap() {
- pkgdesc="soap module for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" 'libxml2')
- _install_module soap
+# gettext
+package_php54-gettext() {
+ pkgdesc="gettext module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
+ _install_module gettext
}
-package_php54-zip() {
- pkgdesc="zip module for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" 'libzip')
- _install_module zip
+# iconv
+package_php54-iconv() {
+ pkgdesc="iconv module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
+ _install_module iconv
+}
+
+# calendar
+package_php54-calendar() {
+ pkgdesc="calendar module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
+ _install_module calendar
+}
+
+
+###############################################################################
+# PHP Modules: multimedia
+###############################################################################
+
+# GD
+package_php54-gd() {
+ pkgdesc="gd module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" 'gd')
+ if ((_build_bundled_gd)); then
+ depends+=('libxpm' 'libpng' 'libjpeg')
+ fi
+ if ((_phpbase >= 55 && _phpbase < 72)); then
+ depends+=('libvpx');
+ fi
+ _install_module gd
+}
+
+# exif
+package_php54-exif() {
+ pkgdesc="exif module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
+ _install_module exif
+}
+
+# fileinfo
+package_php54-fileinfo() {
+ pkgdesc="fileinfo module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
+ _install_module fileinfo
}
+###############################################################################
+# PHP modules: math
+###############################################################################
+
+# bcmath
package_php54-bcmath() {
- pkgdesc="bcmath module for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}")
+ pkgdesc="bcmath module for ${pkgbase}"
+ depends=("${pkgbase}")
_install_module bcmath
}
+# gmp
+package_php54-gmp() {
+ pkgdesc="gmp module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" 'gmp')
+ _install_module gmp
+}
+
+###############################################################################
+# PHP modules: spell checking
+###############################################################################
+
+# Enchant
+package_php54-enchant() {
+ pkgdesc="enchant module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" 'enchant')
+ _install_module enchant
+}
+
+# Pspell
+package_php54-pspell() {
+ pkgdesc="pspell module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" 'aspell')
+ _install_module pspell
+}
+
+###############################################################################
+# PHP modules: compression
+###############################################################################
+
+# bz2
package_php54-bz2() {
- pkgdesc="bz2 module for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" 'bzip2')
+ pkgdesc="bz2 module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" 'bzip2')
_install_module bz2
}
-package_php54-ldap() {
- pkgdesc="ldap module for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" 'libldap' 'libsasl')
- _install_module ldap
+# Zip
+package_php54-zip() {
+ pkgdesc="zip module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" 'libzip')
+ _install_module zip
}
+###############################################################################
+# PHP modules: network client/servers
+###############################################################################
+
+# curl
package_php54-curl() {
- pkgdesc="curl module for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" "curl")
+ pkgdesc="curl module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" "curl")
_install_module curl
}
-# gmp
-package_php54-gmp() {
- pkgdesc="gmp module for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" 'gmp')
- _install_module gmp
+# SOAP
+package_php54-soap() {
+ pkgdesc="soap module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" 'libxml2')
+ _install_module soap
}
-# End gmp
-# Dba
-package_php54-dba() {
- pkgdesc="dba module for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" 'gdbm' 'db')
- _install_module dba
+# FTP
+package_php54-ftp() {
+ pkgdesc="FTP module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
+ if ((_build_openssl_v10_patch)); then
+ depends+=("openssl-1.0")
+ else
+ depends+=("openssl")
+ fi
+ _install_module ftp
}
-# End dba
-# Json
-package_php54-json() {
- pkgdesc="json module for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}")
- _install_module json
+# ldap
+package_php54-ldap() {
+ pkgdesc="ldap module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" 'libldap' 'libsasl')
+ _install_module ldap
}
-# End json
-# Recode
-package_php54-recode() {
- pkgdesc="recode module for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" 'recode')
- _install_module recode
+# SNMP
+package_php54-snmp() {
+ pkgdesc="snmp module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" 'net-snmp')
+ if ((_build_openssl_v10_patch)); then
+ depends+=('openssl-1.0');
+ else
+ depends+=('openssl');
+ fi
+ _install_module snmp
}
-# End recode
-# Recode
+# XML-RPC
+package_php54-xmlrpc() {
+ pkgdesc="xmlrpc module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" 'libxml2')
+ _install_module xmlrpc
+}
+
+# Imap
+package_php54-imap() {
+ pkgdesc="imap module for ${pkgbase}"
+ depends=('pam' 'krb5' 'c-client' 'libxcrypt' "${pkgbase}=${pkgver}");
+ if ((_build_openssl_v10_patch)); then
+ depends+=("openssl-1.0")
+ else
+ depends+=("openssl")
+ fi
+ _install_module imap
+}
+
+# sockets
+package_php54-sockets() {
+ pkgdesc="sockets module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
+ _install_module sockets
+}
+
+###############################################################################
+# PHP Modules: cryptography
+###############################################################################
+
+# Sodium
package_php54-sodium() {
- pkgdesc="sodium (libsodium) module for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" "libsodium")
+ pkgdesc="sodium (libsodium) module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" "libsodium")
_install_module sodium
}
-# End recode
+
+# Mcrypt
+package_php54-mcrypt() {
+ pkgdesc="mcrypt module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" 'libmcrypt')
+ _install_module mcrypt
+}
+
+
+###############################################################################
+# PHP Zend modules: opcache/jit
+###############################################################################
# Opcache
package_php54-opcache() {
- pkgdesc="opcache zend module for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}")
+ pkgdesc="opcache zend module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
_install_module opcache
}
-# End opcache
-# Interbase modules
-package_php54-interbase() {
- pkgdesc="Interbase modules for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}" "libfbclient")
- #backup=()
- if ((_build_interbase)); then
- _install_module interbase
- fi
- _install_module pdo_firebird
+###############################################################################
+# PHP posix, pcntl, shmop and System V modules
+###############################################################################
+
+# posix
+package_php54-posix() {
+ pkgdesc="posix module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
+ _install_module posix
}
-# End interbase
-# MySQL modules
-package_php54-mysql() {
- pkgdesc="MySQL modules for php${_phpbase}${_suffix}"
- depends=("php${_phpbase}${_suffix}")
- _install_module mysqlnd
- _install_module mysqli
- _install_module pdo_mysql
- if ((_build_outdated_mysql)); then
- _install_module mysql
- fi
-}
-# End mysql
-
-sha256sums=('4e0d28b1554c95cfaea6fa2b64aac85433f158ce72bb571bcd5574f98f4c6582'
- '0201d0fa811b80614737424a72c7bb127125807e5d7eeec5e1578a0a58f77d2f'
- '6d0ad9becb5470ce8e5929d7d45660b0f32579038978496317544c5310281a91'
- '92f1b7b9d51b396679c17f35a2112423361b8da3c1b9de00aa94fd768ae296e6'
- 'd0aa68c527f7eee591c45f955e3bdb71378b6f81befcd70ea996898a17d6ef9c'
- 'e49744c78d6413ab6e93e3786d70c2d1cbdbb62e5bcfdb85c05efcf16fecfb96'
- 'd175f0c14fdb22855090c93f76e18f04320d7bf15afc057ffde947f9bb361242'
- 'f5ae925036744a5e88cea2698879aea0498e1e23aee7801923d90f16be383908'
- '12f4e3aeab72e7d24221c07b64106c496c2e300518682bd301351dc9fa6ab3cf'
- '84d0b3bce1be8e0113f3ba63a3dcce774fc79a002d754a2e31348f24a574d8f7'
- '3049b76460c65a70017ba2aac8f8c45725df2bbea458a96ec7164db63639e87f'
- '581d230715bb01a878cd8aba1c1f37c6123691ed80d9c43d53de381f09df8399'
- '19b64388efbeb178eda9e19cf089a096300ef2732d40c128d3ca424526724787'
- 'c9b3c4153596b605a41456e8242d98e474be6391d6fb4b6ce70a21c4c23b5203'
- '7e59ff3e1669d55f2a26ccdd748bfed6bbfd85d5d9206c1241cfd4443994f42c'
- '616ec8aa12070fb058be511abdae703a62d1c99387dd6d2a7bb47cb1b5bbda5f'
- 'caf09b93feec38e4db644bfe4b4d7369b89df926f8041ed007f1cb6d2b687574'
- '558e780e93dfa861a366c49b4d156d8fc43f17898f001ae6033ec63c33d5d41c')
+# pcntl
+package_php54-pcntl() {
+ pkgdesc="pcntl module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
+ _install_module pcntl
+}
+
+# shmop
+package_php54-shmop() {
+ pkgdesc="shmop module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
+ _install_module shmop
+}
+
+# sysvmsg
+package_php54-sysvmsg() {
+ pkgdesc="sysvmsg module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
+ _install_module sysvmsg
+}
+
+# sysvsem
+package_php54-sysvsem() {
+ pkgdesc="sysvsem module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
+ _install_module sysvsem
+}
+
+# sysvshm
+package_php54-sysvshm() {
+ pkgdesc="sysvshm module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
+ _install_module sysvshm
+}
+
+###############################################################################
+# PHP Misc modules
+###############################################################################
+
+# Ffi
+package_php54-ffi() {
+ pkgdesc="ffi module for ${pkgbase}"
+ depends=(
+ 'libffi'
+ "${pkgbase}=${pkgver}"
+ )
+ _install_module ffi
+}
+
+# ctype
+package_php54-ctype() {
+ pkgdesc="ctype module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
+ _install_module ctype
+}
+
+# tokenizer
+package_php54-tokenizer() {
+ pkgdesc="tokenizer module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}")
+ _install_module tokenizer
+}
+
+# libedit/readline
+package_php54-readline() {
+ pkgdesc="readline (libedit version) module for ${pkgbase}"
+ depends=("${pkgbase}=${pkgver}" 'libedit')
+ _install_module readline
+}
+
+