Skip to content

Commit a08715f

Browse files
committed
php73: fix builds on darwin architecture
1 parent aae9847 commit a08715f

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

pkgs/patches/php73-libtool.patch

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
diff -ru a/build/libtool.m4 b/build/libtool.m4
2+
--- a/build/libtool.m4
3+
+++ b/build/libtool.m4
4+
@@ -340,7 +340,7 @@ AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
5+
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
6+
10.[[012]]*)
7+
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
8+
- 10.*)
9+
+ *)
10+
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
11+
esac
12+
;;
13+
@@ -5799,7 +5799,7 @@ _LT_EOF
14+
10.[[012]])
15+
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
16+
;;
17+
- 10.*)
18+
+ *)
19+
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
20+
;;

pkgs/php/7.3.nix

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,16 @@ let
1313
url = "https://github.com/NixOS/nixpkgs/raw/42e9a2ccfab2a96d28c3c164a6cf41fb6f769de5/pkgs/development/interpreters/php/php73-darwin-isfinite.patch";
1414
sha256 = "V0mLLmXa2qJyxIVW/7nEml6cXZTBbr42kkJiij9KPyk=";
1515
})
16-
];
16+
# Handle macos versions that don't start with 10.* in libtool.
17+
# https://github.com/php/php-src/commit/d016434ad33284dfaceb8d233351d34356566d7d
18+
(prev.pkgs.fetchpatch2 {
19+
url = "https://github.com/php/php-src/commit/d016434ad33284dfaceb8d233351d34356566d7d.patch";
20+
sha256 = "";
21+
includes = [
22+
"build/libtool.m4"
23+
];
24+
})
25+
];
1726
};
1827
in
1928
base.withExtensions (

pkgs/phps.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ let
4343

4444
"--enable-libxml"
4545
"--with-libxml-dir=${prev.libxml2.dev}"
46+
]
47+
++ prev.lib.optionals (prev.lib.versionAtLeast args.version "7.3") [
48+
"--with-pcre-regex=${prev.pcre2.dev}"
4649
];
4750

4851
buildInputs =

0 commit comments

Comments
 (0)