Gentoo Archives: gentoo-commits

From: Aaron Bauman <bman@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/php/files/
Date: Sat, 20 Apr 2019 23:22:47
Message-Id: 1555723745.d4d35067dee48487ffbb89116d51e8af195d5258.bman@gentoo
1 commit: d4d35067dee48487ffbb89116d51e8af195d5258
2 Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Fri Apr 19 18:16:30 2019 +0000
4 Commit: Aaron Bauman <bman <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 20 01:29:05 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4d35067
7
8 dev-lang/php: remove unused patches
9
10 Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
11 Closes: https://github.com/gentoo/gentoo/pull/11527
12 Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>
13
14 ...php-7.1.25-intl-detect-icu-via-pkg-config.patch | 121 --------------------
15 .../files/php-7.3.2-fix-iptcembed-bug77546.patch | 127 ---------------------
16 2 files changed, 248 deletions(-)
17
18 diff --git a/dev-lang/php/files/php-7.1.25-intl-detect-icu-via-pkg-config.patch b/dev-lang/php/files/php-7.1.25-intl-detect-icu-via-pkg-config.patch
19 deleted file mode 100644
20 index 2d4254d6e59..00000000000
21 --- a/dev-lang/php/files/php-7.1.25-intl-detect-icu-via-pkg-config.patch
22 +++ /dev/null
23 @@ -1,121 +0,0 @@
24 -Based on the following upstream commits:
25 -
26 -https://github.com/php/php-src/commit/9a8e7b571896f39f83cb000fdb7c466b6d328d52
27 -https://github.com/php/php-src/pull/3701
28 -https://github.com/php/php-src/commit/2bd299f7318492fd7e5cafffa562d76ba60e69d4
29 -
30 ---- a/acinclude.m4
31 -+++ b/acinclude.m4
32 -@@ -2205,52 +2205,16 @@ dnl
33 - dnl Common setup macro for ICU
34 - dnl
35 - AC_DEFUN([PHP_SETUP_ICU],[
36 -- PHP_ARG_WITH(icu-dir,,
37 -- [ --with-icu-dir=DIR Specify where ICU libraries and headers can be found], DEFAULT, no)
38 -+ PKG_CHECK_MODULES([ICU], [icu-io >= 50.1])
39 -
40 -- if test "$PHP_ICU_DIR" = "no"; then
41 -- PHP_ICU_DIR=DEFAULT
42 -- fi
43 --
44 -- if test "$PHP_ICU_DIR" = "DEFAULT"; then
45 -- dnl Try to find icu-config
46 -- AC_PATH_PROG(ICU_CONFIG, icu-config, no, [$PATH:/usr/local/bin])
47 -- else
48 -- ICU_CONFIG="$PHP_ICU_DIR/bin/icu-config"
49 -- fi
50 --
51 -- AC_MSG_CHECKING([for location of ICU headers and libraries])
52 --
53 -- dnl Trust icu-config to know better what the install prefix is..
54 -- icu_install_prefix=`$ICU_CONFIG --prefix 2> /dev/null`
55 -- if test "$?" != "0" || test -z "$icu_install_prefix"; then
56 -- AC_MSG_RESULT([not found])
57 -- AC_MSG_ERROR([Unable to detect ICU prefix or $ICU_CONFIG failed. Please verify ICU install prefix and make sure icu-config works.])
58 -- else
59 -- AC_MSG_RESULT([$icu_install_prefix])
60 --
61 -- dnl Check ICU version
62 -- AC_MSG_CHECKING([for ICU 4.0 or greater])
63 -- icu_version_full=`$ICU_CONFIG --version`
64 -- ac_IFS=$IFS
65 -- IFS="."
66 -- set $icu_version_full
67 -- IFS=$ac_IFS
68 -- icu_version=`expr [$]1 \* 1000 + [$]2`
69 -- AC_MSG_RESULT([found $icu_version_full])
70 --
71 -- if test "$icu_version" -lt "4000"; then
72 -- AC_MSG_ERROR([ICU version 4.0 or later is required])
73 -- fi
74 -+ PHP_EVAL_INCLINE($ICU_CFLAGS)
75 -+ PHP_EVAL_LIBLINE($ICU_LIBS, $1)
76 -
77 -- ICU_VERSION=$icu_version
78 -- ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
79 -- ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
80 -- PHP_EVAL_INCLINE($ICU_INCS)
81 -- PHP_EVAL_LIBLINE($ICU_LIBS, $1)
82 -+ ICU_CFLAGS="$ICU_CFLAGS -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"
83 -+ ICU_CXXFLAGS="$ICU_CXXFLAGS -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit"
84 -
85 -- ICU_CXXFLAGS=`$ICU_CONFIG --cxxflags`
86 -- ICU_CXXFLAGS="$ICU_CXXFLAGS -DU_USING_ICU_NAMESPACE=1"
87 -+ if test "$PKG_CONFIG icu-io --atleast-version=60"; then
88 -+ ICU_CFLAGS="$ICU_CFLAGS -DU_HIDE_OBSOLETE_UTF_OLD_H=1"
89 - fi
90 - ])
91 -
92 ---- a/ext/intl/config.m4
93 -+++ b/ext/intl/config.m4
94 -@@ -9,15 +9,7 @@ if test "$PHP_INTL" != "no"; then
95 - PHP_SETUP_ICU(INTL_SHARED_LIBADD)
96 - PHP_SUBST(INTL_SHARED_LIBADD)
97 - PHP_REQUIRE_CXX()
98 -- INTL_COMMON_FLAGS="$ICU_INCS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
99 -- if test "$icu_version" -ge "4002"; then
100 -- icu_spoof_src=" spoofchecker/spoofchecker_class.c \
101 -- spoofchecker/spoofchecker.c\
102 -- spoofchecker/spoofchecker_create.c\
103 -- spoofchecker/spoofchecker_main.c"
104 -- else
105 -- icu_spoof_src=""
106 -- fi
107 -+ INTL_COMMON_FLAGS="$ICU_CFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
108 - PHP_NEW_EXTENSION(intl, php_intl.c \
109 - intl_error.c \
110 - intl_convert.c \
111 -@@ -68,9 +60,12 @@ if test "$PHP_INTL" != "no"; then
112 - transliterator/transliterator_methods.c \
113 - uchar/uchar.c \
114 - idn/idn.c \
115 -- $icu_spoof_src, $ext_shared,,$INTL_COMMON_FLAGS,cxx)
116 -+ spoofchecker/spoofchecker_class.c \
117 -+ spoofchecker/spoofchecker.c\
118 -+ spoofchecker/spoofchecker_create.c\
119 -+ spoofchecker/spoofchecker_main.c, $ext_shared,,$INTL_COMMON_FLAGS,cxx)
120 -
121 -- PHP_INTL_CXX_SOURCES="intl_convertcpp.cpp \
122 -+ PHP_INTL_CPP_SOURCES="intl_convertcpp.cpp \
123 - common/common_enum.cpp \
124 - common/common_date.cpp \
125 - dateformat/dateformat_format_object.cpp \
126 -@@ -89,11 +84,12 @@ if test "$PHP_INTL" != "no"; then
127 - breakiterator/rulebasedbreakiterator_methods.cpp \
128 - breakiterator/codepointiterator_internal.cpp \
129 - breakiterator/codepointiterator_methods.cpp"
130 -- PHP_INTL_CXX_FLAGS="$INTL_COMMON_FLAGS $ICU_CXXFLAGS"
131 -+
132 -+ PHP_INTL_CPP_FLAGS="$ICU_CXXFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
133 - if test "$ext_shared" = "no"; then
134 -- PHP_ADD_SOURCES(PHP_EXT_DIR(intl), $PHP_INTL_CXX_SOURCES, $PHP_INTL_CXX_FLAGS)
135 -+ PHP_ADD_SOURCES(PHP_EXT_DIR(intl), $PHP_INTL_CPP_SOURCES, $PHP_INTL_CPP_FLAGS)
136 - else
137 -- PHP_ADD_SOURCES_X(PHP_EXT_DIR(intl), $PHP_INTL_CXX_SOURCES, $PHP_INTL_CXX_FLAGS, shared_objects_intl, yes)
138 -+ PHP_ADD_SOURCES_X(PHP_EXT_DIR(intl), $PHP_INTL_CPP_SOURCES, $PHP_INTL_CPP_FLAGS, shared_objects_intl, yes)
139 - fi
140 -
141 - PHP_ADD_BUILD_DIR($ext_builddir/collator)
142 ---
143 -2.19.2
144 -
145
146 diff --git a/dev-lang/php/files/php-7.3.2-fix-iptcembed-bug77546.patch b/dev-lang/php/files/php-7.3.2-fix-iptcembed-bug77546.patch
147 deleted file mode 100644
148 index e157d250f2f..00000000000
149 --- a/dev-lang/php/files/php-7.3.2-fix-iptcembed-bug77546.patch
150 +++ /dev/null
151 @@ -1,127 +0,0 @@
152 -https://git.php.net/?p=php-src.git;a=commit;h=f27f9022660d28c13c6209f4679768dcbd961b43
153 -
154 ---- a/ext/standard/iptc.c
155 -+++ b/ext/standard/iptc.c
156 -@@ -273,7 +273,7 @@ PHP_FUNCTION(iptcembed)
157 - iptcdata_len++; /* make the length even */
158 - }
159 -
160 -- psheader[ 2 ] = (char) (iptcdata_len+28)>>8;
161 -+ psheader[ 2 ] = (char) ((iptcdata_len+28)>>8);
162 - psheader[ 3 ] = (iptcdata_len+28)&0xff;
163 -
164 - for (inx = 0; inx < 28; inx++) {
165 ---- /dev/null
166 -+++ b/ext/standard/tests/image/iptcembed_002.phpt
167 -@@ -0,0 +1,110 @@
168 -+--TEST--
169 -+iptcembed() valid jpg stream
170 -+--FILE--
171 -+<?php
172 -+/*
173 -+# source code to generate base64 use behind as $base64_1x1_jpeg
174 -+# we don't want to be gd library dependant for this test
175 -+$file="1x1.jpg";
176 -+$ret=imagejpeg(imagecreatetruecolor(1, 1), $file, 100);
177 -+echo md5(file_get_contents($file)).PHP_EOL;
178 -+echo base64_encode(file_get_contents($file)).PHP_EOL;
179 -+unlink($file);
180 -+*/
181 -+
182 -+/*
183 -+test description :
184 -+1) create local file 1x1 jpeg (without iptc) (use base64 content to create file)
185 -+2) generate iptcdata string with function iptc_make_tag describe behind
186 -+3) use iptcembed php function with our 1x1 jpeg file and our iptcdata string
187 -+4) write local file2 with iptcembed return content
188 -+5) various check on file2 to verify that's a valid jpeg file with our tags
189 -+*/
190 -+
191 -+
192 -+#iptc_make_tag function from http://php.net/iptcembed
193 -+function iptc_make_tag($rec, $data, $value)
194 -+ {
195 -+ $length = strlen($value);
196 -+ $retval = chr(0x1C) . chr($rec) . chr($data);
197 -+ if($length < 0x8000) { $retval .= chr($length >> 8) . chr($length & 0xFF); }
198 -+ else { $retval .= chr(0x80) . chr(0x04) . chr(($length >> 24) & 0xFF) . chr(($length >> 16) & 0xFF) . chr(($length >> 8) & 0xFF) . chr($length & 0xFF); }
199 -+ return $retval . $value;
200 -+ }
201 -+
202 -+
203 -+$file="1x1.jpg";
204 -+$file2="1x1_with_iptc_tags.jpg";
205 -+$base64_1x1_jpeg="/9j/4AAQSkZJRgABAQEAYABgAAD//gA8Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2ODApLCBxdWFsaXR5ID0gMTAwCv/bAEMAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/bAEMBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAQMBEQACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2gAMAwEAAhEDEQA/AP8AP/oA/9k=";
206 -+#write file
207 -+$fd=fopen($file,"wb");
208 -+if ($fd) { fputs($fd,base64_decode($base64_1x1_jpeg)); fclose($fd); }
209 -+else { echo "error cant write $file".PHP_EOL;exit(1); }
210 -+#check file md5
211 -+$md5=md5_file($file);
212 -+if ($md5!="07dd8594450e8c18ab8a79d7cb4573c7") { echo "md5 error".PHP_EOL;exit(1); }
213 -+#check jpeg properties
214 -+list($width, $height, $type, $attr) = getimagesize($file,$info);
215 -+if ($width!=1) { echo "width error".PHP_EOL;exit(1); }
216 -+if ($height!=1) { echo "height error".PHP_EOL;exit(1); }
217 -+if ($type!=2) { echo "type error".PHP_EOL;exit(1); }
218 -+if (!isset($info["APP0"])) { echo "APP0 error".PHP_EOL;exit(1); }
219 -+
220 -+#our iptc tags
221 -+$tags=array();
222 -+$tags["2#105"]= "Tauren";
223 -+$tags["2#120"]= "Tauren with Trunk";
224 -+$tags["2#110"]= "Copyright 2004-2016, Blizzard";
225 -+$tags["2#025"]= "Tauren, Chaman, Blizzard";
226 -+$tags["2#090"]= "Thunder Bluffs";
227 -+#feed iptc string for iptcembed
228 -+$iptc='';
229 -+foreach ($tags as $tag => $string) { $rec=$tag[0]; $tag = substr($tag, 2); $iptc .= iptc_make_tag($rec, $tag, $string); }
230 -+#check iptc string md5
231 -+if (md5(base64_encode($iptc))!="7056c4b3060f92a4f9e5b7d0caa61859") { echo "iptc md5 error".PHP_EOL;exit(1); }
232 -+
233 -+#use iptcembed to get jpeg stream content with iptc tags
234 -+$content = iptcembed($iptc, $file,0);
235 -+
236 -+#write new image with iptc tags
237 -+if ($content === false) {echo "iptcembed error".PHP_EOL;exit(1); }
238 -+$fd=fopen($file2,"wb");
239 -+if ($fd) { fputs($fd,$content); fclose($fd); }
240 -+else { echo "error cant write $file2".PHP_EOL;exit(1); }
241 -+
242 -+
243 -+#check jpeg properties for new image with iptc tags
244 -+echo "new generated image with itpc tags : $file2".PHP_EOL;
245 -+$ret = getimagesize($file2,$info);
246 -+if ($ret===false) { echo "getimagesize error".PHP_EOL;exit(1); }
247 -+list($width, $height, $type, $attr) = $ret;
248 -+if ($width!=1) { echo "width error".PHP_EOL;exit(1); }
249 -+if ($height!=1) { echo "height error".PHP_EOL;exit(1); }
250 -+if ($type!=2) { echo "type error".PHP_EOL;exit(1); }
251 -+if (!isset($info["APP0"])) { echo "APP0 error".PHP_EOL;exit(1); }
252 -+if (!isset($info["APP13"])) { echo "APP13 error".PHP_EOL;exit(1); }
253 -+
254 -+$error=0;
255 -+$iptc_data_from_created_image = iptcparse($info['APP13']);
256 -+foreach ($tags as $tag => $string) {
257 -+ #check if tag exists
258 -+ if (!isset($iptc_data_from_created_image[$tag])) {
259 -+ echo "error iptc tag $tag not found".PHP_EOL;
260 -+ $error++;
261 -+ } else {
262 -+ #check value
263 -+ if ($iptc_data_from_created_image[$tag][0]!=$string) {
264 -+ echo "error tag $tag : bad value ($string != ".$iptc_data_from_created_image[$tag][0].")".PHP_EOL;
265 -+ $error++;
266 -+ }
267 -+ }
268 -+}
269 -+#clean before exit
270 -+@unlink($file);
271 -+@unlink($file2);
272 -+if ($error==0) { echo "OK".PHP_EOL;exit(0);}
273 -+echo "something wrong: $error errors".PHP_EOL;
274 -+?>
275 -+--EXPECT--
276 -+new generated image with itpc tags : 1x1_with_iptc_tags.jpg
277 -+OK
278 ---