Merge pull request #89266 from talyz/mysqlnd-fix-compression
php.extensions.mysqlnd: Fix compression support
This commit is contained in:
commit
b084cf2d30
@ -854,6 +854,9 @@ in
|
|||||||
inherit configureFlags internalDeps buildInputs
|
inherit configureFlags internalDeps buildInputs
|
||||||
zendExtension doCheck;
|
zendExtension doCheck;
|
||||||
|
|
||||||
|
prePatch = "pushd ../..";
|
||||||
|
postPatch = "popd";
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
nullglobRestore=$(shopt -p nullglob)
|
nullglobRestore=$(shopt -p nullglob)
|
||||||
shopt -u nullglob # To make ?-globbing work
|
shopt -u nullglob # To make ?-globbing work
|
||||||
@ -983,14 +986,14 @@ in
|
|||||||
# The configure script doesn't correctly add library link
|
# The configure script doesn't correctly add library link
|
||||||
# flags, so we add them to the variable used by the Makefile
|
# flags, so we add them to the variable used by the Makefile
|
||||||
# when linking.
|
# when linking.
|
||||||
MYSQLND_SHARED_LIBADD = "-lssl -lcrypto -lz";
|
MYSQLND_SHARED_LIBADD = "-lssl -lcrypto";
|
||||||
# The configure script builds a config.h which is never
|
# The configure script builds a config.h which is never
|
||||||
# included. Let's include it in the main header file
|
# included. Let's include it in the main header file
|
||||||
# included by all .c-files.
|
# included by all .c-files.
|
||||||
patches = [
|
patches = [
|
||||||
(pkgs.writeText "mysqlnd_config.patch" ''
|
(pkgs.writeText "mysqlnd_config.patch" ''
|
||||||
--- a/mysqlnd.h
|
--- a/ext/mysqlnd/mysqlnd.h
|
||||||
+++ b/mysqlnd.h
|
+++ b/ext/mysqlnd/mysqlnd.h
|
||||||
@@ -1,3 +1,6 @@
|
@@ -1,3 +1,6 @@
|
||||||
+#ifdef HAVE_CONFIG_H
|
+#ifdef HAVE_CONFIG_H
|
||||||
+#include "config.h"
|
+#include "config.h"
|
||||||
@ -999,6 +1002,18 @@ in
|
|||||||
+----------------------------------------------------------------------+
|
+----------------------------------------------------------------------+
|
||||||
| Copyright (c) The PHP Group |
|
| Copyright (c) The PHP Group |
|
||||||
'')
|
'')
|
||||||
|
(pkgs.writeText "mysqlnd_fix_compression.patch" ''
|
||||||
|
--- a/ext/mysqlnd/mysqlnd.h
|
||||||
|
+++ b/ext/mysqlnd/mysqlnd.h
|
||||||
|
@@ -48,7 +48,7 @@
|
||||||
|
#define MYSQLND_DBG_ENABLED 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#if defined(MYSQLND_COMPRESSION_WANTED) && defined(HAVE_ZLIB)
|
||||||
|
+#if defined(MYSQLND_COMPRESSION_WANTED)
|
||||||
|
#define MYSQLND_COMPRESSION_ENABLED 1
|
||||||
|
#endif
|
||||||
|
'')
|
||||||
];
|
];
|
||||||
postPhpize = lib.optionalString (lib.versionOlder php.version "7.4") ''
|
postPhpize = lib.optionalString (lib.versionOlder php.version "7.4") ''
|
||||||
substituteInPlace configure --replace '$OPENSSL_LIBDIR' '${openssl}/lib' \
|
substituteInPlace configure --replace '$OPENSSL_LIBDIR' '${openssl}/lib' \
|
||||||
@ -1013,8 +1028,8 @@ in
|
|||||||
# included after the ifdef...
|
# included after the ifdef...
|
||||||
patches = lib.optional (lib.versionOlder php.version "7.4") [
|
patches = lib.optional (lib.versionOlder php.version "7.4") [
|
||||||
(pkgs.writeText "zend_file_cache_config.patch" ''
|
(pkgs.writeText "zend_file_cache_config.patch" ''
|
||||||
--- a/zend_file_cache.c
|
--- a/ext/opcache/zend_file_cache.c
|
||||||
+++ b/zend_file_cache.c
|
+++ b/ext/opcache/zend_file_cache.c
|
||||||
@@ -27,9 +27,9 @@
|
@@ -27,9 +27,9 @@
|
||||||
#include "ext/standard/md5.h"
|
#include "ext/standard/md5.h"
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user