1 |
commit: dbd7f030d482f5593d4fb1d5c4ebcaf633f3174f |
2 |
Author: Alexander Tsoy <alexander <AT> tsoy <DOT> me> |
3 |
AuthorDate: Mon Apr 15 21:22:22 2019 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 21 05:01:25 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dbd7f030 |
7 |
|
8 |
media-libs/zita-resampler: new package |
9 |
|
10 |
Libzita-resampler is a C++ library for resampling audio signals. |
11 |
It is designed to be used within a real-time processing context, |
12 |
to be fast, and to provide high-quality sample rate conversion. |
13 |
|
14 |
Dependency of media-sound/guitarix |
15 |
|
16 |
Signed-off-by: Alexander Tsoy <alexander <AT> tsoy.me> |
17 |
Package-Manager: Portage-2.3.62, Repoman-2.3.11 |
18 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
19 |
|
20 |
media-libs/zita-resampler/Manifest | 1 + |
21 |
.../files/zita-resampler-1.6.2-makefile.patch | 90 ++++++++++++++++++++++ |
22 |
media-libs/zita-resampler/metadata.xml | 20 +++++ |
23 |
.../zita-resampler/zita-resampler-1.6.2.ebuild | 41 ++++++++++ |
24 |
4 files changed, 152 insertions(+) |
25 |
|
26 |
diff --git a/media-libs/zita-resampler/Manifest b/media-libs/zita-resampler/Manifest |
27 |
new file mode 100644 |
28 |
index 00000000000..60d50f605c7 |
29 |
--- /dev/null |
30 |
+++ b/media-libs/zita-resampler/Manifest |
31 |
@@ -0,0 +1 @@ |
32 |
+DIST zita-resampler-1.6.2.tar.bz2 125539 BLAKE2B d2e04fb5e0efbde3432ce973df59a11d2a184146d124b662712a5de2d9c243f6564899f190f7a7b68a9e01bcaab05c92b91ebcbf942473134a12a85e4e08c603 SHA512 d547419dd222c8a399d8f196efa1ec88a3f781275b696ae2fe1bb6e2fc329285affb8aace85972c304ad256becc4a155534dd5ef4ce3c57cbc9dcca0122b670c |
33 |
|
34 |
diff --git a/media-libs/zita-resampler/files/zita-resampler-1.6.2-makefile.patch b/media-libs/zita-resampler/files/zita-resampler-1.6.2-makefile.patch |
35 |
new file mode 100644 |
36 |
index 00000000000..29735e7729a |
37 |
--- /dev/null |
38 |
+++ b/media-libs/zita-resampler/files/zita-resampler-1.6.2-makefile.patch |
39 |
@@ -0,0 +1,90 @@ |
40 |
+diff -urN zita-resampler-1.6.2.orig/apps/Makefile zita-resampler-1.6.2/apps/Makefile |
41 |
+--- zita-resampler-1.6.2.orig/apps/Makefile 2018-08-24 21:41:47.000000000 +0300 |
42 |
++++ zita-resampler-1.6.2/apps/Makefile 2019-04-13 18:49:50.005800712 +0300 |
43 |
+@@ -23,18 +23,17 @@ |
44 |
+ MANDIR ?= /usr/share/man/man1 |
45 |
+ |
46 |
+ VERSION = 1.6.0 |
47 |
+-CPPFLAGS += -MMD -MP -DVERSION=\"$(VERSION)\" |
48 |
+-CXXFLAGS += -O2 -ffast-math -Wall |
49 |
+-CXXFLAGS += -march=native |
50 |
++CPPFLAGS += -MMD -MP -DVERSION=\"$(VERSION)\" -I ../source |
51 |
++CXXFLAGS += -ffast-math -Wall |
52 |
+ |
53 |
+ |
54 |
+-all: zresample zretune zresample.1.gz zretune.1.gz |
55 |
++all: zresample zretune zresample.1 zretune.1 |
56 |
+ |
57 |
+ |
58 |
+ ZRESAMPLE_O = zresample.o audiofile.o dither.o |
59 |
+ zresample: LDLIBS += -lzita-resampler -lsndfile -lrt |
60 |
+ zresample: $(ZRESAMPLE_O) |
61 |
+- $(CXX) $(LDFLAGS) -o $@ $(ZRESAMPLE_O) $(LDLIBS) |
62 |
++ $(CXX) -L ../source $(LDFLAGS) -o $@ $(ZRESAMPLE_O) $(LDLIBS) |
63 |
+ $(ZRESAMPLE_O): |
64 |
+ -include $(ZRESAMPLE_O:%.o=%.d) |
65 |
+ |
66 |
+@@ -42,25 +41,18 @@ |
67 |
+ ZRETUNE_O = zretune.o audiofile.o dither.o |
68 |
+ zretune: LDLIBS += -lzita-resampler -lsndfile -lrt |
69 |
+ zretune: $(ZRETUNE_O) |
70 |
+- $(CXX) $(LDFLAGS) -o $@ $(ZRETUNE_O) $(LDLIBS) |
71 |
++ $(CXX) -L ../source $(LDFLAGS) -o $@ $(ZRETUNE_O) $(LDLIBS) |
72 |
+ $(ZRETUNE_O): |
73 |
+ -include $(ZRETUNE_O:%.o=%.d) |
74 |
+ |
75 |
+ |
76 |
+-zresample.1.gz: zresample.1 |
77 |
+- gzip -c zresample.1 > zresample.1.gz |
78 |
+- |
79 |
+-zretune.1.gz: zretune.1 |
80 |
+- gzip -c zretune.1 > zretune.1.gz |
81 |
+- |
82 |
+- |
83 |
+ install: all |
84 |
+- install -d $(BINDIR) |
85 |
+- install -d $(MANDIR) |
86 |
++ install -d $(DESTDIR)$(BINDIR) |
87 |
++ install -d $(DESTDIR)$(MANDIR) |
88 |
+ install -m 755 zresample $(DESTDIR)$(BINDIR) |
89 |
+ install -m 755 zretune $(DESTDIR)$(BINDIR) |
90 |
+- install -m 644 zresample.1.gz $(DESTDIR)$(MANDIR) |
91 |
+- install -m 644 zretune.1.gz $(DESTDIR)$(MANDIR) |
92 |
++ install -m 644 zresample.1 $(DESTDIR)$(MANDIR) |
93 |
++ install -m 644 zretune.1 $(DESTDIR)$(MANDIR) |
94 |
+ |
95 |
+ uninstall: |
96 |
+ /bin/rm -f $(DESTDIR)$(BINDIR)/zresample |
97 |
+diff -urN zita-resampler-1.6.2.orig/source/Makefile zita-resampler-1.6.2/source/Makefile |
98 |
+--- zita-resampler-1.6.2.orig/source/Makefile 2018-08-24 21:41:47.000000000 +0300 |
99 |
++++ zita-resampler-1.6.2/source/Makefile 2019-04-13 18:49:25.936129640 +0300 |
100 |
+@@ -32,8 +32,7 @@ |
101 |
+ |
102 |
+ |
103 |
+ CPPFLAGS += -I. -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS |
104 |
+-CXXFLAGS += -Wall -fPIC -O2 -ffast-math |
105 |
+-CXXFLAGS += -march=native |
106 |
++CXXFLAGS += -Wall -fPIC -ffast-math |
107 |
+ LDFLAGS += |
108 |
+ LDLIBS += |
109 |
+ |
110 |
+@@ -47,6 +46,9 @@ |
111 |
+ zita-resampler/vresampler.h zita-resampler/cresampler.h |
112 |
+ |
113 |
+ |
114 |
++$(ZITA-RESAMPLER_SO): $(ZITA-RESAMPLER_MIN) |
115 |
++ ln -sf $(ZITA-RESAMPLER_MIN) $(ZITA-RESAMPLER_SO) |
116 |
++ |
117 |
+ $(ZITA-RESAMPLER_MIN): $(ZITA-RESAMPLER_O) |
118 |
+ $(CXX) -shared $(LDFLAGS) -Wl,-soname,$(ZITA-RESAMPLER_MAJ) -o $(ZITA-RESAMPLER_MIN) $(ZITA-RESAMPLER_O) $(ZITA-RESAMPLER_DEP) |
119 |
+ |
120 |
+@@ -58,8 +60,8 @@ |
121 |
+ install -d $(DESTDIR)$(LIBDIR) |
122 |
+ install -m 644 $(ZITA-RESAMPLER_H) $(DESTDIR)$(INCDIR)/zita-resampler |
123 |
+ install -m 755 $(ZITA-RESAMPLER_MIN) $(DESTDIR)$(LIBDIR) |
124 |
+- ldconfig |
125 |
+ ln -sf $(ZITA-RESAMPLER_MIN) $(DESTDIR)$(LIBDIR)/$(ZITA-RESAMPLER_SO) |
126 |
++ ln -sf $(ZITA-RESAMPLER_MIN) $(DESTDIR)$(LIBDIR)/$(ZITA-RESAMPLER_MAJ) |
127 |
+ |
128 |
+ uninstall: |
129 |
+ /bin/rm -rf $(DESTDIR)$(INCDIR)/zita-resampler |
130 |
|
131 |
diff --git a/media-libs/zita-resampler/metadata.xml b/media-libs/zita-resampler/metadata.xml |
132 |
new file mode 100644 |
133 |
index 00000000000..d939c6084b5 |
134 |
--- /dev/null |
135 |
+++ b/media-libs/zita-resampler/metadata.xml |
136 |
@@ -0,0 +1,20 @@ |
137 |
+<?xml version="1.0" encoding="UTF-8"?> |
138 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
139 |
+<pkgmetadata> |
140 |
+ <maintainer type="person"> |
141 |
+ <email>alexander@××××.me</email> |
142 |
+ <name>Alexander Tsoy</name> |
143 |
+ </maintainer> |
144 |
+ <maintainer type="project"> |
145 |
+ <email>proxy-maint@g.o</email> |
146 |
+ <name>Proxy Maintainers</name> |
147 |
+ </maintainer> |
148 |
+ <longdescription lang="en"> |
149 |
+ Libzita-resampler is a C++ library for resampling audio signals. |
150 |
+ It is designed to be used within a real-time processing context, |
151 |
+ to be fast, and to provide high-quality sample rate conversion. |
152 |
+ </longdescription> |
153 |
+ <use> |
154 |
+ <flag name="tools">Install zresample and zretune tools</flag> |
155 |
+ </use> |
156 |
+</pkgmetadata> |
157 |
|
158 |
diff --git a/media-libs/zita-resampler/zita-resampler-1.6.2.ebuild b/media-libs/zita-resampler/zita-resampler-1.6.2.ebuild |
159 |
new file mode 100644 |
160 |
index 00000000000..754fa1dfdde |
161 |
--- /dev/null |
162 |
+++ b/media-libs/zita-resampler/zita-resampler-1.6.2.ebuild |
163 |
@@ -0,0 +1,41 @@ |
164 |
+# Copyright 1999-2019 Gentoo Authors |
165 |
+# Distributed under the terms of the GNU General Public License v2 |
166 |
+ |
167 |
+EAPI=7 |
168 |
+ |
169 |
+inherit toolchain-funcs |
170 |
+ |
171 |
+DESCRIPTION="C++ library for real-time resampling of audio signals" |
172 |
+HOMEPAGE="http://kokkinizita.linuxaudio.org/linuxaudio/" |
173 |
+SRC_URI="http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${P}.tar.bz2" |
174 |
+ |
175 |
+LICENSE="GPL-3" |
176 |
+SLOT="0/1" |
177 |
+KEYWORDS="~amd64" |
178 |
+IUSE="tools" |
179 |
+ |
180 |
+RDEPEND="tools? ( media-libs/libsndfile )" |
181 |
+DEPEND="${RDEPEND}" |
182 |
+BDEPEND="" |
183 |
+ |
184 |
+HTML_DOCS="docs/." |
185 |
+ |
186 |
+PATCHES=( "${FILESDIR}"/${PN}-1.6.2-makefile.patch ) |
187 |
+ |
188 |
+src_compile() { |
189 |
+ tc-export CXX |
190 |
+ |
191 |
+ emake -C source |
192 |
+ if use tools; then |
193 |
+ emake -C apps |
194 |
+ fi |
195 |
+} |
196 |
+ |
197 |
+src_install() { |
198 |
+ emake -C source DESTDIR="${D}" PREFIX="${EPREFIX}/usr" LIBDIR="${EPREFIX}"/usr/$(get_libdir) install |
199 |
+ if use tools; then |
200 |
+ emake -C apps DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install |
201 |
+ fi |
202 |
+ |
203 |
+ einstalldocs |
204 |
+} |