about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/interpreters/php
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/interpreters/php')
-rw-r--r--nixpkgs/pkgs/development/interpreters/php/default.nix33
-rw-r--r--nixpkgs/pkgs/development/interpreters/php/php72-darwin-isfinite.patch62
-rw-r--r--nixpkgs/pkgs/development/interpreters/php/zlib-darwin-tests.patch44
3 files changed, 60 insertions, 79 deletions
diff --git a/nixpkgs/pkgs/development/interpreters/php/default.nix b/nixpkgs/pkgs/development/interpreters/php/default.nix
index b56824c77238..8921cf78aa83 100644
--- a/nixpkgs/pkgs/development/interpreters/php/default.nix
+++ b/nixpkgs/pkgs/development/interpreters/php/default.nix
@@ -8,7 +8,7 @@ let
     { callPackage, lib, stdenv, nixosTests, config, fetchurl, makeWrapper
     , symlinkJoin, writeText, autoconf, automake, bison, flex, libtool
     , pkgconfig, re2c, apacheHttpd, libargon2, libxml2, pcre, pcre2
-    , systemd, valgrind
+    , systemd, system-sendmail, valgrind, xcbuild
 
     , version
     , sha256
@@ -143,7 +143,8 @@ let
 
           enableParallelBuilding = true;
 
-          nativeBuildInputs = [ autoconf automake bison flex libtool pkgconfig re2c ];
+          nativeBuildInputs = [ autoconf automake bison flex libtool pkgconfig re2c ]
+            ++ lib.optional stdenv.isDarwin xcbuild;
 
           buildInputs =
             # PCRE extension
@@ -177,7 +178,10 @@ let
             ++ lib.optional (!cliSupport) "--disable-cli"
             ++ lib.optional fpmSupport    "--enable-fpm"
             ++ lib.optional pearSupport [ "--with-pear=$(out)/lib/php/pear" "--enable-xml" "--with-libxml" ]
-            ++ lib.optional (pearSupport && (lib.versionOlder version "7.4")) "--enable-libxml"
+            ++ lib.optionals (pearSupport && (lib.versionOlder version "7.4")) [
+              "--enable-libxml"
+              "--with-libxml-dir=${libxml2.dev}"
+            ]
             ++ lib.optional pharSupport   "--enable-phar"
             ++ lib.optional phpdbgSupport "--enable-phpdbg"
 
@@ -191,6 +195,10 @@ let
             ++ lib.optional systemdSupport "--with-fpm-systemd"
             ++ lib.optional valgrindSupport "--with-valgrind=${valgrind.dev}"
             ++ lib.optional ztsSupport "--enable-maintainer-zts"
+
+
+            # Sendmail
+            ++ [ "PROG_SENDMAIL=${system-sendmail}/bin/sendmail" ]
           ;
 
           hardeningDisable = [ "bindnow" ];
@@ -263,25 +271,17 @@ let
           };
         };
 
-  php72base = callPackage generic (_args // {
-    version = "7.2.29";
-    sha256 = "08xry2fgqgg8s0ym1hh11wkbr36av3zq1bn4krbciw1b7x8gb8ga";
-
-    # https://bugs.php.net/bug.php?id=76826
-    extraPatches = lib.optional stdenv.isDarwin ./php72-darwin-isfinite.patch;
-  });
-
   php73base = callPackage generic (_args // {
-    version = "7.3.16";
-    sha256 = "0bh499v9dfgh9k51w4rird1slb9rh9whp5h37fb84c98d992s1xq";
+    version = "7.3.20";
+    sha256 = "1pl9bjwvdva2yx4sh465z9cr4bnr8mvv008w71sy1kqsj6a7ivf6";
 
     # https://bugs.php.net/bug.php?id=76826
     extraPatches = lib.optional stdenv.isDarwin ./php73-darwin-isfinite.patch;
   });
 
   php74base = callPackage generic (_args // {
-    version = "7.4.6";
-    sha256 = "0j133pfwa823d4jhx2hkrrzjl4hswvz00b1z58r5c82xd5sr9vd6";
+    version = "7.4.8";
+    sha256 = "0ql01sfg8l7y2bfwmnjxnfw9irpibnz57ssck24b00y00nkd6j3a";
   });
 
   defaultPhpExtensions = { all, ... }: with all; ([
@@ -297,8 +297,7 @@ let
 
   php74 = php74base.withExtensions defaultPhpExtensions;
   php73 = php73base.withExtensions defaultPhpExtensionsWithHash;
-  php72 = php72base.withExtensions defaultPhpExtensionsWithHash;
 
 in {
-  inherit php72 php73 php74;
+  inherit php73 php74;
 }
diff --git a/nixpkgs/pkgs/development/interpreters/php/php72-darwin-isfinite.patch b/nixpkgs/pkgs/development/interpreters/php/php72-darwin-isfinite.patch
deleted file mode 100644
index ea2e3e28f2cc..000000000000
--- a/nixpkgs/pkgs/development/interpreters/php/php72-darwin-isfinite.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-diff --git a/Zend/configure.ac b/Zend/configure.ac
-index b95c1360b8..fe16c86007 100644
---- a/Zend/configure.ac
-+++ b/Zend/configure.ac
-@@ -60,7 +60,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
- #include <math.h>
- 
- #ifndef zend_isnan
--#if HAVE_DECL_ISNAN && (!defined(__cplusplus) || __cplusplus < 201103L)
-+#if HAVE_DECL_ISNAN && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L)
- #define zend_isnan(a) isnan(a)
- #elif defined(HAVE_FPCLASS)
- #define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
-@@ -69,7 +69,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
- #endif
- #endif
- 
--#if HAVE_DECL_ISINF && (!defined(__cplusplus) || __cplusplus < 201103L)
-+#if HAVE_DECL_ISINF && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L)
- #define zend_isinf(a) isinf(a)
- #elif defined(INFINITY)
- /* Might not work, but is required by ISO C99 */
-@@ -80,7 +80,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
- #define zend_isinf(a) 0
- #endif
- 
--#if HAVE_DECL_ISFINITE && (!defined(__cplusplus) || __cplusplus < 201103L)
-+#if HAVE_DECL_ISFINITE && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L)
- #define zend_finite(a) isfinite(a)
- #elif defined(HAVE_FINITE)
- #define zend_finite(a) finite(a)
-diff --git a/configure.ac b/configure.ac
-index d3f3cacd07..ddbf712ba2 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -68,7 +68,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
- #include <math.h>
- 
- #ifndef zend_isnan
--#if HAVE_DECL_ISNAN && (!defined(__cplusplus) || __cplusplus < 201103L)
-+#if HAVE_DECL_ISNAN && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L)
- #define zend_isnan(a) isnan(a)
- #elif defined(HAVE_FPCLASS)
- #define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
-@@ -77,7 +77,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
- #endif
- #endif
- 
--#if HAVE_DECL_ISINF && (!defined(__cplusplus) || __cplusplus < 201103L)
-+#if HAVE_DECL_ISINF && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L)
- #define zend_isinf(a) isinf(a)
- #elif defined(INFINITY)
- /* Might not work, but is required by ISO C99 */
-@@ -88,7 +88,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
- #define zend_isinf(a) 0
- #endif
- 
--#if HAVE_DECL_ISFINITE && (!defined(__cplusplus) || __cplusplus < 201103L)
-+#if HAVE_DECL_ISFINITE && (defined(__APPLE__) || defined(__APPLE_CC__) || !defined(__cplusplus) || __cplusplus < 201103L)
- #define zend_finite(a) isfinite(a)
- #elif defined(HAVE_FINITE)
- #define zend_finite(a) finite(a)
diff --git a/nixpkgs/pkgs/development/interpreters/php/zlib-darwin-tests.patch b/nixpkgs/pkgs/development/interpreters/php/zlib-darwin-tests.patch
new file mode 100644
index 000000000000..ef61f0a87845
--- /dev/null
+++ b/nixpkgs/pkgs/development/interpreters/php/zlib-darwin-tests.patch
@@ -0,0 +1,44 @@
+diff --git a/ext/zlib/tests/bug55544.phpt b/ext/zlib/tests/bug55544.phpt
+index a0d22f4fcebf4846da6781f424f87821626de5ea..e650fe6909f555d04834f4c08f7fd0d354b783e2 100644
+--- a/ext/zlib/tests/bug55544.phpt
++++ b/ext/zlib/tests/bug55544.phpt
+@@ -6,6 +6,9 @@ extension_loaded("zlib") or die("skip");
+ if (substr(PHP_OS, 0, 3) == 'WIN') {
+        die("skip not for windows");
+ }
++if (PHP_OS == "Darwin") {
++       die("skip not for darwin");
++}
+ ?>
+ --INI--
+ output_handler=ob_gzhandler
+diff --git a/ext/zlib/tests/gzencode_variation1.phpt b/ext/zlib/tests/gzencode_variation1.phpt
+index c966b2cbc5b7..2f953168fa22 100644
+--- a/ext/zlib/tests/gzencode_variation1.phpt
++++ b/ext/zlib/tests/gzencode_variation1.phpt
+@@ -10,6 +10,10 @@ if( substr(PHP_OS, 0, 3) == "WIN" ) {
+ if (!extension_loaded("zlib")) {
+ 	print "skip - ZLIB extension not loaded";
+ }
++
++if (PHP_OS == "Darwin") {
++    print "skip - OS is encoded in headers, tested header is non Darwin";
++}
+ ?>
+ --FILE--
+ <?php
+diff --git a/ext/zlib/tests/gzencode_variation2.phpt b/ext/zlib/tests/gzencode_variation2.phpt
+index 94ac42a5f1cd..9160cf519751 100644
+--- a/ext/zlib/tests/gzencode_variation2.phpt
++++ b/ext/zlib/tests/gzencode_variation2.phpt
+@@ -10,6 +10,10 @@ if( substr(PHP_OS, 0, 3) == "WIN" ) {
+ if (!extension_loaded("zlib")) {
+ 	print "skip - ZLIB extension not loaded";
+ }
++
++if (PHP_OS == "Darwin") {
++    print "skip - OS is encoded in headers, tested header is non Darwin";
++}
+ ?>
+ --FILE--
+ <?php