diff options
author | Joakim Tjernlund <Joakim.Tjernlund@infinera.com> | 2021-03-17 00:54:12 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-03-17 01:16:03 +0000 |
commit | f411b6a48680122d54db515b256edcfe706973a2 (patch) | |
tree | 330f2f127a3752407347b5cebf8da37354af0ce4 /media-libs/libopenaptx/libopenaptx-0.2.0.ebuild | |
parent | games-engines/box2d: Keyword 2.4.1 ppc64, #775848 (diff) | |
download | gentoo-f411b6a48680122d54db515b256edcfe706973a2.tar.gz gentoo-f411b6a48680122d54db515b256edcfe706973a2.tar.bz2 gentoo-f411b6a48680122d54db515b256edcfe706973a2.zip |
media-libs/libopenaptx: new package
* Add libopenaptx-0.2.0/9999 ebuilds
Closes: https://bugs.gentoo.org/758377
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/libopenaptx/libopenaptx-0.2.0.ebuild')
-rw-r--r-- | media-libs/libopenaptx/libopenaptx-0.2.0.ebuild | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/media-libs/libopenaptx/libopenaptx-0.2.0.ebuild b/media-libs/libopenaptx/libopenaptx-0.2.0.ebuild new file mode 100644 index 000000000000..7ebf9df70515 --- /dev/null +++ b/media-libs/libopenaptx/libopenaptx-0.2.0.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic + +DESCRIPTION="Reverse-engineered aptX and aptX HD library" +HOMEPAGE="https://github.com/pali/libopenaptx" + +if [[ ${PV} == "9999" ]] ; then + inherit git-r3 + 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" +fi +IUSE="cpu_flags_x86_avx2" + +LICENSE="LGPL-2.1" +SLOT="0" + +RDEPEND="" +DEPEND="${RDEPEND}" + +src_compile() { + 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 +} + +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" +} |