summaryrefslogtreecommitdiff
path: root/media-libs/libebur128/files
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/libebur128/files')
-rw-r--r--media-libs/libebur128/files/libebur128-1.0.3_fix-tests.patch23
-rw-r--r--media-libs/libebur128/files/libebur128-1.2.2-cmake.patch52
-rw-r--r--media-libs/libebur128/files/libebur128-1.2.2-pkgconfig.patch43
3 files changed, 118 insertions, 0 deletions
diff --git a/media-libs/libebur128/files/libebur128-1.0.3_fix-tests.patch b/media-libs/libebur128/files/libebur128-1.0.3_fix-tests.patch
new file mode 100644
index 000000000000..34a49cbea35e
--- /dev/null
+++ b/media-libs/libebur128/files/libebur128-1.0.3_fix-tests.patch
@@ -0,0 +1,23 @@
+From d5a443afaf8bb16188d4069891c63ceab67bdb80 Mon Sep 17 00:00:00 2001
+From: Diogo Pereira <sir.suriv@gmail.com>
+Date: Mon, 7 Sep 2015 18:46:20 +0100
+Subject: [PATCH] Fix tests build
+
+---
+ test/CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 28716f0..9bc67d4 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -3,7 +3,8 @@ cmake_minimum_required(VERSION 2.8.9)
+ set(ENABLE_TESTS OFF CACHE BOOL "Build test binaries, needs libsndfile")
+
+ if(ENABLE_TESTS)
+- find_pkg_config(SNDFILE sndfile REQUIRED)
++ find_package(PkgConfig REQUIRED)
++ pkg_check_modules(SNDFILE REQUIRED sndfile)
+
+ include_directories(${EBUR128_INCLUDE_DIR})
+ include_directories(SYSTEM ${SNDFILE_INCLUDE_DIRS})
diff --git a/media-libs/libebur128/files/libebur128-1.2.2-cmake.patch b/media-libs/libebur128/files/libebur128-1.2.2-cmake.patch
new file mode 100644
index 000000000000..9563ed15319f
--- /dev/null
+++ b/media-libs/libebur128/files/libebur128-1.2.2-cmake.patch
@@ -0,0 +1,52 @@
+From d374f1983966fc3ff65bcd73e5f12d358c4f1273 Mon Sep 17 00:00:00 2001
+From: "Yann E. MORIN" <yann.morin.1998@free.fr>
+Date: Sat, 4 Mar 2017 14:33:07 +0100
+Subject: [PATCH] CMakeList: do not overwrite module path
+
+Currently, the CMakeList.txt completely overwrites the CMAKE_MODULE_PATH
+variable.
+
+This is problematic when an upper-layer buildsystem wants to set its own
+module path to use custom modules.
+
+For example, Buildroot [0] provides a custom platform description [1] to
+fix cross-compilation issue. Overwriting the module path means that this
+custom platform description is not found:
+
+ System is unknown to cmake, create:
+ Platform/Buildroot to use this system, please send your config file
+ to cmake@www.cmake.org so it can be added to cmake
+
+Providing such a custom platform description is what the upstream cmake
+devs suggest [2], quoting:
+
+ If a toolchain file specifies CMAKE_SYSTEM_NAME such that a custom
+ `Platform/MySystem.cmake` file is loaded then the latter can set
+ them [*] as needed for the target platform.
+
+[*] offending settings causing RPATH issues during cross-compilation.
+
+So we need to append to the module path, rather than replace it blindly.
+
+[0] https://buildroot.org/
+[1] https://git.buildroot.org/buildroot/tree/support/misc/Buildroot.cmake
+[2] http://public.kitware.com/pipermail/cmake/2017-February/065063.html
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index eea18a6..ff352eb 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
+ project(libebur128 C)
+
+-set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
++list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
+ set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
+ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
+
diff --git a/media-libs/libebur128/files/libebur128-1.2.2-pkgconfig.patch b/media-libs/libebur128/files/libebur128-1.2.2-pkgconfig.patch
new file mode 100644
index 000000000000..7382960711f1
--- /dev/null
+++ b/media-libs/libebur128/files/libebur128-1.2.2-pkgconfig.patch
@@ -0,0 +1,43 @@
+From 13d70019c6d0e94b1ab71d0d2cf80023cc793071 Mon Sep 17 00:00:00 2001
+From: Sebastian Ramacher <sramacher@debian.org>
+Date: Sat, 18 Feb 2017 01:13:03 +0100
+Subject: [PATCH] Add a pkg-config file (fixes #61)
+
+Signed-off-by: Sebastian Ramacher <sramacher@debian.org>
+---
+ ebur128/CMakeLists.txt | 6 ++++++
+ ebur128/libebur128.pc.cmake | 11 +++++++++++
+ 2 files changed, 17 insertions(+)
+ create mode 100644 ebur128/libebur128.pc.cmake
+
+diff --git a/ebur128/CMakeLists.txt b/ebur128/CMakeLists.txt
+index af09ebb..f9a8017 100644
+--- a/ebur128/CMakeLists.txt
++++ b/ebur128/CMakeLists.txt
+@@ -59,3 +59,9 @@ if(BUILD_STATIC_LIBS)
+ else()
+ install(TARGETS ebur128 DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ endif()
++
++#### pkg-config
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libebur128.pc.cmake
++ ${CMAKE_CURRENT_BINARY_DIR}/libebur128.pc @ONLY)
++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libebur128.pc"
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+diff --git a/ebur128/libebur128.pc.cmake b/ebur128/libebur128.pc.cmake
+new file mode 100644
+index 0000000..017fdeb
+--- /dev/null
++++ b/ebur128/libebur128.pc.cmake
+@@ -0,0 +1,11 @@
++prefix=@CMAKE_INSTALL_PREFIX@
++includedir=${prefix}/include
++libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
++
++Name: libebur128
++Description: EBU R 128 standard for loudness normalisation
++Version: @EBUR128_VERSION@
++URL: https://github.com/jiixyj/libebur128
++Libs: -L${libdir} -lebur128
++Libs.private: -lm
++Cflags: -I${includedir}