summaryrefslogtreecommitdiffstats
path: root/zip-php84.patch
blob: e50b9e064cca02bf87b85f12fb51af394b1e4538 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
From d8814bb56c836d0d76f8353ef82c16b2f80ff9ca Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Wed, 24 Apr 2024 15:19:39 +0200
Subject: [PATCH] compatibility with 8.4

---
 config.m4   | 4 ++--
 config.w32  | 2 ++
 package.xml | 4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/config.m4 b/config.m4
index 97f687a..e196729 100644
--- a/config.m4
+++ b/config.m4
@@ -27,8 +27,8 @@ if test "$PHP_ZIP" != "no"; then
   elif test $PHP_VERSION -lt 80100; then
     AC_MSG_RESULT(8.0)
     subdir=php8
-  elif test $PHP_VERSION -lt 80400; then
-    AC_MSG_RESULT(8.1/8.2/8.3)
+  elif test $PHP_VERSION -lt 80500; then
+    AC_MSG_RESULT(8.1/8.2/8.3/8.4)
     subdir=php81
   else
     AC_MSG_ERROR(PHP version $PHP_VERSION is not supported yet)
From d66c502aa9bba9aed8b553098e80ff9902207927 Mon Sep 17 00:00:00 2001
From: Peter Kokot <peterkokot@gmail.com>
Date: Sat, 1 Jun 2024 14:07:06 +0200
Subject: [PATCH] Add missing pcre dependency definition to zip extension

The zip extension also requires the pcre extension.
---
 config.m4       | 1 +
 config.w32      | 1 +
 php5/php_zip.c  | 8 +++++++-
 php7/php_zip.c  | 8 +++++++-
 php73/php_zip.c | 8 +++++++-
 php74/php_zip.c | 8 +++++++-
 php8/php_zip.c  | 8 +++++++-
 php81/php_zip.c | 8 +++++++-
 8 files changed, 44 insertions(+), 6 deletions(-)

diff --git a/config.m4 b/config.m4
index e196729..0b4669b 100644
--- a/config.m4
+++ b/config.m4
@@ -142,6 +142,7 @@ if test "$PHP_ZIP" != "no"; then
 
     AC_DEFINE(HAVE_ZIP,1,[ ])
     PHP_NEW_EXTENSION(zip, $PHP_ZIP_SOURCES, $ext_shared,, $LIBZIP_CFLAGS)
+    PHP_ADD_EXTENSION_DEP(zip, pcre)
   else
     AC_MSG_ERROR([libzip is no more bundled: install libzip version >= 0.11 (1.3.0 recommended for encryption and bzip2 support)])
   fi
diff --git a/php5/php_zip.c b/php5/php_zip.c
index 0b61c0d..eccd1cc 100644
--- a/php5/php_zip.c
+++ b/php5/php_zip.c
@@ -1338,10 +1338,16 @@ static PHP_MSHUTDOWN_FUNCTION(zip);
 static PHP_MINFO_FUNCTION(zip);
 /* }}} */
 
+static const zend_module_dep zip_deps[] = {
+	ZEND_MOD_REQUIRED("pcre")
+	ZEND_MOD_END
+};
+
 /* {{{ zip_module_entry
  */
 zend_module_entry zip_module_entry = {
-	STANDARD_MODULE_HEADER,
+	STANDARD_MODULE_HEADER_EX, NULL,
+	zip_deps,
 	"zip",
 	zip_functions,
 	PHP_MINIT(zip),
diff --git a/php7/php_zip.c b/php7/php_zip.c
index 0470d52..aa8b71e 100644
--- a/php7/php_zip.c
+++ b/php7/php_zip.c
@@ -1226,10 +1226,16 @@ static PHP_MSHUTDOWN_FUNCTION(zip);
 static PHP_MINFO_FUNCTION(zip);
 /* }}} */
 
+static const zend_module_dep zip_deps[] = {
+	ZEND_MOD_REQUIRED("pcre")
+	ZEND_MOD_END
+};
+
 /* {{{ zip_module_entry
  */
 zend_module_entry zip_module_entry = {
-	STANDARD_MODULE_HEADER,
+	STANDARD_MODULE_HEADER_EX, NULL,
+	zip_deps,
 	"zip",
 	zip_functions,
 	PHP_MINIT(zip),
diff --git a/php73/php_zip.c b/php73/php_zip.c
index e56a94d..ee68b0f 100644
--- a/php73/php_zip.c
+++ b/php73/php_zip.c
@@ -1229,10 +1229,16 @@ static PHP_MSHUTDOWN_FUNCTION(zip);
 static PHP_MINFO_FUNCTION(zip);
 /* }}} */
 
+static const zend_module_dep zip_deps[] = {
+	ZEND_MOD_REQUIRED("pcre")
+	ZEND_MOD_END
+};
+
 /* {{{ zip_module_entry
  */
 zend_module_entry zip_module_entry = {
-	STANDARD_MODULE_HEADER,
+	STANDARD_MODULE_HEADER_EX, NULL,
+	zip_deps,
 	"zip",
 	zip_functions,
 	PHP_MINIT(zip),
diff --git a/php74/php_zip.c b/php74/php_zip.c
index 52ae83d..3c4c509 100644
--- a/php74/php_zip.c
+++ b/php74/php_zip.c
@@ -1241,10 +1241,16 @@ static PHP_MSHUTDOWN_FUNCTION(zip);
 static PHP_MINFO_FUNCTION(zip);
 /* }}} */
 
+static const zend_module_dep zip_deps[] = {
+	ZEND_MOD_REQUIRED("pcre")
+	ZEND_MOD_END
+};
+
 /* {{{ zip_module_entry
  */
 zend_module_entry zip_module_entry = {
-	STANDARD_MODULE_HEADER,
+	STANDARD_MODULE_HEADER_EX, NULL,
+	zip_deps,
 	"zip",
 	zip_functions,
 	PHP_MINIT(zip),
diff --git a/php8/php_zip.c b/php8/php_zip.c
index 34bddd1..93d633b 100644
--- a/php8/php_zip.c
+++ b/php8/php_zip.c
@@ -1141,10 +1141,16 @@ static PHP_MSHUTDOWN_FUNCTION(zip);
 static PHP_MINFO_FUNCTION(zip);
 /* }}} */
 
+static const zend_module_dep zip_deps[] = {
+	ZEND_MOD_REQUIRED("pcre")
+	ZEND_MOD_END
+};
+
 /* {{{ zip_module_entry */
 zend_module_entry zip_module_entry = {
-	STANDARD_MODULE_HEADER,
+	STANDARD_MODULE_HEADER_EX, NULL,
 	"zip",
+	zip_deps,
 	ext_functions,
 	PHP_MINIT(zip),
 	PHP_MSHUTDOWN(zip),
diff --git a/php81/php_zip.c b/php81/php_zip.c
index 274ddf1..97194ba 100644
--- a/php81/php_zip.c
+++ b/php81/php_zip.c
@@ -1156,9 +1156,15 @@ static PHP_MSHUTDOWN_FUNCTION(zip);
 static PHP_MINFO_FUNCTION(zip);
 /* }}} */
 
+static const zend_module_dep zip_deps[] = {
+	ZEND_MOD_REQUIRED("pcre")
+	ZEND_MOD_END
+};
+
 /* {{{ zip_module_entry */
 zend_module_entry zip_module_entry = {
-	STANDARD_MODULE_HEADER,
+	STANDARD_MODULE_HEADER_EX, NULL,
+	zip_deps,
 	"zip",
 	ext_functions,
 	PHP_MINIT(zip),