diff options
author | Timo Kaufmann <timokau@zoho.com> | 2020-06-14 12:30:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-14 12:30:36 +0200 |
commit | 20e62aa580c2ed83b1a1b9caf0bd8431c0ab3666 (patch) | |
tree | 4099884a2b7abda273b6a80f0d341edcf87834e5 | |
parent | 29f3a2fd1a913735759b008afa0c40e9e5d765e2 (diff) | |
parent | c1b9f86cdd2789d213f149944173dd4afac37c71 (diff) | |
download | nixlib-20e62aa580c2ed83b1a1b9caf0bd8431c0ab3666.tar nixlib-20e62aa580c2ed83b1a1b9caf0bd8431c0ab3666.tar.gz nixlib-20e62aa580c2ed83b1a1b9caf0bd8431c0ab3666.tar.bz2 nixlib-20e62aa580c2ed83b1a1b9caf0bd8431c0ab3666.tar.lz nixlib-20e62aa580c2ed83b1a1b9caf0bd8431c0ab3666.tar.xz nixlib-20e62aa580c2ed83b1a1b9caf0bd8431c0ab3666.tar.zst nixlib-20e62aa580c2ed83b1a1b9caf0bd8431c0ab3666.zip |
Merge pull request #90249 from Ericson2314/fix-old-php
php < 7.4: Fix validation of PKG_CONFIG var
-rw-r--r-- | pkgs/development/interpreters/php/default.nix | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix index 6ab682d97e6c..b56824c77238 100644 --- a/pkgs/development/interpreters/php/default.nix +++ b/pkgs/development/interpreters/php/default.nix @@ -195,9 +195,10 @@ let hardeningDisable = [ "bindnow" ]; - preConfigure = '' - # Don't record the configure flags since this causes unnecessary - # runtime dependencies + preConfigure = + # Don't record the configure flags since this causes unnecessary + # runtime dependencies + '' for i in main/build-defs.h.in scripts/php-config.in; do substituteInPlace $i \ --replace '@CONFIGURE_COMMAND@' '(omitted)' \ @@ -206,7 +207,14 @@ let done export EXTENSION_DIR=$out/lib/php/extensions - + '' + # PKG_CONFIG need not be a relative path + + lib.optionalString (! lib.versionAtLeast version "7.4") '' + for i in $(find . -type f -name "*.m4"); do + substituteInPlace $i \ + --replace 'test -x "$PKG_CONFIG"' 'type -P "$PKG_CONFIG" >/dev/null' + done + '' + '' ./buildconf --copy --force if test -f $src/genfiles; then |