summaryrefslogtreecommitdiffstats
path: root/pr2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pr2.patch')
-rw-r--r--pr2.patch82
1 files changed, 82 insertions, 0 deletions
diff --git a/pr2.patch b/pr2.patch
new file mode 100644
index 0000000..394a42d
--- /dev/null
+++ b/pr2.patch
@@ -0,0 +1,82 @@
+From b53da53d60c479baa2e33859bdb03cad0ea5b540 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 9 Jul 2021 16:10:52 +0200
+Subject: [PATCH 1/2] use extension version instead of PHP version
+
+---
+ php_xz.h | 2 ++
+ xz.c | 10 ++++++++--
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/php_xz.h b/php_xz.h
+index 8368c4a..9908cb9 100644
+--- a/php_xz.h
++++ b/php_xz.h
+@@ -20,6 +20,8 @@
+ #ifndef PHP_XZ_H
+ # define PHP_XZ_H
+
++#define PHP_XZ_VERSION "1.1.1"
++
+ extern zend_module_entry xz_module_entry;
+ extern php_stream_wrapper php_stream_xz_wrapper;
+
+diff --git a/xz.c b/xz.c
+index 243167d..e0a4d3a 100644
+--- a/xz.c
++++ b/xz.c
+@@ -92,7 +92,7 @@ zend_module_entry xz_module_entry = {
+ NULL, /* PHP_RINIT(xz) */
+ NULL, /* PHP_RSHUTDOWN(xz) */
+ PHP_MINFO(xz),
+- PHP_VERSION,
++ PHP_XZ_VERSION,
+ STANDARD_MODULE_PROPERTIES
+ };
+ /* }}} */
+@@ -134,7 +134,13 @@ PHP_MINFO_FUNCTION(xz)
+ {
+ php_info_print_table_start();
+ php_info_print_table_header(2, "xz support", "enabled");
+- php_info_print_table_header(2, "liblzma version", lzma_version_string());
++ php_info_print_table_header(2, "xz extension version ", PHP_XZ_VERSION);
++ if (strcmp(LZMA_VERSION_STRING, lzma_version_string())) {
++ php_info_print_table_header(2, "liblzma headers version", LZMA_VERSION_STRING);
++ php_info_print_table_header(2, "liblzma library version", lzma_version_string());
++ } else {
++ php_info_print_table_header(2, "liblzma version", lzma_version_string());
++ }
+ php_info_print_table_end();
+
+ DISPLAY_INI_ENTRIES();
+
+From 1aa1b2763257b9c733c5f636e6ace275e1600891 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 9 Jul 2021 16:13:04 +0200
+Subject: [PATCH 2/2] only 1 header + rows
+
+---
+ xz.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/xz.c b/xz.c
+index e0a4d3a..832c13e 100644
+--- a/xz.c
++++ b/xz.c
+@@ -134,12 +134,12 @@ PHP_MINFO_FUNCTION(xz)
+ {
+ php_info_print_table_start();
+ php_info_print_table_header(2, "xz support", "enabled");
+- php_info_print_table_header(2, "xz extension version ", PHP_XZ_VERSION);
++ php_info_print_table_row(2, "xz extension version ", PHP_XZ_VERSION);
+ if (strcmp(LZMA_VERSION_STRING, lzma_version_string())) {
+- php_info_print_table_header(2, "liblzma headers version", LZMA_VERSION_STRING);
+- php_info_print_table_header(2, "liblzma library version", lzma_version_string());
++ php_info_print_table_row(2, "liblzma headers version", LZMA_VERSION_STRING);
++ php_info_print_table_row(2, "liblzma library version", lzma_version_string());
+ } else {
+- php_info_print_table_header(2, "liblzma version", lzma_version_string());
++ php_info_print_table_row(2, "liblzma version", lzma_version_string());
+ }
+ php_info_print_table_end();
+