# -*- 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 65908 2010-04-02 22:28:17Z jmr@macports.org $

PortSystem              1.0
PortGroup               python26 1.0

name                    py26-pyepl
version                 1.0.29
categories              python

platforms               darwin
maintainers             nomaintainer

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-python \
                        port:py26-numpy \
                        port:py26-pil \
                        port:py26-opengl \
                        port:py26-pyrex \
                        port:py26-ode \
                        port:py26-game \
                        port:py26-distribute

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.]+)}
