diff options
Diffstat (limited to 'media-libs/zita-resampler')
-rw-r--r-- | media-libs/zita-resampler/Manifest | 3 | ||||
-rw-r--r-- | media-libs/zita-resampler/files/zita-resampler-1.8.0-makefile.patch | 91 | ||||
-rw-r--r-- | media-libs/zita-resampler/zita-resampler-1.8.0.ebuild | 44 |
3 files changed, 138 insertions, 0 deletions
diff --git a/media-libs/zita-resampler/Manifest b/media-libs/zita-resampler/Manifest index a2a57d22a669..7b7826f541a5 100644 --- a/media-libs/zita-resampler/Manifest +++ b/media-libs/zita-resampler/Manifest @@ -1,4 +1,7 @@ AUX zita-resampler-1.6.2-makefile.patch 3036 BLAKE2B 595ebbae53d4c0ec344d02f4602eec599e9d301a308384f3a4d3c99a9e64111f7b183ccee92c9f7e069a00275f3304712b9644409bbe23030961aeeadf9c8b52 SHA512 a7bb5621c761ab36502303053872782cf275e55b248f0387765c1251ab43c58577862c5fc2b321f6746fd7ec0a8e7c7766bcac290cb204f2e94947aa27cb1992 +AUX zita-resampler-1.8.0-makefile.patch 3222 BLAKE2B d13a3e6b2beeb6eb4b440f68431d7956cf66774e50549f8a7e8d6351d370778b5c3b75c98880a1260f2ac98b812f1fc51cf97f7f86d38ebf7f147714cd3e7b1d SHA512 4487230e87df2b165abb6e59fad6929fecc72c44509a60162976d5d1b54a2a584f04713c7f8cf77e9792213495656eeb45606c330d3c16be05084d4429cc9f84 DIST zita-resampler-1.6.2.tar.bz2 125539 BLAKE2B d2e04fb5e0efbde3432ce973df59a11d2a184146d124b662712a5de2d9c243f6564899f190f7a7b68a9e01bcaab05c92b91ebcbf942473134a12a85e4e08c603 SHA512 d547419dd222c8a399d8f196efa1ec88a3f781275b696ae2fe1bb6e2fc329285affb8aace85972c304ad256becc4a155534dd5ef4ce3c57cbc9dcca0122b670c +DIST zita-resampler-1.8.0.tar.bz2 131161 BLAKE2B 1ba5d255fff9c66e18e6177bc7e48a4710fdf54f58c07f162f8c8801f4f449b22dea9922645e7e33b70e07739c2b381176714e704f9840305f194f3c23d66de2 SHA512 adf1f465ac09104be5a02c1cf0f052a44b4c1a448312f3aca016a889e98cfcdebfded38f60300ad85d18ae03eadca7e8e95efb2875267bc36435ccfac881a8e7 EBUILD zita-resampler-1.6.2.ebuild 899 BLAKE2B ab844529d67e9284f42fbd8a7e7a6ba536188ace3e778c370e30c39d46fd8de400869d6093cfbc6cb461008667a7cd9f253ab4e4634adaaa6d3326631f9e99f1 SHA512 deaf05a05be70b4d72f07495a64a880cab200d259315314736c192528efe6a502918cd074f7750dc48344b468907ea4727d10faad3d1f761f36149762f8cb091 +EBUILD zita-resampler-1.8.0.ebuild 1011 BLAKE2B 4fc04d354cd69f216003c0e2f46ae9ce3f9af98eaf5def7569ba8b02772e7813c2dd2e33b9517de72f1946d81f70e8daa8c47c838b3dc0049569cf46f221a0c7 SHA512 30f1a438ac17b3c891928053f39262d376d3510e5de4bacd30ff2b91bc040820d04a8351e6056ba4cd9554ed7422ceb91f1a40ace92ee679b3049f2688058af1 MISC metadata.xml 692 BLAKE2B fad59853ee366f99db8e9c0dfa932c564eb0d8194808b809182ce64f286d39de2a363eb86f192d124adbbc92b1e7801a9fa5be0752fad1725f147d468484f589 SHA512 be926699e99357b49f5fe90a78c60b0fd701229fd603dca5988b40611ae5bb0c271a6a346469e0ebaff62bdc718c400954491ccc2557e5799a4fba08c67207cf diff --git a/media-libs/zita-resampler/files/zita-resampler-1.8.0-makefile.patch b/media-libs/zita-resampler/files/zita-resampler-1.8.0-makefile.patch new file mode 100644 index 000000000000..860e199a51de --- /dev/null +++ b/media-libs/zita-resampler/files/zita-resampler-1.8.0-makefile.patch @@ -0,0 +1,91 @@ +diff -urpN zita-resampler-1.8.0.orig/apps/Makefile zita-resampler-1.8.0/apps/Makefile +--- zita-resampler-1.8.0.orig/apps/Makefile 2018-08-23 12:52:50.000000000 +0300 ++++ zita-resampler-1.8.0/apps/Makefile 2021-01-05 20:27:20.816636061 +0300 +@@ -23,18 +23,17 @@ BINDIR ?= $(PREFIX)/bin + MANDIR ?= /usr/share/man/man1 + + VERSION = 1.6.0 +-CPPFLAGS += -MMD -MP -DVERSION=\"$(VERSION)\" +-CXXFLAGS += -O2 -ffast-math -Wall +-CXXFLAGS += -march=native ++CPPFLAGS += -MMD -MP -DVERSION=\"$(VERSION)\" -I ../source ++CXXFLAGS += -ffast-math -Wall + + +-all: zresample zretune zresample.1.gz zretune.1.gz ++all: zresample zretune + + + ZRESAMPLE_O = zresample.o audiofile.o dither.o + zresample: LDLIBS += -lzita-resampler -lsndfile -lrt + zresample: $(ZRESAMPLE_O) +- $(CXX) $(LDFLAGS) -o $@ $(ZRESAMPLE_O) $(LDLIBS) ++ $(CXX) -L ../source $(LDFLAGS) -o $@ $(ZRESAMPLE_O) $(LDLIBS) + $(ZRESAMPLE_O): + -include $(ZRESAMPLE_O:%.o=%.d) + +@@ -42,25 +41,18 @@ $(ZRESAMPLE_O): + ZRETUNE_O = zretune.o audiofile.o dither.o + zretune: LDLIBS += -lzita-resampler -lsndfile -lrt + zretune: $(ZRETUNE_O) +- $(CXX) $(LDFLAGS) -o $@ $(ZRETUNE_O) $(LDLIBS) ++ $(CXX) -L ../source $(LDFLAGS) -o $@ $(ZRETUNE_O) $(LDLIBS) + $(ZRETUNE_O): + -include $(ZRETUNE_O:%.o=%.d) + + +-zresample.1.gz: zresample.1 +- gzip -c zresample.1 > zresample.1.gz +- +-zretune.1.gz: zretune.1 +- gzip -c zretune.1 > zretune.1.gz +- +- + install: all +- install -d $(BINDIR) +- install -d $(MANDIR) ++ install -d $(DESTDIR)$(BINDIR) ++ install -d $(DESTDIR)$(MANDIR) + install -m 755 zresample $(DESTDIR)$(BINDIR) + install -m 755 zretune $(DESTDIR)$(BINDIR) +- install -m 644 zresample.1.gz $(DESTDIR)$(MANDIR) +- install -m 644 zretune.1.gz $(DESTDIR)$(MANDIR) ++ install -m 644 zresample.1 $(DESTDIR)$(MANDIR) ++ install -m 644 zretune.1 $(DESTDIR)$(MANDIR) + + uninstall: + /bin/rm -f $(DESTDIR)$(BINDIR)/zresample +diff -urpN zita-resampler-1.8.0.orig/source/Makefile zita-resampler-1.8.0/source/Makefile +--- zita-resampler-1.8.0.orig/source/Makefile 2020-12-28 23:09:24.000000000 +0300 ++++ zita-resampler-1.8.0/source/Makefile 2021-01-05 20:19:47.951831754 +0300 +@@ -31,9 +31,7 @@ VERSION = $(MAJVERS).$(MINVERS) + DISTDIR = zita-resampler-$(VERSION) + + CPPFLAGS += -I. -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS +-CPPFLAGS += -DENABLE_SSE2 +-CXXFLAGS += -Wall -fPIC -O2 -ffast-math +-CXXFLAGS += -march=native ++CXXFLAGS += -Wall -fPIC -ffast-math + LDFLAGS += + LDLIBS += + +@@ -47,6 +45,9 @@ ZITA-RESAMPLER_H = zita-resampler/resamp + zita-resampler/vresampler.h zita-resampler/cresampler.h + + ++$(ZITA-RESAMPLER_SO): $(ZITA-RESAMPLER_MIN) ++ ln -sf $(ZITA-RESAMPLER_MIN) $(ZITA-RESAMPLER_SO) ++ + $(ZITA-RESAMPLER_MIN): $(ZITA-RESAMPLER_O) + $(CXX) -shared $(LDFLAGS) -Wl,-soname,$(ZITA-RESAMPLER_MAJ) -o $(ZITA-RESAMPLER_MIN) $(ZITA-RESAMPLER_O) $(ZITA-RESAMPLER_DEP) + +@@ -58,8 +59,8 @@ install: $(ZITA-RESAMPLER_MIN) + install -d $(DESTDIR)$(LIBDIR) + install -m 644 $(ZITA-RESAMPLER_H) $(DESTDIR)$(INCDIR)/zita-resampler + install -m 755 $(ZITA-RESAMPLER_MIN) $(DESTDIR)$(LIBDIR) +- ldconfig + ln -sf $(ZITA-RESAMPLER_MIN) $(DESTDIR)$(LIBDIR)/$(ZITA-RESAMPLER_SO) ++ ln -sf $(ZITA-RESAMPLER_MIN) $(DESTDIR)$(LIBDIR)/$(ZITA-RESAMPLER_MAJ) + + uninstall: + /bin/rm -rf $(DESTDIR)$(INCDIR)/zita-resampler diff --git a/media-libs/zita-resampler/zita-resampler-1.8.0.ebuild b/media-libs/zita-resampler/zita-resampler-1.8.0.ebuild new file mode 100644 index 000000000000..b23f36961060 --- /dev/null +++ b/media-libs/zita-resampler/zita-resampler-1.8.0.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="C++ library for real-time resampling of audio signals" +HOMEPAGE="http://kokkinizita.linuxaudio.org/linuxaudio/" +SRC_URI="http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${P}.tar.bz2" + +LICENSE="GPL-3+" +SLOT="0/1" +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="cpu_flags_x86_sse2 tools" + +RDEPEND="tools? ( media-libs/libsndfile )" +DEPEND="${RDEPEND}" +BDEPEND="" + +HTML_DOCS="docs/." + +PATCHES=( "${FILESDIR}"/${PN}-1.8.0-makefile.patch ) + +src_compile() { + tc-export CXX + if use cpu_flags_x86_sse2 ; then + append-cppflags "-DENABLE_SSE2" + fi + + emake -C source + if use tools; then + emake -C apps + fi +} + +src_install() { + emake -C source DESTDIR="${D}" PREFIX="${EPREFIX}/usr" LIBDIR="${EPREFIX}"/usr/$(get_libdir) install + if use tools; then + emake -C apps DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install + fi + + einstalldocs +} |