[86680] trunk/dports/audio/aubio

devans at macports.org devans at macports.org
Mon Oct 31 12:22:01 PDT 2011


Revision: 86680
          http://trac.macports.org/changeset/86680
Author:   devans at macports.org
Date:     2011-10-31 12:21:58 -0700 (Mon, 31 Oct 2011)
Log Message:
-----------
aubio:
    * replace variant +python with +python25, +python26
    * make +python26 default
    * fix python configuration
    * backport python26 compatibility fix from upstream git
    * increment revision

Modified Paths:
--------------
    trunk/dports/audio/aubio/Portfile

Added Paths:
-----------
    trunk/dports/audio/aubio/files/patch-configure.diff
    trunk/dports/audio/aubio/files/patch-python-aubio-Makefile.in.diff
    trunk/dports/audio/aubio/files/patch-python-aubio-python26.diff

Removed Paths:
-------------
    trunk/dports/audio/aubio/files/patch-python-aubio-Makefile.am.diff

Modified: trunk/dports/audio/aubio/Portfile
===================================================================
--- trunk/dports/audio/aubio/Portfile	2011-10-31 18:47:38 UTC (rev 86679)
+++ trunk/dports/audio/aubio/Portfile	2011-10-31 19:21:58 UTC (rev 86680)
@@ -5,7 +5,7 @@
 
 name                    aubio
 version                 0.3.2
-revision                2
+revision                3
 license                 GPL-2
 categories              audio
 maintainers             devans openmaintainer
@@ -26,18 +26,13 @@
 depends_lib             port:fftw-3 \
                         port:libsamplerate
 
-patchfiles              patch-python-aubio-Makefile.am.diff
+patchfiles              patch-configure.diff \
+                        patch-python-aubio-python26.diff \
+                        patch-python-aubio-Makefile.in.diff
 
-post-patch { reinplace "s| -Wno-long-double||g" ${worksrcpath}/configure.ac }
-
-use_autoreconf          yes
-autoreconf.args         -vfi
-
 configure.args          --disable-alsa \
                         --disable-jack \
-                        --disable-lash \
-                        ac_cv_path_PYTHON=no \
-                        ac_cv_path_SWIG=no
+                        --disable-lash
 
 post-build {
     # aubio's includedir is ${prefix}/include/aubio but aubio's file fft.h
@@ -45,15 +40,32 @@
     reinplace {s%-I${includedir}%-I${includedir} -I${prefix}/include%} ${worksrcpath}/${name}.pc
 }
 
-variant python description {Enable gnuplot and Python 2.5 interface} {
+variant python25 conflicts python26 description {Build bindings for Python 2.5 and Gnuplot} {
     configure.python        ${prefix}/bin/python2.5
-    configure.args-delete   ac_cv_path_PYTHON=no \
-                            ac_cv_path_SWIG=no
     depends_lib-append      port:py25-numarray \
                             port:swig-python
     depends_run-append      port:py25-gnuplot
+    post-patch {
+        reinplace "s| -Wno-long-double||g" ${worksrcpath}/configure
+        reinplace "s|__MP_PYTHON_INCLUDE_PREFIX__|${prefix}|" ${worksrcpath}/python/aubio/Makefile.in
+    }
 }
 
+variant python26 conflicts python25 description {Build bindings for Python 2.6 and Gnuplot} {
+    configure.python        ${prefix}/bin/python2.6
+    depends_lib-append      port:py26-numarray \
+                            port:swig-python
+    depends_run-append      port:py26-gnuplot
+    post-patch {
+        reinplace "s| -Wno-long-double||g" ${worksrcpath}/configure
+        reinplace "s|__MP_PYTHON_INCLUDE_PREFIX__|${frameworks_dir}/Python.framework/Versions/2.6|" ${worksrcpath}/python/aubio/Makefile.in
+    }
+}
+
+if {![variant_isset python25]} {
+    default_variants +python26
+}
+
 livecheck.type  regex
 livecheck.url   ${master_sites}
 livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"

Added: trunk/dports/audio/aubio/files/patch-configure.diff
===================================================================
--- trunk/dports/audio/aubio/files/patch-configure.diff	                        (rev 0)
+++ trunk/dports/audio/aubio/files/patch-configure.diff	2011-10-31 19:21:58 UTC (rev 86680)
@@ -0,0 +1,14 @@
+--- configure.orig	2006-10-08 16:22:01.000000000 -0700
++++ configure	2011-10-30 07:21:52.000000000 -0700
+@@ -22328,9 +22328,9 @@
+ 
+ 
+ 
+-  PYTHON_PREFIX='${prefix}'
++  PYTHON_PREFIX=`$PYTHON -c 'import sys; print sys.prefix;'`
+ 
+-  PYTHON_EXEC_PREFIX='${exec_prefix}'
++  PYTHON_EXEC_PREFIX=`$PYTHON -c 'import sys; print sys.exec_prefix;'`
+ 
+ 
+ 

Deleted: trunk/dports/audio/aubio/files/patch-python-aubio-Makefile.am.diff
===================================================================
--- trunk/dports/audio/aubio/files/patch-python-aubio-Makefile.am.diff	2011-10-31 18:47:38 UTC (rev 86679)
+++ trunk/dports/audio/aubio/files/patch-python-aubio-Makefile.am.diff	2011-10-31 19:21:58 UTC (rev 86680)
@@ -1,24 +0,0 @@
---- python/aubio/Makefile.am.orig	2011-09-21 16:50:47.000000000 -0700
-+++ python/aubio/Makefile.am	2011-09-21 16:52:41.000000000 -0700
-@@ -46,7 +46,7 @@
- SWLDFLAGS = -L${prefix}/bin -lpython${PYTHON_VERSION}
- else
- if DARWIN
--SWLDFLAGS = -bundle -framework Python
-+SWLDFLAGS = -bundle -lpython${PYTHON_VERSION}
- else
- SWLDFLAGS = -shared
- endif
-@@ -59,10 +59,9 @@
- 
- AM_CFLAGS = @AUBIO_CFLAGS@ $(NOWARN_CFLAGS) $(SWCFLAGS) \
- 	-I$(top_builddir)/src -I$(top_srcdir)/src -I$(top_srcdir)/ext \
--	-I/usr/include/python${PYTHON_VERSION} \
- 	-I${prefix}/include/python${PYTHON_VERSION} \
--	-I/usr/include \
--	-I${prefix}/include
-+	-I${prefix}/include \
-+	-I/usr/include
- 
- AUBIO_LDFLAGS = $(SWLDFLAGS) \
- 	-L$(top_builddir)/ext -laubioext \

Added: trunk/dports/audio/aubio/files/patch-python-aubio-Makefile.in.diff
===================================================================
--- trunk/dports/audio/aubio/files/patch-python-aubio-Makefile.in.diff	                        (rev 0)
+++ trunk/dports/audio/aubio/files/patch-python-aubio-Makefile.in.diff	2011-10-31 19:21:58 UTC (rev 86680)
@@ -0,0 +1,22 @@
+--- python/aubio/Makefile.in.orig	2006-10-10 07:41:06.000000000 -0700
++++ python/aubio/Makefile.in	2011-10-31 09:23:53.000000000 -0700
+@@ -263,7 +263,7 @@
+ 
+ nodist_pkgpython_PYTHON = aubiowrapper.py _aubiowrapper.so
+ @DARWIN_FALSE@@MINGW_FALSE at SWLDFLAGS = -shared
+- at DARWIN_TRUE@@MINGW_FALSE at SWLDFLAGS = -bundle -framework Python
++ at DARWIN_TRUE@@MINGW_FALSE at SWLDFLAGS = -bundle -lpython${PYTHON_VERSION}
+ @MINGW_TRUE at SWLDFLAGS = -L${prefix}/bin -lpython${PYTHON_VERSION}
+ CLEANFILES = *.pyc *.so *.o aubio_wrap.c aubiowrapper.py 
+ NOWARN_CFLAGS = -Wno-missing-prototypes -Wno-missing-declarations \
+@@ -271,9 +271,7 @@
+ 
+ AM_CFLAGS = @AUBIO_CFLAGS@ $(NOWARN_CFLAGS) $(SWCFLAGS) \
+ 	-I$(top_builddir)/src -I$(top_srcdir)/src -I$(top_srcdir)/ext \
+-	-I/usr/include/python${PYTHON_VERSION} \
+-	-I${prefix}/include/python${PYTHON_VERSION} \
+-	-I/usr/include \
++	-I__MP_PYTHON_INCLUDE_PREFIX__/include/python${PYTHON_VERSION} \
+ 	-I${prefix}/include
+ 
+ AUBIO_LDFLAGS = $(SWLDFLAGS) \

Added: trunk/dports/audio/aubio/files/patch-python-aubio-python26.diff
===================================================================
--- trunk/dports/audio/aubio/files/patch-python-aubio-python26.diff	                        (rev 0)
+++ trunk/dports/audio/aubio/files/patch-python-aubio-python26.diff	2011-10-31 19:21:58 UTC (rev 86680)
@@ -0,0 +1,185 @@
+diff -ur python/aubio.orig/bench/onset.py python/aubio/bench/onset.py
+--- python/aubio.orig/bench/onset.py	2011-10-31 10:52:53.000000000 -0700
++++ python/aubio/bench/onset.py	2011-10-31 10:54:20.000000000 -0700
+@@ -111,7 +111,7 @@
+ 		for i in self.vlist:
+ 			gd.append(i['GD']) 
+ 			fp.append(i['FP']) 
+-		d.append(Gnuplot.Data(fp, gd, with='linespoints', 
++		d.append(Gnuplot.Data(fp, gd, _with='linespoints', 
+ 			title="%s %s" % (plottitle,i['mode']) ))
+ 
+ 	def plotplotroc(self,d,outplot=0,extension='ps'):
+@@ -147,7 +147,7 @@
+ 		for i in self.vlist:
+ 			x.append(i['prec']) 
+ 			y.append(i['recl']) 
+-		d.append(Gnuplot.Data(x, y, with='linespoints', 
++		d.append(Gnuplot.Data(x, y, _with='linespoints', 
+ 			title="%s %s" % (plottitle,i['mode']) ))
+ 
+ 	def plotplotpr(self,d,outplot=0,extension='ps'):
+@@ -172,7 +172,7 @@
+ 		for i in self.vlist:
+ 			x.append(i['thres']) 
+ 			y.append(i['dist']) 
+-		d.append(Gnuplot.Data(x, y, with='linespoints', 
++		d.append(Gnuplot.Data(x, y, _with='linespoints', 
+ 			title="%s %s" % (plottitle,i['mode']) ))
+ 
+ 	def plotplotfmeas(self,d,outplot="",extension='ps', title="F-measure"):
+@@ -205,7 +205,7 @@
+ 		for i in self.vlist:
+ 			x.append(i[var]) 
+ 			y.append(i['dist']) 
+-		d.append(Gnuplot.Data(x, y, with='linespoints', 
++		d.append(Gnuplot.Data(x, y, _with='linespoints', 
+ 			title="%s %s" % (plottitle,i['mode']) ))
+ 	
+ 	def plotplotfmeasvar(self,d,var,outplot="",extension='ps', title="F-measure"):
+@@ -244,7 +244,7 @@
+ 		total = v['Torig']
+ 		for i in range(len(per)): per[i] /= total/100.
+ 
+-		d.append(Gnuplot.Data(val, per, with='fsteps', 
++		d.append(Gnuplot.Data(val, per, _with='fsteps', 
+ 			title="%s %s" % (plottitle,v['mode']) ))
+ 		#d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (mean,smean))
+ 		#d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (amean,samean))
+@@ -275,7 +275,7 @@
+ 		total = v['Torig']
+ 		for i in range(len(per)): per[i] /= total/100.
+ 
+-		d.append(Gnuplot.Data(val, per, with='fsteps', 
++		d.append(Gnuplot.Data(val, per, _with='fsteps', 
+ 			title="%s %s" % (plottitle,v['mode']) ))
+ 		#d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (mean,smean))
+ 		#d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (amean,samean))
+diff -ur python/aubio.orig/gnuplot.py python/aubio/gnuplot.py
+--- python/aubio.orig/gnuplot.py	2011-10-31 10:52:53.000000000 -0700
++++ python/aubio/gnuplot.py	2011-10-31 10:55:35.000000000 -0700
+@@ -155,7 +155,7 @@
+   """ create gnuplot plot from an audio file """
+   import Gnuplot, Gnuplot.funcutils
+   x,y = downsample_audio(time,data,maxpoints=maxpoints)
+-  return Gnuplot.Data(x,y,with='lines')
++  return Gnuplot.Data(x,y,_with='lines')
+ 
+ def make_audio_envelope(time,data,maxpoints=10000):
+   """ create gnuplot plot from an audio file """
+@@ -165,7 +165,7 @@
+   x = [i.mean() for i in numarray.array(time).resize(len(time)/bufsize,bufsize)] 
+   y = [i.mean() for i in numarray.array(data).resize(len(time)/bufsize,bufsize)] 
+   x,y = downsample_audio(x,y,maxpoints=maxpoints)
+-  return Gnuplot.Data(x,y,with='lines')
++  return Gnuplot.Data(x,y,_with='lines')
+ 
+ def gnuplot_addargs(parser):
+   """ add common gnuplot argument to OptParser object """
+diff -ur python/aubio.orig/task/beat.py python/aubio/task/beat.py
+--- python/aubio.orig/task/beat.py	2011-10-31 10:52:53.000000000 -0700
++++ python/aubio/task/beat.py	2011-10-31 10:56:25.000000000 -0700
+@@ -247,7 +247,7 @@
+ 
+ 	def plot(self,oplots,results):
+ 		import Gnuplot
+-		oplots.append(Gnuplot.Data(results,with='linespoints',title="auto"))
++		oplots.append(Gnuplot.Data(results,_with='linespoints',title="auto"))
+ 
+ 	def plotplot(self,wplot,oplots,outplot=None,extension=None,xsize=1.,ysize=1.,spectro=False):
+ 		import Gnuplot
+@@ -258,5 +258,5 @@
+ 		#f = make_audio_plot(time,data)
+ 
+ 		g = gnuplot_create(outplot=outplot, extension=extension)
+-		oplots = [Gnuplot.Data(self.gettruth(),with='linespoints',title="orig")] + oplots
++		oplots = [Gnuplot.Data(self.gettruth(),_with='linespoints',title="orig")] + oplots
+ 		g.plot(*oplots)
+diff -ur python/aubio.orig/task/notes.py python/aubio/task/notes.py
+--- python/aubio.orig/task/notes.py	2011-10-31 10:52:53.000000000 -0700
++++ python/aubio/task/notes.py	2011-10-31 10:57:15.000000000 -0700
+@@ -95,15 +95,15 @@
+ 		import numarray
+ 		import Gnuplot
+ 
+-		oplots.append(Gnuplot.Data(now,freq,with='lines',
++		oplots.append(Gnuplot.Data(now,freq,_with='lines',
+ 			title=self.params.pitchmode))
+-		oplots.append(Gnuplot.Data(now,ifreq,with='lines',
++		oplots.append(Gnuplot.Data(now,ifreq,_with='lines',
+ 			title=self.params.pitchmode))
+ 
+ 		temponsets = []
+ 		for i in onset:
+ 			temponsets.append(i*1000)
+-		oplots.append(Gnuplot.Data(now,temponsets,with='impulses',
++		oplots.append(Gnuplot.Data(now,temponsets,_with='impulses',
+ 			title=self.params.pitchmode))
+ 
+ 	def plotplot(self,wplot,oplots,outplot=None,multiplot = 0):
+@@ -117,10 +117,10 @@
+ 		# check if ground truth exists
+ 		#timet,pitcht = self.gettruth()
+ 		#if timet and pitcht:
+-		#	oplots = [Gnuplot.Data(timet,pitcht,with='lines',
++		#	oplots = [Gnuplot.Data(timet,pitcht,_with='lines',
+ 		#		title='ground truth')] + oplots
+ 
+-		t = Gnuplot.Data(0,0,with='impulses') 
++		t = Gnuplot.Data(0,0,_with='impulses') 
+ 
+ 		g = gnuplot_init(outplot)
+ 		g('set title \'%s\'' % (re.sub('.*/','',self.input)))
+diff -ur python/aubio.orig/task/onset.py python/aubio/task/onset.py
+--- python/aubio.orig/task/onset.py	2011-10-31 10:52:53.000000000 -0700
++++ python/aubio/task/onset.py	2011-10-31 10:57:49.000000000 -0700
+@@ -103,7 +103,7 @@
+ 		self.maxofunc = max(ofunc)
+ 		# onset detection function 
+ 		downtime = numarray.arange(len(ofunc))*self.params.step
+-		oplot.append(Gnuplot.Data(downtime,ofunc,with='lines',title=self.params.onsetmode))
++		oplot.append(Gnuplot.Data(downtime,ofunc,_with='lines',title=self.params.onsetmode))
+ 
+ 		# detected onsets
+ 		if not nplot:
+@@ -114,8 +114,8 @@
+ 			#x1 = numarray.array(onsets)*self.params.step
+ 			#y1 = self.maxofunc*numarray.ones(len(onsets))
+ 			if x1:
+-				oplot.append(Gnuplot.Data(x1,y1,with='impulses'))
+-				wplot.append(Gnuplot.Data(x1,y1p,with='impulses'))
++				oplot.append(Gnuplot.Data(x1,y1,_with='impulses'))
++				wplot.append(Gnuplot.Data(x1,y1p,_with='impulses'))
+ 
+ 		oplots.append((oplot,self.params.onsetmode,self.maxofunc))
+ 
+@@ -128,7 +128,7 @@
+ 			t_onsets = aubio.txtfile.read_datafile(datafile)
+ 			x2 = numarray.array(t_onsets).resize(len(t_onsets))
+ 			y2 = self.maxofunc*numarray.ones(len(t_onsets))
+-			wplot.append(Gnuplot.Data(x2,y2,with='impulses'))
++			wplot.append(Gnuplot.Data(x2,y2,_with='impulses'))
+ 			
+ 			tol = 0.050 
+ 
+diff -ur python/aubio.orig/task/pitch.py python/aubio/task/pitch.py
+--- python/aubio.orig/task/pitch.py	2011-10-31 10:52:53.000000000 -0700
++++ python/aubio/task/pitch.py	2011-10-31 10:59:25.000000000 -0700
+@@ -156,7 +156,7 @@
+ 
+ 		time = [ (i+self.params.pitchdelay)*self.params.step for i in range(len(pitch)) ]
+ 		pitch = [aubio_freqtomidi(i) for i in pitch]
+-		oplots.append(Gnuplot.Data(time,pitch,with='lines',
++		oplots.append(Gnuplot.Data(time,pitch,_with='lines',
+ 			title=self.params.pitchmode))
+ 		titles.append(self.params.pitchmode)
+ 
+@@ -170,7 +170,7 @@
+ 		if truth:
+ 			timet,pitcht = self.gettruth()
+ 			if timet and pitcht:
+-				oplots = [Gnuplot.Data(timet,pitcht,with='lines',
++				oplots = [Gnuplot.Data(timet,pitcht,_with='lines',
+ 					title='ground truth')] + oplots
+ 
+ 		g = gnuplot_create(outplot=outplot, extension=extension)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111031/60210400/attachment-0001.html>


More information about the macports-changes mailing list