Hey Jacob,

tried to build audacity today, but one of its dependencies,
vamp-plugin-sdk, failed to because it 'isnan' and 'isinf'
were undeclared.

Take a look at /usr/include/g++/cmath to see what's going
on -- the functions are pulled into the std namespace,
but the SpectralCentroid.cpp didn't use the whole namespace.
There might be a clean fix, but the patch below fixes this for
me so I thought I'd share.

Stefan

Index: Makefile
===================================================================
RCS file: /usr/cvs/ports/audio/vamp-plugin-sdk/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile
--- Makefile    11 Jan 2009 09:22:08 -0000      1.1.1.1
+++ Makefile    24 Jan 2009 22:38:00 -0000
@@ -3,6 +3,7 @@
 COMMENT =              audio plugin API
 
 DISTNAME =             vamp-plugin-sdk-1.3
+PKGNAME =              ${DISTNAME}p0
 
 SHARED_LIBS +=         vamp-sdk        0.0
 SHARED_LIBS +=         vamp-hostsdk    0.0
Index: patches/patch-examples_SpectralCentroid_cpp
===================================================================
RCS file: 
/usr/cvs/ports/audio/vamp-plugin-sdk/patches/patch-examples_SpectralCentroid_cpp,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-examples_SpectralCentroid_cpp
--- patches/patch-examples_SpectralCentroid_cpp 11 Jan 2009 09:22:08 -0000      
1.1.1.1
+++ patches/patch-examples_SpectralCentroid_cpp 24 Jan 2009 22:37:19 -0000
@@ -1,7 +1,19 @@
 $OpenBSD: patch-examples_SpectralCentroid_cpp,v 1.1.1.1 2009/01/11 09:22:08 
jakemsr Exp $
---- examples/SpectralCentroid.cpp.orig Wed Mar  5 12:51:29 2008
-+++ examples/SpectralCentroid.cpp      Wed Mar  5 12:51:59 2008
-@@ -165,13 +165,13 @@ SpectralCentroid::process(const float *const *inputBuf
+--- examples/SpectralCentroid.cpp.orig Wed Jul  9 11:42:49 2008
++++ examples/SpectralCentroid.cpp      Sat Jan 24 22:36:51 2009
+@@ -36,10 +36,7 @@
+ 
+ #include "SpectralCentroid.h"
+ 
+-using std::string;
+-using std::vector;
+-using std::cerr;
+-using std::endl;
++using namespace std;
+ 
+ #include <cmath>
+ 
+@@ -165,13 +162,13 @@ SpectralCentroid::process(const float *const *inputBuf
  
        Feature feature;
        feature.hasTimestamp = false;

Reply via email to