diff --git a/srcpkgs/php/template b/srcpkgs/php/template index 62260109123..d7bbfc51974 100644 --- a/srcpkgs/php/template +++ b/srcpkgs/php/template @@ -1,7 +1,7 @@ # Template build file for 'php' pkgname=php version=5.5.14 -revision=2 +revision=3 lib32disabled=yes short_desc="An HTML-embedded scripting language" license="PHP" @@ -12,12 +12,22 @@ makedepends="postgresql-libs-devel libldap-devel libvpx-devel sqlite-devel unixodbc-devel net-snmp-devel libzip-devel enchant-devel libmcrypt-devel aspell-devel libltdl-devel libpng-devel libjpeg-turbo-devel icu-devel libcurl-devel libxslt-devel libressl-devel bzip2-devel zlib-devel db-devel - gmp-devel gdbm-devel freetype-devel systemd-devel apache-devel + gmp-devel gdbm-devel freetype-devel apache-devel readline-devel>=6.3 libmysqlclient-devel" conf_files="/etc/php/php.ini" distfiles="http://www.php.net/distributions/php-${version}.tar.gz" checksum=ef7e4f4942c5767e01b96650a5bd4178c663738436f99b5695c3144732ff7166 +# Package build options +build_options="systemd" + +if [ "$build_option_systemd" ]; then + configure_args+=" --with-fpm-systemd" + makedepends+=" systemd-devel" +else + configure_args+=" --without-fpm-systemd" +fi + do_build() { local _phpconfig="--srcdir=.. \ --config-cache \ @@ -54,7 +64,6 @@ do_build() { --with-curl=shared \ --with-db4=/usr \ --with-enchant=shared,/usr \ - --with-fpm-systemd \ --with-freetype-dir=/usr \ --with-gd=shared \ --with-gdbm \ @@ -86,6 +95,7 @@ do_build() { --with-xmlrpc=shared \ --with-xsl=shared \ --with-zlib \ + ${configure_args} \ " EXTENSION_DIR=/usr/lib/php/modules @@ -204,8 +214,10 @@ php-fpm_package() { vinstall ${wrksrc}/build-fpm/sapi/fpm/php-fpm 755 usr/bin vinstall ${wrksrc}/build-fpm/sapi/fpm/php-fpm.8 644 usr/share/man/man8 vinstall ${wrksrc}/build-fpm/sapi/fpm/php-fpm.conf 644 etc/php - vinstall ${FILESDIR}/php-fpm.tmpfiles 644 usr/lib/tmpfiles.d php-fpm.conf - vinstall ${FILESDIR}/php-fpm.service 644 usr/lib/systemd/system + if [ "$build_option_systemd" ]; then + vinstall ${FILESDIR}/php-fpm.tmpfiles 644 usr/lib/tmpfiles.d php-fpm.conf + vinstall ${FILESDIR}/php-fpm.service 644 usr/lib/systemd/system + fi } }