Merge pull request #24648 from asppsa/php-config-fix2
php: fix php-config header file paths
This commit is contained in:
commit
6008ede40d
@ -23,11 +23,6 @@ let
|
|||||||
buildInputs = [ flex bison pkgconfig ]
|
buildInputs = [ flex bison pkgconfig ]
|
||||||
++ lib.optional stdenv.isLinux systemd;
|
++ lib.optional stdenv.isLinux systemd;
|
||||||
|
|
||||||
configureFlags = [
|
|
||||||
"EXTENSION_DIR=$(out)/lib/php/extensions"
|
|
||||||
] ++ lib.optional stdenv.isDarwin "--with-iconv=${libiconv}"
|
|
||||||
++ lib.optional stdenv.isLinux "--with-fpm-systemd";
|
|
||||||
|
|
||||||
flags = {
|
flags = {
|
||||||
|
|
||||||
# much left to do here...
|
# much left to do here...
|
||||||
@ -267,26 +262,40 @@ let
|
|||||||
|
|
||||||
hardeningDisable = [ "bindnow" ];
|
hardeningDisable = [ "bindnow" ];
|
||||||
|
|
||||||
configurePhase = ''
|
preConfigure = ''
|
||||||
# Don't record the configure flags since this causes unnecessary
|
# Don't record the configure flags since this causes unnecessary
|
||||||
# runtime dependencies - except for php-embed, as uwsgi needs them.
|
# runtime dependencies
|
||||||
${lib.optionalString (!(config.php.embed or false)) ''
|
|
||||||
for i in main/build-defs.h.in scripts/php-config.in; do
|
for i in main/build-defs.h.in scripts/php-config.in; do
|
||||||
substituteInPlace $i \
|
substituteInPlace $i \
|
||||||
--replace '@CONFIGURE_COMMAND@' '(omitted)' \
|
--replace '@CONFIGURE_COMMAND@' '(omitted)' \
|
||||||
--replace '@CONFIGURE_OPTIONS@' "" \
|
--replace '@CONFIGURE_OPTIONS@' "" \
|
||||||
--replace '@PHP_LDFLAGS@' ""
|
--replace '@PHP_LDFLAGS@' ""
|
||||||
done
|
done
|
||||||
''}
|
|
||||||
|
|
||||||
[[ -z "$libxml2" ]] || export PATH=$PATH:$libxml2/bin
|
#[[ -z "$libxml2" ]] || addToSearchPath PATH $libxml2/bin
|
||||||
./configure --with-config-file-scan-dir=/etc/php.d --with-config-file-path=$out/etc --prefix=$out $configureFlags
|
|
||||||
|
configureFlags+=(--with-config-file-path=$out/etc \
|
||||||
|
--includedir=$dev/include \
|
||||||
|
EXTENSION_DIR=$out/lib/php/extensions)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
configureFlags = [
|
||||||
|
"--with-config-file-scan-dir=/etc/php.d"
|
||||||
|
] ++ lib.optional stdenv.isDarwin "--with-iconv=${libiconv}"
|
||||||
|
++ lib.optional stdenv.isLinux "--with-fpm-systemd";
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
cp php.ini-production $out/etc/php.ini
|
cp php.ini-production $out/etc/php.ini
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
mkdir -p $dev/bin $dev/share/man/man1
|
||||||
|
mv $out/bin/phpize $out/bin/php-config $dev/bin/
|
||||||
|
mv $out/share/man/man1/phpize.1.gz \
|
||||||
|
$out/share/man/man1/php-config.1.gz \
|
||||||
|
$dev/share/man/man1/
|
||||||
|
'';
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://www.php.net/distributions/php-${version}.tar.bz2";
|
url = "http://www.php.net/distributions/php-${version}.tar.bz2";
|
||||||
inherit sha256;
|
inherit sha256;
|
||||||
@ -298,6 +307,7 @@ let
|
|||||||
license = licenses.php301;
|
license = licenses.php301;
|
||||||
maintainers = with maintainers; [ globin ];
|
maintainers = with maintainers; [ globin ];
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
|
outputsToInstall = [ "out" "dev" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = if !php7 then [ ./fix-paths.patch ] else [ ./fix-paths-php7.patch ];
|
patches = if !php7 then [ ./fix-paths.patch ] else [ ./fix-paths-php7.patch ];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user