PKGNAME=php
PKGSEC=devel
PKGDEP="aspell curl db e2fsprogs enchant-2 file freetds freetype gmp httpd \
        icu libedit libgd libjpeg-turbo libmcrypt libnl libpng libtool \
        libxml2 libxslt libzip libsodium net-snmp openldap openssl pcre2 postfix \
        postgresql-runtime sqlite systemd tidyhtml unixodbc onig argon2 libnsl2"
# Header files and pkg-config database.
BUILDDEP="postgresql"
PKGDES="PHP is a general-purpose scripting language for Web development"

AUTOTOOLS_AFTER=(
	"--srcdir=$SRCDIR"
	"--sysconfdir=/etc/php"
	"--with-layout=GNU"
	"--with-config-file-path=/etc/php"
	"--with-config-file-scan-dir=/etc/php/conf.d"
	"--enable-bcmath=shared"
	"--enable-calendar=shared"
	"--enable-dba=shared"
	"--enable-exif=shared"
	"--enable-ftp=shared"
	"--enable-gd=shared"
	"--enable-intl=shared"
	"--enable-mbstring"
	"--enable-pcntl"
	"--enable-shmop=shared"
	"--enable-soap=shared"
	"--enable-sockets=shared"
	"--enable-sysvmsg=shared"
	"--enable-sysvsem=shared"
	"--enable-sysvshm=shared"
	"--with-bz2=shared"
	"--with-curl=shared"
	"--with-enchant=shared"
	"--with-external-gd"
	"--with-external-pcre"
	"--with-ffi=shared"
	"--with-gdbm"
	"--with-gettext=shared"
	"--with-gmp=shared"
	"--with-iconv=shared"
	"--with-kerberos"
	"--with-ldap=shared"
	"--with-ldap-sasl"
	"--with-mhash"
	"--with-mysql-sock=/run/mysqld/mysqld.sock"
	"--with-mysqli=shared,mysqlnd"
	"--with-openssl"
	"--with-password-argon2"
	"--with-pdo-dblib=shared,/usr"
	"--with-pdo-mysql=shared,mysqlnd"
	"--with-pdo-odbc=shared,unixODBC,/usr"
	"--with-pdo-pgsql=shared"
	"--with-pdo-sqlite=shared"
	"--with-pgsql=shared"
	"--with-pspell=shared"
	"--with-readline"
	"--with-snmp=shared"
	"--with-sodium=shared"
	"--with-sqlite3=shared"
	"--with-tidy=shared"
	"--with-unixODBC=shared"
	"--with-xmlrpc=shared"
	"--with-xsl=shared"
	"--with-zip=shared"
	"--with-zlib"
)

PKGBREAK="php7<=7.4.19-1"
PKGCONFL="php7<=7.4.19-1"
PKGREP="php7"

AB_FLAGS_O3=1

# FIXME: /ext/opcache/jit/zend_jit_vm_helpers.c:43:34: error: global register
# variable follows a function definition
#   43 | register const zend_op* volatile opline __asm__("%r15");
#      |                                  ^
NOLTO=1
