diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2018-06-11 00:21:12 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2018-06-11 00:30:13 +0200 |
commit | 0e59fbe612bb92f9c8625dc187a5420a018df934 (patch) | |
tree | 868f12e0aca9bb05068d324fedad93c9677b19cb /media-libs/soxr | |
parent | dev-perl/IPC-Signal: stable 1.0.0-r2 for ia64, bug #657684 (diff) | |
download | gentoo-0e59fbe612bb92f9c8625dc187a5420a018df934.tar.gz gentoo-0e59fbe612bb92f9c8625dc187a5420a018df934.tar.bz2 gentoo-0e59fbe612bb92f9c8625dc187a5420a018df934.zip |
media-libs/soxr: Fix pkgconfig w/ USE=examples
Thanks-to: PhobosK <phobosk@fastmail.fm>
Closes: https://bugs.gentoo.org/657300
Closes: https://bugs.gentoo.org/650748
Closes: https://bugs.gentoo.org/651116
Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'media-libs/soxr')
-rw-r--r-- | media-libs/soxr/files/soxr-0.1.3-fix-pkgconfig.patch | 25 | ||||
-rw-r--r-- | media-libs/soxr/soxr-0.1.3-r1.ebuild | 51 |
2 files changed, 76 insertions, 0 deletions
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 new file mode 100644 index 000000000000..60818f5405d7 --- /dev/null +++ b/media-libs/soxr/files/soxr-0.1.3-fix-pkgconfig.patch @@ -0,0 +1,25 @@ +Fix pkgconfig 'Version' w/ USE=examples +https://bugs.gentoo.org/657300 + +--- a/CMakeLists.txt 2018-02-23 23:39:25.000000000 +0200 ++++ b/CMakeLists.txt 2018-06-03 22:26:38.673844365 +0300 +@@ -3,7 +3,7 @@ + + cmake_minimum_required (VERSION 3.1 FATAL_ERROR) + +-project (soxr C) ++project (soxr) + set (DESCRIPTION_SUMMARY + "High quality, one-dimensional sample-rate conversion library") + +@@ -100,10 +100,6 @@ + set (LIBM_LIBRARIES m) + endif () + +-if (${BUILD_EXAMPLES}) +- project (${PROJECT_NAME}) # Adds c++ compiler +-endif () +- + if (WITH_OPENMP) + find_package (OpenMP) + if (OPENMP_FOUND) diff --git a/media-libs/soxr/soxr-0.1.3-r1.ebuild b/media-libs/soxr/soxr-0.1.3-r1.ebuild new file mode 100644 index 000000000000..4c035c416747 --- /dev/null +++ b/media-libs/soxr/soxr-0.1.3-r1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit cmake-multilib + +MY_P="${P}-Source" +DESCRIPTION="SoX Resampler library" +HOMEPAGE="https://sourceforge.net/p/soxr/wiki/Home/" +SRC_URI="mirror://sourceforge/soxr/${MY_P}.tar.xz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd" +IUSE="examples test" + +# CMakeLists.txt builds examples if either test or examples USE flag is enabled. +REQUIRED_USE="test? ( examples )" + +DEPEND="" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}" + +DOCS=( README TODO NEWS AUTHORS ) + +PATCHES=( + "${FILESDIR}/nodoc.patch" + "${FILESDIR}/${P}-fix-pkgconfig.patch" +) + +src_configure() { + local mycmakeargs=( + -DBUILD_EXAMPLES="$(usex examples)" + -DBUILD_TESTS="$(usex test)" + ) + if use examples ; then + mycmakeargs+=( + -DDOC_INSTALL_DIR="/usr/share/doc/${PF}" + ) + fi + cmake-multilib_src_configure +} + +src_install() { + cmake-multilib_src_install + if use examples ; then + docompress -x /usr/share/doc/${PF}/examples + fi +} |