diff options
author | Eugene Lamskoy | 2021-12-16 18:16:03 +0200 |
---|---|---|
committer | Eugene Lamskoy | 2021-12-16 18:16:03 +0200 |
commit | 1c636aec0734d5e349a1a78dede03b1897bd85e5 (patch) | |
tree | 9ccd99c9b91a35afb81c2de9fd8b711beca0dc50 /PKGBUILD | |
parent | 82e9513a3e5770bc8ceef73f91c6d57148e75949 (diff) | |
download | aur-1c636aec0734d5e349a1a78dede03b1897bd85e5.tar.gz |
Revert "Upgraded pkgbuild"
This reverts commit 82e9513a3e5770bc8ceef73f91c6d57148e75949.
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 1416 |
1 files changed, 295 insertions, 1121 deletions
@@ -1,1228 +1,402 @@ +# Build props +phpbase=72 +pkgver=7.2.34 +pkgrel=6 -_phpbase="72" -_suffix="" -pkgver="7.2.34" -pkgrel="7" -pkgbase="php${_phpbase}${_suffix}" -pkgdesc="PHP ${pkgver} compiled as to not conflict with mainline php" -_cppflags=" -DU_USING_ICU_NAMESPACE=1 -DU_DEFINE_FALSE_AND_TRUE=1 " +# Custom suffix +suffix= -_pkgver_icu="64-1" -_suffix="" -_suffix_so="7" - -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}-phpdbg${_suffix}" - "php${_phpbase}-pear${_suffix}" - "php${_phpbase}-xmlrpc${_suffix}" - "php${_phpbase}-opcache${_suffix}" - "php${_phpbase}-sodium${_suffix}" - "php${_phpbase}-recode${_suffix}" - "php${_phpbase}-json${_suffix}" -) - -source=( - "https://php.net/distributions/php-${pkgver}.tar.xz" - "pear-config-patcher.php" - "php-apache.conf" - "mysql-socket-php7.1.patch" - "enchant-php7.4.patch" - "debian-php-7.4.26.patch" - "php-phpinfo.patch" - "timezonedb-guess.patch" - "timezonedb-php7.4.patch" - "https://php.net/distributions/php-${pkgver}.tar.xz" - "pear-config-patcher.php" - "php-apache.conf" - "fpm-numeric-uid-gid.patch" - "fpm-reload-sighup.patch" - "mysql-socket-php7.1.patch" - "php-enchant-php5.3.patch" - "php-enchant-depr.patch" - "php-freetype-2.9.1.patch" - "php-icu-php7.3.patch" - "recode-php5.4.patch" - "debian-php-7.3.33.patch" - "php-phpinfo.patch" - "timezonedb-guess.patch" - "timezonedb-php7.3.patch" - "https://php.net/distributions/php-${pkgver}.tar.xz" - "pear-config-patcher.php" - "php-apache.conf" - "fpm-numeric-uid-gid.patch" - "fpm-reload-sighup.patch" - "mysql-socket-php7.1.patch" - "php-enchant-php5.3.patch" - "php-enchant-depr.patch" - "php-freetype-2.9.1.patch" - "php-icu-php5.5.patch" - "recode-php5.4.patch" - "debian-php-7.2.34.patch" - "php-phpinfo.patch" - "timezonedb-guess.patch" - "timezonedb-php7.2.patch" -) - -depends=( -) - -checkdepends=( - "procps-ng" -) - -arch=( - "i686" - "x86_64" -) - -_patches=( - "fpm-numeric-uid-gid.patch" - "fpm-reload-sighup.patch" - "mysql-socket-php7.1.patch" - "php-enchant-php5.3.patch" - "php-enchant-depr.patch" - "php-freetype-2.9.1.patch" - "php-icu-php5.5.patch" - "recode-php5.4.patch" - "debian-php-7.2.34.patch" - "php-phpinfo.patch" - "timezonedb-guess.patch" - "timezonedb-php7.2.patch" -) - -_build_apache_cfg="etc/httpd/conf/extra" -_build_bundled_gd="0" -_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="0" -_build_mssql="0" -_build_opcache="1" -_build_openssl_v10_patch="0" -_build_openssl_v11_patch="0" -_build_outdated_mysql="0" -_build_pear="1" -_build_per_sapi="0" -_build_phpdbg="1" -_build_recode="1" -_build_shared_gd="1" -_build_sodium="1" -_build_static_pdo="0" -_build_uses_autoconf="1" -_build_wddx="1" -_build_with_custom_icu="0" -_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 \ - --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 \ - --enable-phar=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-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-ffi=shared \ - --with-zip=shared \ - --with-curl=shared \ - --with-enchant=shared \ - --with-pcre-jit \ - --with-external-pcre=/usr \ - --with-openssl \ - --with-unixODBC=shared \ - --with-pdo-odbc=shared,unixODBC,/usr \ - --with-ldap=shared,/usr \ - --with-ldap-sasl \ - --with-pdo-sqlite=shared,/usr \ - --with-sqlite3=shared \ - --enable-gd=shared \ - --with-external-gd=/usr \ - --with-jpeg \ - --with-xpm \ - --with-webp \ - --with-freetype \ - --enable-pdo=shared \ - --with-zlib \ - --with-pdo-firebird=shared,/usr \ - --with-pgsql=shared,/usr \ - --with-pdo-pgsql=shared,/usr \ - --enable-soap=shared \ - --enable-opcache \ - --enable-huge-code-pages \ - --with-sodium=shared \ - --enable-mbstring=shared \ - --enable-mbregex \ - --with-pdo-dblib=shared,/usr \ - --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 \ - --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 \ - --enable-phar=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-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 \ - --with-unixODBC=shared,/usr \ - --with-pdo-odbc=shared,unixODBC,/usr \ - --with-ldap=shared,/usr \ - --with-ldap-sasl=/usr \ - --with-pdo-sqlite=shared,/usr \ - --with-sqlite3=shared,/usr \ - --enable-hash \ - --with-mhash=/usr \ - --with-gd=shared,/usr \ - --with-webp-dir=/usr \ - --with-jpeg-dir=/usr \ - --with-png-dir=/usr \ - --with-xpm-dir=/usr \ - --with-freetype-dir=/usr \ - --with-libzip=/usr \ - --enable-pdo=shared \ - --with-zlib \ - --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 \ - --enable-opcache \ - --enable-huge-code-pages \ - --with-xmlrpc=shared \ - --with-sodium=shared \ - --enable-mbstring=shared \ - --enable-mbregex \ - --enable-mbregex-backtrack \ - --with-pdo-dblib=shared,/usr \ - --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 \ - --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 \ - --enable-phar=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-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 \ - --with-unixODBC=shared,/usr \ - --with-pdo-odbc=shared,unixODBC,/usr \ - --with-ldap=shared,/usr \ - --with-ldap-sasl=/usr \ - --with-pdo-sqlite=shared,/usr \ - --with-sqlite3=shared,/usr \ - --enable-hash \ - --with-mhash=/usr \ - --with-gd=shared,/usr \ - --with-webp-dir=/usr \ - --with-jpeg-dir=/usr \ - --with-png-dir=/usr \ - --with-xpm-dir=/usr \ - --with-freetype-dir=/usr \ - --with-libzip=/usr \ - --enable-pdo=shared \ - --with-zlib \ - --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 \ - --enable-opcache \ - --enable-huge-code-pages \ - --with-xmlrpc=shared \ - --with-sodium=shared \ - --enable-mbstring=shared \ - --enable-mbregex \ - --enable-mbregex-backtrack \ - --with-pdo-dblib=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} \ - --disable-rpath \ - --config-cache \ - --with-system-tzdata" - -_phpextensions_fpm="\ - --with-fpm-user=${_build_fpm_user} \ - --with-fpm-group=${_build_fpm_group} \ - --with-fpm-systemd \ - --with-fpm-acl" - - - -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' -) +# Const props arch=('i686' 'x86_64') -checkdepends=('procps-ng') license=('PHP') url='http://www.php.net' +makedepends=('apache' 'aspell' 'c-client' 'db' 'enchant' 'gd' 'gmp' 'icu' 'libmcrypt' 'libxslt' 'libzip' 'net-snmp' + 'postgresql-libs' 'sqlite' 'systemd' 'tidy' 'unixodbc' 'curl' 'libtool' 'freetds' 'pcre' 'libsodium' + 'patchutils' 'oniguruma') +checkdepends=('procps-ng') +# Has "php" string +_base="php" -# Prepare it -prepare() { - pushd "php-${pkgver}" - echo "[SED] sapi/apache2handler/config.m4 and configure" - sed -e '/APACHE_THREADED_MPM=/d' \ - -i sapi/apache2handler/config.m4 \ - -i configure - - echo "[SED] sapi/fpm/Makefile.frag" - sed -e 's#php-fpm\$(program_suffix)#php\$(program_suffix)-fpm#' \ - -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" \ - -i sapi/fpm/php-fpm.service.in - - local _check_files=("sapi/fpm/www.conf.in" "sapi/fpm/php-fpm.conf.in"); - for file_conf in "${_check_files[@]}"; do - if [[ ! -f $file_conf ]]; then - 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#" \ - -e 's#^;*[ \t]*listen.owner =#listen.owner =#' \ - -e 's#^;*[ \t]*listen.group =#listen.group =#' \ - -e 's#^;*[ \t]*error_log =.*#error_log = syslog#' \ - -e 's#^;*[ \t]*chdir =.*#;chdir = /srv/http#' \ - -i "${file_conf}" - done - - 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#^;*[ \t]*extension=#;extension=#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 - 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 them all -build() { - export EXTENSION_DIR="/usr/lib/php${_phpbase}${_suffix}/modules" - if ((_build_openssl_v10_patch)); then - export PHP_OPENSSL_DIR="/usr/lib/openssl-1.0" - 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" - _phpextensions+=" --with-icu-dir=${_php5_icu_first} " - if [[ ! -d $_php5_icu_first ]]; then - mkdir -p "${_php5_icu_first}" - fi - pushd "${_build_icu_src_dir}" - ./configure --prefix="${_php5_icu_first}" \ - --sysconfdir="${_php5_icu_first}/etc" \ - --mandir="${_php5_icu_first}/share/man" \ - --sbindir="${_php5_icu_first}/bin" \ - --libdir="${_php5_icu_first}/lib" \ - --includedir="${_php5_icu_first}/include" \ - --disable-tests \ - --disable-debug - make - 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" \ - --disable-tests \ - --disable-debug - make - popd - fi - - if [[ ! -z "${_cppflags}" ]]; then - CPPFLAGS+=" $_cppflags " - fi - if [[ ! -z "${_ldflags}" ]]; then - LDFLAGS+=" $_ldflags " - fi - +# Calculated props +pkgdesc="${_base} ${pkgver} compiled as to not conflict with mainline ${_base}" +pkgbase="${_base}${phpbase}${suffix}" +pkgname=("${pkgbase}" "${_base}${phpbase}-"{cgi,apache,fpm,embed,phpdbg,dblib,enchant,gd,imap,intl,odbc,pgsql,pspell,snmp,sqlite,tidy,xsl,sodium}${suffix}) - 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'; +# Source +source=("https://php.net/distributions/${_base}-${pkgver}.tar.xz" 'icu.patch' + 'apache.patch' 'apache.conf' 'php-fpm.patch' 'php-fpm.tmpfiles' 'php.ini.patch' 'enchant.patch' 'php-freetype-2.9.1.patch' ) - if [[ ! -d "build" ]]; then - mkdir "build" - fi +# Version specific" +name_libapache_source="libphp7.so" +name_libembed_source="libphp7.so" - pushd "build" - if [[ -L configure ]]; then - rm configure - fi +# Path +path_prefix="usr" +path_config="etc/${pkgbase}" +path_extensions="${path_prefix}/lib/${pkgbase}/modules" - 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 - else - # Per sapi build: cli,cgi,fpm,embed +# Binary names +name_phpconfig="php-config${phpbase}${suffix}" +name_phpize="phpize${phpbase}${suffix}" +name_phar="phar${phpbase}${suffix}" - # 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 +# Conf names +name_apache_module_conf="${pkgbase/-/_}_module.conf" - # fpm - cp -Ta build build-fpm - pushd build-fpm - ./configure ${_phpconfig} \ - --disable-cli \ - --enable-fpm \ - ${_phpextensions_fpm} \ - ${_phpextensions} - make - popd +prepare() { + cd "${_base}-${pkgver}" + patch -p0 -i ${srcdir}/apache.patch + patch -p0 -i ${srcdir}/php-fpm.patch + patch -p0 -i ${srcdir}/php.ini.patch + patch -p1 -i ${srcdir}/enchant.patch + patch -p1 -i ${srcdir}/php-freetype-2.9.1.patch + patch -p1 -i ${srcdir}/icu.patch + rm tests/output/stream_isatty_*.phpt +} - # embed - cp -Ta build build-embed - pushd build-embed - ./configure ${_phpconfig} \ - --disable-cli \ - --enable-embed=shared \ - ${_phpextensions} - make - popd +build() { + CPPFLAGS+=' -DU_USING_ICU_NAMESPACE=1' + CPPFLAGS+=' -DU_DEFINE_FALSE_AND_TRUE=1' + CPPFLAGS+=' -DEL_BUILD=1' + export EXTENSION_DIR="/${path_extensions}" + + local _phpconfig="--srcdir=../${_base}-${pkgver} \ + --config-cache \ + --cache-file=config-${pkgbase}-${pkgver}-${pkgrel}.cache + --prefix=/${path_prefix} \ + --sbindir=/${path_prefix}/bin \ + --sysconfdir=/${path_config} \ + --localstatedir=/var \ + --libdir=/${path_prefix}/lib/${pkgbase} \ + --datarootdir=/${path_prefix}/share/${pkgbase} \ + --datadir=/${path_prefix}/share/${pkgbase} \ + --program-suffix=${phpbase}${suffix} \ + --with-layout=GNU \ + --with-config-file-path=/${path_config} \ + --with-config-file-scan-dir=/${path_config}/conf.d \ + --disable-rpath \ + --mandir=/${path_prefix}/share/man \ + --without-pear \ + " + + local _phpextensions="\ + --enable-bcmath=shared \ + --enable-calendar=shared \ + --enable-dba=shared \ + --enable-exif=shared \ + --enable-ftp=shared \ + --enable-intl=shared \ + --enable-mbstring \ + --enable-shmop=shared \ + --enable-soap=shared \ + --enable-sockets=shared \ + --enable-sysvmsg=shared \ + --enable-sysvsem=shared \ + --enable-sysvshm=shared \ + --enable-zip=shared \ + --with-bz2=shared \ + --with-curl=shared \ + --with-db4=/${path_prefix} \ + --with-enchant=shared,/${path_prefix} \ + --with-freetype-dir=/${path_prefix} \ + --with-gd=shared,/${path_prefix} \ + --with-gdbm \ + --with-gettext=shared \ + --with-gmp=shared \ + --with-iconv=shared \ + --with-imap-ssl \ + --with-imap=shared \ + --with-kerberos=/${path_prefix} \ + --with-ldap=shared \ + --with-ldap-sasl \ + --with-libzip \ + --with-mhash \ + --with-mysql-sock=/run/mysqld/mysqld.sock \ + --with-mysqli=shared,mysqlnd \ + --with-openssl \ + --with-pcre-regex=/${path_prefix} \ + --with-pdo-dblib=shared,/${path_prefix} \ + --with-pdo-mysql=shared,mysqlnd \ + --with-pdo-odbc=shared,unixODBC,/${path_prefix} \ + --with-pdo-pgsql=shared \ + --with-pdo-sqlite=shared,/${path_prefix} \ + --with-pgsql=shared \ + --with-pspell=shared \ + --with-readline \ + --with-snmp=shared \ + --with-sodium=shared \ + --with-sqlite3=shared,/${path_prefix} \ + --with-tidy=shared \ + --with-unixODBC=shared,/${path_prefix} \ + --with-xmlrpc=shared \ + --with-xsl=shared \ + --with-zlib \ + --enable-pcntl \ + " + + # php + if [ ! -d "${srcdir}/build" ]; then + mkdir "${srcdir}/build" fi - - # apache build - cp -a "build" "build-apache" - pushd "build-apache" - ./configure ${_phpconfig} \ - --with-apxs2 \ - ${_phpextensions} - make - popd - - # phpdbg build - if ((_build_phpdbg)); then - cp -a "build" "build-phpdbg" - pushd "build-phpdbg" - ./configure ${_phpconfig} \ - --enable-phpdbg \ - ${_phpextensions} - make - popd + cd "${srcdir}/build" + if [ -L configure ]; then + rm configure 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 - fi - unset EXTENSION_DIR + ln -s ../${_base}-${pkgver}/configure + ./configure ${_phpconfig} \ + --enable-cgi \ + --enable-fpm \ + --with-fpm-systemd \ + --with-fpm-acl \ + --with-fpm-user=http \ + --with-fpm-group=http \ + --enable-embed=shared \ + ${_phpextensions} + make + + # apache + # reuse the previous run; this will save us a lot of time + cp -a "${srcdir}/build" "${srcdir}/build-apache" + cd "${srcdir}/build-apache" + ./configure ${_phpconfig} \ + --with-apxs2 \ + ${_phpextensions} + make + + # phpdbg + cp -a "${srcdir}/build" "${srcdir}/build-phpdbg" + cd "${srcdir}/build-phpdbg" + ./configure ${_phpconfig} \ + --enable-phpdbg \ + ${_phpextensions} + make } check() { - pushd "php-${pkgver}" - # Check if sendmail was configured correctly (FS#47600) - ../build/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 + cd "${_base}-${pkgver}" - 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 TEST_PHP_ARGS="-j$(nproc)" - export TESTS='tests Zend' - make test - fi - popd -} + # Check if sendmail was configured correctly (FS#47600) + ${srcdir}/build/sapi/cli/php -n -r 'echo ini_get("sendmail_path");' | grep -q '/usr/bin/sendmail' -# Custom code -_install_module_ini() { - local extension=$(echo "${1}" | sed 's/\.so//') - local priority="${_priority_default}" - case "${extension}" in - "json") - priority="${_priority_json}" - ;; - "xml") - priority="${_priority_xml}" - ;; - "mysqlnd") - priority="${_priority_mysqlnd}" - ;; - "pdo") - priority="${_priority_pdo}" - ;; - "opcache") - priority="${_priority_opcache}" - ;; - esac - local extension_type="extension" - case "${extension}" in - "opcache" | "xdebug") - extension_type="zend_extension" - ;; - "recode") - extension_type=";extension" - ;; - esac - - if [[ ! -d "${pkgdir}/etc/php${_phpbase}${_suffix}/conf.d" ]]; then - mkdir -p "${pkgdir}/etc/php${_phpbase}${_suffix}/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" - _last_priority=${priority} - _last_extension=${extension} -} + export REPORT_EXIT_STATUS=1 + export NO_INTERACTION=1 + export SKIP_ONLINE_TESTS=1 + export SKIP_SLOW_TESTS=1 -_install_module() { - install -D -m755 "build/modules/${1}.so" "${pkgdir}/usr/lib/php${_phpbase}${_suffix}/modules/${1}.so"; - _install_module_ini "${1}" + ${srcdir}/build/sapi/cli/php -n run-tests.php -n -P {tests,Zend} } -# Custom code end package_php72() { - # 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") - 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}" - rm -rf bin include share - popd - fi - pushd "build" - make -j1 INSTALL_ROOT=${pkgdir} install-{modules,build,headers,programs,pharcmd} + depends=('libxml2' 'curl' 'libzip' 'pcre') + backup=("${path_config}/php.ini") + #provides=("${pkgbase}=${pkgver}") - 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/" + cd ${srcdir}/build + make -j1 INSTALL_ROOT=${pkgdir} install-{modules,cli,build,headers,programs,pharcmd} + + install -D -m644 ${srcdir}/${_base}-${pkgver}/php.ini-production ${pkgdir}/${path_config}/php.ini + install -d -m755 ${pkgdir}/${path_config}/conf.d/ - pushd "${pkgdir}/usr/lib/php${_phpbase}${_suffix}/modules/" # remove static modules - rm -f *.a - + rm -f ${pkgdir}/${path_extensions}/*.a # remove modules provided by sub packages - 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 {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 - popd - + rm -f ${pkgdir}/${path_extensions}/{enchant,gd,imap,intl,sodium,mcrypt,odbc,pdo_dblib,pdo_odbc,pgsql,pdo_pgsql,pspell,snmp,sqlite3,pdo_sqlite,tidy,xsl}.so # remove empty directory - rmdir "${pkgdir}/usr/include/php/include" - + rmdir ${pkgdir}/${path_prefix}/include/php/include + # move include directory - mv "${pkgdir}/usr/include/php" "${pkgdir}/usr/include/php${_phpbase}${_suffix}" + mv ${pkgdir}/${path_prefix}/include/php ${pkgdir}/${path_prefix}/include/${pkgbase} - # Link to phar - ln -sf "phar${_phpbase}${_suffix}.phar" "${pkgdir}/usr/bin/phar${_phpbase}${_suffix}" + # fix phar symlink + rm ${pkgdir}/${path_prefix}/bin/phar + ln -sf ${name_phar}.phar ${pkgdir}/${path_prefix}/bin/${name_phar} # rename executables - if [[ -f "${pkgdir}/usr/bin/phar.phar" ]]; then - mv "${pkgdir}/usr/bin/phar.phar" "${pkgdir}/usr/bin/phar${_phpbase}${_suffix}.phar" - fi + mv ${pkgdir}/${path_prefix}/bin/phar.phar ${pkgdir}/${path_prefix}/bin/${name_phar}.phar - # 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" + # rename man pages + mv ${pkgdir}/${path_prefix}/share/man/man1/{phar,${name_phar}}.1 + mv ${pkgdir}/${path_prefix}/share/man/man1/phar.{phar,${name_phar}}.1 # 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 + sed -i "/^includedir=/c \includedir=/${path_prefix}/include/${pkgbase}" ${pkgdir}/${path_prefix}/bin/${name_phpize} + sed -i "/^include_dir=/c \include_dir=/${path_prefix}/include/${pkgbase}" ${pkgdir}/${path_prefix}/bin/${name_phpconfig} -# Cli -package_php72-cli() { - pkgdesc="cli (command-line executable) version for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}") - pushd "build" - make -j1 INSTALL_ROOT="${pkgdir}" install-cli - popd + # make phpize use php-config${phpbase} + sed -i "/^\[ --with-php-config=/c \[ --with-php-config=PATH Path to php-config [${name_phpconfig}]], ${name_phpconfig}, no)" ${pkgdir}/${path_prefix}/lib/${pkgbase}/build/phpize.m4 } -# End cli -# CGI package_php72-cgi() { - pkgdesc="CGI and FCGI SAPI for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}") - if ((_build_per_sapi)); then - pushd "build-cgi" - else - pushd "build" - fi - case "${_phpbase}" in - 53) - install -D -m755 sapi/cgi/php-cgi "${pkgdir}/usr/bin/php${_phpbase}${_suffix}-cgi" - ;; - *) - make -j1 INSTALL_ROOT="${pkgdir}" install-cgi - ;; - esac - popd + pkgdesc='CGI and FCGI SAPI for PHP' + depends=("${pkgbase}") + #provides=("${pkgbase}-cgi=${pkgver}") + + cd ${srcdir}/build + make -j1 INSTALL_ROOT=${pkgdir} install-cgi } -# End CGI package_php72-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') - backup=("${_build_apache_cfg}/${_apache_module_conf}") + pkgdesc='Apache SAPI for PHP' + depends=("${pkgbase}" 'apache') + backup=("etc/httpd/conf/extra/${name_apache_module_conf}") + #provides=("${pkgbase}-apache=${pkgver}") echo "# End of LoadModule in httpd.conf - see ArchWiki Apache HTTP Server" - echo "LoadModule ${_build_mod_php_module} modules/libphp${_phpbase}${_suffix}.so" - echo "AddHandler ${_build_php_script_name} .php" + echo "LoadModule php_module7 modules/lib${pkgbase}.so" + echo "AddHandler php7-script .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" - install -D -m644 "php-apache.conf" "${pkgdir}/${_build_apache_cfg}/${_apache_module_conf}" - echo "Sed for ${pkgdir}/${_build_apache_cfg}/${_apache_module_conf}" - sed -e "s#@MODULE@#${_build_mod_php_module}#" \ - -i "${pkgdir}/${_build_apache_cfg}/${_apache_module_conf}" + echo "Include conf/extra/${name_apache_module_conf}" + install -D -m755 ${srcdir}/build-apache/libs/${name_libapache_source} ${pkgdir}/${path_prefix}/lib/httpd/modules/lib${pkgbase}.so + install -D -m644 ${srcdir}/apache.conf ${pkgdir}/etc/httpd/conf/extra/${name_apache_module_conf} } package_php72-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") - fi + pkgdesc='FastCGI Process Manager for PHP' + depends=("${pkgbase}" 'systemd') + backup=("etc/${pkgbase}/php-fpm.conf" "etc/${pkgbase}/php-fpm.d/www.conf") options=('!emptydirs') + #provides=("${pkgbase}-fpm=${pkgver}") - if ((_build_per_sapi)); then - pushd "build-fpm" - else - pushd "build" - 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" - popd + cd ${srcdir}/build + make -j1 INSTALL_ROOT=${pkgdir} install-fpm + install -D -m644 sapi/fpm/php-fpm.service ${pkgdir}/${path_prefix}/lib/systemd/system/${pkgbase}-fpm.service + install -D -m644 ${srcdir}/php-fpm.tmpfiles ${pkgdir}/${path_prefix}/lib/tmpfiles.d/${pkgbase}-fpm.conf } package_php72-embed() { - pkgdesc="Embedded PHP SAPI library for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}" 'ncurses' 'systemd-libs') + pkgdesc='Embedded PHP SAPI library' + depends=("${pkgbase}" 'libsystemd') options=('!emptydirs') - if ((_build_per_sapi)); then - pushd "build-embed" - else - pushd "build" - 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 - popd + #provides=("${pkgbase}-embed=${pkgver}") + + cd ${srcdir}/build + make -j1 INSTALL_ROOT=${pkgdir} PHP_SAPI=embed install-sapi + mv ${pkgdir}/${path_prefix}/lib/${name_libembed_source} ${pkgdir}/${path_prefix}/lib/libphp${phpbase}${suffix}.so } package_php72-phpdbg() { - pkgdesc="Interactive PHP debugger for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}") + pkgdesc='Interactive PHP debugger' + depends=("${pkgbase}") options=('!emptydirs') - pushd "build-phpdbg" - make -j1 INSTALL_ROOT="${pkgdir}" install-phpdbg - popd -} + #provides=("${pkgbase}-phpdbg=${pkgver}") -package_php72-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}" - - # remove unneeded files - rm -rf "${pkgdir}"/.{channels,depdb,depdblock,filemap,lock,registry} - - # 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}" - 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 + cd ${srcdir}/build-phpdbg + make -j1 INSTALL_ROOT=${pkgdir} install-phpdbg } package_php72-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}" - else - pkgdesc="mssql and pdo_dblib modules for php${_phpbase}${_suffix}" - fi + pkgdesc='dblib module for PHP' + depends=("${pkgbase}" 'freetds') + #provides=("${pkgbase}-dblib=${pkgver}") + + install -D -m755 ${srcdir}/build/modules/pdo_dblib.so ${pkgdir}/${path_extensions}/pdo_dblib.so } package_php72-enchant() { - pkgdesc="enchant module for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}" 'enchant') - _install_module enchant + pkgdesc='enchant module for PHP' + depends=("${pkgbase}" 'enchant') + #provides=("${pkgbase}-enchant=${pkgver}") + + install -D -m755 ${srcdir}/build/modules/enchant.so ${pkgdir}/${path_extensions}/enchant.so } package_php72-gd() { - pkgdesc="gd module for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}" 'gd') - if ((_build_bundled_gd)); then - depends+=('libxpm' 'libpng' 'libjpeg') - fi - _install_module gd -} + pkgdesc='gd module for PHP' + depends=("${pkgbase}" 'gd') + #provides=("${pkgbase}-gd=${pkgver}") + install -D -m755 ${srcdir}/build/modules/gd.so ${pkgdir}/${path_extensions}/gd.so +} package_php72-imap() { - pkgdesc="imap module for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}" 'pam' 'krb5' 'c-client') - _install_module imap + pkgdesc='imap module for PHP' + depends=("${pkgbase}" 'c-client') + #provides=("${pkgbase}-imap=${pkgver}") + + install -D -m755 ${srcdir}/build/modules/imap.so ${pkgdir}/${path_extensions}/imap.so } package_php72-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') - fi - _install_module intl -} + pkgdesc='intl module for PHP' + depends=("${pkgbase}" 'icu') + #provides=("${pkgbase}-intl=${pkgver}") -package_php72-mcrypt() { - pkgdesc="mcrypt module for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}" 'libmcrypt') - _install_module mcrypt + install -D -m755 ${srcdir}/build/modules/intl.so ${pkgdir}/${path_extensions}/intl.so } package_php72-odbc() { - pkgdesc="ODBC modules for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}" 'unixodbc') - _install_module odbc - _install_module pdo_odbc + pkgdesc='ODBC modules for PHP' + depends=("${pkgbase}" 'unixodbc') + #provides=("${pkgbase}-odbc=${pkgver}") + + install -D -m755 ${srcdir}/build/modules/odbc.so ${pkgdir}/${path_extensions}/odbc.so + install -D -m755 ${srcdir}/build/modules/pdo_odbc.so ${pkgdir}/${path_extensions}/pdo_odbc.so } package_php72-pgsql() { - pkgdesc="PostgreSQL modules for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}" 'postgresql-libs') - _install_module pgsql - _install_module pdo_pgsql + pkgdesc='PostgreSQL modules for PHP' + depends=("${pkgbase}" 'postgresql-libs') + #provides=("${pkgbase}-pgsql=${pkgver}") + + install -D -m755 ${srcdir}/build/modules/pgsql.so ${pkgdir}/${path_extensions}/pgsql.so + install -D -m755 ${srcdir}/build/modules/pdo_pgsql.so ${pkgdir}/${path_extensions}/pdo_pgsql.so } package_php72-pspell() { - pkgdesc="pspell module for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}" 'aspell') - _install_module pspell + pkgdesc='pspell module for PHP' + depends=("${pkgbase}" 'aspell') + #provides=("${pkgbase}-pspell=${pkgver}") + + install -D -m755 ${srcdir}/build/modules/pspell.so ${pkgdir}/${path_extensions}/pspell.so } package_php72-snmp() { - pkgdesc="snmp module for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}" 'net-snmp') - _install_module snmp + pkgdesc='snmp module for PHP' + depends=("${pkgbase}" 'net-snmp') + #provides=("${pkgbase}-snmp=${pkgver}") + + install -D -m755 ${srcdir}/build/modules/snmp.so ${pkgdir}/${path_extensions}/snmp.so } package_php72-sqlite() { - pkgdesc="sqlite module for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}" 'sqlite') - _install_module sqlite3 - _install_module pdo_sqlite + pkgdesc='sqlite module for PHP' + depends=("${pkgbase}" 'sqlite') + #provides=("${pkgbase}-sqlite=${pkgver}") + install -D -m755 ${srcdir}/build/modules/sqlite3.so ${pkgdir}/${path_extensions}/sqlite3.so + install -D -m755 ${srcdir}/build/modules/pdo_sqlite.so ${pkgdir}/${path_extensions}/pdo_sqlite.so } package_php72-tidy() { - pkgdesc="tidy module for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}" 'tidy') - _install_module tidy -} - -package_php72-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 - fi - _install_module xml - _install_module xmlreader - _install_module xmlwriter + pkgdesc='tidy module for PHP' + depends=("${pkgbase}" 'tidy') + #provides=("${pkgbase}-tidy=${pkgver}") + install -D -m755 ${srcdir}/build/modules/tidy.so ${pkgdir}/${path_extensions}/tidy.so } package_php72-xsl() { - pkgdesc="xsl module for php${_phpbase}${_suffix}" - depends=( - "php${_phpbase}${_suffix}" - "php${_phpbase}-xml${_suffix}=${pkgver}" - 'libxslt' - 'libxml2' - ) - _install_module xsl -} - -package_php72-xmlrpc() { - pkgdesc="xmlrpc module for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}") - _install_module xmlrpc + pkgdesc='xsl module for PHP' + depends=("${pkgbase}" 'libxslt') + #provides=("${pkgbase}-xsl=${pkgver}") + install -D -m755 ${srcdir}/build/modules/xsl.so ${pkgdir}/${path_extensions}/xsl.so } -package_php72-soap() { - pkgdesc="soap module for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}" 'libxml2') - _install_module soap -} - -package_php72-zip() { - pkgdesc="zip module for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}" 'libzip') - _install_module zip -} - - -package_php72-bcmath() { - pkgdesc="bcmath module for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}") - _install_module bcmath -} - -package_php72-bz2() { - pkgdesc="bz2 module for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}" 'bzip2') - _install_module bz2 -} - -package_php72-ldap() { - pkgdesc="ldap module for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}" 'libldap' 'libsasl') - _install_module ldap -} - -package_php72-curl() { - pkgdesc="curl module for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}" "curl") - _install_module curl -} - -# gmp -package_php72-gmp() { - pkgdesc="gmp module for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}" 'gmp') - _install_module gmp -} -# End gmp - -# Dba -package_php72-dba() { - pkgdesc="dba module for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}" 'gdbm' 'db') - _install_module dba -} -# End dba - -# Json -package_php72-json() { - pkgdesc="json module for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}") - _install_module json -} -# End json - -# Recode -package_php72-recode() { - pkgdesc="recode module for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}" 'recode') - _install_module recode -} -# End recode - -# Recode package_php72-sodium() { - pkgdesc="sodium (libsodium) module for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}" "libsodium") - _install_module sodium -} -# End recode - -# Opcache -package_php72-opcache() { - pkgdesc="opcache zend module for php${_phpbase}${_suffix}" - depends=("php${_phpbase}${_suffix}") - _install_module opcache -} -# End opcache - -# Interbase modules -package_php72-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 -} -# End interbase - -# MySQL modules -package_php72-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 + pkgdesc='sodium module for PHP' + depends=("${pkgbase}" 'libsodium') + #provides=("${pkgbase}-sodium=${pkgver}") + install -D -m755 ${srcdir}/build/modules/sodium.so ${pkgdir}/${path_extensions}/sodium.so } -# End mysql sha256sums=('409e11bc6a2c18707dfc44bc61c820ddfd81e17481470f3405ee7822d8379903' - '0201d0fa811b80614737424a72c7bb127125807e5d7eeec5e1578a0a58f77d2f' - '6d0ad9becb5470ce8e5929d7d45660b0f32579038978496317544c5310281a91' - '0a3a6e8ff04ff1e0869befcf2c7bca4e886d94065da6d7a10b809a4750b961a0' - '433c542ba7f77f5f69d99e8e12ac0e9520cead3361a152ba2d04291b3d0365b8' - 'ccaad50d9e855bebd9d98bec4db6085dde3446ecd68bdbb58c1d450e1f5aeab9' - '558e780e93dfa861a366c49b4d156d8fc43f17898f001ae6033ec63c33d5d41c' - '40bcc1e5058602302198d0925e431495391d8469499593af477f59d84d32f764' - '6ef318bf8d53a2288d037e3284f4dbfc26c36fd2ecc7d62e3d5036c19ec0a707' - '409e11bc6a2c18707dfc44bc61c820ddfd81e17481470f3405ee7822d8379903' - '0201d0fa811b80614737424a72c7bb127125807e5d7eeec5e1578a0a58f77d2f' - '6d0ad9becb5470ce8e5929d7d45660b0f32579038978496317544c5310281a91' - 'd175f0c14fdb22855090c93f76e18f04320d7bf15afc057ffde947f9bb361242' - 'f5ae925036744a5e88cea2698879aea0498e1e23aee7801923d90f16be383908' - '0a3a6e8ff04ff1e0869befcf2c7bca4e886d94065da6d7a10b809a4750b961a0' - '84d0b3bce1be8e0113f3ba63a3dcce774fc79a002d754a2e31348f24a574d8f7' - '3049b76460c65a70017ba2aac8f8c45725df2bbea458a96ec7164db63639e87f' - '581d230715bb01a878cd8aba1c1f37c6123691ed80d9c43d53de381f09df8399' - '68517bf6fd6ab2890877252f4233f1f7134b412b29d2dba20ef14d6fd1ac368b' - '19b64388efbeb178eda9e19cf089a096300ef2732d40c128d3ca424526724787' - 'd706ded57ed3e46a7993f9e3f5838eea690f66e59e2e3549c6dda1cec44bcc1f' - '558e780e93dfa861a366c49b4d156d8fc43f17898f001ae6033ec63c33d5d41c' - '40bcc1e5058602302198d0925e431495391d8469499593af477f59d84d32f764' - '1cb8f76b465e3c5cd383450bc1f898859f58270d3645fb7405f93d0e06cddac7' - '409e11bc6a2c18707dfc44bc61c820ddfd81e17481470f3405ee7822d8379903' - '0201d0fa811b80614737424a72c7bb127125807e5d7eeec5e1578a0a58f77d2f' - '6d0ad9becb5470ce8e5929d7d45660b0f32579038978496317544c5310281a91' - 'd175f0c14fdb22855090c93f76e18f04320d7bf15afc057ffde947f9bb361242' - 'f5ae925036744a5e88cea2698879aea0498e1e23aee7801923d90f16be383908' - '0a3a6e8ff04ff1e0869befcf2c7bca4e886d94065da6d7a10b809a4750b961a0' - '84d0b3bce1be8e0113f3ba63a3dcce774fc79a002d754a2e31348f24a574d8f7' - '3049b76460c65a70017ba2aac8f8c45725df2bbea458a96ec7164db63639e87f' - '581d230715bb01a878cd8aba1c1f37c6123691ed80d9c43d53de381f09df8399' - 'ed3184d5a6f7a3bf35ee32169f8dc3b6cba09c38f60e868e24652fe9a7dd844d' - '19b64388efbeb178eda9e19cf089a096300ef2732d40c128d3ca424526724787' - '1377d3627fbccb6edca87742836771a6546ecca121bbd43c3981880217258c22' - '558e780e93dfa861a366c49b4d156d8fc43f17898f001ae6033ec63c33d5d41c' - '40bcc1e5058602302198d0925e431495391d8469499593af477f59d84d32f764' - 'db38b1fe1f6d6aa80bbca3c142bf7a166e3e83212dcc1396f9ec706daad36ad2') + 'e438f7a429915d9fe5affce2a32315b670fa0f2b2638ca51e7072374d367ca07' + 'a67ed00467fb886e73808a3246e7a6f6bfb60fa3c24a692e21a4dd474b8353fd' + 'ebc0af1ef3a6baccb013d0ccb29923895a7b22ff2d032e3bba802dc6328301ce' + 'bdd47c439c81b46384332c8b0180e70b80d8b38d844f0dde9d1be329e4c62f18' + '3217979d2ea17f9c6c9209e220d41a5f4e6a6b65fcc7cd5ab8d938f65ca2b59e' + 'd47310dfa4c53fd30744e49b0bacfcabe055568a33af08e28bc5bc80a852b4c4' + 'b11c3de747ef222696f5135556d624e3f7f0135a3cb1b06082f1ec8e9b7eeb0a' + 'f9fe57f809ac13e0043d18b795ef777af3e8c710a83745b37b09db536f683d2a') |