diff --git a/overlay/ports/libid3tag/10_utf16.diff b/overlay/ports/libid3tag/10_utf16.diff deleted file mode 100644 index 7f8c67e48b2662..00000000000000 --- a/overlay/ports/libid3tag/10_utf16.diff +++ /dev/null @@ -1,48 +0,0 @@ -#! /bin/sh -e -## 10_utf16.dpatch by -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Handle bogus UTF16 sequences that have a length that is not -## DP: an even number of 8 bit characters. - -if [ $# -lt 1 ]; then - echo "`basename $0`: script expects -patch|-unpatch as argument" >&2 - exit 1 -fi - -[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts -patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}" - -case "$1" in - -patch) patch -p1 ${patch_opts} < $0;; - -unpatch) patch -R -p1 ${patch_opts} < $0;; - *) - echo "`basename $0`: script expects -patch|-unpatch as argument" >&2 - exit 1;; -esac - -exit 0 - -@DPATCH@ -diff -urNad utf16.c utf16.c ---- utf16.c 2006-01-13 15:26:29.000000000 +0100 -+++ utf16.c 2006-01-13 15:27:19.000000000 +0100 -@@ -282,5 +282,18 @@ - - free(utf16); - -+ if (end == *ptr && length % 2 != 0) -+ { -+ /* We were called with a bogus length. It should always -+ * be an even number. We can deal with this in a few ways: -+ * - Always give an error. -+ * - Try and parse as much as we can and -+ * - return an error if we're called again when we -+ * already tried to parse everything we can. -+ * - tell that we parsed it, which is what we do here. -+ */ -+ (*ptr)++; -+ } -+ - return ucs4; - } diff --git a/overlay/ports/libid3tag/11_unknown_encoding.diff b/overlay/ports/libid3tag/11_unknown_encoding.diff deleted file mode 100644 index 32dbb51ec4cddd..00000000000000 --- a/overlay/ports/libid3tag/11_unknown_encoding.diff +++ /dev/null @@ -1,37 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 11_unknown_encoding.dpatch by Andreas Henriksson -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: In case of an unknown/invalid encoding, id3_parse_string() will -## DP: return NULL, but the return value wasn't checked resulting -## DP: in segfault in id3_ucs4_length(). This is the only place -## DP: the return value wasn't checked. - -@DPATCH@ -diff -urNad compat.gperf compat.gperf ---- compat.gperf 2004-01-23 09:41:32.000000000 +0000 -+++ compat.gperf 2007-01-14 14:36:53.000000000 +0000 -@@ -236,6 +236,10 @@ - - encoding = id3_parse_uint(&data, 1); - string = id3_parse_string(&data, end - data, encoding, 0); -+ if (!string) -+ { -+ continue; -+ } - - if (id3_ucs4_length(string) < 4) { - free(string); -diff -urNad parse.c parse.c ---- parse.c 2004-01-23 09:41:32.000000000 +0000 -+++ parse.c 2007-01-14 14:37:34.000000000 +0000 -@@ -165,6 +165,9 @@ - case ID3_FIELD_TEXTENCODING_UTF_8: - ucs4 = id3_utf8_deserialize(ptr, length); - break; -+ default: -+ /* FIXME: Unknown encoding! Print warning? */ -+ return NULL; - } - - if (ucs4 && !full) { diff --git a/overlay/ports/libid3tag/CMakeLists.txt b/overlay/ports/libid3tag/CMakeLists.txt deleted file mode 100644 index 82999dd37386c8..00000000000000 --- a/overlay/ports/libid3tag/CMakeLists.txt +++ /dev/null @@ -1,85 +0,0 @@ -cmake_minimum_required(VERSION 3.1.0) -project(id3tag VERSION 0.15.1) - -option(BUILD_SHARED_LIBS "Build dynamic library" ON) - -include(GNUInstallDirs) - -# -# Build -# - -add_library(id3tag - compat.c - crc.c - debug.c - field.c - file.c - frame.c - frametype.c - genre.c - latin1.c - parse.c - render.c - tag.c - ucs4.c - utf16.c - utf8.c - util.c - version.c -) -target_include_directories(id3tag PUBLIC - $ - $ -) -if(WIN32 AND BUILD_SHARED_LIBS) - set_target_properties(id3tag PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) -endif() - -find_package(ZLIB REQUIRED) -target_link_libraries(id3tag PRIVATE ZLIB::ZLIB) - -# -# Installation -# - -include(CMakePackageConfigHelpers) - -# Library files -install(TARGETS id3tag - EXPORT id3tagTargets - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" -) - -# Header files -install( - FILES "${CMAKE_CURRENT_SOURCE_DIR}/id3tag.h" - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" -) - -# CMake config -set(ID3TAG_INSTALL_CMAKEDIR "lib/cmake/id3tag") -install( - EXPORT id3tagTargets - FILE id3tagTargets.cmake - NAMESPACE id3tag:: - DESTINATION "${ID3TAG_INSTALL_CMAKEDIR}" -) -configure_package_config_file(id3tagConfig.cmake.in - "${CMAKE_CURRENT_BINARY_DIR}/id3tagConfig.cmake" - INSTALL_DESTINATION "${ID3TAG_INSTALL_CMAKEDIR}" -) -write_basic_package_version_file( - "${CMAKE_CURRENT_BINARY_DIR}/id3tagConfigVersion.cmake" - VERSION "${CMAKE_PROJECT_VERSION}" - COMPATIBILITY SameMajorVersion -) -install( - FILES - "${CMAKE_CURRENT_BINARY_DIR}/id3tagConfig.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/id3tagConfigVersion.cmake" - DESTINATION "${ID3TAG_INSTALL_CMAKEDIR}" -) diff --git a/overlay/ports/libid3tag/CVE-2008-2109.patch b/overlay/ports/libid3tag/CVE-2008-2109.patch deleted file mode 100644 index 26c54c5d2cfeef..00000000000000 --- a/overlay/ports/libid3tag/CVE-2008-2109.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- field.c.orig 2008-05-05 09:49:15.000000000 -0400 -+++ field.c 2008-05-05 09:49:25.000000000 -0400 -@@ -291,7 +291,7 @@ - - end = *ptr + length; - -- while (end - *ptr > 0) { -+ while (end - *ptr > 0 && **ptr != '\0') { - ucs4 = id3_parse_string(ptr, end - *ptr, *encoding, 0); - if (ucs4 == 0) - goto fail; diff --git a/overlay/ports/libid3tag/id3tagConfig.cmake.in b/overlay/ports/libid3tag/id3tagConfig.cmake.in deleted file mode 100644 index 37f19f8e9882b8..00000000000000 --- a/overlay/ports/libid3tag/id3tagConfig.cmake.in +++ /dev/null @@ -1,5 +0,0 @@ -@PACKAGE_INIT@ - -include("${CMAKE_CURRENT_LIST_DIR}/id3tagTargets.cmake") - -check_required_components(id3tag) diff --git a/overlay/ports/libid3tag/portfile.cmake b/overlay/ports/libid3tag/portfile.cmake deleted file mode 100644 index 78d5975830b951..00000000000000 --- a/overlay/ports/libid3tag/portfile.cmake +++ /dev/null @@ -1,33 +0,0 @@ -vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/mad/files/libid3tag/0.15.1b/libid3tag-0.15.1b.tar.gz" - FILENAME "libid3tag-0.15.1b.tar.gz" - SHA512 ade7ce2a43c3646b4c9fdc642095174b9d4938b078b205cd40906d525acd17e87ad76064054a961f391edcba6495441450af2f68be69f116549ca666b069e6d3 -) - -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - PATCHES - 10_utf16.diff - 11_unknown_encoding.diff - CVE-2008-2109.patch -) - -configure_file("${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" "${SOURCE_PATH}/CMakeLists.txt" COPYONLY) -configure_file("${CMAKE_CURRENT_LIST_DIR}/id3tagConfig.cmake.in" "${SOURCE_PATH}/id3tagConfig.cmake.in" COPYONLY) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja -) - -vcpkg_install_cmake() - -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") - -# Moves all .cmake files from /debug/share/libid3tag/ to /share/libid3tag/ -# See /docs/maintainers/vcpkg_fixup_cmake_targets.md for more details -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share/libid3tag) - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libid3tag RENAME copyright) diff --git a/overlay/ports/libid3tag/vcpkg.json b/overlay/ports/libid3tag/vcpkg.json deleted file mode 100644 index 738a7d46d73744..00000000000000 --- a/overlay/ports/libid3tag/vcpkg.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "libid3tag", - "version-string": "0.15.1b", - "homepage": "https://www.underbit.com/products/mad/", - "description": "ID3 tag manipulation library", - "dependencies": [ - "zlib" - ] -} diff --git a/ports/libid3tag/portfile.cmake b/ports/libid3tag/portfile.cmake new file mode 100644 index 00000000000000..33d7635dfb4e03 --- /dev/null +++ b/ports/libid3tag/portfile.cmake @@ -0,0 +1,17 @@ +vcpkg_download_distfile( + ARCHIVE URLS "https://codeberg.org/tenacityteam/libid3tag/archive/${VERSION}.tar.gz" + FILENAME "${VERSION}.tar.gz" + SHA512 d49bc637899e4251ed66b5b56aa4c910dcdecd6b03ed197866d74175fc4eadff40f40f336606b23e2505b0e11834c4212a1314feeeaa2c0e9713051fdb56cb45 +) + +vcpkg_extract_source_archive(SOURCE_PATH ARCHIVE "${ARCHIVE}") + +vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}") +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(PACKAGE_NAME id3tag CONFIG_PATH lib/cmake/id3tag) +vcpkg_fixup_pkgconfig() +vcpkg_copy_pdbs() + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/libid3tag/vcpkg.json b/ports/libid3tag/vcpkg.json new file mode 100644 index 00000000000000..74b72dc5b3f437 --- /dev/null +++ b/ports/libid3tag/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "libid3tag", + "version": "0.16.3", + "description": "ID3 tag manipulation library", + "homepage": "https://codeberg.org/tenacityteam/libid3tag", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 53201d09a39670..7717d9e0c19806 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4312,6 +4312,10 @@ "baseline": "1.6.6", "port-version": 0 }, + "libid3tag": { + "baseline": "0.16.3", + "port-version": 0 + }, "libideviceactivation": { "baseline": "2023-05-01", "port-version": 1 diff --git a/versions/l-/libid3tag.json b/versions/l-/libid3tag.json new file mode 100644 index 00000000000000..ed1fec06e14acb --- /dev/null +++ b/versions/l-/libid3tag.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "a30c7af82d01be2c3bd973012681915cf394d464", + "version": "0.16.3", + "port-version": 0 + } + ] +}