Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libebur128/files/, media-libs/libebur128/
Date: Sat, 05 Aug 2017 11:54:46
Message-Id: 1501934067.79dddd4a1489e3155eb06139f084b9e0d4aa7c9c.asturm@gentoo
1 commit: 79dddd4a1489e3155eb06139f084b9e0d4aa7c9c
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 5 09:08:01 2017 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 5 11:54:27 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79dddd4a
7
8 media-libs/libebur128: 1.2.2 version bump
9
10 Additional upstream fixes to cmake and adding pkgconfig file.
11
12 Package-Manager: Portage-2.3.6, Repoman-2.3.1
13
14 media-libs/libebur128/Manifest | 1 +
15 .../libebur128/files/libebur128-1.2.2-cmake.patch | 52 ++++++++++++++++++++++
16 .../files/libebur128-1.2.2-pkgconfig.patch | 43 ++++++++++++++++++
17 media-libs/libebur128/libebur128-1.2.2.ebuild | 39 ++++++++++++++++
18 4 files changed, 135 insertions(+)
19
20 diff --git a/media-libs/libebur128/Manifest b/media-libs/libebur128/Manifest
21 index 76e751ea9c6..549751feae6 100644
22 --- a/media-libs/libebur128/Manifest
23 +++ b/media-libs/libebur128/Manifest
24 @@ -4,3 +4,4 @@ DIST libebur128-1.0.2.tar.gz 29794 SHA256 9b334d31a26b47ba6740bb7bbee7a24461d535
25 DIST libebur128-1.0.3.tar.gz 19804 SHA256 dd90d0e44bd4db1e038d990b4538a7317b2f44f29eaf2e206c247663234d9d52 SHA512 586ae80c31b9ef1d315821cef6901edd3f3d5309299411e969cce18cdc1911639971ad249b3b49edae9195b428557dbfa3281a5dc22da20a245e66c497eb0422 WHIRLPOOL c5d62232ed6bc05bf909a809fc38c15d79d1278ecc708ca94d4b41e37d38985d50764eeff9a6c5a4582baf3963864d512ba90d6b7a90c363b3bb334ebb860fda
26 DIST libebur128-1.1.0.tar.gz 19318 SHA256 c60e78f4bfda387a0895c64a4fc9850445e3a4425cc98f9140885966ce17c1d1 SHA512 13a0d92eae8d991a15cb090e5f3ca34fbe285bf7e8e01e10b5ccc8be4f066e8bbff6920370d4506284f02dbfca3a5189ddfe9135f195179d356257055768c08a WHIRLPOOL 0775f4b220a690310f736dccd1748fe48c643cf0889378b4238b7aa4cc57967fb77c81f28cd4bdd4de220e832c220d45524fd63834e6e5ce37cfe381118cc0eb
27 DIST libebur128-1.2.0.tar.gz 21690 SHA256 f4c4ce732ae085214bcc47349f89b61ed53c13721c097e01cb966533ee6b1e5b SHA512 70bae021e4a9c60e1eee5dd2ffb357bda007b9f29cda0a25b9ae453cf389661a238e6300a2bbfb323afe9b0955d2b8468fff91eb1bf2a3d665c9e32c5e80631d WHIRLPOOL 50a861a61bcb7028d6cf94ac669d3876199680f696eff09a699713cbc5047d863f337cebd54988e3061daa420f92454148f642c16fa4abe4e50da6ad1ff76c17
28 +DIST libebur128-1.2.2.tar.gz 21738 SHA256 1d0d7e855da04010a2432e11fbc596502caf11b61c3b571ccbcb10095fe44b43 SHA512 76cf92824498cc0f73676ce4bf8e58156a0b2d5c686c6a483bbbdba95f879d651a2a3bb3b836e6409e0821aa165dc3c71827f47fd952407fb3e421a0c2c7ebf6 WHIRLPOOL 3ff598a6c1c47bef493770fc139274e02e36b976785d5865df8556df0c3b782a6d9aebfebf6a5ef1e291f5db6c89156cc214e775885f24b0293653003e7fb3cf
29
30 diff --git a/media-libs/libebur128/files/libebur128-1.2.2-cmake.patch b/media-libs/libebur128/files/libebur128-1.2.2-cmake.patch
31 new file mode 100644
32 index 00000000000..9563ed15319
33 --- /dev/null
34 +++ b/media-libs/libebur128/files/libebur128-1.2.2-cmake.patch
35 @@ -0,0 +1,52 @@
36 +From d374f1983966fc3ff65bcd73e5f12d358c4f1273 Mon Sep 17 00:00:00 2001
37 +From: "Yann E. MORIN" <yann.morin.1998@××××.fr>
38 +Date: Sat, 4 Mar 2017 14:33:07 +0100
39 +Subject: [PATCH] CMakeList: do not overwrite module path
40 +
41 +Currently, the CMakeList.txt completely overwrites the CMAKE_MODULE_PATH
42 +variable.
43 +
44 +This is problematic when an upper-layer buildsystem wants to set its own
45 +module path to use custom modules.
46 +
47 +For example, Buildroot [0] provides a custom platform description [1] to
48 +fix cross-compilation issue. Overwriting the module path means that this
49 +custom platform description is not found:
50 +
51 + System is unknown to cmake, create:
52 + Platform/Buildroot to use this system, please send your config file
53 + to cmake@×××××××××.org so it can be added to cmake
54 +
55 +Providing such a custom platform description is what the upstream cmake
56 +devs suggest [2], quoting:
57 +
58 + If a toolchain file specifies CMAKE_SYSTEM_NAME such that a custom
59 + `Platform/MySystem.cmake` file is loaded then the latter can set
60 + them [*] as needed for the target platform.
61 +
62 +[*] offending settings causing RPATH issues during cross-compilation.
63 +
64 +So we need to append to the module path, rather than replace it blindly.
65 +
66 +[0] https://buildroot.org/
67 +[1] https://git.buildroot.org/buildroot/tree/support/misc/Buildroot.cmake
68 +[2] http://public.kitware.com/pipermail/cmake/2017-February/065063.html
69 +
70 +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@××××.fr>
71 +---
72 + CMakeLists.txt | 2 +-
73 + 1 file changed, 1 insertion(+), 1 deletion(-)
74 +
75 +diff --git a/CMakeLists.txt b/CMakeLists.txt
76 +index eea18a6..ff352eb 100644
77 +--- a/CMakeLists.txt
78 ++++ b/CMakeLists.txt
79 +@@ -1,7 +1,7 @@
80 + cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
81 + project(libebur128 C)
82 +
83 +-set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
84 ++list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
85 + set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
86 + set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
87 +
88
89 diff --git a/media-libs/libebur128/files/libebur128-1.2.2-pkgconfig.patch b/media-libs/libebur128/files/libebur128-1.2.2-pkgconfig.patch
90 new file mode 100644
91 index 00000000000..7382960711f
92 --- /dev/null
93 +++ b/media-libs/libebur128/files/libebur128-1.2.2-pkgconfig.patch
94 @@ -0,0 +1,43 @@
95 +From 13d70019c6d0e94b1ab71d0d2cf80023cc793071 Mon Sep 17 00:00:00 2001
96 +From: Sebastian Ramacher <sramacher@××××××.org>
97 +Date: Sat, 18 Feb 2017 01:13:03 +0100
98 +Subject: [PATCH] Add a pkg-config file (fixes #61)
99 +
100 +Signed-off-by: Sebastian Ramacher <sramacher@××××××.org>
101 +---
102 + ebur128/CMakeLists.txt | 6 ++++++
103 + ebur128/libebur128.pc.cmake | 11 +++++++++++
104 + 2 files changed, 17 insertions(+)
105 + create mode 100644 ebur128/libebur128.pc.cmake
106 +
107 +diff --git a/ebur128/CMakeLists.txt b/ebur128/CMakeLists.txt
108 +index af09ebb..f9a8017 100644
109 +--- a/ebur128/CMakeLists.txt
110 ++++ b/ebur128/CMakeLists.txt
111 +@@ -59,3 +59,9 @@ if(BUILD_STATIC_LIBS)
112 + else()
113 + install(TARGETS ebur128 DESTINATION ${CMAKE_INSTALL_LIBDIR})
114 + endif()
115 ++
116 ++#### pkg-config
117 ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libebur128.pc.cmake
118 ++ ${CMAKE_CURRENT_BINARY_DIR}/libebur128.pc @ONLY)
119 ++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libebur128.pc"
120 ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
121 +diff --git a/ebur128/libebur128.pc.cmake b/ebur128/libebur128.pc.cmake
122 +new file mode 100644
123 +index 0000000..017fdeb
124 +--- /dev/null
125 ++++ b/ebur128/libebur128.pc.cmake
126 +@@ -0,0 +1,11 @@
127 ++prefix=@CMAKE_INSTALL_PREFIX@
128 ++includedir=${prefix}/include
129 ++libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
130 ++
131 ++Name: libebur128
132 ++Description: EBU R 128 standard for loudness normalisation
133 ++Version: @EBUR128_VERSION@
134 ++URL: https://github.com/jiixyj/libebur128
135 ++Libs: -L${libdir} -lebur128
136 ++Libs.private: -lm
137 ++Cflags: -I${includedir}
138
139 diff --git a/media-libs/libebur128/libebur128-1.2.2.ebuild b/media-libs/libebur128/libebur128-1.2.2.ebuild
140 new file mode 100644
141 index 00000000000..d1e90f816a2
142 --- /dev/null
143 +++ b/media-libs/libebur128/libebur128-1.2.2.ebuild
144 @@ -0,0 +1,39 @@
145 +# Copyright 1999-2017 Gentoo Foundation
146 +# Distributed under the terms of the GNU General Public License v2
147 +
148 +EAPI=6
149 +
150 +inherit cmake-multilib
151 +
152 +DESCRIPTION="A library implementing the EBU R128 loudness standard"
153 +HOMEPAGE="https://github.com/jiixyj/libebur128"
154 +SRC_URI="https://github.com/jiixyj/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
155 + test? ( https://tech.ebu.ch/files/live/sites/tech/files/shared/testmaterial/ebu-loudness-test-setv05.zip )"
156 +
157 +LICENSE="MIT"
158 +SLOT="0/1"
159 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86"
160 +IUSE="static-libs test"
161 +
162 +DEPEND="test? ( app-arch/unzip
163 + media-libs/libsndfile[${MULTILIB_USEDEP}] )"
164 +
165 +PATCHES=(
166 + "${FILESDIR}/${P}-pkgconfig.patch"
167 + "${FILESDIR}/${P}-cmake.patch"
168 +)
169 +
170 +multilib_src_configure() {
171 + local mycmakeargs=(
172 + -DBUILD_STATIC_LIBS=$(usex static-libs)
173 + -DENABLE_TESTS=$(usex test)
174 + )
175 + cmake-utils_src_configure
176 +}
177 +
178 +multilib_src_test() {
179 + cd "${WORKDIR}"
180 + "${BUILD_DIR}"/r128-test-library | tee test-results
181 + grep -c "^FAILED" test-results > /dev/null \
182 + && die "At least one test failed"
183 +}