1 |
commit: 0e59fbe612bb92f9c8625dc187a5420a018df934 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jun 10 22:21:12 2018 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jun 10 22:30:13 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e59fbe6 |
7 |
|
8 |
media-libs/soxr: Fix pkgconfig w/ USE=examples |
9 |
|
10 |
Thanks-to: PhobosK <phobosk <AT> fastmail.fm> |
11 |
Closes: https://bugs.gentoo.org/657300 |
12 |
Closes: https://bugs.gentoo.org/650748 |
13 |
Closes: https://bugs.gentoo.org/651116 |
14 |
Package-Manager: Portage-2.3.40, Repoman-2.3.9 |
15 |
|
16 |
.../soxr/files/soxr-0.1.3-fix-pkgconfig.patch | 25 +++++++++++ |
17 |
media-libs/soxr/soxr-0.1.3-r1.ebuild | 51 ++++++++++++++++++++++ |
18 |
2 files changed, 76 insertions(+) |
19 |
|
20 |
diff --git a/media-libs/soxr/files/soxr-0.1.3-fix-pkgconfig.patch b/media-libs/soxr/files/soxr-0.1.3-fix-pkgconfig.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..60818f5405d |
23 |
--- /dev/null |
24 |
+++ b/media-libs/soxr/files/soxr-0.1.3-fix-pkgconfig.patch |
25 |
@@ -0,0 +1,25 @@ |
26 |
+Fix pkgconfig 'Version' w/ USE=examples |
27 |
+https://bugs.gentoo.org/657300 |
28 |
+ |
29 |
+--- a/CMakeLists.txt 2018-02-23 23:39:25.000000000 +0200 |
30 |
++++ b/CMakeLists.txt 2018-06-03 22:26:38.673844365 +0300 |
31 |
+@@ -3,7 +3,7 @@ |
32 |
+ |
33 |
+ cmake_minimum_required (VERSION 3.1 FATAL_ERROR) |
34 |
+ |
35 |
+-project (soxr C) |
36 |
++project (soxr) |
37 |
+ set (DESCRIPTION_SUMMARY |
38 |
+ "High quality, one-dimensional sample-rate conversion library") |
39 |
+ |
40 |
+@@ -100,10 +100,6 @@ |
41 |
+ set (LIBM_LIBRARIES m) |
42 |
+ endif () |
43 |
+ |
44 |
+-if (${BUILD_EXAMPLES}) |
45 |
+- project (${PROJECT_NAME}) # Adds c++ compiler |
46 |
+-endif () |
47 |
+- |
48 |
+ if (WITH_OPENMP) |
49 |
+ find_package (OpenMP) |
50 |
+ if (OPENMP_FOUND) |
51 |
|
52 |
diff --git a/media-libs/soxr/soxr-0.1.3-r1.ebuild b/media-libs/soxr/soxr-0.1.3-r1.ebuild |
53 |
new file mode 100644 |
54 |
index 00000000000..4c035c41674 |
55 |
--- /dev/null |
56 |
+++ b/media-libs/soxr/soxr-0.1.3-r1.ebuild |
57 |
@@ -0,0 +1,51 @@ |
58 |
+# Copyright 1999-2018 Gentoo Foundation |
59 |
+# Distributed under the terms of the GNU General Public License v2 |
60 |
+ |
61 |
+EAPI=6 |
62 |
+ |
63 |
+inherit cmake-multilib |
64 |
+ |
65 |
+MY_P="${P}-Source" |
66 |
+DESCRIPTION="SoX Resampler library" |
67 |
+HOMEPAGE="https://sourceforge.net/p/soxr/wiki/Home/" |
68 |
+SRC_URI="mirror://sourceforge/soxr/${MY_P}.tar.xz" |
69 |
+ |
70 |
+LICENSE="LGPL-2.1" |
71 |
+SLOT="0" |
72 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd" |
73 |
+IUSE="examples test" |
74 |
+ |
75 |
+# CMakeLists.txt builds examples if either test or examples USE flag is enabled. |
76 |
+REQUIRED_USE="test? ( examples )" |
77 |
+ |
78 |
+DEPEND="" |
79 |
+RDEPEND="${DEPEND}" |
80 |
+ |
81 |
+S="${WORKDIR}/${MY_P}" |
82 |
+ |
83 |
+DOCS=( README TODO NEWS AUTHORS ) |
84 |
+ |
85 |
+PATCHES=( |
86 |
+ "${FILESDIR}/nodoc.patch" |
87 |
+ "${FILESDIR}/${P}-fix-pkgconfig.patch" |
88 |
+) |
89 |
+ |
90 |
+src_configure() { |
91 |
+ local mycmakeargs=( |
92 |
+ -DBUILD_EXAMPLES="$(usex examples)" |
93 |
+ -DBUILD_TESTS="$(usex test)" |
94 |
+ ) |
95 |
+ if use examples ; then |
96 |
+ mycmakeargs+=( |
97 |
+ -DDOC_INSTALL_DIR="/usr/share/doc/${PF}" |
98 |
+ ) |
99 |
+ fi |
100 |
+ cmake-multilib_src_configure |
101 |
+} |
102 |
+ |
103 |
+src_install() { |
104 |
+ cmake-multilib_src_install |
105 |
+ if use examples ; then |
106 |
+ docompress -x /usr/share/doc/${PF}/examples |
107 |
+ fi |
108 |
+} |