summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStéphane Cerveau <scerveau@igalia.com>2022-11-14 11:45:18 +0100
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2022-12-07 03:44:03 +0000
commit15a60faa256012953c328211b8a0440ff1dfa1b2 (patch)
treeb20a237fac7f4cf2c069520026d423ca379f9521
parent6e8251009aad6f1e463fc13ba00a230543d6fda9 (diff)
taglib: add patch to generate the pc files properly
The pc files should be generated using prefix in libdir and includedir Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1038>
-rw-r--r--recipes/taglib.recipe2
-rw-r--r--recipes/taglib/0003-cmake-generate-pc-file-with-the-use-of-prefix-in-lib.patch77
2 files changed, 79 insertions, 0 deletions
diff --git a/recipes/taglib.recipe b/recipes/taglib.recipe
index cc1dcf4c..75122b7c 100644
--- a/recipes/taglib.recipe
+++ b/recipes/taglib.recipe
@@ -26,6 +26,8 @@ class Recipe(recipe.Recipe):
patches = [
'taglib/0001-Link-with-correct-STL-on-Android.patch',
'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',
]
files_libs = ['libtag']
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
new file mode 100644
index 00000000..fae0ac94
--- /dev/null
+++ b/recipes/taglib/0003-cmake-generate-pc-file-with-the-use-of-prefix-in-lib.patch
@@ -0,0 +1,77 @@
+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
+