Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Oct 2022 00:19:30 GMT
From:      "Jason E. Hale" <jhale@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: edb0ef96c5cb - main - audio/taglib: Update to 1.13
Message-ID:  <202210280019.29S0JUsw056642@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhale:

URL: https://cgit.FreeBSD.org/ports/commit/?id=edb0ef96c5cb57b74d0e50f3f26dc843caea269e

commit edb0ef96c5cb57b74d0e50f3f26dc843caea269e
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2022-10-28 00:16:25 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2022-10-28 00:19:09 +0000

    audio/taglib: Update to 1.13
    
    https://github.com/taglib/taglib/releases/tag/v1.13
---
 audio/taglib/Makefile             |   9 +-
 audio/taglib/distinfo             |   6 +-
 audio/taglib/files/extrapatch-rcc | 186 ++++++++++++++++----------------------
 audio/taglib/pkg-plist            |   4 +-
 4 files changed, 87 insertions(+), 118 deletions(-)

diff --git a/audio/taglib/Makefile b/audio/taglib/Makefile
index 263e222b0a14..3143470f65b0 100644
--- a/audio/taglib/Makefile
+++ b/audio/taglib/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	taglib
-DISTVERSION=	1.12
+DISTVERSION=	1.13
 CATEGORIES=	audio
 MASTER_SITES=	https://github.com/${PORTNAME}/${PORTNAME}/releases/download/v${DISTVERSION}/ \
 		https://taglib.org/releases/
@@ -13,8 +13,6 @@ LICENSE_COMB=	dual
 LICENSE_FILE_LGPL21=	${WRKSRC}/COPYING.LGPL
 LICENSE_FILE_MPL11=	${WRKSRC}/COPYING.MPL
 
-TEST_DEPENDS=	cppunit-config:devel/cppunit
-
 USES=		cmake compiler:c++11-lang cpe pathfix
 USE_LDCONFIG=	yes
 
@@ -37,9 +35,8 @@ RCC_EXTRA_PATCHES=	${FILESDIR}/extrapatch-rcc
 STATIC_CMAKE_BOOL_OFF=	BUILD_SHARED_LIBS
 
 TEST_BUILD_DEPENDS=	cppunit-config:devel/cppunit
-TEST_CMAKE_BOOL=	BUILD_TESTS
-TEST_TARGET=		check
-TEST_IMPLIES=		STATIC
+TEST_CMAKE_BOOL=	BUILD_TESTING
+TEST_TEST_TARGET=	check
 
 post-patch-RCC-on:
 	@${REINPLACE_CMD} -e 's|-ltag|-ltag -lrcc|g' \
diff --git a/audio/taglib/distinfo b/audio/taglib/distinfo
index 2cdc7eb04470..d8108c7f77c2 100644
--- a/audio/taglib/distinfo
+++ b/audio/taglib/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1613544760
-SHA256 (taglib-1.12.tar.gz) = 7fccd07669a523b07a15bd24c8da1bbb92206cb19e9366c3692af3d79253b703
-SIZE (taglib-1.12.tar.gz) = 1364231
+TIMESTAMP = 1666898708
+SHA256 (taglib-1.13.tar.gz) = 58f08b4db3dc31ed152c04896ee9172d22052bc7ef12888028c01d8b1d60ade0
+SIZE (taglib-1.13.tar.gz) = 1371504
diff --git a/audio/taglib/files/extrapatch-rcc b/audio/taglib/files/extrapatch-rcc
index 82dedb55594e..0fe833407650 100644
--- a/audio/taglib/files/extrapatch-rcc
+++ b/audio/taglib/files/extrapatch-rcc
@@ -1,19 +1,21 @@
-diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
-index 5e5fca2..69a5e39 100644
---- ConfigureChecks.cmake
-+++ ConfigureChecks.cmake
-@@ -213,3 +213,5 @@ endif()
- if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
- 	set(PLATFORM WINRT 1)
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 06a7c2fa..122e87c2 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -139,6 +139,8 @@ if(NOT BUILD_FRAMEWORK)
+   install(FILES "${CMAKE_CURRENT_BINARY_DIR}/taglib.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
  endif()
-+
+ 
 +SET(HAVE_LIBRCC 1)
-\ No newline at end of file
++
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+ configure_file(config.h.cmake "${CMAKE_CURRENT_BINARY_DIR}/config.h")
+ 
 diff --git a/config.h.cmake b/config.h.cmake
-index c1a3109..5eb5b84 100644
+index 8d8c36ab..ccae081b 100644
 --- config.h.cmake
 +++ config.h.cmake
-@@ -30,6 +30,9 @@
+@@ -29,6 +29,9 @@
  /* Indicates whether debug messages are shown even in release mode */
  #cmakedefine   TRACE_IN_RELEASE 1
  
@@ -24,7 +26,7 @@ index c1a3109..5eb5b84 100644
  
  #endif
 diff --git a/examples/tagreader_c.c b/examples/tagreader_c.c
-index 0436992..e0f17d8 100644
+index 04369926..e0f17d82 100644
 --- examples/tagreader_c.c
 +++ examples/tagreader_c.c
 @@ -38,7 +38,7 @@ int main(int argc, char *argv[])
@@ -37,7 +39,7 @@ index 0436992..e0f17d8 100644
    for(i = 1; i < argc; i++) {
      printf("******************** \"%s\" ********************\n", argv[i]);
 diff --git a/examples/tagwriter.cpp b/examples/tagwriter.cpp
-index ed8b0d7..6a7a263 100644
+index ed8b0d7a..6a7a2632 100644
 --- examples/tagwriter.cpp
 +++ examples/tagwriter.cpp
 @@ -115,7 +115,7 @@ int main(int argc, char *argv[])
@@ -50,10 +52,10 @@ index ed8b0d7..6a7a263 100644
        TagLib::List<TagLib::FileRef>::ConstIterator it;
        for(it = fileList.begin(); it != fileList.end(); ++it) {
 diff --git a/taglib/CMakeLists.txt b/taglib/CMakeLists.txt
-index fcff0b3..2741ef4 100644
+index 527c0073..ed405225 100644
 --- taglib/CMakeLists.txt
 +++ taglib/CMakeLists.txt
-@@ -41,6 +41,7 @@ set(tag_HDRS
+@@ -39,6 +39,7 @@ set(tag_HDRS
    audioproperties.h
    taglib_export.h
    ${CMAKE_CURRENT_BINARY_DIR}/../taglib_config.h
@@ -61,7 +63,7 @@ index fcff0b3..2741ef4 100644
    toolkit/taglib.h
    toolkit/tstring.h
    toolkit/tlist.h
-@@ -297,6 +298,7 @@ set(xm_SRCS
+@@ -295,6 +296,7 @@ set(xm_SRCS
  )
  
  set(toolkit_SRCS
@@ -69,22 +71,22 @@ index fcff0b3..2741ef4 100644
    toolkit/tstring.cpp
    toolkit/tstringlist.cpp
    toolkit/tbytevector.cpp
-@@ -339,7 +341,9 @@ set(tag_LIB_SRCS
- add_library(tag ${tag_LIB_SRCS} ${tag_HDRS})
+@@ -338,7 +340,9 @@ add_library(tag ${tag_LIB_SRCS} ${tag_HDRS})
+ set_property(TARGET tag PROPERTY CXX_STANDARD 98)
  
  if(HAVE_ZLIB AND NOT HAVE_ZLIB_SOURCE)
 -  target_link_libraries(tag ${ZLIB_LIBRARIES})
 +  target_link_libraries(tag rcc ${ZLIB_LIBRARIES})
-+else ()
++else()
 +  target_link_libraries(tag rcc)
  endif()
  
  set_target_properties(tag PROPERTIES
 diff --git a/taglib/mpeg/id3v1/id3v1tag.cpp b/taglib/mpeg/id3v1/id3v1tag.cpp
-index ca93041..872ba6a 100644
+index 358a9595..1dbf37e7 100644
 --- taglib/mpeg/id3v1/id3v1tag.cpp
 +++ taglib/mpeg/id3v1/id3v1tag.cpp
-@@ -69,15 +69,18 @@ StringHandler::StringHandler()
+@@ -69,14 +69,14 @@ StringHandler::StringHandler()
  
  String ID3v1::StringHandler::parse(const ByteVector &data) const
  {
@@ -96,18 +98,14 @@ index ca93041..872ba6a 100644
  {
 -  if(s.isLatin1())
 -    return s.data(String::Latin1);
--  else
-+  if(!s.isLatin1())
-+  {
-+   if (String::ID3WType(String::Latin1) == String::Latin1)
-     return ByteVector();
-+  }
-+
+-  return ByteVector();
++  if(!s.isLatin1() && String::ID3WType(String::Latin1) == String::Latin1)
++    return ByteVector();
 +  return s.data(String::Latin1ID3);
  }
  
  ////////////////////////////////////////////////////////////////////////////////
-@@ -262,7 +265,7 @@ void ID3v1::Tag::parse(const ByteVector &data)
+@@ -259,7 +259,7 @@ void ID3v1::Tag::parse(const ByteVector &data)
      d->track   = static_cast<unsigned char>(data[offset + 29]);
    }
    else
@@ -117,7 +115,7 @@ index ca93041..872ba6a 100644
    offset += 30;
  
 diff --git a/taglib/mpeg/id3v2/frames/commentsframe.cpp b/taglib/mpeg/id3v2/frames/commentsframe.cpp
-index 815e5e1..cf25328 100644
+index 815e5e1a..cf253284 100644
 --- taglib/mpeg/id3v2/frames/commentsframe.cpp
 +++ taglib/mpeg/id3v2/frames/commentsframe.cpp
 @@ -150,10 +150,10 @@ void CommentsFrame::parseFields(const ByteVector &data)
@@ -148,10 +146,10 @@ index 815e5e1..cf25328 100644
    v.append(d->description.data(encoding));
    v.append(textDelimiter(encoding));
 diff --git a/taglib/mpeg/id3v2/frames/textidentificationframe.cpp b/taglib/mpeg/id3v2/frames/textidentificationframe.cpp
-index 9b1eacd..464d951 100644
+index f468b485..bf5251a1 100644
 --- taglib/mpeg/id3v2/frames/textidentificationframe.cpp
 +++ taglib/mpeg/id3v2/frames/textidentificationframe.cpp
-@@ -191,12 +191,12 @@ void TextIdentificationFrame::parseFields(const ByteVector &data)
+@@ -194,12 +194,12 @@ void TextIdentificationFrame::parseFields(const ByteVector &data)
  
    // read the string data type (the first byte of the field data)
  
@@ -166,7 +164,7 @@ index 9b1eacd..464d951 100644
  
    // build a small counter to strip nulls off the end of the field
  
-@@ -227,11 +227,14 @@ void TextIdentificationFrame::parseFields(const ByteVector &data)
+@@ -250,11 +250,14 @@ void TextIdentificationFrame::parseFields(const ByteVector &data)
  
  ByteVector TextIdentificationFrame::renderFields() const
  {
@@ -184,7 +182,7 @@ index 9b1eacd..464d951 100644
    for(StringList::ConstIterator it = d->fieldList.begin(); it != d->fieldList.end(); it++) {
  
 diff --git a/taglib/mpeg/id3v2/id3v2frame.cpp b/taglib/mpeg/id3v2/id3v2frame.cpp
-index af4136a..e792d63 100644
+index ae735b54..1d853058 100644
 --- taglib/mpeg/id3v2/id3v2frame.cpp
 +++ taglib/mpeg/id3v2/id3v2frame.cpp
 @@ -297,7 +297,7 @@ String::Type Frame::checkEncoding(const StringList &fields, String::Type encodin
@@ -198,10 +196,10 @@ index af4136a..e792d63 100644
    for(StringList::ConstIterator it = fields.begin(); it != fields.end(); ++it) {
 diff --git a/taglib/toolkit/rccpatch.cpp b/taglib/toolkit/rccpatch.cpp
 new file mode 100644
-index 0000000..2e40e01
+index 00000000..972874e3
 --- /dev/null
 +++ taglib/toolkit/rccpatch.cpp
-@@ -0,0 +1,235 @@
+@@ -0,0 +1,237 @@
 +#include <stdlib.h>
 +
 +#include <string>
@@ -402,6 +400,7 @@ index 0000000..2e40e01
 +    if (!rccLocaleGetCharset(charset, NULL, 31)) {
 +	if (!strncmp(charset, "UTF", 3)) {
 +	    len = strlen(charset);
++
 +	    if (charset[len-1]=='8') return TagLib::String::UTF8;
 +	    if (!strcmp(charset+(len-2),"16")) return TagLib::String::UTF16;
 +	    if (!strcmp(charset+(len-4),"16LE")) return TagLib::String::UTF16LE;
@@ -424,6 +423,7 @@ index 0000000..2e40e01
 +    if (charset) {
 +	if (!strncmp(charset, "UTF", 3)) {
 +	    len = strlen(charset);
++
 +	    if (charset[len-1]=='8') return TagLib::String::UTF8;
 +	    if (!strcmp(charset+(len-2),"16")) return TagLib::String::UTF16;
 +	    if (!strcmp(charset+(len-4),"16LE")) return TagLib::String::UTF16LE;
@@ -439,7 +439,7 @@ index 0000000..2e40e01
 +}
 diff --git a/taglib/toolkit/rccpatch.h b/taglib/toolkit/rccpatch.h
 new file mode 100644
-index 0000000..31f4410
+index 00000000..31f44106
 --- /dev/null
 +++ taglib/toolkit/rccpatch.h
 @@ -0,0 +1,20 @@
@@ -464,7 +464,7 @@ index 0000000..31f4410
 +
 +#endif /* _RCC_PATCH_H */
 diff --git a/taglib/toolkit/tstring.cpp b/taglib/toolkit/tstring.cpp
-index c60a3e2..7249c83 100644
+index 669cd0eb..7168b1bd 100644
 --- taglib/toolkit/tstring.cpp
 +++ taglib/toolkit/tstring.cpp
 @@ -33,6 +33,7 @@
@@ -475,74 +475,59 @@ index c60a3e2..7249c83 100644
  #include "tstring.h"
  
  namespace
-@@ -48,16 +49,6 @@ namespace
-       return String::UTF16BE;
+@@ -47,14 +48,36 @@ namespace
+     return String::UTF16BE;
    }
  
--  // Converts a Latin-1 string into UTF-16(without BOM/CPU byte order)
--  // and copies it to the internal buffer.
--  void copyFromLatin1(std::wstring &data, const char *s, size_t length)
--  {
--    data.resize(length);
--
--    for(size_t i = 0; i < length; ++i)
--      data[i] = static_cast<unsigned char>(s[i]);
--  }
--
-   // Converts a UTF-8 string into UTF-16(without BOM/CPU byte order)
++  void copyFromUTF8(std::wstring &data, const char *s, size_t length);
++
+   // Converts a Latin-1 string into UTF-16(without BOM/CPU byte order)
    // and copies it to the internal buffer.
-   void copyFromUTF8(std::wstring &data, const char *s, size_t length)
-@@ -73,6 +64,36 @@ namespace
-       debug("String::copyFromUTF8() - UTF8-CPP error: " + message);
-       data.clear();
-     }
+-  void copyFromLatin1(std::wstring &data, const char *s, size_t length)
++  void copyFromLatin1(std::wstring &data, const char *s, size_t length, bool prepare = false, String::Type t = String::Latin1)
+   {
+     data.resize(length);
+ 
+     for(size_t i = 0; i < length; ++i)
+       data[i] = static_cast<unsigned char>(s[i]);
 +
-+  }
 +
-+  // Converts a Latin-1 string into UTF-16(without BOM/CPU byte order)
-+  // and copies it to the internal buffer.
-+  void copyFromLatin1(std::wstring &data, const char *s, size_t length, bool prepare, String::Type t)
-+  {
-+     // librcc conversation
++    // librcc conversation
 +    if (prepare) {
-+      ByteVector v;
-+      std::string std_s(s);
 +
-+      if (t == String::Latin1ID3) v = rccTaglibPatchRecodeInputID3(std_s, false);
-+      else if (t == String::Latin1ID3V2) v = rccTaglibPatchRecodeInputID3(std_s, true);
-+      else /* Latin1 converted from Locale */ v = rccTaglibPatchRecodeInput(std_s);
-+
-+      if (v.size()) {
-+        copyFromUTF8(data, v.data(), v.size());
-+        return;
-+      } else {
-+	// We don't know if we got UTF-8 encoded string or either rcc is disable or something is failed,
-+	// since standard applications are really expecting here Latin1, it is safe to just check if we have violations of UTF8
-+	//if (Unicode::isLegalUTF8(s)) t = UTF8;
-+      }
-+    }
++     ByteVector v;
++     std::string str = std::string(s, length);
 +
-+    data.resize(length);
++     if (t == String::Latin1ID3) v = rccTaglibPatchRecodeInputID3(str, false);
++     else if (t == String::Latin1ID3V2) v = rccTaglibPatchRecodeInputID3(str, true);
++     else /* Latin1 converted from Locale */ v = rccTaglibPatchRecodeInput(str);
 +
-+    for(size_t i = 0; i < length; ++i)
-+      data[i] = static_cast<unsigned char>(s[i]);
++     if (v.size()) {
++       copyFromUTF8(data, v.data(), v.size());
++     } else {
++     // We don't know if we got UTF-8 encoded string or either rcc is disable or something is failed,
++     // since standard applications are really expecting here Latin1, it is safe to just check if we have violations of UTF8
++     //if (Unicode::isLegalUTF8(s)) t = UTF8;
++     }
++    }
    }
  
-   // Helper functions to read a UTF-16 character from an array.
-@@ -175,8 +196,11 @@ String::String(const String &s) :
+   // Converts a UTF-8 string into UTF-16(without BOM/CPU byte order)
+@@ -174,8 +197,11 @@ String::String(const String &s) :
  String::String(const std::string &s, Type t) :
    d(new StringPrivate())
  {
+-  if(t == Latin1)
+-    copyFromLatin1(d->data, s.c_str(), s.length());
 +  if(t == Locale)
-+    t = rccTaglibPatchGetLocaleType();
++   t = rccTaglibPatchGetLocaleType();
 +
-   if(t == Latin1)
--    copyFromLatin1(d->data, s.c_str(), s.length());
++  if(t == Latin1 || t == Latin1ID3 || t == Latin1ID3V2)
 +    copyFromLatin1(d->data, s.c_str(), s.length(), true, t);
    else if(t == String::UTF8)
      copyFromUTF8(d->data, s.c_str(), s.length());
    else {
-@@ -223,8 +247,11 @@ String::String(const wchar_t *s, Type t) :
+@@ -222,8 +248,11 @@ String::String(const wchar_t *s, Type t) :
  String::String(const char *s, Type t) :
    d(new StringPrivate())
  {
@@ -556,35 +541,22 @@ index c60a3e2..7249c83 100644
    else if(t == String::UTF8)
      copyFromUTF8(d->data, s, ::strlen(s));
    else {
-@@ -245,8 +272,11 @@ String::String(wchar_t c, Type t) :
- String::String(char c, Type t) :
-   d(new StringPrivate())
- {
--  if(t == Latin1)
--    copyFromLatin1(d->data, &c, 1);
-+  if(t == Locale)
-+    t = rccTaglibPatchGetLocaleType();
-+
-+  if(t == Latin1 || t == Latin1ID3 || t == Latin1ID3V2)
-+    copyFromLatin1(d->data, &c, 1, true, t);
-   else if(t == String::UTF8)
-     copyFromUTF8(d->data, &c, 1);
-   else {
-@@ -260,8 +290,11 @@ String::String(const ByteVector &v, Type t) :
+@@ -259,8 +288,12 @@ String::String(const ByteVector &v, Type t) :
    if(v.isEmpty())
      return;
  
 -  if(t == Latin1)
 -    copyFromLatin1(d->data, v.data(), v.size());
 +  if(t == Locale)
-+    t = rccTaglibPatchGetLocaleType();
++   t = rccTaglibPatchGetLocaleType();
++
++   if(t == Latin1 || t == Latin1ID3 || t == Latin1ID3V2)
++     copyFromLatin1(d->data, v.data(), v.size(), true, t);
 +
-+  if(t == Latin1 || t == Latin1ID3 || t == Latin1ID3V2)
-+    copyFromLatin1(d->data, v.data(), v.size(), true, t);
    else if(t == UTF8)
      copyFromUTF8(d->data, v.data(), v.size());
    else
-@@ -416,8 +449,38 @@ bool String::isNull() const
+@@ -412,8 +445,38 @@ bool String::isNull() const
  
  ByteVector String::data(Type t) const
  {
@@ -625,7 +597,7 @@ index c60a3e2..7249c83 100644
    case Latin1:
      {
        ByteVector v(size(), 0);
-@@ -741,7 +804,33 @@ const TagLib::String operator+(const TagLib::String &s1, const char *s2)
+@@ -737,7 +800,33 @@ const TagLib::String operator+(const TagLib::String &s1, const char *s2)
  
  std::ostream &operator<<(std::ostream &s, const TagLib::String &str)
  {
@@ -661,7 +633,7 @@ index c60a3e2..7249c83 100644
 +  return type;
 +}
 diff --git a/taglib/toolkit/tstring.h b/taglib/toolkit/tstring.h
-index 7028aab..715d04d 100644
+index e6bbbe7b..0c60df9c 100644
 --- taglib/toolkit/tstring.h
 +++ taglib/toolkit/tstring.h
 @@ -95,6 +95,18 @@ namespace TagLib {
diff --git a/audio/taglib/pkg-plist b/audio/taglib/pkg-plist
index cc2faf45f346..6e6d7a3beb12 100644
--- a/audio/taglib/pkg-plist
+++ b/audio/taglib/pkg-plist
@@ -24,13 +24,13 @@ include/taglib/flacproperties.h
 include/taglib/generalencapsulatedobjectframe.h
 include/taglib/id3v1genres.h
 include/taglib/id3v1tag.h
+include/taglib/id3v2.h
 include/taglib/id3v2extendedheader.h
 include/taglib/id3v2footer.h
 include/taglib/id3v2frame.h
 include/taglib/id3v2framefactory.h
 include/taglib/id3v2header.h
 include/taglib/id3v2synchdata.h
-include/taglib/id3v2.h
 include/taglib/id3v2tag.h
 include/taglib/infotag.h
 include/taglib/itfile.h
@@ -109,7 +109,7 @@ include/taglib/xmproperties.h
 %%STATIC%%lib/libtag.a
 %%NO_STATIC%%lib/libtag.so
 %%NO_STATIC%%lib/libtag.so.1
-%%NO_STATIC%%lib/libtag.so.1.18.0
+%%NO_STATIC%%lib/libtag.so.1.19.0
 %%STATIC%%lib/libtag_c.a
 %%NO_STATIC%%lib/libtag_c.so
 %%NO_STATIC%%lib/libtag_c.so.0



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202210280019.29S0JUsw056642>