diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2007-04-09 17:46:35 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2007-04-09 17:46:35 +0000 |
commit | 4c69167eb478d29b07fa4f2a3b80d923012a1984 (patch) | |
tree | 7b24880aecdb9338bfb579761b3fb9ead623fc3f | |
parent | befc26fa192d24170780d9b04d60db7fe548a657 (diff) | |
download | ports-4c69167eb478d29b07fa4f2a3b80d923012a1984.tar.gz ports-4c69167eb478d29b07fa4f2a3b80d923012a1984.zip |
Notes
-rw-r--r-- | audio/Makefile | 1 | ||||
-rw-r--r-- | audio/libconvolve/Makefile | 24 | ||||
-rw-r--r-- | audio/libconvolve/distinfo | 3 | ||||
-rw-r--r-- | audio/libconvolve/files/patch-Makefile | 32 | ||||
-rw-r--r-- | audio/libconvolve/files/patch-convolution_init.c | 74 | ||||
-rw-r--r-- | audio/libconvolve/files/patch-convolution_process.c | 11 | ||||
-rw-r--r-- | audio/libconvolve/pkg-descr | 3 | ||||
-rw-r--r-- | audio/libconvolve/pkg-plist | 5 |
8 files changed, 153 insertions, 0 deletions
diff --git a/audio/Makefile b/audio/Makefile index 4af4d6385203..6f6e20f6851a 100644 --- a/audio/Makefile +++ b/audio/Makefile @@ -322,6 +322,7 @@ SUBDIR += libcdaudio SUBDIR += libcddb SUBDIR += libcddb-doc + SUBDIR += libconvolve SUBDIR += libdssialsacompat SUBDIR += libgpod SUBDIR += libid3tag diff --git a/audio/libconvolve/Makefile b/audio/libconvolve/Makefile new file mode 100644 index 000000000000..c531b876c885 --- /dev/null +++ b/audio/libconvolve/Makefile @@ -0,0 +1,24 @@ +# New ports collection makefile for: libconvolve +# Date created: 2007-04-02 +# Whom: trasz <trasz@pin.if.uz.zgora.pl> +# +# $FreeBSD$ +# + +PORTNAME= libconvolve +PORTVERSION= 0.0.8 +CATEGORIES= audio +MASTER_SITES= http://tapas.affenbande.org/jack_convolve/ +EXTRACT_SUFX= .tgz + +MAINTAINER= trasz@pin.if.uz.zgora.pl +COMMENT= Simple C library for partitioned convolution + +LIB_DEPENDS= fftw3f.4:${PORTSDIR}/math/fftw3-float \ + samplerate.1:${PORTSDIR}/audio/libsamplerate \ + sndfile.1:${PORTSDIR}/audio/libsndfile + +USE_GMAKE= yes +USE_LDCONFIG= yes + +.include <bsd.port.mk> diff --git a/audio/libconvolve/distinfo b/audio/libconvolve/distinfo new file mode 100644 index 000000000000..688d4ce436ef --- /dev/null +++ b/audio/libconvolve/distinfo @@ -0,0 +1,3 @@ +MD5 (libconvolve-0.0.8.tgz) = 4798e82a00bc7f2b81f3b4493813c17f +SHA256 (libconvolve-0.0.8.tgz) = 60701b9da1af63fa6883df8fadd8d474af370f63df18481dea903097771781d4 +SIZE (libconvolve-0.0.8.tgz) = 39486 diff --git a/audio/libconvolve/files/patch-Makefile b/audio/libconvolve/files/patch-Makefile new file mode 100644 index 000000000000..1ab141eb90c3 --- /dev/null +++ b/audio/libconvolve/files/patch-Makefile @@ -0,0 +1,32 @@ +--- Makefile.orig Mon Apr 2 09:20:41 2007 ++++ Makefile Mon Apr 2 09:20:55 2007 +@@ -1,19 +1,18 @@ + PREFIX=/usr/local + +-COMPILE_FLAGS = -fPIC `pkg-config fftw3f samplerate sndfile --cflags` ++COMPILE_FLAGS = $(CFLAGS) -fPIC `pkg-config fftw3f samplerate sndfile --cflags` + #COMPILE_FLAGS += -g +-COMPILE_FLAGS += -O3 -funroll-loops -funroll-all-loops + + LINK_FLAGS = `pkg-config fftw3f samplerate sndfile --libs` + + # uncomment the following line if libDSP is not available for + # your platform (power pc etc.)... + +-# COMPILE_FLAGS += -DC_CMUL ++COMPILE_FLAGS += -DC_CMUL + + # ...and comment this one out: + +-LINK_FLAGS += -L/usr/local/lib -ldsp -lstdc++ ++#LINK_FLAGS += -L/usr/local/lib -ldsp -lstdc++ + + + ST_TARGET = libconvolve.a +@@ -53,5 +52,5 @@ + cp $(TARGET) $(PREFIX)/lib/ + cp $(ST_TARGET) $(PREFIX)/lib/ + cp convolve.h $(PREFIX)/include/ +- ldconfig -n $(PREFIX)/lib ++ ln -s $(PREFIX)/lib/$(TARGET) $(PREFIX)/lib/$(SONAME) || true + ln -s $(PREFIX)/lib/$(SONAME) $(PREFIX)/lib/$(SMALLNAME) || true diff --git a/audio/libconvolve/files/patch-convolution_init.c b/audio/libconvolve/files/patch-convolution_init.c new file mode 100644 index 000000000000..6c5bebc4eb34 --- /dev/null +++ b/audio/libconvolve/files/patch-convolution_init.c @@ -0,0 +1,74 @@ +--- convolution_init.c.orig Mon Nov 28 00:24:57 2005 ++++ convolution_init.c Mon Apr 2 09:26:43 2007 +@@ -17,8 +17,19 @@ + */ + + #include "convolve.h" +-#include <malloc.h> ++#include <stdlib.h> + #include <math.h> ++#include <errno.h> ++ ++int my_posix_memalign(void **memptr, size_t alignment, size_t size) ++{ ++ *memptr = malloc(size); ++ ++ if (*memptr != NULL) ++ return 0; ++ else ++ return errno; ++} + + int convolution_init (convolution_t *conv, + int number_of_responses, +@@ -47,12 +58,12 @@ + // allocate FFT buffers + // as r2c stores only N/2+1 results, we don't need the padded size for this + // conv->fft_complex = (fftwf_complex*)malloc (sizeof(fftwf_complex) * (conv->chunk_length + 1)); +- posix_memalign(&conv->fft_complex, 16, sizeof(fftwf_complex) * (conv->chunk_length + 1)); ++ my_posix_memalign(&conv->fft_complex, 16, sizeof(fftwf_complex) * (conv->chunk_length + 1)); + + + // this one still needs to be 2 * chunk_length as we zero pad it + // conv->fft_real = (float*)malloc (sizeof(float) * 2 * conv->chunk_length); +- posix_memalign(&conv->fft_real, 16, sizeof(float) * 2 * conv->chunk_length); ++ my_posix_memalign(&conv->fft_real, 16, sizeof(float) * 2 * conv->chunk_length); + + // create fftw plans + conv->fft_plan_forward = fftwf_plan_dft_r2c_1d (2 * conv->chunk_length, +@@ -100,7 +111,7 @@ + * (conv->chunk_length + 1) + * conv->fft_responses[index]->number_of_chunks); + */ +- posix_memalign(&conv->fft_responses[index]->channel_data[index2], ++ my_posix_memalign(&conv->fft_responses[index]->channel_data[index2], + 16, + sizeof(fftwf_complex) + * (conv->chunk_length + 1) +@@ -169,7 +180,7 @@ + + // need to divide (integer divide) the index by number_of_responses to get + // a valid index into the list of responses. +- posix_memalign(&conv->input_chunk_ringbuffers[index], 16, ++ my_posix_memalign(&conv->input_chunk_ringbuffers[index], 16, + sizeof(fftwf_complex) * conv->fft_responses[index/conv->number_of_response_channels]->number_of_chunks + * (conv->chunk_length + 1)); + +@@ -189,7 +200,7 @@ + = (fftwf_complex*)malloc (sizeof(fftwf_complex) * conv->fft_responses[index]->number_of_chunks + * (conv->chunk_length + 1)); + */ +- posix_memalign(&conv->input_chunk_ringbuffers[index], 16, ++ my_posix_memalign(&conv->input_chunk_ringbuffers[index], 16, + sizeof(fftwf_complex) * conv->fft_responses[index]->number_of_chunks + * (conv->chunk_length + 1)); + +@@ -222,7 +233,7 @@ + for (index = 0; index < conv->number_of_response_channels; ++index) { + + // conv->overlap_buffers[index] = (float*)malloc (sizeof(float) * conv->chunk_length); +- posix_memalign(&conv->overlap_buffers[index], 16, sizeof(float) * conv->chunk_length); ++ my_posix_memalign(&conv->overlap_buffers[index], 16, sizeof(float) * conv->chunk_length); + + // zero out + for (index2 = 0; index2 < conv->chunk_length; ++index2) { diff --git a/audio/libconvolve/files/patch-convolution_process.c b/audio/libconvolve/files/patch-convolution_process.c new file mode 100644 index 000000000000..a5582fb2a21e --- /dev/null +++ b/audio/libconvolve/files/patch-convolution_process.c @@ -0,0 +1,11 @@ +--- convolution_process.c.orig Mon Apr 2 09:22:07 2007 ++++ convolution_process.c Mon Apr 2 09:22:15 2007 +@@ -23,7 +23,7 @@ + #include <dsp/dspop.h> + #endif + +-#include <malloc.h> ++#include <stdlib.h> + #include <math.h> + + diff --git a/audio/libconvolve/pkg-descr b/audio/libconvolve/pkg-descr new file mode 100644 index 000000000000..b074260a9488 --- /dev/null +++ b/audio/libconvolve/pkg-descr @@ -0,0 +1,3 @@ +Simple C library for partitioned convolution. + +WWW: http://tapas.affenbande.org/wordpress/?page_id=9 diff --git a/audio/libconvolve/pkg-plist b/audio/libconvolve/pkg-plist new file mode 100644 index 000000000000..e85d72768cbc --- /dev/null +++ b/audio/libconvolve/pkg-plist @@ -0,0 +1,5 @@ +include/convolve.h +lib/libconvolve.so.0.0.8 +lib/libconvolve.so.0 +lib/libconvolve.so +lib/libconvolve.a |