summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2016-02-24 11:26:30 +0100
committerAlexis Ballier <aballier@gentoo.org>2016-02-24 11:39:23 +0100
commit8c33bb965ecb410f52bc2964f1884a30e5902d5d (patch)
tree0a34b48443c463e68b5e4b3495b6c669a4f0fda4 /media-sound/dcadec
parentnet-fs/cifs-utils: Removed old. (diff)
downloadgentoo-8c33bb965ecb410f52bc2964f1884a30e5902d5d.tar.gz
gentoo-8c33bb965ecb410f52bc2964f1884a30e5902d5d.tar.bz2
gentoo-8c33bb965ecb410f52bc2964f1884a30e5902d5d.zip
media-sound/dcadec: convert to multilib and build shared libs.
Package-Manager: portage-2.2.27 Signed-off-by: Alexis Ballier <aballier@gentoo.org>
Diffstat (limited to 'media-sound/dcadec')
-rw-r--r--media-sound/dcadec/dcadec-0.2.0.ebuild32
1 files changed, 25 insertions, 7 deletions
diff --git a/media-sound/dcadec/dcadec-0.2.0.ebuild b/media-sound/dcadec/dcadec-0.2.0.ebuild
index d93dc26aa6d..dbd688612d1 100644
--- a/media-sound/dcadec/dcadec-0.2.0.ebuild
+++ b/media-sound/dcadec/dcadec-0.2.0.ebuild
@@ -4,7 +4,7 @@
EAPI="5"
-inherit toolchain-funcs multilib
+inherit toolchain-funcs multilib multilib-minimal
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="git://github.com/foo86/dcadec.git"
@@ -20,18 +20,36 @@ HOMEPAGE="https://github.com/foo86/dcadec"
LICENSE="LGPL-2.1"
SLOT="0"
IUSE=""
+DOCS=( CHANGELOG.md README.md )
-src_configure() {
- tc-export AR CC
+src_prepare() {
sed -i \
- -e "/^PREFIX /s:=.*:= ${EPREFIX}/usr:" \
- -e "/^LIBDIR /s:/lib:/$(get_libdir):" \
-e '/^CFLAGS/s:-O3::' \
Makefile || die
}
-src_install() {
- default
+multilib_src_compile() {
+ # Build shared libs
+ echo 'CONFIG_SHARED=1' >> .config
+
+ local target=all
+ multilib_is_native_abi || target=lib
+ tc-export AR CC
+ PREFIX="${EPREFIX}/usr" LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ emake -f "${S}/Makefile" ${target}
+}
+
+multilib_src_install() {
+ local target=install
+ multilib_is_native_abi || target=install-lib
+ PREFIX="${EPREFIX}/usr" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ emake -f "${S}/Makefile" DESTDIR="${D}" ${target}
+}
+
+multilib_src_install_all() {
# Rename the executable since it conflicts with libdca.
mv "${ED}"/usr/bin/dcadec{,-new} || die
+
+ einstalldocs
}