summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Savchenko <bircoph@gentoo.org>2018-09-25 17:24:00 +0300
committerAndrew Savchenko <bircoph@gentoo.org>2018-09-25 17:25:51 +0300
commit78bff4dfac8ced74932a4311400b359d307b306d (patch)
treefa80cbb20572d90571143ecde49e12af2657540f /media-sound/apulse/apulse-0.1.12-r4.ebuild
parentnet-dns/bind-tools: Bump to versions 9.11.4_p2 and 9.12.2_p2 (diff)
downloadgentoo-78bff4dfac8ced74932a4311400b359d307b306d.tar.gz
gentoo-78bff4dfac8ced74932a4311400b359d307b306d.tar.bz2
gentoo-78bff4dfac8ced74932a4311400b359d307b306d.zip
media-sound/apulse: fix wrapper installation on multilib setups
Wrapper installation was broken on multilib setups with newest bash versions. In order to avoid environment driven eclass problems manual installation of required wrappers is added. Thanks Karl-Johan Karlsson (creideiki+gentoo-bugzilla_lysator.liu.se) for detailed reporting and testing. Closes: https://bugs.gentoo.org/666884 Signed-off-by: Andrew Savchenko <bircoph@gentoo.org> Package-Manager: Portage-2.3.49, Repoman-2.3.10
Diffstat (limited to 'media-sound/apulse/apulse-0.1.12-r4.ebuild')
-rw-r--r--media-sound/apulse/apulse-0.1.12-r4.ebuild63
1 files changed, 63 insertions, 0 deletions
diff --git a/media-sound/apulse/apulse-0.1.12-r4.ebuild b/media-sound/apulse/apulse-0.1.12-r4.ebuild
new file mode 100644
index 000000000000..46b1d98a51ad
--- /dev/null
+++ b/media-sound/apulse/apulse-0.1.12-r4.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib cmake-multilib
+
+DESCRIPTION="PulseAudio emulation for ALSA"
+HOMEPAGE="https://github.com/i-rinat/apulse"
+SRC_URI="https://github.com/i-rinat/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="debug sdk test"
+
+DEPEND="dev-libs/glib:2[${MULTILIB_USEDEP}]
+ media-libs/alsa-lib[${MULTILIB_USEDEP}]
+ sdk? ( !media-sound/pulseaudio ) "
+RDEPEND="${DEPEND}
+ !!media-plugins/alsa-plugins[pulseaudio]"
+
+PATCHES=( "${FILESDIR}/sdk.patch" )
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ if ! use sdk; then
+ # Ensure all relevant libdirs are added, to support all ABIs
+ DIRS=
+ _add_dir() { DIRS="${EPREFIX}/usr/$(get_libdir)/apulse${DIRS:+:${DIRS}}"; }
+ multilib_foreach_abi _add_dir
+ sed -e "s#@@DIRS@@#${DIRS}#g" "${FILESDIR}"/apulse > "${T}"/apulse || die
+ fi
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ "-DINSTALL_SDK=$(usex sdk)"
+ "-DLOG_TO_STDERR=$(usex debug)"
+ "-DWITH_TRACE=$(usex debug)"
+ )
+ cmake-utils_src_configure
+}
+
+multilib_src_test() {
+ emake check
+}
+
+multilib_src_install_all() {
+ cmake-utils_src_install
+ # The easiest way would be setting MULTILIB_CHOST_TOOLS at global scope, depending
+ # on USE=sdk, but this is no longer permitted, so workaround is required.
+ # See bug 666884 for details.
+ if ! use sdk; then
+ unset BUILD_DIR
+ _install_wrapper() { newbin "${BUILD_DIR}/apulse" "${CHOST}-apulse"; }
+ multilib_foreach_abi _install_wrapper
+ dobin "${T}/apulse"
+ fi
+ einstalldocs
+}