1 |
commit: 61790034799954c4799fa3fc68d45ccc47282d52 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Aug 23 03:14:00 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 23 03:14:03 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61790034 |
7 |
|
8 |
media-libs/libfreeaptx: initial import (fork of media-libs/libopenaptx) |
9 |
|
10 |
Bug: https://bugs.gentoo.org/791259 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
media-libs/libfreeaptx/Manifest | 1 + |
14 |
.../files/libfreeaptx-0.1.1-fix-version.patch | 20 +++++++++ |
15 |
media-libs/libfreeaptx/libfreeaptx-0.1.1.ebuild | 50 ++++++++++++++++++++++ |
16 |
media-libs/libfreeaptx/libfreeaptx-9999.ebuild | 49 +++++++++++++++++++++ |
17 |
media-libs/libfreeaptx/metadata.xml | 15 +++++++ |
18 |
5 files changed, 135 insertions(+) |
19 |
|
20 |
diff --git a/media-libs/libfreeaptx/Manifest b/media-libs/libfreeaptx/Manifest |
21 |
new file mode 100644 |
22 |
index 00000000000..308669f5c72 |
23 |
--- /dev/null |
24 |
+++ b/media-libs/libfreeaptx/Manifest |
25 |
@@ -0,0 +1 @@ |
26 |
+DIST libfreeaptx-0.1.1.tar.gz 27902 BLAKE2B 0aa015b0317db7f6dd61ae667cc1b7b10c7f7457d057144c1457572a214891848b81512960eb8643138c638a0f691b53a7bbcb36ad434ac29335d92b108a43fa SHA512 53dd7f348120fea0425b365f26668925dd435a8a3a0c5e98476764a452c7d729f2a3556e953c557d0ccaaa65391265c8c3c61fc29377cf60079fa0bed2cc20b1 |
27 |
|
28 |
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 |
29 |
new file mode 100644 |
30 |
index 00000000000..0a738fd9c81 |
31 |
--- /dev/null |
32 |
+++ b/media-libs/libfreeaptx/files/libfreeaptx-0.1.1-fix-version.patch |
33 |
@@ -0,0 +1,20 @@ |
34 |
+Report the correct version rather than the old libopenaptx version (left over from the fork point). |
35 |
+https://github.com/iamthehorker/libfreeaptx/commit/c176b7de9c2017d0fc1877659cea3bb6c330aafa.patch |
36 |
+ |
37 |
+From: Hunter <wardlawhunter@×××××.com> |
38 |
+Date: Mon, 9 Aug 2021 23:51:49 -0400 |
39 |
+Subject: [PATCH] Fixed libfreeaptx reporting wrong version number |
40 |
+ |
41 |
+--- a/freeaptx.h |
42 |
++++ b/freeaptx.h |
43 |
+@@ -22,8 +22,8 @@ |
44 |
+ #define freeaptx_H |
45 |
+ |
46 |
+ #define freeaptx_MAJOR 0 |
47 |
+-#define freeaptx_MINOR 2 |
48 |
+-#define freeaptx_PATCH 0 |
49 |
++#define freeaptx_MINOR 1 |
50 |
++#define freeaptx_PATCH 1 |
51 |
+ |
52 |
+ #include <stddef.h> |
53 |
+ |
54 |
|
55 |
diff --git a/media-libs/libfreeaptx/libfreeaptx-0.1.1.ebuild b/media-libs/libfreeaptx/libfreeaptx-0.1.1.ebuild |
56 |
new file mode 100644 |
57 |
index 00000000000..e761be0ee4d |
58 |
--- /dev/null |
59 |
+++ b/media-libs/libfreeaptx/libfreeaptx-0.1.1.ebuild |
60 |
@@ -0,0 +1,50 @@ |
61 |
+# Copyright 1999-2021 Gentoo Authors |
62 |
+# Distributed under the terms of the GNU General Public License v2 |
63 |
+ |
64 |
+EAPI=7 |
65 |
+ |
66 |
+inherit flag-o-matic toolchain-funcs |
67 |
+ |
68 |
+DESCRIPTION="Reverse-engineered aptX and aptX HD library (fork of libopenaptx)" |
69 |
+HOMEPAGE="https://github.com/iamthehorker/libfreeaptx" |
70 |
+ |
71 |
+if [[ ${PV} == "9999" ]] ; then |
72 |
+ inherit git-r3 |
73 |
+ EGIT_REPO_URI="https://github.com/iamthehorker/${PN}" |
74 |
+else |
75 |
+ SRC_URI="https://github.com/iamthehorker/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
76 |
+ KEYWORDS="~amd64" |
77 |
+fi |
78 |
+ |
79 |
+LICENSE="LGPL-2.1+" |
80 |
+SLOT="0" |
81 |
+IUSE="cpu_flags_x86_avx2" |
82 |
+ |
83 |
+PATCHES=( |
84 |
+ "${FILESDIR}"/${P}-fix-version.patch |
85 |
+) |
86 |
+ |
87 |
+src_compile() { |
88 |
+ tc-export CC AR |
89 |
+ |
90 |
+ use cpu_flags_x86_avx2 && append-cflags "-mavx2" |
91 |
+ |
92 |
+ emake \ |
93 |
+ PREFIX="${EPREFIX}"/usr \ |
94 |
+ LIBDIR=$(get_libdir) \ |
95 |
+ CFLAGS="${CFLAGS}" \ |
96 |
+ LDFLAGS="${LDFLAGS}" \ |
97 |
+ ARFLAGS="${ARFLAGS} -rcs" \ |
98 |
+ all |
99 |
+} |
100 |
+ |
101 |
+src_install() { |
102 |
+ emake \ |
103 |
+ PREFIX="${EPREFIX}"/usr \ |
104 |
+ DESTDIR="${D}" \ |
105 |
+ LIBDIR="$(get_libdir)" \ |
106 |
+ CFLAGS="${CFLAGS}" \ |
107 |
+ LDFLAGS="${LDFLAGS}" \ |
108 |
+ ARFLAGS="${ARFLAGS} -rcs" \ |
109 |
+ install |
110 |
+} |
111 |
|
112 |
diff --git a/media-libs/libfreeaptx/libfreeaptx-9999.ebuild b/media-libs/libfreeaptx/libfreeaptx-9999.ebuild |
113 |
new file mode 100644 |
114 |
index 00000000000..f849a9cc545 |
115 |
--- /dev/null |
116 |
+++ b/media-libs/libfreeaptx/libfreeaptx-9999.ebuild |
117 |
@@ -0,0 +1,49 @@ |
118 |
+# Copyright 1999-2021 Gentoo Authors |
119 |
+# Distributed under the terms of the GNU General Public License v2 |
120 |
+ |
121 |
+EAPI=7 |
122 |
+ |
123 |
+inherit flag-o-matic toolchain-funcs |
124 |
+ |
125 |
+DESCRIPTION="Reverse-engineered aptX and aptX HD library (fork of libopenaptx)" |
126 |
+HOMEPAGE="https://github.com/iamthehorker/libfreeaptx" |
127 |
+ |
128 |
+if [[ ${PV} == "9999" ]] ; then |
129 |
+ inherit git-r3 |
130 |
+ EGIT_REPO_URI="https://github.com/iamthehorker/${PN}" |
131 |
+else |
132 |
+ SRC_URI="https://github.com/iamthehorker/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
133 |
+ KEYWORDS="~amd64" |
134 |
+fi |
135 |
+ |
136 |
+LICENSE="LGPL-2.1+" |
137 |
+SLOT="0" |
138 |
+ |
139 |
+IUSE="cpu_flags_x86_avx2" |
140 |
+ |
141 |
+src_compile() { |
142 |
+ tc-export CC AR |
143 |
+ |
144 |
+ use cpu_flags_x86_avx2 && append-cflags "-mavx2" |
145 |
+ |
146 |
+ emake \ |
147 |
+ PREFIX="${EPREFIX}"/usr \ |
148 |
+ LIBDIR=$(get_libdir) \ |
149 |
+ CFLAGS="${CFLAGS}" \ |
150 |
+ LDFLAGS="${LDFLAGS}" \ |
151 |
+ ARFLAGS="${ARFLAGS} -rcs" \ |
152 |
+ all |
153 |
+} |
154 |
+ |
155 |
+src_install() { |
156 |
+ emake \ |
157 |
+ PREFIX="${EPREFIX}"/usr \ |
158 |
+ DESTDIR="${D}" \ |
159 |
+ LIBDIR="$(get_libdir)" \ |
160 |
+ CFLAGS="${CFLAGS}" \ |
161 |
+ LDFLAGS="${LDFLAGS}" \ |
162 |
+ ARFLAGS="${ARFLAGS} -rcs" \ |
163 |
+ install |
164 |
+ |
165 |
+ rm -f "${ED}/usr/$(get_libdir)"/libopenaptx.a || die "Failed to remove static lib" |
166 |
+} |
167 |
|
168 |
diff --git a/media-libs/libfreeaptx/metadata.xml b/media-libs/libfreeaptx/metadata.xml |
169 |
new file mode 100644 |
170 |
index 00000000000..889e237efe9 |
171 |
--- /dev/null |
172 |
+++ b/media-libs/libfreeaptx/metadata.xml |
173 |
@@ -0,0 +1,15 @@ |
174 |
+<?xml version="1.0" encoding="UTF-8"?> |
175 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
176 |
+<pkgmetadata> |
177 |
+ <maintainer type="person"> |
178 |
+ <email>sam@g.o</email> |
179 |
+ <name>Sam James</name> |
180 |
+ </maintainer> |
181 |
+ <maintainer type="project"> |
182 |
+ <email>codec@g.o</email> |
183 |
+ <name>Gentoo Codec Project</name> |
184 |
+ </maintainer> |
185 |
+ <upstream> |
186 |
+ <remote-id type="github">iamthehorker/libfreeaptx</remote-id> |
187 |
+ </upstream> |
188 |
+</pkgmetadata> |