From: "Daniel Campbell" <zlg@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/apulse/, media-sound/apulse/files/
Date: Thu, 27 Aug 2015 07:26:00 +0000 (UTC) [thread overview]
Message-ID: <1440660349.7345c7f2d1f42ec82330796f3b8cda8b6d558a49.zlg@gentoo> (raw)
commit: 7345c7f2d1f42ec82330796f3b8cda8b6d558a49
Author: Daniel Campbell <zlg <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 27 07:25:49 2015 +0000
Commit: Daniel Campbell <zlg <AT> gentoo <DOT> org>
CommitDate: Thu Aug 27 07:25:49 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7345c7f2
media-sound/apulse: Fix ebuild and script to support all ABIs
Prior solution was over-engineered and didn't cover all cases.
Thanks mgorny and jcallen for the assistance.
Gentoo-Bug: 547524
Package-Manager: portage-2.2.20.1
media-sound/apulse/apulse-0.1.6-r1.ebuild | 8 +++++++-
media-sound/apulse/files/apulse | 32 +++----------------------------
2 files changed, 10 insertions(+), 30 deletions(-)
diff --git a/media-sound/apulse/apulse-0.1.6-r1.ebuild b/media-sound/apulse/apulse-0.1.6-r1.ebuild
index 2f68179..8324b90 100644
--- a/media-sound/apulse/apulse-0.1.6-r1.ebuild
+++ b/media-sound/apulse/apulse-0.1.6-r1.ebuild
@@ -25,9 +25,15 @@ multilib_src_configure() {
local mycmakeargs="-DAPULSEPATH=${EPREFIX}/usr/$(get_libdir)/apulse"
cmake-utils_src_configure
+
+ # Ensure all relevant libdirs are added
+ 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
}
multilib_src_install() {
cmake-utils_src_install
- dobin "${FILESDIR}"/apulse
+ dobin "${T}"/apulse
}
diff --git a/media-sound/apulse/files/apulse b/media-sound/apulse/files/apulse
index f419565..32633b2 100755
--- a/media-sound/apulse/files/apulse
+++ b/media-sound/apulse/files/apulse
@@ -9,32 +9,6 @@ if [ $# -lt 1 ]; then
exit
fi
-# Get the full path of our application
-app_path=$(which ${1} 2>/dev/null)
-
-# The app might not be picked up by `which`, so let's use realpath as a backup
-[ -z ${app_path} ] && app_path=$(realpath ${1})
-
-# Then make sure it's executable
-[ ! -x ${app_path} ] && echo "${app_path} is not executable!" && exit 8
-
-# Fetch the app's ABI
-app_abi=$(file -L ${app_path} | sed 's/\([^,]*\), \([^,]*\), \(.*\)/\2/')
-
-# Determine libdir based on app_abi
-# Applications that don't have a header will default to native libdir
-case $app_abi in
- Intel\ 80386)
- APULSE_ABI="32"
- ;;
- x86-64)
- APULSE_ABI="64"
- ;;
- *)
- APULSE_ABI=$(readlink /usr/lib)
- APULSE_ABI=${APULSE_ABI#lib}
- ;;
-esac
-
-# Set library path for the application so it'll use apulse
-LD_LIBRARY_PATH=/usr/lib${APULSE_ABI}/apulse${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} exec "$@"
+# Set library path for the application so it'll use apulse. DIRS is
+# replaced by the ebuild to include the correct paths
+LD_LIBRARY_PATH=@@DIRS@@${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} exec "$@"
next reply other threads:[~2015-08-27 7:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-27 7:26 Daniel Campbell [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-06-07 13:15 [gentoo-commits] repo/gentoo:master commit in: media-sound/apulse/, media-sound/apulse/files/ Joonas Niilola
2020-05-10 22:28 Andrew Savchenko
2018-09-22 20:53 Andrew Savchenko
2015-08-24 9:41 Daniel Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1440660349.7345c7f2d1f42ec82330796f3b8cda8b6d558a49.zlg@gentoo \
--to=zlg@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox