diff options
author | Sam James <sam@gentoo.org> | 2021-03-17 01:19:47 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-03-17 01:22:01 +0000 |
commit | 99aeb4db26dbd9fc4cc19b915349e6060c3cd0b4 (patch) | |
tree | 1d04e0e56d9f4381b4c6de7cabcbece5fd87e998 /media-libs/libopenaptx | |
parent | media-libs/libopenaptx: update maintainers (me then codec@) (diff) | |
download | gentoo-99aeb4db26dbd9fc4cc19b915349e6060c3cd0b4.tar.gz gentoo-99aeb4db26dbd9fc4cc19b915349e6060c3cd0b4.tar.bz2 gentoo-99aeb4db26dbd9fc4cc19b915349e6060c3cd0b4.zip |
media-libs/libopenaptx: fixes to prepare for tree
* Update LICENSE to LGPL-2.1+
* Respect CC and AR
* Drop ~x86 keyword until tested
* Style changes (inc. block structure, variable style)
* Don't use ${D} in src_compile
Bug: https://bugs.gentoo.org/758377
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/libopenaptx')
-rw-r--r-- | media-libs/libopenaptx/libopenaptx-0.2.0.ebuild | 36 | ||||
-rw-r--r-- | media-libs/libopenaptx/libopenaptx-9999.ebuild | 36 |
2 files changed, 46 insertions, 26 deletions
diff --git a/media-libs/libopenaptx/libopenaptx-0.2.0.ebuild b/media-libs/libopenaptx/libopenaptx-0.2.0.ebuild index 7ebf9df70515..bac055db1328 100644 --- a/media-libs/libopenaptx/libopenaptx-0.2.0.ebuild +++ b/media-libs/libopenaptx/libopenaptx-0.2.0.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit flag-o-matic +inherit flag-o-matic toolchain-funcs DESCRIPTION="Reverse-engineered aptX and aptX HD library" HOMEPAGE="https://github.com/pali/libopenaptx" @@ -13,27 +13,37 @@ if [[ ${PV} == "9999" ]] ; then EGIT_REPO_URI="https://github.com/pali/${PN}" else SRC_URI="https://github.com/pali/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~x86" + KEYWORDS="~amd64" fi -IUSE="cpu_flags_x86_avx2" -LICENSE="LGPL-2.1" +LICENSE="LGPL-2.1+" SLOT="0" -RDEPEND="" -DEPEND="${RDEPEND}" +IUSE="cpu_flags_x86_avx2" src_compile() { + tc-export CC AR + use cpu_flags_x86_avx2 && append-cflags "-mavx2" - emake PREFIX="${EPREFIX}"/usr DESTDIR="${D}" LIBDIR=$(get_libdir) \ - CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" ARFLAGS="$ARFLAGS -rcs" all + emake \ + PREFIX="${EPREFIX}"/usr \ + LIBDIR=$(get_libdir) \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + ARFLAGS="${ARFLAGS} -rcs" \ + all } src_install() { - emake PREFIX="${EPREFIX}"/usr DESTDIR="${D}" LIBDIR=$(get_libdir) \ - CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" ARFLAGS="$ARFLAGS -rcs" install - - #rm static lib - rm -f "${D}/usr/$(get_libdir)"/libopenaptx.a || die "rm libopenaptx.a" + emake \ + PREFIX="${EPREFIX}"/usr \ + DESTDIR="${D}" \ + LIBDIR="$(get_libdir)" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + ARFLAGS="${ARFLAGS} -rcs" \ + install + + rm -f "${ED}/usr/$(get_libdir)"/libopenaptx.a || die "Failed to remove static lib" } diff --git a/media-libs/libopenaptx/libopenaptx-9999.ebuild b/media-libs/libopenaptx/libopenaptx-9999.ebuild index 7ebf9df70515..bac055db1328 100644 --- a/media-libs/libopenaptx/libopenaptx-9999.ebuild +++ b/media-libs/libopenaptx/libopenaptx-9999.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit flag-o-matic +inherit flag-o-matic toolchain-funcs DESCRIPTION="Reverse-engineered aptX and aptX HD library" HOMEPAGE="https://github.com/pali/libopenaptx" @@ -13,27 +13,37 @@ if [[ ${PV} == "9999" ]] ; then EGIT_REPO_URI="https://github.com/pali/${PN}" else SRC_URI="https://github.com/pali/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~x86" + KEYWORDS="~amd64" fi -IUSE="cpu_flags_x86_avx2" -LICENSE="LGPL-2.1" +LICENSE="LGPL-2.1+" SLOT="0" -RDEPEND="" -DEPEND="${RDEPEND}" +IUSE="cpu_flags_x86_avx2" src_compile() { + tc-export CC AR + use cpu_flags_x86_avx2 && append-cflags "-mavx2" - emake PREFIX="${EPREFIX}"/usr DESTDIR="${D}" LIBDIR=$(get_libdir) \ - CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" ARFLAGS="$ARFLAGS -rcs" all + emake \ + PREFIX="${EPREFIX}"/usr \ + LIBDIR=$(get_libdir) \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + ARFLAGS="${ARFLAGS} -rcs" \ + all } src_install() { - emake PREFIX="${EPREFIX}"/usr DESTDIR="${D}" LIBDIR=$(get_libdir) \ - CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" ARFLAGS="$ARFLAGS -rcs" install - - #rm static lib - rm -f "${D}/usr/$(get_libdir)"/libopenaptx.a || die "rm libopenaptx.a" + emake \ + PREFIX="${EPREFIX}"/usr \ + DESTDIR="${D}" \ + LIBDIR="$(get_libdir)" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + ARFLAGS="${ARFLAGS} -rcs" \ + install + + rm -f "${ED}/usr/$(get_libdir)"/libopenaptx.a || die "Failed to remove static lib" } |