Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/taglib/files/
Date: Sat, 02 Dec 2017 08:35:10
Message-Id: 1512203691.5e6af07a8dd3b95fabf2874995edbc85064d4a68.asturm@gentoo
1 commit: 5e6af07a8dd3b95fabf2874995edbc85064d4a68
2 Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Sat Dec 2 08:16:13 2017 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 2 08:34:51 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e6af07a
7
8 media-libs/taglib: remove unused patches
9
10 .../files/taglib-1.6.1-install-examples.patch | 16 ---
11 .../taglib/files/taglib-1.9.1-abi-breakage.patch | 107 -----------------
12 .../files/taglib-1.9.1-bytevector-simpler.patch | 131 ---------------------
13 .../files/taglib-1.9.1-missing-deletes.patch | 48 --------
14 .../files/taglib-1.9.1-order-big-endian.patch | 33 ------
15 5 files changed, 335 deletions(-)
16
17 diff --git a/media-libs/taglib/files/taglib-1.6.1-install-examples.patch b/media-libs/taglib/files/taglib-1.6.1-install-examples.patch
18 deleted file mode 100644
19 index f53768175a3..00000000000
20 --- a/media-libs/taglib/files/taglib-1.6.1-install-examples.patch
21 +++ /dev/null
22 @@ -1,16 +0,0 @@
23 -diff -purN taglib-1.6.1.orig/examples/CMakeLists.txt taglib-1.6.1/examples/CMakeLists.txt
24 ---- taglib-1.6.1.orig/examples/CMakeLists.txt 2009-09-09 14:16:38.000000000 -0400
25 -+++ taglib-1.6.1/examples/CMakeLists.txt 2009-12-14 18:47:33.405385063 -0500
26 -@@ -45,6 +45,12 @@ ADD_EXECUTABLE(strip-id3v1 strip-id3v1.c
27 -
28 - TARGET_LINK_LIBRARIES(strip-id3v1 tag )
29 -
30 -+INSTALL(TARGETS
31 -+ tagreader tagreader_c tagwriter framelist strip-id3v1
32 -+ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
33 -+ RUNTIME DESTINATION ${BIN_INSTALL_DIR}
34 -+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
35 -+)
36 -
37 - endif(BUILD_EXAMPLES)
38 -
39
40 diff --git a/media-libs/taglib/files/taglib-1.9.1-abi-breakage.patch b/media-libs/taglib/files/taglib-1.9.1-abi-breakage.patch
41 deleted file mode 100644
42 index 930439fc834..00000000000
43 --- a/media-libs/taglib/files/taglib-1.9.1-abi-breakage.patch
44 +++ /dev/null
45 @@ -1,107 +0,0 @@
46 -From 3bf30af66c8fd77a88d9379a0956ddb2fc70dc20 Mon Sep 17 00:00:00 2001
47 -From: Tsuda Kageyu <tsuda.kageyu@×××××.com>
48 -Date: Wed, 6 Nov 2013 17:01:21 +0900
49 -Subject: [PATCH 2/6] Fixed ABI breakage in TagLib::String
50 -
51 ----
52 - taglib/toolkit/tstring.cpp | 20 ++++++++++++++++++--
53 - taglib/toolkit/tstring.h | 12 ++++++++++--
54 - tests/test_string.cpp | 14 ++++++++++++++
55 - 3 files changed, 42 insertions(+), 4 deletions(-)
56 -
57 -diff --git a/taglib/toolkit/tstring.cpp b/taglib/toolkit/tstring.cpp
58 -index 75a9833..fb6e947 100644
59 ---- a/taglib/toolkit/tstring.cpp
60 -+++ b/taglib/toolkit/tstring.cpp
61 -@@ -209,8 +209,16 @@ String::String(const std::string &s, Type t)
62 - String::String(const wstring &s, Type t)
63 - : d(new StringPrivate())
64 - {
65 -- if(t == UTF16 || t == UTF16BE || t == UTF16LE)
66 -+ if(t == UTF16 || t == UTF16BE || t == UTF16LE) {
67 -+ // This looks ugly but needed for the compatibility with TagLib1.8.
68 -+ // Should be removed in TabLib2.0.
69 -+ if (t == UTF16BE)
70 -+ t = WCharByteOrder;
71 -+ else if (t == UTF16LE)
72 -+ t = (WCharByteOrder == UTF16LE ? UTF16BE : UTF16LE);
73 -+
74 - copyFromUTF16(s.c_str(), s.length(), t);
75 -+ }
76 - else {
77 - debug("String::String() -- A TagLib::wstring should not contain Latin1 or UTF-8.");
78 - }
79 -@@ -219,8 +227,16 @@ String::String(const wstring &s, Type t)
80 - String::String(const wchar_t *s, Type t)
81 - : d(new StringPrivate())
82 - {
83 -- if(t == UTF16 || t == UTF16BE || t == UTF16LE)
84 -+ if(t == UTF16 || t == UTF16BE || t == UTF16LE) {
85 -+ // This looks ugly but needed for the compatibility with TagLib1.8.
86 -+ // Should be removed in TabLib2.0.
87 -+ if (t == UTF16BE)
88 -+ t = WCharByteOrder;
89 -+ else if (t == UTF16LE)
90 -+ t = (WCharByteOrder == UTF16LE ? UTF16BE : UTF16LE);
91 -+
92 - copyFromUTF16(s, ::wcslen(s), t);
93 -+ }
94 - else {
95 - debug("String::String() -- A const wchar_t * should not contain Latin1 or UTF-8.");
96 - }
97 -diff --git a/taglib/toolkit/tstring.h b/taglib/toolkit/tstring.h
98 -index 57945be..605b9c2 100644
99 ---- a/taglib/toolkit/tstring.h
100 -+++ b/taglib/toolkit/tstring.h
101 -@@ -134,13 +134,21 @@ namespace TagLib {
102 -
103 - /*!
104 - * Makes a deep copy of the data in \a s.
105 -+ *
106 -+ * /note If \a t is UTF16LE, the byte order of \a s will be swapped regardless
107 -+ * of the CPU byte order. If UTF16BE, it will not be swapped. This behavior
108 -+ * will be changed in TagLib2.0.
109 - */
110 -- String(const wstring &s, Type t = WCharByteOrder);
111 -+ String(const wstring &s, Type t = UTF16BE);
112 -
113 - /*!
114 - * Makes a deep copy of the data in \a s.
115 -+ *
116 -+ * /note If \a t is UTF16LE, the byte order of \a s will be swapped regardless
117 -+ * of the CPU byte order. If UTF16BE, it will not be swapped. This behavior
118 -+ * will be changed in TagLib2.0.
119 - */
120 -- String(const wchar_t *s, Type t = WCharByteOrder);
121 -+ String(const wchar_t *s, Type t = UTF16BE);
122 -
123 - /*!
124 - * Makes a deep copy of the data in \a c.
125 -diff --git a/tests/test_string.cpp b/tests/test_string.cpp
126 -index a815a0b..9a574b3 100644
127 ---- a/tests/test_string.cpp
128 -+++ b/tests/test_string.cpp
129 -@@ -75,6 +75,20 @@ public:
130 - String unicode3(L"\u65E5\u672C\u8A9E");
131 - CPPUNIT_ASSERT(*(unicode3.toCWString() + 1) == L'\u672C');
132 -
133 -+ String unicode4(L"\u65e5\u672c\u8a9e", String::UTF16BE);
134 -+ CPPUNIT_ASSERT(unicode4[1] == L'\u672c');
135 -+
136 -+ String unicode5(L"\u65e5\u672c\u8a9e", String::UTF16LE);
137 -+ CPPUNIT_ASSERT(unicode5[1] == L'\u2c67');
138 -+
139 -+ wstring stduni = L"\u65e5\u672c\u8a9e";
140 -+
141 -+ String unicode6(stduni, String::UTF16BE);
142 -+ CPPUNIT_ASSERT(unicode6[1] == L'\u672c');
143 -+
144 -+ String unicode7(stduni, String::UTF16LE);
145 -+ CPPUNIT_ASSERT(unicode7[1] == L'\u2c67');
146 -+
147 - CPPUNIT_ASSERT(strcmp(String::number(0).toCString(), "0") == 0);
148 - CPPUNIT_ASSERT(strcmp(String::number(12345678).toCString(), "12345678") == 0);
149 - CPPUNIT_ASSERT(strcmp(String::number(-12345678).toCString(), "-12345678") == 0);
150 ---
151 -1.8.4.2
152 -
153
154 diff --git a/media-libs/taglib/files/taglib-1.9.1-bytevector-simpler.patch b/media-libs/taglib/files/taglib-1.9.1-bytevector-simpler.patch
155 deleted file mode 100644
156 index 0b134ec8221..00000000000
157 --- a/media-libs/taglib/files/taglib-1.9.1-bytevector-simpler.patch
158 +++ /dev/null
159 @@ -1,131 +0,0 @@
160 -From 4a7d31c87bf41c1de21cb725176d5b34c2a95720 Mon Sep 17 00:00:00 2001
161 -From: Tsuda Kageyu <tsuda.kageyu@×××××.com>
162 -Date: Thu, 14 Nov 2013 14:05:32 +0900
163 -Subject: [PATCH 3/6] Rewrote ByteVector::replace() simpler
164 -
165 ----
166 - taglib/toolkit/tbytevector.cpp | 77 +++++++++++++++---------------------------
167 - tests/test_bytevector.cpp | 5 +++
168 - 2 files changed, 33 insertions(+), 49 deletions(-)
169 -
170 -diff --git a/taglib/toolkit/tbytevector.cpp b/taglib/toolkit/tbytevector.cpp
171 -index b658246..566a20f 100644
172 ---- a/taglib/toolkit/tbytevector.cpp
173 -+++ b/taglib/toolkit/tbytevector.cpp
174 -@@ -31,6 +31,7 @@
175 - #include <iostream>
176 - #include <cstdio>
177 - #include <cstring>
178 -+#include <cstddef>
179 -
180 - #include <tstring.h>
181 - #include <tdebug.h>
182 -@@ -508,62 +509,40 @@ ByteVector &ByteVector::replace(const ByteVector &pattern, const ByteVector &wit
183 - if(pattern.size() == 0 || pattern.size() > size())
184 - return *this;
185 -
186 -- const uint withSize = with.size();
187 -- const uint patternSize = pattern.size();
188 -- int offset = 0;
189 -+ const size_t withSize = with.size();
190 -+ const size_t patternSize = pattern.size();
191 -+ const ptrdiff_t diff = withSize - patternSize;
192 -+
193 -+ size_t offset = 0;
194 -+ while (true)
195 -+ {
196 -+ offset = find(pattern, offset);
197 -+ if(offset == static_cast<size_t>(-1)) // Use npos in taglib2.
198 -+ break;
199 -
200 -- if(withSize == patternSize) {
201 -- // I think this case might be common enough to optimize it
202 - detach();
203 -- offset = find(pattern);
204 -- while(offset >= 0) {
205 -- ::memcpy(data() + offset, with.data(), withSize);
206 -- offset = find(pattern, offset + withSize);
207 -- }
208 -- return *this;
209 -- }
210 -
211 -- // calculate new size:
212 -- uint newSize = 0;
213 -- for(;;) {
214 -- int next = find(pattern, offset);
215 -- if(next < 0) {
216 -- if(offset == 0)
217 -- // pattern not found, do nothing:
218 -- return *this;
219 -- newSize += size() - offset;
220 -- break;
221 -+ if(diff < 0) {
222 -+ ::memmove(
223 -+ data() + offset + withSize,
224 -+ data() + offset + patternSize,
225 -+ size() - offset - patternSize);
226 -+ resize(size() + diff);
227 - }
228 -- newSize += (next - offset) + withSize;
229 -- offset = next + patternSize;
230 -- }
231 --
232 -- // new private data of appropriate size:
233 -- ByteVectorPrivate *newData = new ByteVectorPrivate(newSize, 0);
234 -- char *target = DATA(newData);
235 -- const char *source = data();
236 --
237 -- // copy modified data into new private data:
238 -- offset = 0;
239 -- for(;;) {
240 -- int next = find(pattern, offset);
241 -- if(next < 0) {
242 -- ::memcpy(target, source + offset, size() - offset);
243 -- break;
244 -+ else if(diff > 0) {
245 -+ resize(size() + diff);
246 -+ ::memmove(
247 -+ data() + offset + withSize,
248 -+ data() + offset + patternSize,
249 -+ size() - diff - offset - patternSize);
250 - }
251 -- int chunkSize = next - offset;
252 -- ::memcpy(target, source + offset, chunkSize);
253 -- target += chunkSize;
254 -- ::memcpy(target, with.data(), withSize);
255 -- target += withSize;
256 -- offset += chunkSize + patternSize;
257 -- }
258 -
259 -- // replace private data:
260 -- if(d->deref())
261 -- delete d;
262 -+ ::memcpy(data() + offset, with.data(), with.size());
263 -
264 -- d = newData;
265 -+ offset += withSize;
266 -+ if(offset > size() - patternSize)
267 -+ break;
268 -+ }
269 -
270 - return *this;
271 - }
272 -diff --git a/tests/test_bytevector.cpp b/tests/test_bytevector.cpp
273 -index 9efd23a..eca74f8 100644
274 ---- a/tests/test_bytevector.cpp
275 -+++ b/tests/test_bytevector.cpp
276 -@@ -239,6 +239,11 @@ public:
277 - a.replace(ByteVector("ab"), ByteVector());
278 - CPPUNIT_ASSERT_EQUAL(ByteVector("cdf"), a);
279 - }
280 -+ {
281 -+ ByteVector a("abcdabf");
282 -+ a.replace(ByteVector("bf"), ByteVector("x"));
283 -+ CPPUNIT_ASSERT_EQUAL(ByteVector("abcdax"), a);
284 -+ }
285 - }
286 -
287 - };
288 ---
289 -1.8.4.2
290 -
291
292 diff --git a/media-libs/taglib/files/taglib-1.9.1-missing-deletes.patch b/media-libs/taglib/files/taglib-1.9.1-missing-deletes.patch
293 deleted file mode 100644
294 index 9cdbdcf00fb..00000000000
295 --- a/media-libs/taglib/files/taglib-1.9.1-missing-deletes.patch
296 +++ /dev/null
297 @@ -1,48 +0,0 @@
298 -From c14a3b5c3d0831f7c113d0cf95840c4671d9ebd4 Mon Sep 17 00:00:00 2001
299 -From: Tsuda Kageyu <tsuda.kageyu@×××××.com>
300 -Date: Tue, 13 May 2014 20:07:02 +0900
301 -Subject: [PATCH] Added some missing deletes to test_flac.cpp.
302 -
303 ----
304 - tests/test_flac.cpp | 4 ++++
305 - 1 file changed, 4 insertions(+)
306 -
307 -diff --git a/tests/test_flac.cpp b/tests/test_flac.cpp
308 -index caec715..364fb11 100644
309 ---- a/tests/test_flac.cpp
310 -+++ b/tests/test_flac.cpp
311 -@@ -91,6 +91,7 @@ public:
312 - newpic->setData("JPEG data");
313 - f->addPicture(newpic);
314 - f->save();
315 -+ delete f;
316 -
317 - f = new FLAC::File(newname.c_str());
318 - lst = f->pictureList();
319 -@@ -138,6 +139,7 @@ public:
320 - f->removePictures();
321 - f->addPicture(newpic);
322 - f->save();
323 -+ delete f;
324 -
325 - f = new FLAC::File(newname.c_str());
326 - lst = f->pictureList();
327 -@@ -165,6 +167,7 @@ public:
328 -
329 - f->removePictures();
330 - f->save();
331 -+ delete f;
332 -
333 - f = new FLAC::File(newname.c_str());
334 - lst = f->pictureList();
335 -@@ -185,6 +188,7 @@ public:
336 - tag->setTitle("NEW TITLE 2");
337 - f->save();
338 - CPPUNIT_ASSERT_EQUAL(String("NEW TITLE 2"), tag->title());
339 -+ delete f;
340 -
341 - f = new FLAC::File(newname.c_str());
342 - tag = f->tag();
343 ---
344 -1.9.0
345 -
346
347 diff --git a/media-libs/taglib/files/taglib-1.9.1-order-big-endian.patch b/media-libs/taglib/files/taglib-1.9.1-order-big-endian.patch
348 deleted file mode 100644
349 index 86d5201e54d..00000000000
350 --- a/media-libs/taglib/files/taglib-1.9.1-order-big-endian.patch
351 +++ /dev/null
352 @@ -1,33 +0,0 @@
353 -From db3e961d1098d5efe57364f540f68a5996dc83c2 Mon Sep 17 00:00:00 2001
354 -From: Tsuda Kageyu <tsuda.kageyu@×××××.com>
355 -Date: Tue, 13 May 2014 18:22:16 +0900
356 -Subject: [PATCH] Fixed a wrong byte order handling on big-endian machines.
357 -
358 ----
359 - taglib/toolkit/tstring.cpp | 8 ++++++--
360 - 1 file changed, 6 insertions(+), 2 deletions(-)
361 -
362 -diff --git a/taglib/toolkit/tstring.cpp b/taglib/toolkit/tstring.cpp
363 -index 603455a..1ec083b 100644
364 ---- a/taglib/toolkit/tstring.cpp
365 -+++ b/taglib/toolkit/tstring.cpp
366 -@@ -47,10 +47,14 @@
367 -
368 - namespace
369 - {
370 --
371 - inline unsigned short combine(unsigned char c1, unsigned char c2)
372 - {
373 -- return (c1 << 8) | c2;
374 -+ using namespace TagLib::Utils;
375 -+
376 -+ if(SystemByteOrder == LittleEndian)
377 -+ return (c1 << 8) | c2;
378 -+ else
379 -+ return (c2 << 8) | c1;
380 - }
381 -
382 - void UTF16toUTF8(const wchar_t *src, size_t srcLength, char *dst, size_t dstLength)
383 ---
384 -1.9.0
385 -