1 |
commit: 8c33bb965ecb410f52bc2964f1884a30e5902d5d |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 24 10:26:30 2016 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 24 10:39:23 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c33bb96 |
7 |
|
8 |
media-sound/dcadec: convert to multilib and build shared libs. |
9 |
|
10 |
Package-Manager: portage-2.2.27 |
11 |
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org> |
12 |
|
13 |
media-sound/dcadec/dcadec-0.2.0.ebuild | 32 +++++++++++++++++++++++++------- |
14 |
1 file changed, 25 insertions(+), 7 deletions(-) |
15 |
|
16 |
diff --git a/media-sound/dcadec/dcadec-0.2.0.ebuild b/media-sound/dcadec/dcadec-0.2.0.ebuild |
17 |
index d93dc26..dbd6886 100644 |
18 |
--- a/media-sound/dcadec/dcadec-0.2.0.ebuild |
19 |
+++ b/media-sound/dcadec/dcadec-0.2.0.ebuild |
20 |
@@ -4,7 +4,7 @@ |
21 |
|
22 |
EAPI="5" |
23 |
|
24 |
-inherit toolchain-funcs multilib |
25 |
+inherit toolchain-funcs multilib multilib-minimal |
26 |
|
27 |
if [[ ${PV} == "9999" ]] ; then |
28 |
EGIT_REPO_URI="git://github.com/foo86/dcadec.git" |
29 |
@@ -20,18 +20,36 @@ HOMEPAGE="https://github.com/foo86/dcadec" |
30 |
LICENSE="LGPL-2.1" |
31 |
SLOT="0" |
32 |
IUSE="" |
33 |
+DOCS=( CHANGELOG.md README.md ) |
34 |
|
35 |
-src_configure() { |
36 |
- tc-export AR CC |
37 |
+src_prepare() { |
38 |
sed -i \ |
39 |
- -e "/^PREFIX /s:=.*:= ${EPREFIX}/usr:" \ |
40 |
- -e "/^LIBDIR /s:/lib:/$(get_libdir):" \ |
41 |
-e '/^CFLAGS/s:-O3::' \ |
42 |
Makefile || die |
43 |
} |
44 |
|
45 |
-src_install() { |
46 |
- default |
47 |
+multilib_src_compile() { |
48 |
+ # Build shared libs |
49 |
+ echo 'CONFIG_SHARED=1' >> .config |
50 |
+ |
51 |
+ local target=all |
52 |
+ multilib_is_native_abi || target=lib |
53 |
+ tc-export AR CC |
54 |
+ PREFIX="${EPREFIX}/usr" LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ |
55 |
+ emake -f "${S}/Makefile" ${target} |
56 |
+} |
57 |
+ |
58 |
+multilib_src_install() { |
59 |
+ local target=install |
60 |
+ multilib_is_native_abi || target=install-lib |
61 |
+ PREFIX="${EPREFIX}/usr" \ |
62 |
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ |
63 |
+ emake -f "${S}/Makefile" DESTDIR="${D}" ${target} |
64 |
+} |
65 |
+ |
66 |
+multilib_src_install_all() { |
67 |
# Rename the executable since it conflicts with libdca. |
68 |
mv "${ED}"/usr/bin/dcadec{,-new} || die |
69 |
+ |
70 |
+ einstalldocs |
71 |
} |