summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor V. Kovalenko <igor.v.kovalenko@gmail.com>2022-02-14 21:44:57 +0300
committerSam James <sam@gentoo.org>2022-03-08 13:32:17 +0000
commitbba8613d14afbf44862902f028285bcee5fe1450 (patch)
tree2c3ca4715506e3ca99e1e3cc5b868840950613d8 /media-libs/libfreeaptx/libfreeaptx-0.1.1-r1.ebuild
parentmedia-libs/libopenaptx: Change to multilib build (diff)
downloadgentoo-bba8613d14afbf44862902f028285bcee5fe1450.tar.gz
gentoo-bba8613d14afbf44862902f028285bcee5fe1450.tar.bz2
gentoo-bba8613d14afbf44862902f028285bcee5fe1450.zip
media-libs/libfreeaptx: Change to multilib build
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/libfreeaptx/libfreeaptx-0.1.1-r1.ebuild')
-rw-r--r--media-libs/libfreeaptx/libfreeaptx-0.1.1-r1.ebuild57
1 files changed, 57 insertions, 0 deletions
diff --git a/media-libs/libfreeaptx/libfreeaptx-0.1.1-r1.ebuild b/media-libs/libfreeaptx/libfreeaptx-0.1.1-r1.ebuild
new file mode 100644
index 000000000000..349cf9fa588b
--- /dev/null
+++ b/media-libs/libfreeaptx/libfreeaptx-0.1.1-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic multilib-minimal toolchain-funcs
+
+DESCRIPTION="Reverse-engineered aptX and aptX HD library (fork of libopenaptx)"
+HOMEPAGE="https://github.com/iamthehorker/libfreeaptx"
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/iamthehorker/${PN}"
+else
+ SRC_URI="https://github.com/iamthehorker/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="amd64 arm arm64 ppc ~ppc64 ~riscv x86"
+fi
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+IUSE="cpu_flags_x86_avx2"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fix-version.patch
+)
+
+src_prepare() {
+ default
+
+ # custom Makefiles
+ multilib_copy_sources
+}
+
+multilib_src_compile() {
+ tc-export CC AR
+
+ use cpu_flags_x86_avx2 && append-cflags "-mavx2"
+
+ emake \
+ PREFIX="${EPREFIX}"/usr \
+ LIBDIR=$(get_libdir) \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ ARFLAGS="${ARFLAGS} -rcs" \
+ all
+}
+
+multilib_src_install() {
+ emake \
+ PREFIX="${EPREFIX}"/usr \
+ DESTDIR="${D}" \
+ LIBDIR="$(get_libdir)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ ARFLAGS="${ARFLAGS} -rcs" \
+ install
+}