[54050] trunk/dports/python

jameskyle at macports.org jameskyle at macports.org
Sun Jul 19 14:08:51 PDT 2009


Revision: 54050
          http://trac.macports.org/changeset/54050
Author:   jameskyle at macports.org
Date:     2009-07-19 14:08:51 -0700 (Sun, 19 Jul 2009)
Log Message:
-----------
Provides the Python Experimental Programming Library.
Includes support for ActiveWire cards.

Added Paths:
-----------
    trunk/dports/python/py26-pyepl/
    trunk/dports/python/py26-pyepl/Portfile
    trunk/dports/python/py26-pyepl/files/
    trunk/dports/python/py26-pyepl/files/patch-code-hardware-Makefile.diff
    trunk/dports/python/py26-pyepl/files/patch-code-hardware-eeg-pulse-Makefile.diff
    trunk/dports/python/py26-pyepl/files/patch-code-hardware-sound-Makefile.diff
    trunk/dports/python/py26-pyepl/files/patch-code-hardware-vr-Makefile.diff
    trunk/dports/python/py26-pyepl/files/patch-setup.py.diff

Added: trunk/dports/python/py26-pyepl/Portfile
===================================================================
--- trunk/dports/python/py26-pyepl/Portfile	                        (rev 0)
+++ trunk/dports/python/py26-pyepl/Portfile	2009-07-19 21:08:51 UTC (rev 54050)
@@ -0,0 +1,68 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id: Portfile 52656 2009-06-20 18:09:47Z jameskyle at macports.org $
+
+PortSystem              1.0
+PortGroup               python26 1.0
+
+name                    py26-pyepl
+version                 1.0.29
+categories              python
+
+platforms               darwin
+maintainers             jameskyle
+
+description             PyEPL (the Python Experiment-Programming Library) is a library for coding psychology experiments in Python. (awcard support disabled)
+
+long_description        ${description}.  It supports presentation of both visual and auditory stimuli, and supports both manual (keyboard/joystick) and sound (microphone) input as responses.
+
+homepage                http://pyepl.sourceforge.net/
+
+depends_lib             port:libsndfile \
+                        port:libsamplerate \
+                        port:swig \
+                        port:py26-numpy \
+                        port:py26-pil \
+                        port:py26-opengl \
+                        port:py26-pyrex \
+                        port:py26-ode \
+                        port:py26-game \
+                        port:py26-setuptools 
+
+patchfiles              patch-setup.py.diff \
+                        patch-code-hardware-Makefile.diff \
+                        patch-code-hardware-sound-Makefile.diff \
+                        patch-code-hardware-vr-Makefile.diff
+     
+worksrcdir              pyepl-${version}
+master_sites            sourceforge:pyepl
+extract.suffix          tgz
+distfiles               ${worksrcdir}.${extract.suffix}
+
+checksums               md5     009e5a537bcf27b8810afa416487a8d6 \
+                        sha1    bd84ad6b765e5aa49e5da3ab0c8ebdd0fd6b14b6 \
+                        rmd160  7a83e6c0359e9b9ba856575e7d881a0770e8a57b
+
+pre-configure {
+  reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/setup.py  
+  reinplace "s|\"_awCard.so\"|\"_awCard.so\", \"awCard.py\"|g" ${worksrcpath}/setup.py
+  
+  reinplace "s|@@PYTHON.INC@@|${python.include}|g" ${worksrcpath}/code/hardware/Makefile
+  
+  reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/code/hardware/sound/Makefile
+  
+  reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/code/hardware/vr/Makefile
+  
+  reinplace "s|@@PYTHON@@|${python.bin}|g" ${worksrcpath}/code/hardware/vr/Makefile
+  
+  set hroot "${worksrcpath}/code/hardware"
+  foreach {i} {/eeg/pulse /eeg/scalp /rt /sound /vr} {
+    reinplace "s|shell python|shell ${python.bin}|g" ${hroot}${i}/Makefile  
+  }
+  
+  reinplace "s|-law|-L${prefix}/lib -law|g" ${worksrcpath}/code/hardware/eeg/pulse/Makefile
+}
+
+
+
+livecheck.url   http://git.debian.org/?p=pkg-exppsy/pymvpa.git
+livecheck.regex {upstream\/([0-9.]+)}
\ No newline at end of file


Property changes on: trunk/dports/python/py26-pyepl/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/python/py26-pyepl/files/patch-code-hardware-Makefile.diff
===================================================================
--- trunk/dports/python/py26-pyepl/files/patch-code-hardware-Makefile.diff	                        (rev 0)
+++ trunk/dports/python/py26-pyepl/files/patch-code-hardware-Makefile.diff	2009-07-19 21:08:51 UTC (rev 54050)
@@ -0,0 +1,101 @@
+--- code/hardware/Makefile.old	2009-07-18 16:55:42.000000000 -0700
++++ code/hardware/Makefile	2009-07-18 16:56:15.000000000 -0700
+@@ -7,7 +7,7 @@
+ # Distributed under the terms of the GNU Lesser General Public License
+ # (LGPL). See the license.txt that came with this file.
+ 
+-all: eeg sound vr rt eventpoll.so timing.so keyboard.so joystick.so mouse.so
++all: sound vr rt eventpoll.so timing.so keyboard.so joystick.so mouse.so
+ 
+ eeg: FORCE
+ 	$(MAKE) -C eeg
+@@ -31,7 +31,7 @@
+ 	gcc -shared eventpoll.o -o eventpoll.so
+ 
+ eventpoll.o: eventpoll.c
+-	gcc -c -fPIC -I/usr/include/python2.3/ eventpoll.c
++	gcc -c -fPIC -I@@PYTHON.INC@@ eventpoll.c
+ 
+ eventpoll.c: eventpoll.pyx
+ 	pyrexc eventpoll.pyx
+@@ -40,7 +40,7 @@
+ 	gcc -shared timing.o -o timing.so
+ 
+ timing.o: timing.c
+-	gcc -c -fPIC -I/usr/include/python2.3/ timing.c
++	gcc -c -fPIC -I@@PYTHON.INC@@ timing.c
+ 
+ timing.c: timing.pyx
+ 	pyrexc timing.pyx
+@@ -49,7 +49,7 @@
+ 	gcc -shared keyboard.o -o keyboard.so
+ 
+ keyboard.o: keyboard.c
+-	gcc -c -fPIC -I/usr/include/python2.3/ keyboard.c
++	gcc -c -fPIC -I@@PYTHON.INC@@ keyboard.c
+ 
+ keyboard.c: keyboard.pyx
+ 	pyrexc keyboard.pyx
+@@ -58,7 +58,7 @@
+ 	gcc -shared joystick.o -o joystick.so
+ 
+ joystick.o: joystick.c
+-	gcc -c -fPIC -I/usr/include/python2.3/ joystick.c
++	gcc -c -fPIC -I@@PYTHON.INC@@ joystick.c
+ 
+ joystick.c: joystick.pyx
+ 	pyrexc joystick.pyx
+@@ -67,7 +67,7 @@
+ 	gcc -shared mouse.o -o mouse.so
+ 
+ mouse.o: mouse.c
+-	gcc -c -fPIC -I/usr/include/python2.3/ mouse.c
++	gcc -c -fPIC -I@@PYTHON.INC@@ mouse.c
+ 
+ mouse.c: mouse.pyx
+ 	pyrexc mouse.pyx
+@@ -80,7 +80,7 @@
+ 	gcc -bundle -flat_namespace -undefined suppress eventpoll.o -o eventpoll.so
+ 
+ eventpoll.o: eventpoll.c
+-	gcc -fPIC -c eventpoll.c -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3//
++	gcc -fPIC -c eventpoll.c -I@@PYTHON.INC@@
+ 
+ eventpoll.c: eventpoll.pyx
+ 	pyrexc eventpoll.pyx
+@@ -89,7 +89,7 @@
+ 	gcc -bundle -flat_namespace -undefined suppress timing.o -o timing.so
+ 
+ timing.o: timing.c
+-	gcc -fPIC -c timing.c -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3//
++	gcc -fPIC -c timing.c -I@@PYTHON.INC@@
+ 
+ timing.c: timing.pyx
+ 	pyrexc timing.pyx
+@@ -98,7 +98,7 @@
+ 	gcc -bundle -flat_namespace -undefined suppress keyboard.o -o keyboard.so
+ 
+ keyboard.o: keyboard.c
+-	gcc -fPIC -c keyboard.c -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3//
++	gcc -fPIC -c keyboard.c -I@@PYTHON.INC@@
+ 
+ keyboard.c: keyboard.pyx
+ 	pyrexc keyboard.pyx
+@@ -107,7 +107,7 @@
+ 	gcc -bundle -flat_namespace -undefined suppress joystick.o -o joystick.so
+ 
+ joystick.o: joystick.c
+-	gcc -fPIC -c joystick.c -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3//
++	gcc -fPIC -c joystick.c -I@@PYTHON.INC@@
+ 
+ joystick.c: joystick.pyx
+ 	pyrexc joystick.pyx
+@@ -116,7 +116,7 @@
+ 	gcc -bundle -flat_namespace -undefined suppress mouse.o -o mouse.so
+ 
+ mouse.o: mouse.c
+-	gcc -fPIC -c mouse.c -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3//
++	gcc -fPIC -c mouse.c -I@@PYTHON.INC@@
+ 
+ mouse.c: mouse.pyx
+ 	pyrexc mouse.pyx

Added: trunk/dports/python/py26-pyepl/files/patch-code-hardware-eeg-pulse-Makefile.diff
===================================================================
--- trunk/dports/python/py26-pyepl/files/patch-code-hardware-eeg-pulse-Makefile.diff	                        (rev 0)
+++ trunk/dports/python/py26-pyepl/files/patch-code-hardware-eeg-pulse-Makefile.diff	2009-07-19 21:08:51 UTC (rev 54050)
@@ -0,0 +1,16 @@
+--- code/hardware/eeg/pulse/Makefile.old	2009-07-18 12:29:43.000000000 -0700
++++ code/hardware/eeg/pulse/Makefile	2009-07-18 12:32:25.000000000 -0700
+@@ -39,11 +39,11 @@
+ 
+ _awCard.so: awCard.o awCard.i 
+ 	swig -c++ -python awCard.i
+-	g++ $(FLAGS1) -I$(PYTHON_INC) -L$(PYTHON_LIB) -c awCard_wrap.cxx 
++	g++ $(FLAGS1) -I$(PYTHON_INC) -L$(PYTHON_LIB) -I@@PREFIX@@/include -L@@PREFIX@@/lib -c awCard_wrap.cxx 
+ 	g++ $(FLAGS2) awCard.o awCard_wrap.o -o $@ -law 
+ 
+ awCard.o: awCard.cpp awCard.h 
+-	g++ $(FLAGS3) -I$(PYTHON_INC) -c $*.cpp -o $@
++	g++ $(FLAGS3) -I$(PYTHON_INC) -I@@PREFIX@@/include -c $*.cpp -o $@
+ 
+ awctest: awCard.cpp awCard.h
+ 	g++ -g -o $@ awCard.cpp -law

Added: trunk/dports/python/py26-pyepl/files/patch-code-hardware-sound-Makefile.diff
===================================================================
--- trunk/dports/python/py26-pyepl/files/patch-code-hardware-sound-Makefile.diff	                        (rev 0)
+++ trunk/dports/python/py26-pyepl/files/patch-code-hardware-sound-Makefile.diff	2009-07-19 21:08:51 UTC (rev 54050)
@@ -0,0 +1,22 @@
+--- code/hardware/sound/Makefile.old	2009-07-18 13:47:05.000000000 -0700
++++ code/hardware/sound/Makefile	2009-07-18 13:47:13.000000000 -0700
+@@ -52,8 +52,8 @@
+ #
+ ########################################################
+ 
+-LIBDIR = -L/usr/local/lib -L/opt/local/lib -L/sw/lib
+-INCLUDEDIR = -I/usr/local/include -I/opt/local/include -I/sw/include
++LIBDIR = -L@@PREFIX@@/lib
++INCLUDEDIR = -I@@PREFIX@@/include
+ 
+ INCLUDEPY=$(shell python -c "import distutils.sysconfig;print distutils.sysconfig.get_config_var('INCLUDEPY')")
+ LIBPY=$(shell python -c "import distutils.sysconfig;print distutils.sysconfig.get_config_var('LIBPL')")
+@@ -83,7 +83,7 @@
+ 
+ _soundFile.so: soundFile.i soundFile.o
+ 	swig -c++ -python soundFile.i		
+-	g++ -Wno-long-double -c soundFile_wrap.cxx -DHAVE_CONFIG_H -I$(PYTHON_INC)
++	g++ -Wno-long-double -c soundFile_wrap.cxx -DHAVE_CONFIG_H -I$(PYTHON_INC) $(INCLUDEDIR)
+ 	g++ -bundle -undefined suppress -flat_namespace soundFile_wrap.o soundFile.o -lsndfile -lsamplerate -o _soundFile.so $(LIBDIR) $(INCLUDEDIR)
+ 
+ test_epl: eplSound.o RtAudio.o test_epl.cpp

Added: trunk/dports/python/py26-pyepl/files/patch-code-hardware-vr-Makefile.diff
===================================================================
--- trunk/dports/python/py26-pyepl/files/patch-code-hardware-vr-Makefile.diff	                        (rev 0)
+++ trunk/dports/python/py26-pyepl/files/patch-code-hardware-vr-Makefile.diff	2009-07-19 21:08:51 UTC (rev 54050)
@@ -0,0 +1,11 @@
+--- code/hardware/vr/Makefile.old	2009-07-18 11:28:59.000000000 -0700
++++ code/hardware/vr/Makefile	2009-07-18 11:31:23.000000000 -0700
+@@ -47,7 +47,7 @@
+ ifeq ($(PLATFORM), Darwin)
+ 
+ avatar.so: avatar.o
+-	gcc -bundle -flat_namespace -undefined suppress avatar.o -lode -L/opt/local/lib -o avatar.so
++	gcc -bundle -flat_namespace -undefined suppress avatar.o -lode -L@@PREFIX@@/lib -o avatar.so
+ 
+ avatar.o: avatar.c
+ 	gcc -fPIC -c avatar.c -I$(INCLUDEPY)

Added: trunk/dports/python/py26-pyepl/files/patch-setup.py.diff
===================================================================
--- trunk/dports/python/py26-pyepl/files/patch-setup.py.diff	                        (rev 0)
+++ trunk/dports/python/py26-pyepl/files/patch-setup.py.diff	2009-07-19 21:08:51 UTC (rev 54050)
@@ -0,0 +1,17 @@
+--- setup.py.old 2009-07-18 11:51:10.000000000 -0700
++++ setup.py 2009-07-18 11:52:13.000000000 -0700
+@@ -39,11 +39,11 @@
+ 			     sources=['code/hardware/eeg/scalp/scalp.pyx', 'code/hardware/eeg/scalp/epleeg.cpp', 
+ 				      'code/hardware/eeg/scalp/epleeg_wrapper.cpp']))
+ # hardware.vr modules
+-if platform=='Darwin' and sys.version[:3]=='2.4':
++if platform=='Darwin':
+     # currently distutils for Python 2.4 isn't looking under /usr/local,
+     # necessitating this 
+-    INC_DIR = '/usr/local/include'
+-    LIB_DIR = '/usr/local/lib'
++    INC_DIR = '@@PREFIX@@/include'
++    LIB_DIR = '@@PREFIX@@/lib'
+     ext_modules.append(Extension(name='pyepl.hardware.vr.avatar', sources=['code/hardware/vr/avatar.pyx'],
+  include_dirs=[INC_DIR], libraries=['ode'], library_dirs=[LIB_DIR]))
+ else:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090719/8ea5e8a8/attachment-0001.html>


More information about the macports-changes mailing list