[proaudio] [2071] fix rezound-9999 qt4 port (fftw,audiofile-lib,ladspa,autotools)

[ Thread Index | Date Index | More lists.tuxfamily.org/proaudio Archives ]


Revision: 2071
Author:   evermind
Date:     2012-01-21 13:37:48 +0100 (Sat, 21 Jan 2012)
Log Message:
-----------
fix rezound-9999 qt4 port (fftw,audiofile-lib,ladspa,autotools)

Modified Paths:
--------------
    trunk/overlays/proaudio/media-sound/rezound/ChangeLog
    trunk/overlays/proaudio/media-sound/rezound/Manifest
    trunk/overlays/proaudio/media-sound/rezound/rezound-9999.ebuild

Added Paths:
-----------
    trunk/overlays/proaudio/media-sound/rezound/files/0001-fix-ladspa-path.patch
    trunk/overlays/proaudio/media-sound/rezound/files/0002-add-support-for-fftw3.patch
    trunk/overlays/proaudio/media-sound/rezound/files/0003-autotools-patch.patch
    trunk/overlays/proaudio/media-sound/rezound/files/0004-pkg-config-and-the-audiofile-library.patch

Modified: trunk/overlays/proaudio/media-sound/rezound/ChangeLog
===================================================================
--- trunk/overlays/proaudio/media-sound/rezound/ChangeLog	2012-01-21 12:37:45 UTC (rev 2070)
+++ trunk/overlays/proaudio/media-sound/rezound/ChangeLog	2012-01-21 12:37:48 UTC (rev 2071)
@@ -1,7 +1,13 @@
 # ChangeLog for media-sound/rezound
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  21 Jan 2012; Frieder Buerzele <evermind@xxxxxxxxxxxxx>
+  +files/0001-fix-ladspa-path.patch, +files/0002-add-support-for-fftw3.patch,
+  +files/0004-pkg-config-and-the-audiofile-library.patch, rezound-9999.ebuild,
+  +files/0003-autotools-patch.patch:
+  fix rezound-9999 qt4 port (fftw,audiofile-lib,ladspa,autotools)
+
   19 Mar 2011; Hakan Demiralp <keenblade@xxxxxxxxxxxxx> rezound-9999.ebuild,
   +files/rezound-9999-O2.patch:
   rezound-9999: added O2.patch at b.g.o 334797 by John 

Modified: trunk/overlays/proaudio/media-sound/rezound/Manifest
===================================================================
--- trunk/overlays/proaudio/media-sound/rezound/Manifest	2012-01-21 12:37:45 UTC (rev 2070)
+++ trunk/overlays/proaudio/media-sound/rezound/Manifest	2012-01-21 12:37:48 UTC (rev 2071)
@@ -1,3 +1,7 @@
+AUX 0001-fix-ladspa-path.patch 649 RMD160 65150f85d7f03353ffca5b816d9cbeb90fc7685c SHA1 7f4b50c2ce40421e21d8f7b88b20587013f5e92e SHA256 e708dfddb7fd6b62aff2c6bd309d48607a9ede1a4266ff13a53652fcc7f2d32b
+AUX 0002-add-support-for-fftw3.patch 15463 RMD160 e2aff72c77cfa736613fc1536d31235ee9cff407 SHA1 7a9474990fcb3df0f80b589b94073e58f1654bc5 SHA256 057c44cedd5078e13b59e4ff0ef85abfbe624bb2c107f53ea911db1b9a96ec98
+AUX 0003-autotools-patch.patch 6405 RMD160 41a9d54d3208ccbe4bf15cccfdf63367e7f7c0c6 SHA1 5aee085e992145567d11aa37044202efe61b02d7 SHA256 16c9ec635ff93a5c6a54ba330595b76eaa7ce79dadcd52cd9179019d22b6b81c
+AUX 0004-pkg-config-and-the-audiofile-library.patch 1157 RMD160 7195dd0ebe149ad0d952a20d1b88580ecab78441 SHA1 535f07032510e15572aee81b61486da5230dee76 SHA256 04ec54323c088bfa7a85149aa5aada031e60eeb132b44bf47c1928ba9749498a
 AUX rezound-9999-O2.patch 1296 RMD160 9e3e2cb692bb196504544c8b33a9f82f215f5542 SHA1 aa7f2bf35db4b79cf29fcdc0c0a458fa03248067 SHA256 896b45b5aaed6542cfc09353626133d5cb7b9e655e9d2c35c42d63f3308955b5
 AUX rezound-9999-gcc43.patch 30494 RMD160 71959c67927359ffc277303bf6f879b09a5153fe SHA1 0facd68d74de9bb507a038dec30885b77c75d0b4 SHA256 1473b55f95b2b6ab7607de61e4aed7ba42ac8ccc7371c52aaabe20bbcee48246
 AUX rezound-9999-missing_includes.patch 2056 RMD160 ed10329ff7cbd74f516e342e68b7ebba2226d9d4 SHA1 b108fbabedd8c723a5bdd50b171d3dec1f63722a SHA256 937b3e323b2c2f3101d5292c8aaebd7e3465f251ddf715aebe20bcfdd4f17cff
@@ -3,5 +7,5 @@
 AUX rezound-9999-qt44.patch 485 RMD160 89ca07e742533f0beb4d91a942e8bd163e3f31e5 SHA1 b681c88a6ddb0f03706058589dfd94d09598c9b5 SHA256 34828dfe25a96df290281d0e452d205dd380fb06a3d80b45f5db4798f9e58e70
 DIST rezound-0.12.3_beta-patches-5.tar.bz2 11361 RMD160 a44ee3b5d82bb8d2e7b15e0634d20cb08b723975 SHA1 7fd816e637299ca9ae1d0f1b5b5a4d9e97600b24 SHA256 c2f7d192f05881c46de7a7027b2ef2369e9ac9821f3ddeb57a94389cf3d502c7
-EBUILD rezound-9999.ebuild 2607 RMD160 6592fbbfc498483b2712b806ac78121c4192eecc SHA1 76d85143748e9f19b94f96edbc4a7fc8c5f7e8d7 SHA256 023776cb975767ef809eca8d2441d72da1934525098e20eafc0a3b6a9e613baf
-MISC ChangeLog 558 RMD160 1aee6e404f290969bf4d019cba3e9e2d2e9d810a SHA1 5c1f73ea295ae2243163f9b0210eae7742f4593b SHA256 d6016d3d1adc31d515b6d187534164e764afd4e34d79ab42f44581102a1d7e32
+EBUILD rezound-9999.ebuild 2927 RMD160 3b4624db85bf2972096689c31cfaa7a62e0c56c0 SHA1 04b3aa6cc7262ccf25785397a1063e9f85313805 SHA256 239ab7aea27cc5efff6ced341c2aaed295f57cc89503e6878aac71b6b4099e43
+MISC ChangeLog 876 RMD160 423c84add3e8a5993762e7fbdb2c6d4aacc57fb9 SHA1 ed80a0d46266d1541b9b09992ccf4297811c4d6e SHA256 c3efb1d41bbf0e57c81eef19a423f6f3acee7a29a57a90ca44c605b1d468da17
 MISC metadata.xml 268 RMD160 facc07bd885f20615a1f2555069329c642e1a566 SHA1 2456bdb8a218c9d477d2d6ee4bf158de070c7be4 SHA256 96629b266b743f566c29158d4498edeeb1cd6b1f0cd9629e42d4f10b4da82f89

Added: trunk/overlays/proaudio/media-sound/rezound/files/0001-fix-ladspa-path.patch
===================================================================
--- trunk/overlays/proaudio/media-sound/rezound/files/0001-fix-ladspa-path.patch	                        (rev 0)
+++ trunk/overlays/proaudio/media-sound/rezound/files/0001-fix-ladspa-path.patch	2012-01-21 12:37:48 UTC (rev 2071)
@@ -0,0 +1,25 @@
+Subject: [PATCH 1/4] fix ladspa path
+
+---
+ src/backend/settings.cpp |    5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/src/backend/settings.cpp b/src/backend/settings.cpp
+index 3399a2e..21591e1 100644
+--- a/src/backend/settings.cpp
++++ b/src/backend/settings.cpp
+@@ -89,7 +89,10 @@ string gJACKInputPortNames[64];
+ #endif
+ 
+ 
+-string gLADSPAPath="";
++// GG set the ladspa path to a reasonable default
++// this *only* works for Debian, because thats were
++// LADSPA plugins are put
++string gLADSPAPath="/usr/lib/ladspa";
+ 
+ 
+ string gFallbackWorkDir="/tmp"; // ??? would be something else on non-unix platforms
+-- 
+1.7.3.4
+

Added: trunk/overlays/proaudio/media-sound/rezound/files/0002-add-support-for-fftw3.patch
===================================================================
--- trunk/overlays/proaudio/media-sound/rezound/files/0002-add-support-for-fftw3.patch	                        (rev 0)
+++ trunk/overlays/proaudio/media-sound/rezound/files/0002-add-support-for-fftw3.patch	2012-01-21 12:37:48 UTC (rev 2071)
@@ -0,0 +1,433 @@
+Subject: [PATCH 2/4] add support for fftw3
+
+---
+ configure.ac                                       |   52 ++++++++++++++------
+ src/backend/ASoundPlayer.cpp                       |   26 +++++-----
+ src/backend/ASoundPlayer.h                         |   12 +++--
+ src/backend/DSP/Convolver.h                        |   40 ++++++++-------
+ src/backend/Effects/CTestEffect.cpp                |    2 +-
+ src/backend/Filters/CArbitraryFIRFilter.cpp        |    2 +-
+ src/backend/Filters/CConvolutionFilter.cpp         |    2 +-
+ .../Filters/CMorphingArbitraryFIRFilter.cpp        |    2 +-
+ src/backend/Makefile.am                            |    4 +-
+ src/frontend_fox/CMetersWindow.cpp                 |    2 +-
+ 10 files changed, 85 insertions(+), 59 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4791622..f521d44 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -568,22 +568,43 @@ fi
+ # Handle the flags for the FFTW library                                    #
+ ############################################################################
+ 
+-# check for the rfftw library installed.  Eventually this macro call
+-# should define HAVE_FFTW and enable or disable the FFT based actions
+-# if it's not found, then I should print a noticable warning that FFT
+-# actions will be disabled and why
+-#  ??? email about an official way to test for fftw
+-		# ??? actually I don't think I need fftw, just rfftw.. remove fftw and see if that's so
+-AC_CHECK_HEADER(
+-	fftw.h,
+-	AC_CHECK_LIB(fftw, fftw_create_plan, , AC_MSG_WARN([***** libfftw.a (version 2) not found -- any FFT based actions will be disabled (http://www.fftw.org) *****]),-lfftw),
+-	AC_MSG_WARN([***** fftw.h (version 2) header file not found -- any FFT based actions will be disabled (http://www.fftw.org) *****])
+-	)
++# check for the rfftw library installed. 
+ 
+-AC_CHECK_HEADER(
+-	rfftw.h,
+-	AC_CHECK_LIB(rfftw, rfftw_create_plan, , AC_MSG_WARN([***** librfftw.a (version 2) not found -- any FFT based actions will be disabled (http://www.fftw.org) *****]),-lrfftw),
+-	AC_MSG_WARN([***** rfftw.h (version 2) header file not found -- any FFT based actions will be disabled (http://www.fftw.org) *****])
++AH_TEMPLATE(HAVE_FFTW)
++AC_ARG_ENABLE(
++	fftw,
++	AC_HELP_STRING([--enable/disable-fftw],[enable/disable ReZound to use FFTW library (version 3 and later)]),
++	[ # action if either enable or disable flag is given
++		if [[ "$enableval" = "yes" ]]
++		then 
++			PKG_CHECK_MODULES(
++				FFTW,
++				fftw3 >= 3.0.0,
++				[
++					AC_DEFINE(HAVE_FFTW)
++					AC_MSG_RESULT([*** enabling FFTW])
++				],
++				AC_MSG_ERROR([***** libfftw3.a or fftw3.h not found (http://www.fftw.org) *****])
++			)
++		else
++			AC_MSG_RESULT([*** disabling fftw3])
++		fi
++	],
++	[ # action if neither enable or disable flag was given
++		# if the jack lib is found, then enable it
++		PKG_CHECK_MODULES(
++			FFTW,
++			fftw3 >= 3.0.0,
++			[
++				AC_DEFINE(HAVE_FFTW)
++				AC_MSG_RESULT([*** enabling FFTW])
++			],
++			[
++				# disable default action of exiting if not found
++				AC_MSG_RESULT([*** FFTW not enabled])
++			]
++		)
++	]
+ )
+ 
+ 
+@@ -591,7 +612,6 @@ AC_CHECK_HEADER(
+ 
+ 
+ 
+-
+ ############################################################################
+ # detect if we should be able to compile the LADSPA code                   #
+ ############################################################################
+diff --git a/src/backend/ASoundPlayer.cpp b/src/backend/ASoundPlayer.cpp
+index 7210888..0ea4dff 100644
+--- a/src/backend/ASoundPlayer.cpp
++++ b/src/backend/ASoundPlayer.cpp
+@@ -34,14 +34,14 @@
+ 
+ ASoundPlayer::ASoundPlayer()
+ {
+-#ifdef HAVE_LIBRFFTW
++#ifdef HAVE_FFTW
+ 	analyzerPlan=NULL;
+ #endif
+ }
+ 
+ ASoundPlayer::~ASoundPlayer()
+ {
+-#ifdef HAVE_LIBRFFTW
++#ifdef HAVE_FFTW
+ 	for(map<size_t,TAutoBuffer<fftw_real> *>::iterator i=hammingWindows.begin();i!=hammingWindows.end();i++)
+ 		delete i->second;
+ #endif
+@@ -62,12 +62,13 @@ void ASoundPlayer::initialize()
+ 
+ 
+ 
+-#ifdef HAVE_LIBRFFTW
++#ifdef HAVE_FFTW
+ 	frequencyAnalysisBufferPrepared=false;
+ 	for(size_t t=0;t<ASP_ANALYSIS_BUFFER_SIZE;t++)
+ 		frequencyAnalysisBuffer[t]=0.0;
+ 
+-	analyzerPlan=rfftw_create_plan(ASP_ANALYSIS_BUFFER_SIZE, FFTW_REAL_TO_COMPLEX, FFTW_ESTIMATE);
++  analyzerPlan = fftw_plan_r2r_1d(ASP_ANALYSIS_BUFFER_SIZE, frequencyAnalysisBuffer,
++      data, FFTW_HC2R, FFTW_ESTIMATE);
+ 
+ 	// this causes calculateAnalyzerBandIndexRanges() to be called later when getting the analysis
+ 	bandLowerIndexes.clear();
+@@ -79,10 +80,10 @@ void ASoundPlayer::deinitialize()
+ {
+ 	stopAll();
+ 
+-#ifdef HAVE_LIBRFFTW
++#ifdef HAVE_FFTW
+ 	if(analyzerPlan!=NULL)
+ 	{
+-		rfftw_destroy_plan(analyzerPlan);
++		fftw_destroy_plan(analyzerPlan);
+ 		analyzerPlan=NULL;
+ 	}
+ #endif
+@@ -163,7 +164,7 @@ void ASoundPlayer::mixSoundPlayerChannels(const unsigned nChannels,sample_t * co
+ 	if(gStereoPhaseMetersEnabled)
+ 		samplingForStereoPhaseMeters.write(buffer,bufferSize*nChannels); // NOTE: nChannels is supposed to equal devices[0].channelCount
+ 
+-#ifdef HAVE_LIBRFFTW
++#ifdef HAVE_FFTW
+ 	if(gFrequencyAnalyzerEnabled)
+ 	{
+ 		CMutexLocker l(frequencyAnalysisBufferMutex);
+@@ -229,7 +230,7 @@ const size_t ASoundPlayer::getSamplingForStereoPhaseMeters(sample_t *buffer,size
+ 	return samplingForStereoPhaseMeters.read(buffer,min(bufferSizeInSamples,(size_t)(gStereoPhaseMeterPointCount*devices[0].channelCount)))/devices[0].channelCount; // ??? only device zero
+ }
+ 
+-#ifdef HAVE_LIBRFFTW
++#ifdef HAVE_FFTW
+ 
+ // NOTE: when I say 'band', a band is expressed in terms of an 
+ // octave (where octave is a real number) and each band is a 
+@@ -337,7 +338,7 @@ const vector<float> ASoundPlayer::getFrequencyAnalysis() const
+ 	if(!isInitialized())
+ 		return v;
+ 
+-#ifdef HAVE_LIBRFFTW
++#ifdef HAVE_FFTW
+ 	CMutexLocker l(frequencyAnalysisBufferMutex);
+ 
+ 	if(!frequencyAnalysisBufferPrepared)
+@@ -378,8 +379,7 @@ for(int t=0;t<ASP_ANALYSIS_BUFFER_SIZE;t++)
+ }
+ */
+ 
+-	fftw_real data[ASP_ANALYSIS_BUFFER_SIZE];
+-	rfftw_one(analyzerPlan,(fftw_real *)frequencyAnalysisBuffer,data);
++  fftw_execute(analyzerPlan);
+ 	
+ 	for(size_t t=0;t<bandLowerIndexes.size();t++)
+ 	{
+@@ -449,7 +449,7 @@ for(int t=0;t<ASP_ANALYSIS_BUFFER_SIZE;t++)
+ 
+ const size_t ASoundPlayer::getFrequency(size_t index) const
+ {
+-#ifdef HAVE_LIBRFFTW
++#ifdef HAVE_FFTW
+ 	return (size_t)freqAtOctave((float)index/(float)octaveStride);
+ #else
+ 	return 0;
+@@ -458,7 +458,7 @@ const size_t ASoundPlayer::getFrequency(size_t index) const
+ 
+ const size_t ASoundPlayer::getFrequencyAnalysisOctaveStride() const
+ {
+-#ifdef HAVE_LIBRFFTW
++#ifdef HAVE_FFTW
+ 	return octaveStride;
+ #else
+ 	return 1;
+diff --git a/src/backend/ASoundPlayer.h b/src/backend/ASoundPlayer.h
+index afd5152..6c1f48d 100644
+--- a/src/backend/ASoundPlayer.h
++++ b/src/backend/ASoundPlayer.h
+@@ -29,11 +29,14 @@ class ASoundPlayer;
+ 
+ #include <vector>
+ 
+-#ifdef HAVE_LIBRFFTW
++#ifdef HAVE_FFTW
+ #include <map>
+-#include <rfftw.h>
++#include <fftw3.h>
+ #include <CMutex.h>
+ #include <TAutoBuffer.h>
++
++typedef double fftw_real;
++
+ #endif
+ 
+ 
+@@ -165,14 +168,15 @@ private:
+ 	mutable sample_t peakLevels[MAX_CHANNELS];
+ 	mutable bool resetPeakLevels[MAX_CHANNELS]; // a bool that is flagged if the next buffer processed should start with a new max or max with the current one (since it hasn't been obtained from the get method yet)
+ 
+-#ifdef HAVE_LIBRFFTW
++#ifdef HAVE_FFTW
+ 	#define ASP_ANALYSIS_BUFFER_SIZE 8192
+ 	mutable CMutex frequencyAnalysisBufferMutex;
+ 	mutable bool frequencyAnalysisBufferPrepared;
+ 	mutable fftw_real frequencyAnalysisBuffer[ASP_ANALYSIS_BUFFER_SIZE];
+ 	size_t frequencyAnalysisBufferLength; // the amount of data that mixSoundPlayerChannels copied into the buffer
+ 	mutable map<size_t,TAutoBuffer<fftw_real> *> hammingWindows; // create and save Hamming windows for any length needed
+-	rfftw_plan analyzerPlan;
++	fftw_plan analyzerPlan;
++	fftw_real data[ASP_ANALYSIS_BUFFER_SIZE];
+ 	mutable vector<size_t> bandLowerIndexes; // mutable because calculateAnalyzerBandIndexRanges is called from getFrequencyAnalysis
+ 	mutable vector<size_t> bandUpperIndexes;
+ 
+diff --git a/src/backend/DSP/Convolver.h b/src/backend/DSP/Convolver.h
+index 816dc89..65dfc75 100644
+--- a/src/backend/DSP/Convolver.h
++++ b/src/backend/DSP/Convolver.h
+@@ -82,12 +82,14 @@ private:
+ 
+ 
+ 
+-#ifdef HAVE_LIBRFFTW
++#ifdef HAVE_FFTW
+ 
+-#include <rfftw.h>
++#include <fftw3.h>
+ 
+ #include <TAutoBuffer.h>
+ 
++typedef double fftw_real;
++
+ /*
+  *	Written partly from stuff I learned in "The Scientist and 
+  *	Engineer's Guide to Digital Signal Processing":
+@@ -138,8 +140,8 @@ public:
+ 		data(W),dataPos(0),
+ 		xform(W+1),
+ 
+-		p(rfftw_create_plan_specific(W, FFTW_REAL_TO_COMPLEX, FFTW_ESTIMATE, data,1,xform,1)),
+-		un_p(rfftw_create_plan_specific(W, FFTW_COMPLEX_TO_REAL, FFTW_ESTIMATE, xform,1,data,1)),
++		p   (fftw_plan_r2r_1d(W, data, xform, FFTW_R2HC, FFTW_ESTIMATE)),
++		un_p(fftw_plan_r2r_1d(W, xform, data, FFTW_HC2R, FFTW_ESTIMATE)),
+ 
+ 		kernel_real(W/2+1),
+ 		kernel_img(W/2+1),
+@@ -160,21 +162,21 @@ public:
+ 
+ 	virtual ~TFFTConvolverTimeDomainKernel()
+ 	{
+-		rfftw_destroy_plan(p);
+-		rfftw_destroy_plan(un_p);
++		fftw_destroy_plan(p);
++		fftw_destroy_plan(un_p);
+ 	}
+ 
+ 	// the NEW set of coefficients MUST be the same size as the original one at construction
+ 	void setNewFilterKernel(const coefficient_t filterKernel[])
+ 	{
+ 		TAutoBuffer<fftw_real> data(W),xform(W+1);
+-		rfftw_plan p=rfftw_create_plan_specific(W, FFTW_REAL_TO_COMPLEX, FFTW_ESTIMATE, data,1,xform,1);
+-		rfftw_plan un_p=rfftw_create_plan_specific(W, FFTW_COMPLEX_TO_REAL, FFTW_ESTIMATE, xform,1,data,1);
++		fftw_plan p    = fftw_plan_r2r_1d(W, data, xform, FFTW_R2HC, FFTW_ESTIMATE);
++		fftw_plan un_p = fftw_plan_r2r_1d(W, xform, data, FFTW_HC2R, FFTW_ESTIMATE);
+ 
+ 		prepareFilterKernel(filterKernel,data,xform,p,un_p);
+ 
+-		rfftw_destroy_plan(p);
+-		rfftw_destroy_plan(un_p);
++		fftw_destroy_plan(p);
++		fftw_destroy_plan(un_p);
+ 	}
+ 
+ 
+@@ -202,7 +204,7 @@ public:
+ 			data[dataPos++]=0;
+ 
+ 		// do the fft data --> xform
+-		rfftw_one(p, data, xform);
++		fftw_execute(p);
+ 		xform[W]=0; // to help out macros
+ 						
+ 
+@@ -220,7 +222,7 @@ public:
+ 		}
+ 
+ 		// do the inverse fft xfrorm --> data
+-		rfftw_one(un_p, xform, data);
++		fftw_execute(un_p);
+ 
+ 		// add the last segment's overlap to this segment
+ 		for(size_t t=0;t<M-1;t++)
+@@ -281,8 +283,8 @@ private:
+ 
+ 	TAutoBuffer<fftw_real> xform;
+ 
+-	rfftw_plan p;
+-	rfftw_plan un_p;
++	fftw_plan p;
++	fftw_plan un_p;
+ 
+ 	TAutoBuffer<fftw_real> kernel_real;
+ 	TAutoBuffer<fftw_real> kernel_img;
+@@ -308,7 +310,7 @@ private:
+ 		throw runtime_error(string(__func__)+" -- cannot handle a filter kernel of size "+istring(M)+" -- perhaps simply another element needs to be added to fftw_good_sizes");
+ 	}
+ 	
+-	void prepareFilterKernel(const coefficient_t filterKernel[],fftw_real data[],fftw_real xform[],rfftw_plan p,rfftw_plan un_p)
++	void prepareFilterKernel(const coefficient_t filterKernel[],fftw_real data[],fftw_real xform[],fftw_plan p,fftw_plan un_p)
+ 	{
+ 			// ??? perhaps a parameter could be passed that would indicate what the filterKernel is.. whether it's time-domain or freq domain already
+ 
+@@ -318,7 +320,7 @@ private:
+ 		for(size_t t=M;t<W;t++) // pad with zero
+ 			data[t]=0;
+ 
+-		rfftw_one(p, data, xform);
++		fftw_execute(p);
+ 		xform[W]=0; // to help out macros
+ 
+ 		// copy into kernel_real and kernel_img
+@@ -410,9 +412,9 @@ private:
+ 				xform[W-t]=imaginary[t];
+ 		}
+ 		TAutoBuffer<fftw_real> data(W);
+-		rfftw_plan un_p=rfftw_create_plan(W, FFTW_COMPLEX_TO_REAL, FFTW_ESTIMATE);
+-		rfftw_one(un_p, xform, data);	// xform -> data
+-		rfftw_destroy_plan(un_p);
++		fftw_plan un_p = fftw_plan_r2r_1d(W, xform, data, FFTW_HC2R, FFTW_ESTIMATE);
++		fftw_execute(un_p);	// xform -> data
++		fftw_destroy_plan(un_p);
+ 
+ 
+ 		// fftw scales the output of the complex->real transform by W (undo this)
+diff --git a/src/backend/Effects/CTestEffect.cpp b/src/backend/Effects/CTestEffect.cpp
+index e47b029..f14282f 100644
+--- a/src/backend/Effects/CTestEffect.cpp
++++ b/src/backend/Effects/CTestEffect.cpp
+@@ -112,7 +112,7 @@ bool CTestEffect::doActionSizeSafe(CActionSound *actionSound,bool prepareForUndo
+ 	filter_kernel[M/2]+=1.0;
+ #endif
+ 
+-#ifdef HAVE_LIBRFFTW
++#ifdef HAVE_FFTW
+ 	TFFTConvolverTimeDomainKernel<sample_t,float> c(filter_kernel,M);
+ 
+ 	for(unsigned i=0;i<actionSound->sound->getChannelCount();i++)
+diff --git a/src/backend/Filters/CArbitraryFIRFilter.cpp b/src/backend/Filters/CArbitraryFIRFilter.cpp
+index de9b793..232b40c 100644
+--- a/src/backend/Filters/CArbitraryFIRFilter.cpp
++++ b/src/backend/Filters/CArbitraryFIRFilter.cpp
+@@ -46,7 +46,7 @@ CArbitraryFIRFilter::~CArbitraryFIRFilter()
+ 
+ bool CArbitraryFIRFilter::doActionSizeSafe(CActionSound *actionSound,bool prepareForUndo)
+ {
+-#ifdef HAVE_LIBRFFTW
++#ifdef HAVE_FFTW
+ 	const sample_pos_t start=actionSound->start;
+ 	const sample_pos_t stop=actionSound->stop;
+ 	const sample_pos_t selectionLength=actionSound->selectionLength();
+diff --git a/src/backend/Filters/CConvolutionFilter.cpp b/src/backend/Filters/CConvolutionFilter.cpp
+index b8af95f..bc41b93 100644
+--- a/src/backend/Filters/CConvolutionFilter.cpp
++++ b/src/backend/Filters/CConvolutionFilter.cpp
+@@ -60,7 +60,7 @@ CConvolutionFilter::~CConvolutionFilter()
+ #include <unistd.h> // for symlink and unlink
+ bool CConvolutionFilter::doActionSizeSafe(CActionSound *actionSound,bool prepareForUndo)
+ {
+-#ifdef HAVE_LIBRFFTW
++#ifdef HAVE_FFTW
+ 	const sample_pos_t start=actionSound->start;
+ 	const sample_pos_t stop=actionSound->stop;
+ 	const sample_pos_t selectionLength=actionSound->selectionLength();
+diff --git a/src/backend/Filters/CMorphingArbitraryFIRFilter.cpp b/src/backend/Filters/CMorphingArbitraryFIRFilter.cpp
+index 7dfe28f..8451b36 100644
+--- a/src/backend/Filters/CMorphingArbitraryFIRFilter.cpp
++++ b/src/backend/Filters/CMorphingArbitraryFIRFilter.cpp
+@@ -53,7 +53,7 @@ CMorphingArbitraryFIRFilter::~CMorphingArbitraryFIRFilter()
+ 
+ bool CMorphingArbitraryFIRFilter::doActionSizeSafe(CActionSound *actionSound,bool prepareForUndo)
+ {
+-#ifdef HAVE_LIBRFFTW
++#ifdef HAVE_FFTW
+ 	const sample_pos_t start=actionSound->start;
+ 	const sample_pos_t stop=actionSound->stop;
+ 	const sample_pos_t selectionLength=actionSound->selectionLength();
+diff --git a/src/backend/Makefile.am b/src/backend/Makefile.am
+index 00e8652..8870494 100644
+--- a/src/backend/Makefile.am
++++ b/src/backend/Makefile.am
+@@ -146,8 +146,8 @@ libbackend_la_SOURCES= \
+ 		        settings.cpp
+ 
+ # SOUNDTOUCH_CXXFLAGS is in Remaster/Makefile.am
+-AM_CXXFLAGS=@AUDIOFILE_CFLAGS@ @ALSA_CFLAGS@ @JACK_CFLAGS@ @OGG_CFLAGS@ @VORBIS_CFLAGS@ @LIBFLACPP_CFLAGS@ @LIBFLAC_CFLAGS@
++AM_CXXFLAGS=@AUDIOFILE_CFLAGS@ @ALSA_CFLAGS@ @JACK_CFLAGS@ @OGG_CFLAGS@ @VORBIS_CFLAGS@ @LIBFLACPP_CFLAGS@ @LIBFLAC_CFLAGS@ @FFTW_CFLAGS@
+ 
+ # SOUNDTOUCH_LIBS is in Remaster/Makefile.am
+-libbackend_la_LIBADD=@LTLIBINTL@ @AUDIOFILE_LIBS@ @ALSA_LIBS@ @JACK_LIBS@ @OGG_LIBS@ @VORBISFILE_LIBS@ @VORBISENC_LIBS@ @VORBIS_LIBS@ @LIBFLACPP_LIBS@ @LIBFLAC_LIBS@
++libbackend_la_LIBADD=@LTLIBINTL@ @AUDIOFILE_LIBS@ @ALSA_LIBS@ @JACK_LIBS@ @OGG_LIBS@ @VORBISFILE_LIBS@ @VORBISENC_LIBS@ @VORBIS_LIBS@ @LIBFLACPP_LIBS@ @LIBFLAC_LIBS@ @FFTW_LIBS@
+ 
+diff --git a/src/frontend_fox/CMetersWindow.cpp b/src/frontend_fox/CMetersWindow.cpp
+index 5b49098..d2dba82 100644
+--- a/src/frontend_fox/CMetersWindow.cpp
++++ b/src/frontend_fox/CMetersWindow.cpp
+@@ -829,7 +829,7 @@ public:
+ 				x+=barWidth;
+ 			}
+ 		}
+-#ifndef HAVE_LIBRFFTW
++#ifndef HAVE_FFTW
+ 		else
+ 		{
+ 			dc.compat_setFont(getApp()->getNormalFont());
+-- 
+1.7.3.4
+

Added: trunk/overlays/proaudio/media-sound/rezound/files/0003-autotools-patch.patch
===================================================================
--- trunk/overlays/proaudio/media-sound/rezound/files/0003-autotools-patch.patch	                        (rev 0)
+++ trunk/overlays/proaudio/media-sound/rezound/files/0003-autotools-patch.patch	2012-01-21 12:37:48 UTC (rev 2071)
@@ -0,0 +1,175 @@
+Subject: [PATCH 3/4] autotools patch
+
+---
+ config/m4/audiofile.m4  |    2 +-
+ config/m4/cxx.m4        |    2 +-
+ config/m4/libFLAC++.m4  |    2 +-
+ config/m4/libFLAC.m4    |    2 +-
+ config/m4/ogg.m4        |    2 +-
+ config/m4/soundtouch.m4 |    2 +-
+ config/m4/vorbis.m4     |    2 +-
+ configure.ac            |   30 +++++++++++++++---------------
+ 8 files changed, 22 insertions(+), 22 deletions(-)
+
+diff --git a/config/m4/audiofile.m4 b/config/m4/audiofile.m4
+index 18929ef..497a6f2 100644
+--- a/config/m4/audiofile.m4
++++ b/config/m4/audiofile.m4
+@@ -9,7 +9,7 @@
+ dnl AM_PATH_AUDIOFILE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+ dnl Test for Audio File Library, and define AUDIOFILE_CFLAGS and AUDIOFILE_LIBS.
+ dnl
+-AC_DEFUN(AM_PATH_AUDIOFILE,
++AC_DEFUN([AM_PATH_AUDIOFILE],
+ [dnl 
+ dnl Get compiler flags and libraries from the audiofile-config script.
+ dnl
+diff --git a/config/m4/cxx.m4 b/config/m4/cxx.m4
+index 946cbe6..e43397e 100644
+--- a/config/m4/cxx.m4
++++ b/config/m4/cxx.m4
+@@ -27,7 +27,7 @@ dnl add them to our gcc CXXFLAGS
+ dnl ajv_CXX_FLAG(compiler flag)
+ dnl Usage - Pass one argument- the Compiler flag to check for. If the falg is
+ dnl found to be valid, it is included in CXXFLAGS otherwise, it's left out
+-AC_DEFUN(ajv_CXX_FLAG,
++AC_DEFUN([ajv_CXX_FLAG],
+ 
+ 	[AC_MSG_CHECKING(if $CXX accepts $1 )
+ 
+diff --git a/config/m4/libFLAC++.m4 b/config/m4/libFLAC++.m4
+index 5daa0e7..cbb424b 100644
+--- a/config/m4/libFLAC++.m4
++++ b/config/m4/libFLAC++.m4
+@@ -5,7 +5,7 @@
+ dnl AM_PATH_LIBFLACPP([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+ dnl Test for libFLAC++, and define LIBFLACPP_CFLAGS and LIBFLACPP_LIBS
+ dnl
+-AC_DEFUN(AM_PATH_LIBFLACPP,
++AC_DEFUN([AM_PATH_LIBFLACPP],
+ [dnl 
+ dnl Get the cflags and libraries
+ dnl
+diff --git a/config/m4/libFLAC.m4 b/config/m4/libFLAC.m4
+index 7f7c63f..2e8f09b 100644
+--- a/config/m4/libFLAC.m4
++++ b/config/m4/libFLAC.m4
+@@ -4,7 +4,7 @@
+ dnl AM_PATH_LIBFLAC([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+ dnl Test for libFLAC, and define LIBFLAC_CFLAGS and LIBFLAC_LIBS
+ dnl
+-AC_DEFUN(AM_PATH_LIBFLAC,
++AC_DEFUN([AM_PATH_LIBFLAC],
+ [dnl 
+ dnl Get the cflags and libraries
+ dnl
+diff --git a/config/m4/ogg.m4 b/config/m4/ogg.m4
+index 2005ff8..e325377 100644
+--- a/config/m4/ogg.m4
++++ b/config/m4/ogg.m4
+@@ -5,7 +5,7 @@
+ dnl XIPH_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+ dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
+ dnl
+-AC_DEFUN(XIPH_PATH_OGG,
++AC_DEFUN([XIPH_PATH_OGG],
+ [dnl 
+ dnl Get the cflags and libraries
+ dnl
+diff --git a/config/m4/soundtouch.m4 b/config/m4/soundtouch.m4
+index f904643..f472418 100644
+--- a/config/m4/soundtouch.m4
++++ b/config/m4/soundtouch.m4
+@@ -24,7 +24,7 @@ AH_TEMPLATE([HAVE_LIBSOUNDTOUCH], [defined by $0])
+ SOUNDTOUCH_CXXFLAGS=""
+ SOUNDTOUCH_LIBS=""
+ 
+-AC_DEFUN(AM_PATH_SOUNDTOUCH,[
++AC_DEFUN([AM_PATH_SOUNDTOUCH],[
+ 	AC_ARG_WITH(soundtouch-prefix,[  --with-soundtouch-prefix=DIR   Prefix where SoundTouch was installed (optional)], [soundtouch_prefix="$withval"],[soundtouch_prefix=""])
+ 
+ 	AC_ARG_ENABLE(soundtouch-check,[  --disable-soundtouch-check   Do not look for the SoundTouch Library],[enable_soundtouch_check="$enableval"],[enable_soundtouch_check="yes"])
+diff --git a/config/m4/vorbis.m4 b/config/m4/vorbis.m4
+index ca96e21..75e652f 100644
+--- a/config/m4/vorbis.m4
++++ b/config/m4/vorbis.m4
+@@ -6,7 +6,7 @@
+ dnl XIPH_PATH_VORBIS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+ dnl Test for libvorbis, and define VORBIS_CFLAGS and VORBIS_LIBS
+ dnl
+-AC_DEFUN(XIPH_PATH_VORBIS,
++AC_DEFUN([XIPH_PATH_VORBIS],
+ [dnl 
+ dnl Get the cflags and libraries
+ dnl
+diff --git a/configure.ac b/configure.ac
+index f521d44..8ed1ec0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -24,7 +24,8 @@
+ # Process this file with autoconf to produce a configure script.
+ 
+ AC_INIT(rezound, 0.12.3beta, [http://sourceforge.net/tracker/?atid=105056&group_id=5056])
+-AC_CONFIG_AUX_DIR(config)
++AC_CONFIG_AUX_DIR([config])
++AC_CONFIG_MACRO_DIR([config/m4])
+ AM_CONFIG_HEADER([config/config.h])
+ AM_INIT_AUTOMAKE
+ AC_DISABLE_SHARED	# This makes libtool only build static libs 
+@@ -79,15 +80,15 @@ AC_PATH_PROG(CDRDAO, cdrdao)
+ 
+ 
+ 
+-
++#Need a better fix
+ ############################################################################
+ # Set some compilter flags if they're available                            #
+ ############################################################################
+-ajv_CXX_FLAG(-g)
+-ajv_CXX_FLAG(-Wall)
+-ajv_CXX_FLAG(-Wno-unused-function)
+-ajv_CXX_FLAG(-Wno-unused-variable)
+-ajv_CXX_FLAG(-Wno-unused)
++#ajv_CXX_FLAG(-g)
++#ajv_CXX_FLAG(-Wall)
++#ajv_CXX_FLAG(-Wno-unused-function)
++#ajv_CXX_FLAG(-Wno-unused-variable)
++#ajv_CXX_FLAG(-Wno-unused)
+ 
+ 
+ 
+@@ -661,24 +662,23 @@ fi
+ # Check for the Frontend GUI Library                                       #
+ ############################################################################
+ 
+-## ??? this needs to be based on a config flag.. 
+ ### This is a check for a class in a C++ library. To pinpoint the specific version we need we could change what class is linked.
+ ### it sets $1_CXXFLAGS and $1_LIBS to either something useful or nothing
+-##ajv_CXX_CHECK_LIB(FOX-1.6,FXApp,fox-1.6/fx.h,[http://fox-toolkit.org],[],false)
++##AC_CHECK_LIB(FOX-1.6,fxfindfox,,false)
+ ##if test -z "$FOX_1_6_LIBS"; then
+-##	ajv_CXX_CHECK_LIB(FOX-1.5,FXApp,fox-1.5/fx.h,[http://fox-toolkit.org],[],false)
++##	AC_CHECK_LIB(FOX-1.5,fxfindfox,,false)
+ ##	if test -z "$FOX_1_5_LIBS"; then
+-##		ajv_CXX_CHECK_LIB(FOX-1.4,FXApp,fox-1.4/fx.h,[http://fox-toolkit.org],[],false)
++##		AC_CHECK_LIB(FOX-1.4,fxfindfox,,false)
+ ##		if test -z "$FOX_1_4_LIBS"; then
+-##			ajv_CXX_CHECK_LIB(FOX-1.3,FXApp,fox-1.3/fx.h,[http://fox-toolkit.org],[],false)
++##			AC_CHECK_LIB(FOX-1.3,fxfindfox,,false)
+ ##			if test -z "$FOX_1_3_LIBS"; then
+-##				ajv_CXX_CHECK_LIB(FOX-1.2,FXApp,fox-1.2/fx.h,[http://fox-toolkit.org],[],false)
++##				AC_CHECK_LIB(FOX-1.2,fxfindfox,,false)
+ ##				if test -z "$FOX_1_2_LIBS"; then
+ ##					# libFOX-1.2 was not found, now try libFOX-1.1
+-##					ajv_CXX_CHECK_LIB(FOX-1.1,FXApp,fox-1.1/fx.h,[http://fox-toolkit.org],[],false)
++##					AC_CHECK_LIB(FOX-1.1,fxfindfox,,false)
+ ##					if test -z "$FOX_1_1_LIBS"; then
+ ##						# libFOX-1.1 was not found, now try libFOX
+-##						ajv_CXX_CHECK_LIB(FOX,FXApp,fox/fx.h,[http://fox-toolkit.org],[],true)
++##						AC_CHECK_LIB(FOX,fxfindfox,,true)
+ ##					fi
+ ##				fi
+ ##			fi
+-- 
+1.7.3.4
+

Added: trunk/overlays/proaudio/media-sound/rezound/files/0004-pkg-config-and-the-audiofile-library.patch
===================================================================
--- trunk/overlays/proaudio/media-sound/rezound/files/0004-pkg-config-and-the-audiofile-library.patch	                        (rev 0)
+++ trunk/overlays/proaudio/media-sound/rezound/files/0004-pkg-config-and-the-audiofile-library.patch	2012-01-21 12:37:48 UTC (rev 2071)
@@ -0,0 +1,28 @@
+Subject: [PATCH 4/4] pkg config and the audiofile library
+
+---
+ configure.ac |    8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 8ed1ec0..8d99090 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -514,10 +514,10 @@ AC_ARG_ENABLE(
+ ### Audiofile ##############################################################
+ 
+ # used to conditionally activate code in ClibaudiofileSoundTranslator.*
+-AH_TEMPLATE(HAVE_LIBAUDIOFILE)
+-# this macro detects libaudiofile and does an AC_SUBST on AUDIOFILE_CFLAGS and AUDIOFILE_LIBS, so I put these variables in src/backend/Makefile.am for substitution (also audiofile comes with with a pkg-config file, I could use that)
+-AM_PATH_AUDIOFILE(0.2.2,AC_DEFINE(HAVE_LIBAUDIOFILE),AC_MSG_NOTICE([audiofile website: http://oss.sgi.com/projects/audiofile]))
+-
++PKG_CHECK_MODULES([AUDIOFILE], [audiofile >= 0.2.2],AC_DEFINE([HAVE_LIBAUDIOFILE], [1], [We have audiofile]))
++dnl PKG_CHECK_MODULES([AUDIOFILE], [AUDIOFILE >= 0.2.2])
++AC_SUBST(AUDIOFILE_CFLAGS)
++AC_SUBST(AUDIOFILE_LIBS)
+ 
+ 
+ ### Ogg Vorbis Libraries ##################################################
+-- 
+1.7.3.4
+

Modified: trunk/overlays/proaudio/media-sound/rezound/rezound-9999.ebuild
===================================================================
--- trunk/overlays/proaudio/media-sound/rezound/rezound-9999.ebuild	2012-01-21 12:37:45 UTC (rev 2070)
+++ trunk/overlays/proaudio/media-sound/rezound/rezound-9999.ebuild	2012-01-21 12:37:48 UTC (rev 2071)
@@ -1,8 +1,8 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 
-EAPI="1"
+EAPI="2"
 
 inherit eutils autotools flag-o-matic subversion
 
@@ -18,16 +18,16 @@
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS=""
-IUSE="16bittmp alsa audiofile doc flac jack ladspa nls oss portaudio soundtouch vorbis"
+IUSE="16bittmp alsa doc flac jack ladspa nls oss portaudio soundtouch vorbis"
 
 RDEPEND="|| ( ( x11-libs/qt-core x11-libs/qt-gui )
 				x11-libs/qt:4 )
-	sci-libs/fftw:2.1
+	sci-libs/fftw:3.0
 	ladspa? ( >=media-libs/ladspa-sdk-1.12
 			>=media-libs/ladspa-cmt-1.15 )
-	audiofile? ( >=media-libs/audiofile-0.2.2 )
+	>=media-libs/audiofile-0.2.2
 	alsa? ( >=media-libs/alsa-lib-1.0 )
-	flac? ( >=media-libs/flac-1.1.0 )
+	flac? ( >=media-libs/flac-1.1.2[cxx] )
 	jack? ( media-sound/jack-audio-connection-kit )
 	portaudio? ( >=media-libs/portaudio-18 )
 	soundtouch? ( >=media-libs/libsoundtouch-1.3.1 )
@@ -35,12 +35,15 @@
 
 DEPEND="${RDEPEND}
 	doc? ( sys-devel/gettext
-		virtual/libintl )"
+		virtual/libintl )
+	dev-util/pkgconfig"
 
 src_unpack() {
 	unpack ${A}
 	subversion_src_unpack
+}
 
+src_prepare() {
 	EPATCH_EXCLUDE="010_all_flac-1.1.3.patch
 		030_all_dont-ignore-cxxflags.patch
 		090_all_gcc_4.3.patch
@@ -51,16 +54,24 @@
 	epatch "${FILESDIR}/${P}-qt44.patch"
 	epatch "${FILESDIR}/${P}-missing_includes.patch"
 	epatch "${FILESDIR}/${P}-O2.patch"
+	epatch "${FILESDIR}/0001-fix-ladspa-path.patch"
+	epatch "${FILESDIR}/0002-add-support-for-fftw3.patch"
+	epatch "${FILESDIR}/0003-autotools-patch.patch"
+	epatch "${FILESDIR}/0004-pkg-config-and-the-audiofile-library.patch"
+
 	#AT_M4DIR="config/m4" eautoreconf
 	./bootstrap || die
 }
 
-src_compile() {
+src_configure() {
 	# following features can't be disabled if already installed:
 	# -> flac, oggvorbis, soundtouch <-- why not? I've added missing flags
 	local sampletype="--enable-internal-sample-type=float"
 	use 16bittmp && sampletype="--enable-internal-sample-type=int16"
 
+	# -O3 isn't safe wrt #275437
+	replace-flags -O[3-9] -O2
+
 	econf \
 		$(use_enable alsa) \
 		$(use_enable jack) \
@@ -74,7 +85,9 @@
 		${sampletype} \
 		--enable-largefile \
 		|| die "configure failed"
+}
 
+src_compile() {
 	emake -j1 || die "make failed"
 }
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/