summaryrefslogtreecommitdiff
path: root/recipes
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2024-02-11 19:04:30 +0530
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2024-02-11 15:24:25 +0000
commitf210eb88576193af99de228958dd694152e22127 (patch)
tree01179ef5289cf54daff1a035dc3ad43889766c92 /recipes
parent0982f029f973de78f4a536fddb765d186e83345c (diff)
taglib: Bump to 1.13.1
Co-authored-by: Tim-Philipp Müller <tim@centricular.com> Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1132>
Diffstat (limited to 'recipes')
-rw-r--r--recipes/taglib.recipe14
-rw-r--r--recipes/taglib/0001-Don-t-use-deprecated-OSAtomic-on-macOS-10.12-and-new.patch195
-rw-r--r--recipes/taglib/0002-Build-a-static-and-non-static-version.patch10
-rw-r--r--recipes/taglib/0003-cmake-generate-pc-file-with-the-use-of-prefix-in-lib.patch77
4 files changed, 9 insertions, 287 deletions
diff --git a/recipes/taglib.recipe b/recipes/taglib.recipe
index 78c3fd9d..ab21d82a 100644
--- a/recipes/taglib.recipe
+++ b/recipes/taglib.recipe
@@ -5,12 +5,10 @@ from cerbero.tools.libtool import LibtoolLibrary
class Recipe(recipe.Recipe):
name = 'taglib'
- version = '1.11.1'
+ version = '1.13.1'
stype = SourceType.TARBALL
- # This uses a github certificate, hence fails TLS check
- #url = 'https://taglib.org/releases/taglib-%(version)s.tar.gz'
- url = 'https://github.com/taglib/taglib/releases/download/v1.11.1/taglib-%(version)s.tar.gz'
- tarball_checksum = 'b6d1a5a610aae6ff39d93de5efd0fdc787aa9e9dc1e7026fa4c961b26563526b'
+ url = 'https://github.com/taglib/taglib/releases/download/v1.13.1/taglib-%(version)s.tar.gz'
+ tarball_checksum = 'c8da2b10f1bfec2cd7dbfcd33f4a2338db0765d851a50583d410bacf055cfd0b'
# either LGPLv2.1 or MPLv1.1
licenses = [License.LGPLv2_1Plus, License.MPLv1_1]
@@ -25,10 +23,6 @@ class Recipe(recipe.Recipe):
patches = [
'taglib/0002-Build-a-static-and-non-static-version.patch',
- # https://github.com/taglib/taglib/pull/1071
- 'taglib/0003-cmake-generate-pc-file-with-the-use-of-prefix-in-lib.patch',
- # Upstream did this change once and then reverted it, so keep it private
- 'taglib/0001-Don-t-use-deprecated-OSAtomic-on-macOS-10.12-and-new.patch',
]
files_libs = ['libtag']
@@ -40,7 +34,7 @@ class Recipe(recipe.Recipe):
if self.config.target_platform == Platform.ANDROID:
# configure for android
self.configure_options += ' -DANDROID_NDK=1 '
- self.append_env('CXXFLAGS', '-frtti')
+ self.append_env('CXXFLAGS', '-frtti', '-fexceptions')
self.configure_options += ' -DZLIB_ROOT=%s ' % self.config.prefix
async def install(self):
diff --git a/recipes/taglib/0001-Don-t-use-deprecated-OSAtomic-on-macOS-10.12-and-new.patch b/recipes/taglib/0001-Don-t-use-deprecated-OSAtomic-on-macOS-10.12-and-new.patch
deleted file mode 100644
index c0d6c8e8..00000000
--- a/recipes/taglib/0001-Don-t-use-deprecated-OSAtomic-on-macOS-10.12-and-new.patch
+++ /dev/null
@@ -1,195 +0,0 @@
-From 2f4766817a2b67b523b247e045049c6d434cab46 Mon Sep 17 00:00:00 2001
-From: Nirbheek Chauhan <nirbheek@centricular.com>
-Date: Thu, 8 Jun 2023 00:43:37 +0530
-Subject: [PATCH] Don't use deprecated OSAtomic on macOS 10.12 and newer
-
-Fixes deprecation warnings:
-
-```
-include/taglib/trefcounter.h:84:29: error: 'OSAtomicDecrement32Barrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_fetch_sub() from <atomic> instead [-Werror,-Wdeprecated-declarations]
- bool deref() { return ! OSAtomicDecrement32Barrier(const_cast<int32_t*>(&refCount)); }
- ^
-/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/usr/include/libkern/OSAtomicDeprecated.h:202:9: note: 'OSAtomicDecrement32Barrier' has been explicitly marked deprecated here
-int32_t OSAtomicDecrement32Barrier( volatile int32_t *__theValue );
- ^
-2 errors generated.
-```
----
- ConfigureChecks.cmake | 14 ++-----
- taglib/toolkit/trefcounter.cpp | 38 -----------------
- taglib/toolkit/trefcounter.h | 76 ++++++++++++++++------------------
- 3 files changed, 39 insertions(+), 89 deletions(-)
-
-diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
-index ee4fdc2..70bcd5d 100644
---- a/ConfigureChecks.cmake
-+++ b/ConfigureChecks.cmake
-@@ -72,17 +72,9 @@ if(NOT HAVE_STD_ATOMIC)
- " HAVE_GCC_ATOMIC)
-
- if(NOT HAVE_GCC_ATOMIC)
-- check_cxx_source_compiles("
-- #include <libkern/OSAtomic.h>
-- int main() {
-- volatile int32_t x;
-- OSAtomicIncrement32Barrier(&x);
-- int32_t y = OSAtomicDecrement32Barrier(&x);
-- return 0;
-- }
-- " HAVE_MAC_ATOMIC)
--
-- if(NOT HAVE_MAC_ATOMIC)
-+ if (APPLE)
-+ set(HAVE_MAC_ATOMIC TRUE)
-+ else()
- check_cxx_source_compiles("
- #include <windows.h>
- int main() {
-diff --git a/taglib/toolkit/trefcounter.cpp b/taglib/toolkit/trefcounter.cpp
-index 27d17b8..b8221a6 100644
---- a/taglib/toolkit/trefcounter.cpp
-+++ b/taglib/toolkit/trefcounter.cpp
-@@ -29,44 +29,6 @@
-
- #include "trefcounter.h"
-
--#if defined(HAVE_STD_ATOMIC)
--# include <atomic>
--# define ATOMIC_INT std::atomic<unsigned int>
--# define ATOMIC_INC(x) x.fetch_add(1)
--# define ATOMIC_DEC(x) (x.fetch_sub(1) - 1)
--#elif defined(HAVE_BOOST_ATOMIC)
--# include <boost/atomic.hpp>
--# define ATOMIC_INT boost::atomic<unsigned int>
--# define ATOMIC_INC(x) x.fetch_add(1)
--# define ATOMIC_DEC(x) (x.fetch_sub(1) - 1)
--#elif defined(HAVE_GCC_ATOMIC)
--# define ATOMIC_INT int
--# define ATOMIC_INC(x) __sync_add_and_fetch(&x, 1)
--# define ATOMIC_DEC(x) __sync_sub_and_fetch(&x, 1)
--#elif defined(HAVE_WIN_ATOMIC)
--# if !defined(NOMINMAX)
--# define NOMINMAX
--# endif
--# include <windows.h>
--# define ATOMIC_INT long
--# define ATOMIC_INC(x) InterlockedIncrement(&x)
--# define ATOMIC_DEC(x) InterlockedDecrement(&x)
--#elif defined(HAVE_MAC_ATOMIC)
--# include <libkern/OSAtomic.h>
--# define ATOMIC_INT int32_t
--# define ATOMIC_INC(x) OSAtomicIncrement32Barrier(&x)
--# define ATOMIC_DEC(x) OSAtomicDecrement32Barrier(&x)
--#elif defined(HAVE_IA64_ATOMIC)
--# include <ia64intrin.h>
--# define ATOMIC_INT int
--# define ATOMIC_INC(x) __sync_add_and_fetch(&x, 1)
--# define ATOMIC_DEC(x) __sync_sub_and_fetch(&x, 1)
--#else
--# define ATOMIC_INT int
--# define ATOMIC_INC(x) (++x)
--# define ATOMIC_DEC(x) (--x)
--#endif
--
- namespace TagLib
- {
-
-diff --git a/taglib/toolkit/trefcounter.h b/taglib/toolkit/trefcounter.h
-index bc3cdd9..0848f69 100644
---- a/taglib/toolkit/trefcounter.h
-+++ b/taglib/toolkit/trefcounter.h
-@@ -29,23 +29,39 @@
- #include "taglib_export.h"
- #include "taglib.h"
-
--#ifdef __APPLE__
--# include <libkern/OSAtomic.h>
--# define TAGLIB_ATOMIC_MAC
--#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
--# ifndef NOMINMAX
--# define NOMINMAX
--# endif
--# include <windows.h>
--# define TAGLIB_ATOMIC_WIN
--#elif defined (__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 401) \
-- && (defined(__i386__) || defined(__i486__) || defined(__i586__) || \
-- defined(__i686__) || defined(__x86_64) || defined(__ia64)) \
-- && !defined(__INTEL_COMPILER)
--# define TAGLIB_ATOMIC_GCC
--#elif defined(__ia64) && defined(__INTEL_COMPILER)
--# include <ia64intrin.h>
--# define TAGLIB_ATOMIC_GCC
-+#if defined(HAVE_GCC_ATOMIC)
-+# define ATOMIC_INT int
-+# define ATOMIC_INC(x) __sync_add_and_fetch(&(x), 1)
-+# define ATOMIC_DEC(x) __sync_sub_and_fetch(&(x), 1)
-+#elif defined(HAVE_WIN_ATOMIC)
-+# if !defined(NOMINMAX)
-+# define NOMINMAX
-+# endif
-+# include <windows.h>
-+# define ATOMIC_INT long
-+# define ATOMIC_INC(x) InterlockedIncrement(&x)
-+# define ATOMIC_DEC(x) InterlockedDecrement(&x)
-+#elif defined(HAVE_MAC_ATOMIC)
-+# if defined(MAC_OS_VERSION_10_12) && MAC_OS_X_VERSION_MIN_ALLOWED >= MAC_OS_VERSION_10_12
-+# include <stdatomic.h>
-+# define ATOMIC_INT atomic_int
-+# define ATOMIC_INC(x) std::atomic_fetch_add(&x, 1)
-+# define ATOMIC_DEC(x) std::atomic_fetch_sub(&x, 1)
-+# else
-+# include <libkern/OSAtomic.h>
-+# define ATOMIC_INT int32_t
-+# define ATOMIC_INC(x) OSAtomicIncrement32Barrier(&x)
-+# define ATOMIC_DEC(x) OSAtomicDecrement32Barrier(&x)
-+# endif
-+#elif defined(HAVE_IA64_ATOMIC)
-+# include <ia64intrin.h>
-+# define ATOMIC_INT int
-+# define ATOMIC_INC(x) __sync_add_and_fetch(&x, 1)
-+# define ATOMIC_DEC(x) __sync_sub_and_fetch(&x, 1)
-+#else
-+# define ATOMIC_INT unsigned int
-+# define ATOMIC_INC(x) (++x)
-+# define ATOMIC_DEC(x) (--x)
- #endif
-
- #ifndef DO_NOT_DOCUMENT // Tell Doxygen to skip this class.
-@@ -79,31 +95,11 @@ namespace TagLib
- public:
- RefCounterOld() : refCount(1) {}
-
--#ifdef TAGLIB_ATOMIC_MAC
-- void ref() { OSAtomicIncrement32Barrier(const_cast<int32_t*>(&refCount)); }
-- bool deref() { return ! OSAtomicDecrement32Barrier(const_cast<int32_t*>(&refCount)); }
-+ void ref() { ATOMIC_INC(refCount); }
-+ bool deref() { return ATOMIC_DEC(refCount); }
- int32_t count() { return refCount; }
- private:
-- volatile int32_t refCount;
--#elif defined(TAGLIB_ATOMIC_WIN)
-- void ref() { InterlockedIncrement(&refCount); }
-- bool deref() { return ! InterlockedDecrement(&refCount); }
-- long count() { return refCount; }
-- private:
-- volatile long refCount;
--#elif defined(TAGLIB_ATOMIC_GCC)
-- void ref() { __sync_add_and_fetch(&refCount, 1); }
-- bool deref() { return ! __sync_sub_and_fetch(&refCount, 1); }
-- int count() { return refCount; }
-- private:
-- volatile int refCount;
--#else
-- void ref() { refCount++; }
-- bool deref() { return ! --refCount; }
-- int count() { return refCount; }
-- private:
-- unsigned int refCount;
--#endif
-+ volatile ATOMIC_INT refCount;
- };
-
- }
---
-2.39.2
-
diff --git a/recipes/taglib/0002-Build-a-static-and-non-static-version.patch b/recipes/taglib/0002-Build-a-static-and-non-static-version.patch
index 872880c8..dacbdd98 100644
--- a/recipes/taglib/0002-Build-a-static-and-non-static-version.patch
+++ b/recipes/taglib/0002-Build-a-static-and-non-static-version.patch
@@ -19,18 +19,18 @@ index 4f8c876..5f894db 100644
+add_library(tag SHARED ${tag_LIB_SRCS} ${tag_HDRS})
+add_library(tag_static STATIC ${tag_LIB_SRCS} ${tag_HDRS})
+set_target_properties(tag_static PROPERTIES COMPILE_DEFINITIONS TAGLIB_STATIC)
+ set_property(TARGET tag PROPERTY CXX_STANDARD 98)
- if(ZLIB_FOUND)
- target_link_libraries(tag ${ZLIB_LIBRARIES})
+ if(HAVE_ZLIB AND NOT HAVE_ZLIB_SOURCE)
@@ -372,7 +374,7 @@ if(BUILD_FRAMEWORK)
- set_target_properties(tag PROPERTIES FRAMEWORK TRUE)
+ )
endif()
-install(TARGETS tag
+install(TARGETS tag tag_static
FRAMEWORK DESTINATION ${FRAMEWORK_INSTALL_DIR}
- LIBRARY DESTINATION ${LIB_INSTALL_DIR}
- RUNTIME DESTINATION ${BIN_INSTALL_DIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
--
2.11.0
diff --git a/recipes/taglib/0003-cmake-generate-pc-file-with-the-use-of-prefix-in-lib.patch b/recipes/taglib/0003-cmake-generate-pc-file-with-the-use-of-prefix-in-lib.patch
deleted file mode 100644
index fae0ac94..00000000
--- a/recipes/taglib/0003-cmake-generate-pc-file-with-the-use-of-prefix-in-lib.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 99e261065152d92eeab7648f157c75287774911f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= <scerveau@igalia.com>
-Date: Mon, 14 Nov 2022 11:55:08 +0100
-Subject: [PATCH] cmake: pc file with the use of prefix in lib and include
-
----
- CMakeLists.txt | 4 ++++
- bindings/c/CMakeLists.txt | 4 ++++
- bindings/c/taglib_c.pc.cmake | 8 ++++----
- taglib.pc.cmake | 8 ++++----
- 4 files changed, 16 insertions(+), 8 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 0dd8e6e..353c759 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -118,6 +118,10 @@ if(WIN32)
- endif()
-
- if(NOT BUILD_FRAMEWORK)
-+ set (prefix ${CMAKE_INSTALL_PREFIX})
-+ set (exec_prefix "\${prefix}")
-+ set (libdir "\${prefix}/${CMAKE_INSTALL_LIBDIR}")
-+ set (includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
- configure_file("${CMAKE_CURRENT_SOURCE_DIR}/taglib.pc.cmake" "${CMAKE_CURRENT_BINARY_DIR}/taglib.pc" @ONLY)
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/taglib.pc" DESTINATION "${LIB_INSTALL_DIR}/pkgconfig")
- endif()
-diff --git a/bindings/c/CMakeLists.txt b/bindings/c/CMakeLists.txt
-index c4aafc6..2c102e1 100644
---- a/bindings/c/CMakeLists.txt
-+++ b/bindings/c/CMakeLists.txt
-@@ -62,6 +62,10 @@ install(TARGETS tag_c
- )
-
- if(NOT BUILD_FRAMEWORK)
-+ set (prefix ${CMAKE_INSTALL_PREFIX})
-+ set (exec_prefix "\${prefix}")
-+ set (libdir "\${prefix}/${CMAKE_INSTALL_LIBDIR}")
-+ set (includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib_c.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
- endif()
-diff --git a/bindings/c/taglib_c.pc.cmake b/bindings/c/taglib_c.pc.cmake
-index 232f4f7..b09af83 100644
---- a/bindings/c/taglib_c.pc.cmake
-+++ b/bindings/c/taglib_c.pc.cmake
-@@ -1,7 +1,7 @@
--prefix=${CMAKE_INSTALL_PREFIX}
--exec_prefix=${CMAKE_INSTALL_PREFIX}
--libdir=${LIB_INSTALL_DIR}
--includedir=${INCLUDE_INSTALL_DIR}
-+prefix=@prefix@
-+exec_prefix=@exec_prefix@
-+libdir=@libdir@
-+includedir=@includedir@
-
-
- Name: TagLib C Bindings
-diff --git a/taglib.pc.cmake b/taglib.pc.cmake
-index 5f42e0b..3a720a9 100644
---- a/taglib.pc.cmake
-+++ b/taglib.pc.cmake
-@@ -1,7 +1,7 @@
--prefix=@CMAKE_INSTALL_PREFIX@
--exec_prefix=@CMAKE_INSTALL_PREFIX@
--libdir=@LIB_INSTALL_DIR@
--includedir=@INCLUDE_INSTALL_DIR@
-+prefix=@prefix@
-+exec_prefix=@exec_prefix@
-+libdir=@libdir@
-+includedir=@includedir@
-
- Name: TagLib
- Description: Audio meta-data library
---
-2.34.1
-