source: trunk/dports/python/py-pycg/Portfile

Last change on this file was 114324, checked in by ryandesign@…, 4 years ago

python ports: use eq and ne when comparing ${subport} instead of == and !=

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.7 KB
Line 
1# $Id: Portfile 114324 2013-12-05 08:44:51Z ryandesign@macports.org $
2
3PortSystem 1.0
4PortGroup       python 1.0
5
6name            py-pycg
7version         0.14.1
8revision        11
9license         GPL-2
10platforms       darwin
11maintainers     blair
12description     Python bindings to NVIDIA's Cg package
13long_description \
14    This project provides Python bindings to NVIDIA's Cg runtime \
15    library, enabling GPUs to be controlled from Python.
16
17python.versions 26 27
18
19patchfiles      patch-darwin.conf.in.diff \
20                patch-swig-files.diff
21
22if {${name} ne ${subport}} {
23    depends_build-append    port:swig-python
24    depends_lib-append      port:cg-toolkit \
25                            port:py${python.version}-numpy
26
27    fetch.type      bzr
28    bzr.url         lp:~callelejdfors/pycg/trunk
29    bzr.revision    release-${version}
30
31    worksrcdir      py-PyCg-${version}
32
33    post-patch {
34        file copy ${worksrcpath}/Darwin.conf.in ${worksrcpath}/Darwin.conf
35        reinplace "s|@CC@|${configure.compiler}|g" ${worksrcpath}/Darwin.conf
36        reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/Darwin.conf
37        reinplace "s|@PYTHON_BRANCH@|${python.branch}|g" ${worksrcpath}/Darwin.conf
38    }
39
40    build.cmd       make
41    build.target    all
42
43    destroot {
44        set cgdir ${destroot}${python.pkgd}/Cg
45        xinstall -d ${cgdir}
46        file copy ${worksrcpath}/Cg.py ${cgdir}/__init__.py
47        file copy ${worksrcpath}/_Cg.so ${cgdir}/
48        foreach f {LICENSE README} {
49            file copy ${worksrcpath}/${f} \
50                ${destroot}${prefix}/share/doc/${subport}
51        }
52    }
53} else {
54    livecheck.type  regex
55    livecheck.url   http://cheeseshop.python.org/pypi/fpconst/
56    livecheck.regex fpconst-(\[0-9\.\]+).tar.gz
57}
Note: See TracBrowser for help on using the repository browser.