diff options
author | Domen Kožar <domen@dev.si> | 2013-06-29 03:53:26 -0700 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2013-06-29 03:53:26 -0700 |
commit | f33ebf88b9321b7a409edef2629b69cd6a78116f (patch) | |
tree | 45135fb742d135f56b2d5816111d2d5293c51a2f /pkgs/development/interpreters/php | |
parent | 2f643d43d2e9d0d61664df3ae2e872b3a08af565 (diff) | |
parent | a7746e3585cbdf437c57f43fa50750a1bc6c3c11 (diff) | |
download | nixlib-f33ebf88b9321b7a409edef2629b69cd6a78116f.tar nixlib-f33ebf88b9321b7a409edef2629b69cd6a78116f.tar.gz nixlib-f33ebf88b9321b7a409edef2629b69cd6a78116f.tar.bz2 nixlib-f33ebf88b9321b7a409edef2629b69cd6a78116f.tar.lz nixlib-f33ebf88b9321b7a409edef2629b69cd6a78116f.tar.xz nixlib-f33ebf88b9321b7a409edef2629b69cd6a78116f.tar.zst nixlib-f33ebf88b9321b7a409edef2629b69cd6a78116f.zip |
Merge pull request #650 from lovek323/php53
php53: fix on darwin
Diffstat (limited to 'pkgs/development/interpreters/php')
-rw-r--r-- | pkgs/development/interpreters/php/5.3.nix | 71 |
1 files changed, 45 insertions, 26 deletions
diff --git a/pkgs/development/interpreters/php/5.3.nix b/pkgs/development/interpreters/php/5.3.nix index 576c1dac7ed5..347a374ffcc3 100644 --- a/pkgs/development/interpreters/php/5.3.nix +++ b/pkgs/development/interpreters/php/5.3.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, composableDerivation, autoconf, automake, flex, bison , apacheHttpd, mysql, libxml2, readline, zlib, curl, gd, postgresql, gettext -, openssl, pkgconfig, sqlite, config, libiconv, libjpeg, libpng, freetype -, libxslt, libmcrypt, bzip2, icu }: +, openssl, pkgconfig, sqlite, config, libjpeg, libpng, freetype, libxslt +, libmcrypt, bzip2, icu, libssh2, makeWrapper, libiconvOrEmpty, libiconv }: let libmcryptOverride = libmcrypt.override { disablePosixThreads = true; }; @@ -15,7 +15,15 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed) enableParallelBuilding = true; - buildInputs = ["flex" "bison" "pkgconfig"]; + buildInputs + = [ flex bison pkgconfig ] + ++ stdenv.lib.optionals stdenv.isDarwin [ libssh2 makeWrapper ]; + + # need to include the C++ standard library when compiling on darwin + NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lstdc++"; + + # need to specify where the dylib for icu is stored + DYLD_LIBRARY_PATH = stdenv.lib.optionalString stdenv.isDarwin "${icu}/lib"; flags = { @@ -35,17 +43,21 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed) buildInputs = [curl openssl]; }; + pcntl = { + configureFlags = [ "--enable-pcntl" ]; + }; + zlib = { configureFlags = ["--with-zlib=${zlib}"]; buildInputs = [zlib]; }; libxml2 = { - configureFlags = [ - "--with-libxml-dir=${libxml2}" - #"--with-iconv-dir=${libiconv}" - ]; - buildInputs = [ libxml2 ]; + configureFlags + = [ "--with-libxml-dir=${libxml2}" ] + ++ stdenv.lib.optional (libiconvOrEmpty != []) + [ "--with-iconv=${libiconv}" ]; + buildInputs = [ libxml2 ] ++ libiconvOrEmpty; }; readline = { @@ -166,30 +178,31 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed) }; cfg = { - mysqlSupport = 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; bcmathSupport = config.php.bcmath or true; - socketsSupport = config.php.sockets or true; + bz2Support = config.php.bz2 or false; curlSupport = config.php.curl or true; + exifSupport = config.php.exif or true; + ftpSupport = config.php.ftp or true; + gdSupport = config.php.gd or true; gettextSupport = config.php.gettext or true; + intlSupport = config.php.intl or true; + libxml2Support = config.php.libxml2 or true; + mbstringSupport = config.php.mbstring or true; + mcryptSupport = config.php.mcrypt or false; + mysqlSupport = config.php.mysql or true; + mysqliSupport = config.php.mysqli or true; + opensslSupport = config.php.openssl or true; + pcntlSupport = config.php.pcntl or true; + pdo_mysqlSupport = config.php.pdo_mysql or true; postgresqlSupport = config.php.postgresql or true; readlineSupport = config.php.readline or true; - sqliteSupport = config.php.sqlite or true; soapSupport = config.php.soap or true; - zlibSupport = config.php.zlib or true; - opensslSupport = config.php.openssl or true; - mbstringSupport = config.php.mbstring or true; - gdSupport = config.php.gd or true; - intlSupport = config.php.intl or true; - exifSupport = config.php.exif or true; + socketsSupport = config.php.sockets or true; + sqliteSupport = config.php.sqlite or true; xslSupport = config.php.xsl or false; - mcryptSupport = config.php.mcrypt or false; - bz2Support = config.php.bz2 or false; zipSupport = config.php.zip or true; - ftpSupport = config.php.ftp or true; + zlibSupport = config.php.zlib or true; }; configurePhase = '' @@ -202,7 +215,11 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed) installPhase = '' unset installPhase; installPhase; cp php.ini-production $iniFile - ''; + '' + ( stdenv.lib.optionalString stdenv.isDarwin '' + for prog in $out/bin/*; do + wrapProgram "$prog" --prefix DYLD_LIBRARY_PATH : "$DYLD_LIBRARY_PATH" + done + '' ); src = fetchurl { url = "http://nl.php.net/get/php-${version}.tar.bz2/from/this/mirror"; @@ -212,8 +229,10 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed) meta = { description = "The PHP language runtime engine"; - homepage = http://www.php.net/; - license = "PHP-3"; + homepage = http://www.php.net/; + license = "PHP-3"; + maintainers = with stdenv.lib.maintainers; [ lovek323 ]; + platforms = stdenv.lib.platforms.unix; }; patches = [./fix.patch]; |