diff --git a/audio/Makefile b/audio/Makefile index 2bdbe7ed7753..05728a315e58 100644 --- a/audio/Makefile +++ b/audio/Makefile @@ -852,6 +852,7 @@ SUBDIR += xwave SUBDIR += yell SUBDIR += zinf + SUBDIR += zita-resampler SUBDIR += zynaddsubfx .include diff --git a/audio/zita-resampler/Makefile b/audio/zita-resampler/Makefile new file mode 100644 index 000000000000..216c4b373631 --- /dev/null +++ b/audio/zita-resampler/Makefile @@ -0,0 +1,18 @@ +# Created by: Goran Mekić +# $FreeBSD$ + +PORTNAME= zita-resampler +PORTVERSION= 1.6.0 +CATEGORIES= audio +MASTER_SITES= http://kokkinizita.linuxaudio.org/linuxaudio/downloads/ + +MAINTAINER= meka@tilda.center +COMMENT= C++ library for resampling audio signals + +LICENSE= GPLv3+ +LICENSE_FILE= ${WRKSRC}/../COPYING + +USES= gmake tar:bzip2 +WRKSRC_SUBDIR= libs + +.include diff --git a/audio/zita-resampler/distinfo b/audio/zita-resampler/distinfo new file mode 100644 index 000000000000..8984f6bc70ec --- /dev/null +++ b/audio/zita-resampler/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1484153136 +SHA256 (zita-resampler-1.6.0.tar.bz2) = 10888d76299d8072990939be45d6fc5865f5a45d766d7690819c5899d2a588f0 +SIZE (zita-resampler-1.6.0.tar.bz2) = 126427 diff --git a/audio/zita-resampler/files/patch-Makefile b/audio/zita-resampler/files/patch-Makefile new file mode 100644 index 000000000000..a54fd4c6691e --- /dev/null +++ b/audio/zita-resampler/files/patch-Makefile @@ -0,0 +1,65 @@ +--- Makefile.orig 2015-10-02 14:59:52 UTC ++++ Makefile +@@ -1,7 +1,7 @@ + # ---------------------------------------------------------------------------- + # + # Copyright (C) 2006-2012 Fons Adriaensen +-# ++# + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 3 of the License, or +@@ -20,8 +20,8 @@ + + # Modify as required. + # +-PREFIX = /usr/local +-SUFFIX := $(shell uname -m | sed -e 's/^unknown/$//' -e 's/^i.86/$//' -e 's/^x86_64/$/64/') ++PREFIX ?= /usr/local ++SUFFIX = + LIBDIR = lib$(SUFFIX) + + MAJVERS = 1 +@@ -31,10 +31,7 @@ DISTDIR = zita-resampler-$(VERSION) + + + CPPFLAGS += -I. -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS +-CXXFLAGS += -Wall -fPIC -O2 -ffast-math +-CXXFLAGS += -march=native +-LDFLAGS += +-LDLIBS += ++CXXFLAGS += -Wall -fPIC + + + ZITA-RESAMPLER_SO = libzita-resampler.so +@@ -46,8 +43,10 @@ ZITA-RESAMPLER_H = zita-resampler/resamp + zita-resampler/vresampler.h zita-resampler/cresampler.h + + ++all: $(ZITA-RESAMPLER_MIN) ++ + $(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) + +@@ -55,10 +54,10 @@ $(ZITA-RESAMPLER_O): $(ZITA-RESAMPLER_H) + install: $(ZITA-RESAMPLER_MIN) + install -d $(DESTDIR)$(PREFIX)/include/zita-resampler + install -d $(DESTDIR)$(PREFIX)/$(LIBDIR) +- install -m 644 $(ZITA-RESAMPLER_H) $(DESTDIR)$(PREFIX)/include/zita-resampler +- install -m 644 $(ZITA-RESAMPLER_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR) ++ ${BSD_INSTALL_DATA} $(ZITA-RESAMPLER_H) $(DESTDIR)$(PREFIX)/include/zita-resampler ++ ${BSD_INSTALL_LIB} $(ZITA-RESAMPLER_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR) + ln -sf $(ZITA-RESAMPLER_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)/$(ZITA-RESAMPLER_SO) +- ldconfig ++ ln -sf $(ZITA-RESAMPLER_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)/$(ZITA-RESAMPLER_MAJ) + + uninstall: + /bin/rm -rf $(DESTDIR)$(PREFIX)/include/zita-resampler +@@ -66,4 +65,3 @@ uninstall: + + clean: + /bin/rm -rf *~ *.o *.a *.d *.so.* zita-resampler/*~ +- diff --git a/audio/zita-resampler/pkg-descr b/audio/zita-resampler/pkg-descr new file mode 100644 index 000000000000..b81e4e805ff0 --- /dev/null +++ b/audio/zita-resampler/pkg-descr @@ -0,0 +1,14 @@ +Zita-resampler is a C++ library for resampling audio signals. It is designed to +be used within a real-time processing context, to be fast, and to provide +high-quality sample rate conversion. + +The library operates on signals represented in single-precision floating point +format. For multichannel operation both the input and output signals are assumed +to be stored as interleaved samples. + +The API allows a trade-off between quality and CPU load. For the latter a range +of approximately 1:6 is available. Even at the highest quality setting +libzita-resampler will be faster than most similar libraries providing the same +quality, e.g. libsamplerate. + +WWW: http://kokkinizita.linuxaudio.org/linuxaudio/zita-resampler/resampler.html diff --git a/audio/zita-resampler/pkg-plist b/audio/zita-resampler/pkg-plist new file mode 100644 index 000000000000..04cb7204fdba --- /dev/null +++ b/audio/zita-resampler/pkg-plist @@ -0,0 +1,7 @@ +include/zita-resampler/cresampler.h +include/zita-resampler/resampler-table.h +include/zita-resampler/resampler.h +include/zita-resampler/vresampler.h +lib/libzita-resampler.so +lib/libzita-resampler.so.1 +lib/libzita-resampler.so.1.6.0