1 |
commit: 6ad0e787c9a3e8cddbc787b1420dc9551cbc55e1 |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Mar 6 17:14:21 2020 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 6 17:14:37 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ad0e787 |
7 |
|
8 |
dev-php/pecl-uploadprogress: new version 1.1.3. |
9 |
|
10 |
This new version supports all newer slots of PHP, making our custom |
11 |
patches obsolete. Thanks to Reuben Farrelly for the heads-up! |
12 |
|
13 |
Closes: https://bugs.gentoo.org/711658 |
14 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
15 |
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org> |
16 |
|
17 |
dev-php/pecl-uploadprogress/Manifest | 2 +- |
18 |
.../pecl-uploadprogress/files/1.0.3.1-php7.patch | 148 --------------------- |
19 |
...-r4.ebuild => pecl-uploadprogress-1.1.3.ebuild} | 15 ++- |
20 |
3 files changed, 9 insertions(+), 156 deletions(-) |
21 |
|
22 |
diff --git a/dev-php/pecl-uploadprogress/Manifest b/dev-php/pecl-uploadprogress/Manifest |
23 |
index fe1058ee715..ce8d10d0aef 100644 |
24 |
--- a/dev-php/pecl-uploadprogress/Manifest |
25 |
+++ b/dev-php/pecl-uploadprogress/Manifest |
26 |
@@ -1 +1 @@ |
27 |
-DIST uploadprogress-1.0.3.1.tgz 9040 BLAKE2B b926ee0cc7d40276425ea8eed86c5934c35ff2436b5785888394927a145620caa335d4eae87fd85bd754f8a67c1562f3b8d23a2c626f0d0ca4bed4bf4872e465 SHA512 c317a30ed81430184b643e2755867cdccf9848312aa31a5527e4fe229ac19ee3099121de8e253207b55dd7e788c28720bd3c477663c4ca15100478647a6dc1bb |
28 |
+DIST uploadprogress-1.1.3.tgz 14798 BLAKE2B 5edda3e8672bb0e0829d100284240fcceac26be695386225a18446c742f59edfd906a9ae2f17b594816d3cddea02eb648db01a3352d7f8bd764ad2f6b2e03628 SHA512 2202f419be852a71eadae47eaa83909a032e5a6bbe4ce17ae5d45ea4e9f6d9c9edceb2111630d1f0e277b531d463accf540288ecbcca9bf154fe01754f225686 |
29 |
|
30 |
diff --git a/dev-php/pecl-uploadprogress/files/1.0.3.1-php7.patch b/dev-php/pecl-uploadprogress/files/1.0.3.1-php7.patch |
31 |
deleted file mode 100644 |
32 |
index c90f4bd9539..00000000000 |
33 |
--- a/dev-php/pecl-uploadprogress/files/1.0.3.1-php7.patch |
34 |
+++ /dev/null |
35 |
@@ -1,148 +0,0 @@ |
36 |
-From 7a4d6b3ac3575caedf9429940f54688411cbf5e9 Mon Sep 17 00:00:00 2001 |
37 |
-From: Jan-E <github@××××××××.nl> |
38 |
-Date: Sun, 19 Apr 2015 18:49:48 +0200 |
39 |
-Subject: [PATCH 1/2] PHP7 compatibility |
40 |
- |
41 |
---- |
42 |
- uploadprogress.c | 36 +++++++++++++++++++++++++++++++++--- |
43 |
- 1 file changed, 33 insertions(+), 3 deletions(-) |
44 |
- |
45 |
-diff --git a/uploadprogress.c b/uploadprogress.c |
46 |
-index 30f6758..7a52ba7 100644 |
47 |
---- a/uploadprogress.c |
48 |
-+++ b/uploadprogress.c |
49 |
-@@ -71,7 +71,7 @@ PHPAPI extern int (*php_rfc1867_callback)(unsigned int , void *, void ** TSRMLS_ |
50 |
- */ |
51 |
- static int uploadprogress_php_rfc1867_file(unsigned int event, void *event_data, void **data TSRMLS_DC) |
52 |
- { |
53 |
-- zval handler; |
54 |
-+ //zval handler; |
55 |
- char *callable = NULL; |
56 |
- uploadprogress_data * progress; |
57 |
- int read_bytes; |
58 |
-@@ -157,7 +157,11 @@ static int uploadprogress_php_rfc1867_file(unsigned int event, void *event_data |
59 |
- |
60 |
- if (get_contents) { |
61 |
- php_stream *stream; |
62 |
-+#if defined(ZEND_ENGINE_3) |
63 |
-+ int options = 0; |
64 |
-+#else |
65 |
- int options = ENFORCE_SAFE_MODE; |
66 |
-+#endif |
67 |
- |
68 |
- stream = php_stream_open_wrapper(progress->data_filename, "ab", options, NULL); |
69 |
- if (stream) { |
70 |
-@@ -301,7 +305,7 @@ PHP_FUNCTION(uploadprogress_get_info) |
71 |
- { |
72 |
- char * id; |
73 |
- int id_lg; |
74 |
-- char method; |
75 |
-+ //char method; |
76 |
- |
77 |
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &id, &id_lg) == FAILURE) { |
78 |
- return; |
79 |
-@@ -417,7 +421,11 @@ static void uploadprogress_file_php_get_info(char * id, zval * return_value) |
80 |
- v[index] = 0; |
81 |
- } |
82 |
- } |
83 |
-+#if defined(ZEND_ENGINE_3) |
84 |
-+ add_assoc_string( return_value, k, v ); |
85 |
-+#else |
86 |
- add_assoc_string( return_value, k, v, 1 ); |
87 |
-+#endif |
88 |
- } |
89 |
- fclose(F); |
90 |
- } |
91 |
-@@ -432,10 +440,22 @@ static void uploadprogress_file_php_get_info(char * id, zval * return_value) |
92 |
- */ |
93 |
- static void uploadprogress_file_php_get_contents(char *id, char *fieldname, long maxlen, zval *return_value) |
94 |
- { |
95 |
-+#if defined(ZEND_ENGINE_3) |
96 |
-+ char *filename, *template, *data_identifier; |
97 |
-+ zend_string *contents; |
98 |
-+#else |
99 |
- char *filename, *template, *contents, *data_identifier; |
100 |
-+#endif |
101 |
- php_stream *stream; |
102 |
-+#if defined(ZEND_ENGINE_3) |
103 |
-+ int options = 0; |
104 |
-+#else |
105 |
- int options = ENFORCE_SAFE_MODE; |
106 |
-- int len, newlen; |
107 |
-+#endif |
108 |
-+ int len; |
109 |
-+#if PHP_API_VERSION < 20100412 |
110 |
-+ int newlen; |
111 |
-+#endif |
112 |
- TSRMLS_FETCH(); |
113 |
- |
114 |
- template = INI_STR("uploadprogress.file.contents_template"); |
115 |
-@@ -455,7 +475,13 @@ static void uploadprogress_file_php_get_contents(char *id, char *fieldname, long |
116 |
- } |
117 |
- |
118 |
- /* uses mmap if possible */ |
119 |
-+#if defined(ZEND_ENGINE_3) |
120 |
-+ contents = php_stream_copy_to_mem(stream, maxlen, 0); |
121 |
-+ len = contents->len; |
122 |
-+ if (contents && len > 0) { |
123 |
-+#else |
124 |
- if ((len = php_stream_copy_to_mem(stream, &contents, maxlen, 0)) > 0) { |
125 |
-+#endif |
126 |
- |
127 |
- #if PHP_API_VERSION < 20100412 |
128 |
- if (PG(magic_quotes_runtime)) { |
129 |
-@@ -463,7 +489,11 @@ static void uploadprogress_file_php_get_contents(char *id, char *fieldname, long |
130 |
- len = newlen; |
131 |
- } |
132 |
- #endif |
133 |
-+#if defined(ZEND_ENGINE_3) |
134 |
-+ RETVAL_STR(contents); |
135 |
-+#else |
136 |
- RETVAL_STRINGL(contents, len, 0); |
137 |
-+#endif |
138 |
- } else if (len == 0) { |
139 |
- RETVAL_EMPTY_STRING(); |
140 |
- } else { |
141 |
--- |
142 |
-2.1.4 |
143 |
- |
144 |
- |
145 |
-From 95d8a0fd4554e10c215d3ab301e901bd8f99c5d9 Mon Sep 17 00:00:00 2001 |
146 |
-From: Jan-E <github@××××××××.nl> |
147 |
-Date: Mon, 20 Apr 2015 22:20:40 +0200 |
148 |
-Subject: [PATCH 2/2] int id_lg should be size_t id_lg |
149 |
- |
150 |
---- |
151 |
- uploadprogress.c | 4 ++++ |
152 |
- 1 file changed, 4 insertions(+) |
153 |
- |
154 |
-diff --git a/uploadprogress.c b/uploadprogress.c |
155 |
-index 7a52ba7..3d73d15 100644 |
156 |
---- a/uploadprogress.c |
157 |
-+++ b/uploadprogress.c |
158 |
-@@ -304,7 +304,11 @@ PHP_MINFO_FUNCTION(uploadprogress) |
159 |
- PHP_FUNCTION(uploadprogress_get_info) |
160 |
- { |
161 |
- char * id; |
162 |
-+#if defined(ZEND_ENGINE_3) |
163 |
-+ size_t id_lg; |
164 |
-+#else |
165 |
- int id_lg; |
166 |
-+#endif |
167 |
- //char method; |
168 |
- |
169 |
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &id, &id_lg) == FAILURE) { |
170 |
--- |
171 |
-2.1.4 |
172 |
- |
173 |
---- a/uploadprogress.c 2011-08-15 09:21:10.000000000 -0400 |
174 |
-+++ b/uploadprogress.c 2016-12-07 11:05:47.961377088 -0500 |
175 |
-@@ -213,7 +213,7 @@ |
176 |
- FILE *F; |
177 |
- F = VCWD_FOPEN(progress->identifier_tmp, "wb"); |
178 |
- if (F) { |
179 |
-- fprintf(F, "upload_id=%s\nfieldname=%s\nfilename=%s\ntime_start=%d\ntime_last=%d\nspeed_average=%d\nspeed_last=%d\nbytes_uploaded=%d\nbytes_total=%d\nfiles_uploaded=%d\nest_sec=%d\n", |
180 |
-+ fprintf(F, "upload_id=%s\nfieldname=%s\nfilename=%s\ntime_start=%ld\ntime_last=%ld\nspeed_average=%d\nspeed_last=%d\nbytes_uploaded=%ld\nbytes_total=%ld\nfiles_uploaded=%d\nest_sec=%d\n", |
181 |
- progress->upload_id, progress->fieldname, progress->filename, |
182 |
- progress->time_start, progress->time_last, |
183 |
- progress->speed_average, progress->speed_last, |
184 |
|
185 |
diff --git a/dev-php/pecl-uploadprogress/pecl-uploadprogress-1.0.3.1-r4.ebuild b/dev-php/pecl-uploadprogress/pecl-uploadprogress-1.1.3.ebuild |
186 |
similarity index 56% |
187 |
rename from dev-php/pecl-uploadprogress/pecl-uploadprogress-1.0.3.1-r4.ebuild |
188 |
rename to dev-php/pecl-uploadprogress/pecl-uploadprogress-1.1.3.ebuild |
189 |
index a11f8d2eeea..a19bb78b273 100644 |
190 |
--- a/dev-php/pecl-uploadprogress/pecl-uploadprogress-1.0.3.1-r4.ebuild |
191 |
+++ b/dev-php/pecl-uploadprogress/pecl-uploadprogress-1.1.3.ebuild |
192 |
@@ -1,9 +1,9 @@ |
193 |
-# Copyright 1999-2019 Gentoo Authors |
194 |
+# Copyright 1999-2020 Gentoo Authors |
195 |
# Distributed under the terms of the GNU General Public License v2 |
196 |
|
197 |
EAPI=7 |
198 |
|
199 |
-USE_PHP="php5-6 php7-0 php7-1 php7-2 php7-3 php7-4" |
200 |
+USE_PHP="php7-2 php7-3 php7-4" |
201 |
|
202 |
inherit php-ext-pecl-r3 |
203 |
|
204 |
@@ -11,14 +11,15 @@ DESCRIPTION="An extension to track progress of a file upload" |
205 |
LICENSE="PHP-3.01" |
206 |
SLOT="0" |
207 |
KEYWORDS="~amd64 ~x86" |
208 |
-IUSE="" |
209 |
+IUSE="examples" |
210 |
|
211 |
RDEPEND=" |
212 |
- php_targets_php5-6? ( dev-lang/php:5.6[apache2] ) |
213 |
- php_targets_php7-0? ( dev-lang/php:7.0[apache2] ) |
214 |
- php_targets_php7-1? ( dev-lang/php:7.1[apache2] ) |
215 |
php_targets_php7-2? ( dev-lang/php:7.2[apache2] ) |
216 |
php_targets_php7-3? ( dev-lang/php:7.3[apache2] ) |
217 |
php_targets_php7-4? ( dev-lang/php:7.4[apache2] ) |
218 |
" |
219 |
-PATCHES=( "${FILESDIR}/1.0.3.1-php7.patch" ) |
220 |
+ |
221 |
+src_install() { |
222 |
+ default |
223 |
+ use examples && dodoc -r examples |
224 |
+} |