php: use external GD library

This commit is contained in:
Izorkin 2019-12-10 20:34:06 +03:00
parent ac3c11a980
commit 0ee5d55d3b
1 changed files with 12 additions and 6 deletions

View File

@ -1,9 +1,10 @@
# pcre functionality is tested in nixos/tests/php-pcre.nix
{ lib, stdenv, fetchurl, autoconf, bison, libtool, pkgconfig, re2c
, libxml2, readline, zlib, curl, postgresql, gettext
, openssl, pcre, pcre2, sqlite, config, libjpeg, libpng, freetype
, openssl, pcre, pcre2, sqlite, config
, libxslt, libmcrypt, bzip2, icu, openldap, cyrus_sasl, libmhash, unixODBC
, uwimap, pam, gmp, apacheHttpd, libiconv, systemd, libsodium, html-tidy, libargon2
, gd, freetype, libXpm, libjpeg, libpng, libwebp
, libzip, valgrind, oniguruma
}:
@ -84,7 +85,7 @@ let
++ optionals imapSupport [ uwimap openssl pam ]
++ optionals curlSupport [ curl openssl ]
++ optionals ldapSupport [ openldap openssl ]
++ optionals gdSupport [ libpng libjpeg freetype ]
++ optionals gdSupport [ gd freetype libXpm libjpeg libpng libwebp ]
++ optionals opensslSupport [ openssl openssl.dev ]
++ optional apxs2Support apacheHttpd
++ optional (ldapSupport && stdenv.isLinux) cyrus_sasl
@ -155,17 +156,22 @@ let
++ optional (mysqliSupport && mysqlndSupport) "--with-mysqli=mysqlnd"
++ optional (pdo_mysqlSupport || mysqliSupport) "--with-mysql-sock=/run/mysqld/mysqld.sock"
++ optional bcmathSupport "--enable-bcmath"
# FIXME: Our own gd package doesn't work, see https://bugs.php.net/bug.php?id=60108.
++ optionals (gdSupport && versionAtLeast version "7.4") [
"--enable-gd"
"--with-external-gd=${gd.dev}"
"--with-webp=${libwebp}"
"--with-jpeg=${libjpeg.dev}"
"--with-xpm=${libXpm.dev}"
"--with-freetype=${freetype.dev}"
"--enable-gd-jis-conv"
] ++ optionals (gdSupport && versionOlder version "7.4") [
"--with-gd"
"--with-freetype-dir=${freetype.dev}"
"--with-png-dir=${libpng.dev}"
"--with-gd=${gd.dev}"
"--with-webp-dir=${libwebp}"
"--with-jpeg-dir=${libjpeg.dev}"
"--with-png-dir=${libpng.dev}"
"--with-freetype-dir=${freetype.dev}"
"--with-xpm-dir=${libXpm.dev}"
"--enable-gd-jis-conv"
]
++ optional gmpSupport "--with-gmp=${gmp.dev}"
++ optional soapSupport "--enable-soap"