[vlc-commits] Contribs: update taglib to 1.10beta

Steve Lhomme git at videolan.org
Mon Jan 30 11:36:39 CET 2017


vlc/vlc-2.2 | branch: master | Steve Lhomme <robUx4 at gmail.com> | Sat Jan 30 09:26:47 2016 +0100| [70b0ac9adfdd36c7192af7e98ba958e0f2e2ba16] | committer: Hugo Beauzée-Luyssen

Contribs: update taglib to 1.10beta

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit b26be80390ba920bd5fcbad3848b62741eeb6414)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=70b0ac9adfdd36c7192af7e98ba958e0f2e2ba16
---

 .../0002-Rewrote-ByteVector-replace-simpler.patch  | 131 ---------------------
 contrib/src/taglib/SHA512SUMS                      |   2 +-
 contrib/src/taglib/rules.mak                       |   4 +-
 contrib/src/taglib/taglib-pc.patch                 |  13 --
 4 files changed, 2 insertions(+), 148 deletions(-)

diff --git a/contrib/src/taglib/0002-Rewrote-ByteVector-replace-simpler.patch b/contrib/src/taglib/0002-Rewrote-ByteVector-replace-simpler.patch
deleted file mode 100644
index cf17e6c..0000000
--- a/contrib/src/taglib/0002-Rewrote-ByteVector-replace-simpler.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From 4a7d31c87bf41c1de21cb725176d5b34c2a95720 Mon Sep 17 00:00:00 2001
-From: Tsuda Kageyu <tsuda.kageyu at gmail.com>
-Date: Thu, 14 Nov 2013 14:05:32 +0900
-Subject: [PATCH 2/3] Rewrote ByteVector::replace() simpler
-
----
- taglib/toolkit/tbytevector.cpp | 77 +++++++++++++++---------------------------
- tests/test_bytevector.cpp      |  5 +++
- 2 files changed, 33 insertions(+), 49 deletions(-)
-
-diff --git a/taglib/toolkit/tbytevector.cpp b/taglib/toolkit/tbytevector.cpp
-index b658246..566a20f 100644
---- a/taglib/toolkit/tbytevector.cpp
-+++ b/taglib/toolkit/tbytevector.cpp
-@@ -31,6 +31,7 @@
- #include <iostream>
- #include <cstdio>
- #include <cstring>
-+#include <cstddef>
- 
- #include <tstring.h>
- #include <tdebug.h>
-@@ -508,62 +509,40 @@ ByteVector &ByteVector::replace(const ByteVector &pattern, const ByteVector &wit
-   if(pattern.size() == 0 || pattern.size() > size())
-     return *this;
- 
--  const uint withSize = with.size();
--  const uint patternSize = pattern.size();
--  int offset = 0;
-+  const size_t withSize    = with.size();
-+  const size_t patternSize = pattern.size();
-+  const ptrdiff_t diff = withSize - patternSize;
-+  
-+  size_t offset = 0;
-+  while (true)
-+  {
-+    offset = find(pattern, offset);
-+    if(offset == static_cast<size_t>(-1)) // Use npos in taglib2.
-+      break;
- 
--  if(withSize == patternSize) {
--    // I think this case might be common enough to optimize it
-     detach();
--    offset = find(pattern);
--    while(offset >= 0) {
--      ::memcpy(data() + offset, with.data(), withSize);
--      offset = find(pattern, offset + withSize);
--    }
--    return *this;
--  }
- 
--  // calculate new size:
--  uint newSize = 0;
--  for(;;) {
--    int next = find(pattern, offset);
--    if(next < 0) {
--      if(offset == 0)
--        // pattern not found, do nothing:
--        return *this;
--      newSize += size() - offset;
--      break;
-+    if(diff < 0) {
-+      ::memmove(
-+        data() + offset + withSize, 
-+        data() + offset + patternSize, 
-+        size() - offset - patternSize);
-+      resize(size() + diff);
-     }
--    newSize += (next - offset) + withSize;
--    offset = next + patternSize;
--  }
--
--  // new private data of appropriate size:
--  ByteVectorPrivate *newData = new ByteVectorPrivate(newSize, 0);
--  char *target = DATA(newData);
--  const char *source = data();
--
--  // copy modified data into new private data:
--  offset = 0;
--  for(;;) {
--    int next = find(pattern, offset);
--    if(next < 0) {
--      ::memcpy(target, source + offset, size() - offset);
--      break;
-+    else if(diff > 0) {
-+      resize(size() + diff);
-+      ::memmove(
-+        data() + offset + withSize, 
-+        data() + offset + patternSize, 
-+        size() - diff - offset - patternSize);
-     }
--    int chunkSize = next - offset;
--    ::memcpy(target, source + offset, chunkSize);
--    target += chunkSize;
--    ::memcpy(target, with.data(), withSize);
--    target += withSize;
--    offset += chunkSize + patternSize;
--  }
- 
--  // replace private data:
--  if(d->deref())
--    delete d;
-+    ::memcpy(data() + offset, with.data(), with.size());
- 
--  d = newData;
-+    offset += withSize;
-+    if(offset > size() - patternSize)
-+      break;
-+  }
- 
-   return *this;
- }
-diff --git a/tests/test_bytevector.cpp b/tests/test_bytevector.cpp
-index 9efd23a..eca74f8 100644
---- a/tests/test_bytevector.cpp
-+++ b/tests/test_bytevector.cpp
-@@ -239,6 +239,11 @@ public:
-       a.replace(ByteVector("ab"), ByteVector());
-       CPPUNIT_ASSERT_EQUAL(ByteVector("cdf"), a);
-     }
-+    {
-+      ByteVector a("abcdabf");
-+      a.replace(ByteVector("bf"), ByteVector("x"));
-+      CPPUNIT_ASSERT_EQUAL(ByteVector("abcdax"), a);
-+    }
-   }
- 
- };
--- 
-1.8.5.2
-
diff --git a/contrib/src/taglib/SHA512SUMS b/contrib/src/taglib/SHA512SUMS
index 936ebe1..37d0915 100644
--- a/contrib/src/taglib/SHA512SUMS
+++ b/contrib/src/taglib/SHA512SUMS
@@ -1 +1 @@
-63a4f06b88b33be716dde3111e62a624995bc020127c9d22f63e918a535ebba858c59308ca4295eeedb29dc72b87d6673db5483f20d9dbf3f56cd93c7ba7ed58  taglib-1.9.1.tar.gz
+881b3dc3bee27f199f8a7eefc5a4e35a69555c5244eb5cb34856e733b1e4f33fd3085e0608c7b128c247a71b407faedd488902dee5e632858c610d8f7b7ee67c  taglib-1.10beta.tar.gz
diff --git a/contrib/src/taglib/rules.mak b/contrib/src/taglib/rules.mak
index d0df727..aecbccc 100644
--- a/contrib/src/taglib/rules.mak
+++ b/contrib/src/taglib/rules.mak
@@ -1,6 +1,6 @@
 # TagLib
 
-TAGLIB_VERSION := 1.9.1
+TAGLIB_VERSION := 1.10beta
 TAGLIB_URL := http://taglib.github.io/releases/taglib-$(TAGLIB_VERSION).tar.gz
 
 PKGS += taglib
@@ -15,8 +15,6 @@ $(TARBALLS)/taglib-$(TAGLIB_VERSION).tar.gz:
 
 taglib: taglib-$(TAGLIB_VERSION).tar.gz .sum-taglib
 	$(UNPACK)
-	$(APPLY) $(SRC)/taglib/taglib-pc.patch
-	$(APPLY) $(SRC)/taglib/0002-Rewrote-ByteVector-replace-simpler.patch
 	$(MOVE)
 
 .taglib: taglib toolchain.cmake
diff --git a/contrib/src/taglib/taglib-pc.patch b/contrib/src/taglib/taglib-pc.patch
deleted file mode 100644
index 977034f..0000000
--- a/contrib/src/taglib/taglib-pc.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- taglib-1.8/CMakeLists.txt.orig	2012-09-06 20:03:15.000000000 +0200
-+++ taglib-1.8/CMakeLists.txt	2012-09-27 15:24:05.840067656 +0200
-@@ -69,10 +69,8 @@
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib-config )
- install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/taglib-config DESTINATION ${BIN_INSTALL_DIR})
- 
--if(NOT WIN32 AND NOT BUILD_FRAMEWORK)
-   configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib.pc )
-   install(FILES ${CMAKE_CURRENT_BINARY_DIR}/taglib.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
--endif()
- 
- include_directories(${CMAKE_CURRENT_BINARY_DIR})
- configure_file(config-taglib.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)



More information about the vlc-commits mailing list