diff options
author | Sam James <sam@gentoo.org> | 2021-08-23 04:14:00 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-08-23 04:14:03 +0100 |
commit | 61790034799954c4799fa3fc68d45ccc47282d52 (patch) | |
tree | b7524bd589ac4b3d37bbe0d74bd74d7f9d686a23 /media-libs/libfreeaptx | |
parent | dev-libs/libpcre2: clarify subslot meaning in metadata.xml (diff) | |
download | gentoo-61790034799954c4799fa3fc68d45ccc47282d52.tar.gz gentoo-61790034799954c4799fa3fc68d45ccc47282d52.tar.bz2 gentoo-61790034799954c4799fa3fc68d45ccc47282d52.zip |
media-libs/libfreeaptx: initial import (fork of media-libs/libopenaptx)
Bug: https://bugs.gentoo.org/791259
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/libfreeaptx')
-rw-r--r-- | media-libs/libfreeaptx/Manifest | 1 | ||||
-rw-r--r-- | media-libs/libfreeaptx/files/libfreeaptx-0.1.1-fix-version.patch | 20 | ||||
-rw-r--r-- | media-libs/libfreeaptx/libfreeaptx-0.1.1.ebuild | 50 | ||||
-rw-r--r-- | media-libs/libfreeaptx/libfreeaptx-9999.ebuild | 49 | ||||
-rw-r--r-- | media-libs/libfreeaptx/metadata.xml | 15 |
5 files changed, 135 insertions, 0 deletions
diff --git a/media-libs/libfreeaptx/Manifest b/media-libs/libfreeaptx/Manifest new file mode 100644 index 000000000000..308669f5c726 --- /dev/null +++ b/media-libs/libfreeaptx/Manifest @@ -0,0 +1 @@ +DIST libfreeaptx-0.1.1.tar.gz 27902 BLAKE2B 0aa015b0317db7f6dd61ae667cc1b7b10c7f7457d057144c1457572a214891848b81512960eb8643138c638a0f691b53a7bbcb36ad434ac29335d92b108a43fa SHA512 53dd7f348120fea0425b365f26668925dd435a8a3a0c5e98476764a452c7d729f2a3556e953c557d0ccaaa65391265c8c3c61fc29377cf60079fa0bed2cc20b1 diff --git a/media-libs/libfreeaptx/files/libfreeaptx-0.1.1-fix-version.patch b/media-libs/libfreeaptx/files/libfreeaptx-0.1.1-fix-version.patch new file mode 100644 index 000000000000..0a738fd9c81a --- /dev/null +++ b/media-libs/libfreeaptx/files/libfreeaptx-0.1.1-fix-version.patch @@ -0,0 +1,20 @@ +Report the correct version rather than the old libopenaptx version (left over from the fork point). +https://github.com/iamthehorker/libfreeaptx/commit/c176b7de9c2017d0fc1877659cea3bb6c330aafa.patch + +From: Hunter <wardlawhunter@gmail.com> +Date: Mon, 9 Aug 2021 23:51:49 -0400 +Subject: [PATCH] Fixed libfreeaptx reporting wrong version number + +--- a/freeaptx.h ++++ b/freeaptx.h +@@ -22,8 +22,8 @@ + #define freeaptx_H + + #define freeaptx_MAJOR 0 +-#define freeaptx_MINOR 2 +-#define freeaptx_PATCH 0 ++#define freeaptx_MINOR 1 ++#define freeaptx_PATCH 1 + + #include <stddef.h> + diff --git a/media-libs/libfreeaptx/libfreeaptx-0.1.1.ebuild b/media-libs/libfreeaptx/libfreeaptx-0.1.1.ebuild new file mode 100644 index 000000000000..e761be0ee4d6 --- /dev/null +++ b/media-libs/libfreeaptx/libfreeaptx-0.1.1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic 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" +fi + +LICENSE="LGPL-2.1+" +SLOT="0" +IUSE="cpu_flags_x86_avx2" + +PATCHES=( + "${FILESDIR}"/${P}-fix-version.patch +) + +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 +} + +src_install() { + emake \ + PREFIX="${EPREFIX}"/usr \ + DESTDIR="${D}" \ + LIBDIR="$(get_libdir)" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + ARFLAGS="${ARFLAGS} -rcs" \ + install +} diff --git a/media-libs/libfreeaptx/libfreeaptx-9999.ebuild b/media-libs/libfreeaptx/libfreeaptx-9999.ebuild new file mode 100644 index 000000000000..f849a9cc545a --- /dev/null +++ b/media-libs/libfreeaptx/libfreeaptx-9999.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic 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" +fi + +LICENSE="LGPL-2.1+" +SLOT="0" + +IUSE="cpu_flags_x86_avx2" + +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 +} + +src_install() { + 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/libfreeaptx/metadata.xml b/media-libs/libfreeaptx/metadata.xml new file mode 100644 index 000000000000..889e237efe92 --- /dev/null +++ b/media-libs/libfreeaptx/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>sam@gentoo.org</email> + <name>Sam James</name> + </maintainer> + <maintainer type="project"> + <email>codec@gentoo.org</email> + <name>Gentoo Codec Project</name> + </maintainer> + <upstream> + <remote-id type="github">iamthehorker/libfreeaptx</remote-id> + </upstream> +</pkgmetadata> |