php: Now builds on darwin
This commit is contained in:
parent
e52194f17d
commit
d4babc49dc
@ -2,7 +2,7 @@
|
||||
, mysql, libxml2, readline, zlib, curl, postgresql, gettext
|
||||
, openssl, pkgconfig, sqlite, config, libjpeg, libpng, freetype
|
||||
, libxslt, libmcrypt, bzip2, icu, openldap, cyrus_sasl, libmhash, freetds
|
||||
, uwimap, pam, gmp, apacheHttpd }:
|
||||
, uwimap, pam, gmp, apacheHttpd, libiconv }:
|
||||
|
||||
let
|
||||
|
||||
@ -21,7 +21,10 @@ let
|
||||
|
||||
buildInputs = [ flex bison pkgconfig ];
|
||||
|
||||
configureFlags = ["EXTENSION_DIR=$(out)/lib/php/extensions"];
|
||||
configureFlags = [
|
||||
"EXTENSION_DIR=$(out)/lib/php/extensions"
|
||||
"--with-iconv=${libiconv}"
|
||||
];
|
||||
|
||||
flags = {
|
||||
|
||||
@ -49,9 +52,9 @@ let
|
||||
"LDAP_DIR=${openldap.dev}"
|
||||
"LDAP_INCDIR=${openldap.dev}/include"
|
||||
"LDAP_LIBDIR=${openldap.out}/lib"
|
||||
"--with-ldap-sasl=${cyrus_sasl.dev}"
|
||||
(lib.optional stdenv.isLinux "--with-ldap-sasl=${cyrus_sasl.dev}")
|
||||
];
|
||||
buildInputs = [openldap cyrus_sasl openssl];
|
||||
buildInputs = [openldap openssl] ++ lib.optional stdenv.isLinux cyrus_sasl;
|
||||
};
|
||||
|
||||
mhash = {
|
||||
@ -218,14 +221,14 @@ let
|
||||
};
|
||||
|
||||
cfg = {
|
||||
imapSupport = config.php.imap or true;
|
||||
imapSupport = config.php.imap or (!stdenv.isDarwin);
|
||||
ldapSupport = config.php.ldap or true;
|
||||
mhashSupport = config.php.mhash or true;
|
||||
mysqlSupport = (!php7) && (config.php.mysql or true);
|
||||
mysqliSupport = config.php.mysqli or true;
|
||||
pdo_mysqlSupport = config.php.pdo_mysql or true;
|
||||
libxml2Support = config.php.libxml2 or true;
|
||||
apxs2Support = config.php.apxs2 or true;
|
||||
apxs2Support = config.php.apxs2 or (!stdenv.isDarwin);
|
||||
bcmathSupport = config.php.bcmath or true;
|
||||
socketsSupport = config.php.sockets or true;
|
||||
curlSupport = config.php.curl or true;
|
||||
@ -287,6 +290,10 @@ let
|
||||
|
||||
patches = if !php7 then [ ./fix-paths.patch ] else [ ./fix-paths-php7.patch ];
|
||||
|
||||
postPatch = lib.optional stdenv.isDarwin ''
|
||||
substituteInPlace configure --replace "-lstdc++" "-lc++"
|
||||
'';
|
||||
|
||||
});
|
||||
|
||||
in {
|
||||
|
Loading…
Reference in New Issue
Block a user