Line 0
Link Here
|
|
|
1 |
# Copyright 1999-2021 Gentoo Authors |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
|
4 |
EAPI=7 |
5 |
|
6 |
inherit flag-o-matic |
7 |
|
8 |
DESCRIPTION="Reverse-engineered aptX and aptX HD library" |
9 |
HOMEPAGE="https://github.com/pali/libopenaptx" |
10 |
|
11 |
if [[ ${PV} == "9999" ]] ; then |
12 |
inherit git-r3 |
13 |
EGIT_REPO_URI="https://github.com/pali/${PN}" |
14 |
else |
15 |
SRC_URI="https://github.com/pali/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
16 |
KEYWORDS="~amd64 ~x86" |
17 |
fi |
18 |
IUSE="cpu_flags_x86_avx2" |
19 |
|
20 |
LICENSE="LGPL-2.1" |
21 |
SLOT="0" |
22 |
|
23 |
RDEPEND="" |
24 |
DEPEND="${RDEPEND}" |
25 |
|
26 |
src_compile() { |
27 |
use cpu_flags_x86_avx2 && append-cflags "-mavx2" |
28 |
|
29 |
emake PREFIX="${EPREFIX}"/usr DESTDIR="${D}" LIBDIR=$(get_libdir) \ |
30 |
CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" ARFLAGS="$ARFLAGS -rcs" all |
31 |
} |
32 |
|
33 |
src_install() { |
34 |
emake PREFIX="${EPREFIX}"/usr DESTDIR="${D}" LIBDIR=$(get_libdir) \ |
35 |
CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" ARFLAGS="$ARFLAGS -rcs" install |
36 |
|
37 |
#rm static lib |
38 |
rm -f "${D}/usr/$(get_libdir)"/libopenaptx.a || die "rm libopenaptx.a" |
39 |
} |