git: 9519e493aa53 - main - audio/id3lib: Change to a fork and update to newer snapshot

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Tue, 28 May 2024 23:58:10 UTC
The branch main has been updated by sunpoet:

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

commit 9519e493aa53a22aa64a8ff219932f1c1cf21997
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-05-28 23:57:55 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-05-28 23:57:55 +0000

    audio/id3lib: Change to a fork and update to newer snapshot
    
    - Update WWW
    
    Changes:        https://github.com/thekhalifa/id3lib/commits/master
    PR:             278775
    Reported by:    diizzy
---
 audio/id3lib/Makefile                              | 20 +++++----
 audio/id3lib/distinfo                              |  5 ++-
 audio/id3lib/files/patch-CVE-2007-4460             | 49 ----------------------
 audio/id3lib/files/patch-Makefile.in               | 13 ------
 audio/id3lib/files/patch-configure                 | 38 -----------------
 audio/id3lib/files/patch-examples-demo_convert.cpp | 11 -----
 audio/id3lib/files/patch-examples-demo_copy.cpp    | 11 -----
 audio/id3lib/files/patch-examples-demo_info.cpp    | 11 -----
 audio/id3lib/files/patch-examples-demo_tag.cpp     | 11 -----
 audio/id3lib/files/patch-include-id3-globals.h     | 11 -----
 .../files/patch-include-id3-id3lib_strings.h       | 10 -----
 audio/id3lib/files/patch-include-id3-writers.h     | 10 -----
 audio/id3lib/files/patch-src-CMakeLists.txt        |  9 ++++
 audio/id3lib/files/patch-src-io_helpers.cpp        | 14 -------
 audio/id3lib/files/patch-src-mp3_parse.cpp         | 11 -----
 audio/id3lib/pkg-plist                             | 13 ++++--
 16 files changed, 33 insertions(+), 214 deletions(-)

diff --git a/audio/id3lib/Makefile b/audio/id3lib/Makefile
index 4f5a71d357a7..a01fbbb2d887 100644
--- a/audio/id3lib/Makefile
+++ b/audio/id3lib/Makefile
@@ -1,12 +1,11 @@
 PORTNAME=	id3lib
-PORTVERSION=	3.8.3
-PORTREVISION=	10
+PORTVERSION=	3.8.3.20240114
 CATEGORIES=	audio
-MASTER_SITES=	SF
 
 MAINTAINER=	sunpoet@FreeBSD.org
 COMMENT=	Library for manipulating ID3v1/v1.1 and ID3v2 tags
-WWW=		https://id3lib.sourceforge.net/
+WWW=		https://github.com/thekhalifa/id3lib \
+		https://id3lib.sourceforge.net/
 
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING
@@ -14,13 +13,16 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 BROKEN_mips=	fails to link: '_ZTSN12_GLOBAL__N_117ConstIteratorImplE' referenced in section '.data.rel.ro' of tag.lo: defined in discarded section
 BROKEN_mips64=	fails to link: '_ZTSN12_GLOBAL__N_117ConstIteratorImplE' referenced in section '.data.rel.ro' of tag.lo: defined in discarded section
 
-USES=		compiler:c11 cpe iconv libtool localbase
+USES=		cmake compiler:c11 cpe iconv pkgconfig
 
-GNU_CONFIGURE=	yes
+CMAKE_OFF=	WITH_DOCS WITH_TESTS
 USE_LDCONFIG=	yes
 
-post-patch:
-# Clean up bundled libraries
-	@${RM} -r ${WRKSRC}/ogr/ogrsf_frmts/geojson/libjson/
+USE_GITHUB=	yes
+GH_ACCOUNT=	thekhalifa
+GH_TAGNAME=	497fe49
+
+post-install:
+	cd ${WRKSRC}/include/ && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/include/
 
 .include <bsd.port.mk>
diff --git a/audio/id3lib/distinfo b/audio/id3lib/distinfo
index ccfdc90a3e8d..77e353197e30 100644
--- a/audio/id3lib/distinfo
+++ b/audio/id3lib/distinfo
@@ -1,2 +1,3 @@
-SHA256 (id3lib-3.8.3.tar.gz) = 2749cc3c0cd7280b299518b1ddf5a5bcfe2d1100614519b68702230e26c7d079
-SIZE (id3lib-3.8.3.tar.gz) = 950726
+TIMESTAMP = 1714861837
+SHA256 (thekhalifa-id3lib-3.8.3.20240114-497fe49_GH0.tar.gz) = 1bcd3129cea7be9d4eea5f4d0009cd889c23e703be4c838da830cdcb666d9fe2
+SIZE (thekhalifa-id3lib-3.8.3.20240114-497fe49_GH0.tar.gz) = 450648
diff --git a/audio/id3lib/files/patch-CVE-2007-4460 b/audio/id3lib/files/patch-CVE-2007-4460
deleted file mode 100644
index a2d6cb6ff269..000000000000
--- a/audio/id3lib/files/patch-CVE-2007-4460
+++ /dev/null
@@ -1,49 +0,0 @@
---- src/tag_file.cpp.orig	2003-03-02 00:23:00 UTC
-+++ src/tag_file.cpp
-@@ -242,8 +242,8 @@ size_t RenderV2ToFile(const ID3_TagImpl& tag, fstream&
-     strcpy(sTempFile, filename.c_str());
-     strcat(sTempFile, sTmpSuffix.c_str());
- 
--#if ((defined(__GNUC__) && __GNUC__ >= 3  ) || !defined(HAVE_MKSTEMP))
--    // This section is for Windows folk && gcc 3.x folk
-+#if !defined(HAVE_MKSTEMP)
-+    // This section is for Windows folk
-     fstream tmpOut;
-     createFile(sTempFile, tmpOut);
- 
-@@ -257,7 +257,7 @@ size_t RenderV2ToFile(const ID3_TagImpl& tag, fstream&
-       tmpOut.write((char *)tmpBuffer, nBytes);
-     }
- 
--#else //((defined(__GNUC__) && __GNUC__ >= 3  ) || !defined(HAVE_MKSTEMP))
-+#else //!defined(HAVE_MKSTEMP)
- 
-     // else we gotta make a temp file, copy the tag into it, copy the
-     // rest of the old file after the tag, delete the old file, rename
-@@ -270,7 +270,7 @@ size_t RenderV2ToFile(const ID3_TagImpl& tag, fstream&
-       //ID3_THROW_DESC(ID3E_NoFile, "couldn't open temp file");
-     }
- 
--    ofstream tmpOut(fd);
-+    ofstream tmpOut(sTempFile);
-     if (!tmpOut)
-     {
-       tmpOut.close();
-@@ -285,14 +285,14 @@ size_t RenderV2ToFile(const ID3_TagImpl& tag, fstream&
-     uchar tmpBuffer[BUFSIZ];
-     while (file)
-     {
--      file.read(tmpBuffer, BUFSIZ);
-+      file.read((char *)tmpBuffer, BUFSIZ);
-       size_t nBytes = file.gcount();
--      tmpOut.write(tmpBuffer, nBytes);
-+      tmpOut.write((char *)tmpBuffer, nBytes);
-     }
- 
-     close(fd); //closes the file
- 
--#endif ////((defined(__GNUC__) && __GNUC__ >= 3  ) || !defined(HAVE_MKSTEMP))
-+#endif ////!defined(HAVE_MKSTEMP)
- 
-     tmpOut.close();
-     file.close();
diff --git a/audio/id3lib/files/patch-Makefile.in b/audio/id3lib/files/patch-Makefile.in
deleted file mode 100644
index 4517c3792851..000000000000
--- a/audio/id3lib/files/patch-Makefile.in
+++ /dev/null
@@ -1,13 +0,0 @@
---- Makefile.in.orig	2003-03-02 00:23:00 UTC
-+++ Makefile.in
-@@ -132,8 +132,8 @@ EXTRA_DIST = \
- @ID3_NEEDZLIB_TRUE@zlib_subdir = zlib
- @ID3_NEEDZLIB_FALSE@zlib_subdir = 
- 
--SUBDIRS = . m4 $(zlib_subdir) doc include id3com src examples
--DIST_SUBDIRS = . m4 zlib doc include id3com src examples prj libprj
-+SUBDIRS = . m4 doc include id3com src examples
-+DIST_SUBDIRS = . m4 doc include id3com src examples prj libprj
- 
- INCLUDES = @ID3LIB_DEBUG_FLAGS@
- 
diff --git a/audio/id3lib/files/patch-configure b/audio/id3lib/files/patch-configure
deleted file mode 100644
index d4e36fb70886..000000000000
--- a/audio/id3lib/files/patch-configure
+++ /dev/null
@@ -1,38 +0,0 @@
---- configure.orig	2003-03-02 00:23:00 UTC
-+++ configure
-@@ -9134,6 +9134,7 @@ if test x$ac_cv_lib_z_uncompress = xno; then
- else
-   ID3_NEEDZLIB_TRUE='#'
-   ID3_NEEDZLIB_FALSE=
-+  LIBS="-lz $LIBS"
- fi
- 
- 
-@@ -9730,14 +9731,13 @@ fi
-   if test ! x$silent = xyes; then
-     exec 6>&1
-   fi
--  #standalone library rules over libc
--  if test $iconv_in_iconv = 1 -o $libiconv_in_iconv = 1; then
-+  if test $iconv_in_libc = 1; then
-+    echo "$as_me:$LINENO: result: libc" >&5
-+echo "${ECHO_T}libc" >&6
-+  elif test $iconv_in_iconv = 1 -o $libiconv_in_iconv = 1; then
-     echo "$as_me:$LINENO: result: libiconv" >&5
- echo "${ECHO_T}libiconv" >&6
-     ICONV_LIB=-liconv
--  elif test $iconv_in_libc = 1; then
--    echo "$as_me:$LINENO: result: libc" >&5
--echo "${ECHO_T}libc" >&6
-   else
-     echo "$as_me:$LINENO: result: not found (panic)" >&5
- echo "${ECHO_T}not found (panic)" >&6
-@@ -10296,7 +10296,7 @@ done
- 
- for ac_header in \
-   string                        \
--  iomanip.h                     \
-+  iomanip                     \
- 
- do
- as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
diff --git a/audio/id3lib/files/patch-examples-demo_convert.cpp b/audio/id3lib/files/patch-examples-demo_convert.cpp
deleted file mode 100644
index f0e3852703e3..000000000000
--- a/audio/id3lib/files/patch-examples-demo_convert.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- examples/demo_convert.cpp.orig	2003-03-02 00:23:00 UTC
-+++ examples/demo_convert.cpp
-@@ -84,7 +84,7 @@ void DisplayTags(ostream &os, luint nTags)
-   }
- }
- 
--int main( unsigned int argc, char * const argv[])
-+int main( int argc, char * const argv[])
- {
-   flags_t ulFlag = ID3TT_ALL;
-   gengetopt_args_info args;
diff --git a/audio/id3lib/files/patch-examples-demo_copy.cpp b/audio/id3lib/files/patch-examples-demo_copy.cpp
deleted file mode 100644
index 1c28c399acad..000000000000
--- a/audio/id3lib/files/patch-examples-demo_copy.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- examples/demo_copy.cpp.orig	2003-03-02 00:23:00 UTC
-+++ examples/demo_copy.cpp
-@@ -81,7 +81,7 @@ void DisplayTags(ostream &os, luint nTags)
-   }
- }
- 
--int main( unsigned int argc, char * const argv[])
-+int main( int argc, char * const argv[])
- {
-   int ulFlag = ID3TT_ID3;
-   ID3D_INIT_DOUT();
diff --git a/audio/id3lib/files/patch-examples-demo_info.cpp b/audio/id3lib/files/patch-examples-demo_info.cpp
deleted file mode 100644
index 37d36adb7bde..000000000000
--- a/audio/id3lib/files/patch-examples-demo_info.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- examples/demo_info.cpp.orig	2003-03-02 00:23:00 UTC
-+++ examples/demo_info.cpp
-@@ -309,7 +309,7 @@ void PrintInformation(const ID3_Tag &myTag)
- 
- #define DEBUG
- 
--int main( unsigned int argc, char * const argv[])
-+int main( int argc, char * const argv[])
- {
-   ID3D_INIT_DOUT();
- 
diff --git a/audio/id3lib/files/patch-examples-demo_tag.cpp b/audio/id3lib/files/patch-examples-demo_tag.cpp
deleted file mode 100644
index f5c82c3b4899..000000000000
--- a/audio/id3lib/files/patch-examples-demo_tag.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- examples/demo_tag.cpp.orig	2003-03-02 00:23:00 UTC
-+++ examples/demo_tag.cpp
-@@ -46,7 +46,7 @@ void DisplayTags(ostream &os, luint nTags)
-     os << "v2";
- }
- 
--int main( unsigned int argc, char * const argv[])
-+int main( int argc, char * const argv[])
- {
-   int ulFlag = ID3TT_ID3;
-   ID3D_INIT_DOUT();
diff --git a/audio/id3lib/files/patch-include-id3-globals.h b/audio/id3lib/files/patch-include-id3-globals.h
deleted file mode 100644
index 64218f132a92..000000000000
--- a/audio/id3lib/files/patch-include-id3-globals.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- include/id3/globals.h.orig	2003-03-02 00:23:00 UTC
-+++ include/id3/globals.h
-@@ -480,7 +480,7 @@ ID3_ENUM(Mp3_Frequencies)
-   MP3FREQUENCIES_24000HZ = 24000,
-   MP3FREQUENCIES_32000HZ = 32000,
-   MP3FREQUENCIES_48000HZ = 48000,
--  MP3FREQUENCIES_44100HZ = 44100,
-+  MP3FREQUENCIES_44100HZ = 44100
- };
- 
- ID3_ENUM(Mp3_ChannelMode)
diff --git a/audio/id3lib/files/patch-include-id3-id3lib_strings.h b/audio/id3lib/files/patch-include-id3-id3lib_strings.h
deleted file mode 100644
index cc1961c418fe..000000000000
--- a/audio/id3lib/files/patch-include-id3-id3lib_strings.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- include/id3/id3lib_strings.h.orig	2003-03-02 00:23:00 UTC
-+++ include/id3/id3lib_strings.h
-@@ -30,6 +30,7 @@
- #define _ID3LIB_STRINGS_H_
- 
- #include <string>
-+#include <cstring>
- 
- #if (defined(__GNUC__) && (__GNUC__ >= 3) || (defined(_MSC_VER) && _MSC_VER > 1000))
- namespace std
diff --git a/audio/id3lib/files/patch-include-id3-writers.h b/audio/id3lib/files/patch-include-id3-writers.h
deleted file mode 100644
index 2699cf391e19..000000000000
--- a/audio/id3lib/files/patch-include-id3-writers.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- include/id3/writers.h.orig	2003-03-02 00:23:00 UTC
-+++ include/id3/writers.h
-@@ -29,6 +29,7 @@
- #define _ID3LIB_WRITERS_H_
- 
- #include "id3/writer.h"
-+#include <cstring>
- #include "id3/id3lib_streams.h"
- //#include <string.h>
- 
diff --git a/audio/id3lib/files/patch-src-CMakeLists.txt b/audio/id3lib/files/patch-src-CMakeLists.txt
new file mode 100644
index 000000000000..691b63e1baf8
--- /dev/null
+++ b/audio/id3lib/files/patch-src-CMakeLists.txt
@@ -0,0 +1,9 @@
+--- src/CMakeLists.txt.orig	2024-01-14 15:07:45 UTC
++++ src/CMakeLists.txt
+@@ -45,5 +45,5 @@ install(FILES ${CMAKE_BINARY_DIR}/id3lib.pc
+ configure_file(${CMAKE_SOURCE_DIR}/id3lib.pc.in
+     ${CMAKE_BINARY_DIR}/id3lib.pc @ONLY)
+ install(FILES ${CMAKE_BINARY_DIR}/id3lib.pc
+-    DESTINATION share/pkgconfig
++    DESTINATION libdata/pkgconfig
+     PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
diff --git a/audio/id3lib/files/patch-src-io_helpers.cpp b/audio/id3lib/files/patch-src-io_helpers.cpp
deleted file mode 100644
index 50ab74c98889..000000000000
--- a/audio/id3lib/files/patch-src-io_helpers.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
---- src/io_helpers.cpp.orig	2003-03-02 00:23:00 UTC
-+++ src/io_helpers.cpp
-@@ -363,9 +363,10 @@ size_t io::writeUnicodeText(ID3_Writer& writer, String
-     // Write the BOM: 0xFEFF
-     unicode_t BOM = 0xFEFF;
-     writer.writeChars((const unsigned char*) &BOM, 2);
-+    const unsigned char* pdata = (const unsigned char*)data.c_str();
-     for (size_t i = 0; i < size; i += 2)
-     {
--      unicode_t ch = (data[i] << 8) | data[i+1];
-+      unicode_t ch = (pdata[i] << 8) | pdata[i+1];
-       writer.writeChars((const unsigned char*) &ch, 2);
-     }
-   }
diff --git a/audio/id3lib/files/patch-src-mp3_parse.cpp b/audio/id3lib/files/patch-src-mp3_parse.cpp
deleted file mode 100644
index 60197c375bba..000000000000
--- a/audio/id3lib/files/patch-src-mp3_parse.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/mp3_parse.cpp.orig	2003-03-02 00:23:00 UTC
-+++ src/mp3_parse.cpp
-@@ -465,7 +465,7 @@ bool Mp3Info::Parse(ID3_Reader& reader, 
-   // from http://www.xingtech.com/developer/mp3/
- 
-   const size_t VBR_HEADER_MIN_SIZE = 8;     // "xing" + flags are fixed
--  const size_t VBR_HEADER_MAX_SIZE = 116;   // frames, bytes, toc and scale are optional
-+  const size_t VBR_HEADER_MAX_SIZE = 120;   // frames, bytes, toc and scale are optional
- 
-   if (mp3size >= vbr_header_offest + VBR_HEADER_MIN_SIZE) 
-   {
diff --git a/audio/id3lib/pkg-plist b/audio/id3lib/pkg-plist
index ba257060dcf7..274083ed58da 100644
--- a/audio/id3lib/pkg-plist
+++ b/audio/id3lib/pkg-plist
@@ -5,9 +5,13 @@ bin/id3tag
 include/id3.h
 include/id3/field.h
 include/id3/globals.h
+include/id3/helpers.h
 include/id3/id3lib_frame.h
 include/id3/id3lib_streams.h
 include/id3/id3lib_strings.h
+include/id3/io_decorators.h
+include/id3/io_helpers.h
+include/id3/io_strings.h
 include/id3/misc_support.h
 include/id3/reader.h
 include/id3/readers.h
@@ -16,7 +20,10 @@ include/id3/tag.h
 include/id3/utils.h
 include/id3/writer.h
 include/id3/writers.h
-lib/libid3-3.8.so.3
-lib/libid3-3.8.so.3.0.0
-lib/libid3.a
 lib/libid3.so
+lib/libid3.so.3.8.3
+libdata/pkgconfig/id3lib.pc
+share/man/man1/id3convert.1.gz
+share/man/man1/id3cp.1.gz
+share/man/man1/id3info.1.gz
+share/man/man1/id3tag.1.gz