summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--media-libs/zita-resampler/Manifest4
-rw-r--r--media-libs/zita-resampler/files/zita-resampler-1.6.0-Makefile.patch90
-rw-r--r--media-libs/zita-resampler/metadata.xml8
-rw-r--r--media-libs/zita-resampler/zita-resampler-1.6.0.ebuild39
4 files changed, 141 insertions, 0 deletions
diff --git a/media-libs/zita-resampler/Manifest b/media-libs/zita-resampler/Manifest
new file mode 100644
index 000000000..897f6b8e6
--- /dev/null
+++ b/media-libs/zita-resampler/Manifest
@@ -0,0 +1,4 @@
+AUX zita-resampler-1.6.0-Makefile.patch 2925 SHA256 c14cfa3436add1c4449a084fea19e3d1e903c71c90f37a3d958a22b4ff21b10a SHA512 ebf57bde27fcc320695de6d413e98d72b0c508fe71751e2f775f44f4bbaf516742e4fa3f7c3c25be96b4827ee7b8776128a2156cebd70776c9016bfd1a422542 WHIRLPOOL 897cfb4292290a3355f3848b4e230d678b2cc5f8755ca4cd0535d78abc88aec22e47f71a2739613d759f09d8304104f21fdf0eabed5b694779c34625afc78255
+DIST zita-resampler-1.6.0.tar.bz2 126427 SHA256 10888d76299d8072990939be45d6fc5865f5a45d766d7690819c5899d2a588f0 SHA512 fefe01dfc459a7ee0a98965b6e354cfe23b8e18838eeedabe2a6d965e9e413c8bafb9ebb11f8328852f18be20c14443785214b000065887e4482aa8d5e6b34f5 WHIRLPOOL 346c6a869c8debcf64c92fcf1ee3d83bb4cb51627a9850fa45079fc87f6f9a91369b669855620188f07bc20c63d13712b02d92c60d667786ca18edfdd96e3222
+EBUILD zita-resampler-1.6.0.ebuild 823 SHA256 2170f369c592e17913af01dd3ea8ce6e80900765383a1b2a6c535f5e81a8270e SHA512 62e27c459c101a88dbdb4ac81fd43291feee3d3cf5d104441f2a425e10b59f2fb097e59c617a3c2ebeabc282cb61b77c3a78f1aec2bf3eb30c44acec1d262052 WHIRLPOOL 8bec1c47e20fc410eb77c054ed1263483b84b8a09104ca2cbdeaab1163da365a2fd85940cb2311816f4f5c7cd50f7d7cd63abaf1d18d1cb71bab60a28ef132f7
+MISC metadata.xml 246 SHA256 fd995ca4ddd81d61668478402f0f6459948808e6c7c22b7ec0ef887a52d7ddba SHA512 86562751c7aa80747d42c87f757b005655ba552d62ad09381704e6947ce0f31b233264adaeb7766320f21f6491c0e10f18e2c113cfffe0d736122f524f342b4d WHIRLPOOL f1b7643f403e5524ff60de9018182d32a41db965031661c95ecd77c2e74f9e602ab018718d521d957f29f844e38520beaf885febc8fac09df38ddd9f962f6176
diff --git a/media-libs/zita-resampler/files/zita-resampler-1.6.0-Makefile.patch b/media-libs/zita-resampler/files/zita-resampler-1.6.0-Makefile.patch
new file mode 100644
index 000000000..5bcc70d61
--- /dev/null
+++ b/media-libs/zita-resampler/files/zita-resampler-1.6.0-Makefile.patch
@@ -0,0 +1,90 @@
+diff --git a/apps/Makefile b/apps/Makefile
+index f009937..42f7125 100644
+--- a/apps/Makefile
++++ b/apps/Makefile
+@@ -18,6 +18,7 @@
+ # ----------------------------------------------------------------------------
+
+
++CXX ?= g++
+ PREFIX = /usr/local
+ SUFFIX := $(shell uname -m | sed -e 's/^unknown/$//' -e 's/^i.86/$//' -e 's/^x86_64/$/64/')
+ LIBDIR = lib$(SUFFIX)
+@@ -25,26 +26,26 @@ DISTDIR = zresample-$(VERSION)
+ VERSION = 1.6.0
+ MANDIR = /usr/share/man/man1
+ LDFLAGS += -L$(PREFIX)/$(LIBDIR)
+-CPPFLAGS += -MMD -MP -DVERSION=\"$(VERSION)\"
+-CXXFLAGS += -O3 -ffast-math -Wall
+-CXXFLAGS += -march=native
++CPPFLAGS += -MMD -MP -DVERSION=\"$(VERSION)\" -I../libs
++CXXFLAGS += -ffast-math -Wall
++
+
+
+ all: zresample zretune zresample.1.gz zretune.1.gz
+
+
+ ZRESAMPLE_O = zresample.o audiofile.o dither.o
+-zresample: LDLIBS += -lzita-resampler -lsndfile -lrt
++zresample: LDLIBS += ../libs/libzita-resampler.so.$(VERSION) -lsndfile -lrt
+ zresample: $(ZRESAMPLE_O)
+- g++ $(LDFLAGS) -o $@ $(ZRESAMPLE_O) $(LDLIBS)
++ $(CXX) $(LDFLAGS) -o $@ $(ZRESAMPLE_O) $(LDLIBS)
+ $(ZRESAMPLE_O):
+ -include $(ZRESAMPLE_O:%.o=%.d)
+
+
+ ZRETUNE_O = zretune.o audiofile.o dither.o
+-zretune: LDLIBS += -lzita-resampler -lsndfile -lrt
++zretune: LDLIBS += ../libs/libzita-resampler.so.$(VERSION) -lsndfile -lrt
+ zretune: $(ZRETUNE_O)
+- g++ $(LDFLAGS) -o $@ $(ZRETUNE_O) $(LDLIBS)
++ $(CXX) $(LDFLAGS) -o $@ $(ZRETUNE_O) $(LDLIBS)
+ $(ZRETUNE_O):
+ -include $(ZRETUNE_O:%.o=%.d)
+
+diff --git a/libs/Makefile b/libs/Makefile
+index 15b0471..62867b9 100644
+--- a/libs/Makefile
++++ b/libs/Makefile
+@@ -20,9 +20,10 @@
+
+ # Modify as required.
+ #
++CXX ?= g++
+ PREFIX = /usr/local
+ SUFFIX := $(shell uname -m | sed -e 's/^unknown/$//' -e 's/^i.86/$//' -e 's/^x86_64/$/64/')
+-LIBDIR = lib$(SUFFIX)
++LIBDIR ?= lib$(SUFFIX)
+
+ MAJVERS = 1
+ MINVERS = 6.0
+@@ -31,8 +32,7 @@ DISTDIR = zita-resampler-$(VERSION)
+
+
+ CPPFLAGS += -I. -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
+-CXXFLAGS += -Wall -fPIC -O2 -ffast-math
+-CXXFLAGS += -march=native
++CXXFLAGS += -Wall -fPIC -ffast-math
+ LDFLAGS +=
+ LDLIBS +=
+
+@@ -47,7 +47,7 @@ ZITA-RESAMPLER_H = zita-resampler/resampler.h zita-resampler/resampler-table.h \
+
+
+ $(ZITA-RESAMPLER_MIN): $(ZITA-RESAMPLER_O)
+- g++ -shared $(LDFLAGS) -Wl,-soname,$(ZITA-RESAMPLER_MAJ) -o $(ZITA-RESAMPLER_MIN) $(ZITA-RESAMPLER_O) $(ZITA-RESAMPLER_DEP)
++ $(CXX) -shared $(LDFLAGS) -Wl,-soname,$(ZITA-RESAMPLER_MAJ) -o $(ZITA-RESAMPLER_MIN) $(ZITA-RESAMPLER_O) $(ZITA-RESAMPLER_DEP)
+
+ $(ZITA-RESAMPLER_O): $(ZITA-RESAMPLER_H)
+
+@@ -58,7 +58,7 @@ install: $(ZITA-RESAMPLER_MIN)
+ install -m 644 $(ZITA-RESAMPLER_H) $(DESTDIR)$(PREFIX)/include/zita-resampler
+ install -m 644 $(ZITA-RESAMPLER_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)
+ ln -sf $(ZITA-RESAMPLER_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)/$(ZITA-RESAMPLER_SO)
+- ldconfig
++ /sbin/ldconfig -n $(DESTDIR)$(PREFIX)/$(LIBDIR)
+
+ uninstall:
+ /bin/rm -rf $(DESTDIR)$(PREFIX)/include/zita-resampler
diff --git a/media-libs/zita-resampler/metadata.xml b/media-libs/zita-resampler/metadata.xml
new file mode 100644
index 000000000..fcbd082bd
--- /dev/null
+++ b/media-libs/zita-resampler/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>fordfrog@gentoo.org</email>
+ <name>Miroslav Šulc</name>
+</maintainer>
+</pkgmetadata>
diff --git a/media-libs/zita-resampler/zita-resampler-1.6.0.ebuild b/media-libs/zita-resampler/zita-resampler-1.6.0.ebuild
new file mode 100644
index 000000000..2620e8ab6
--- /dev/null
+++ b/media-libs/zita-resampler/zita-resampler-1.6.0.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils toolchain-funcs multilib
+
+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"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND="media-libs/libsndfile"
+RDEPEND="${DEPEND}"
+
+RESTRICT="mirror"
+
+DOCS=(AUTHORS README)
+HTML_DOCS=(docs/)
+
+PATCHES=("${FILESDIR}"/${P}-Makefile.patch)
+
+src_compile() {
+ tc-export CXX
+
+ emake -C libs
+ emake -C apps
+}
+
+src_install() {
+ emake -C libs DESTDIR="${D}" PREFIX="${EPREFIX}/usr" LIBDIR=$(get_libdir) install
+ emake -C apps DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
+
+ einstalldocs
+}