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

Last change on this file was 146846, checked in by khindenburg@…, 16 months ago

py-pmw: fix build for py27 #50924

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.9 KB
Line 
1# -*- 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
2# $Id: Portfile 146846 2016-03-19 01:52:49Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup python    1.0
6
7name                py-pmw
8version             2.0.0
9revision            1
10maintainers         nomaintainer
11platforms           darwin
12license             MIT
13
14description         high-level compound widget toolkit
15long_description    Pmw is a toolkit for building high-level compound widgets in Python using \
16                    the Tkinter module.
17
18homepage            http://pmw.sourceforge.net/
19master_sites        sourceforge:pmw
20distname            Pmw-${version}
21
22patchfiles          patch-pmw2.diff
23patch.pre_args      -p1
24
25checksums           rmd160  2a76186192f13eb22c373b3e0e60ce65cba506fe \
26                    sha256  2babb2855feaabeea1003c6908b61c9d39cff606d418685f0559952714c680bb
27
28supported_archs     noarch
29
30python.versions     27 34 35
31
32if {${name} ne ${subport}} {
33    depends_lib-append  port:py${python.version}-tkinter
34
35    if {${python.version} == 27} {
36        set pmw_folder Pmw_1_3_3
37    } else {
38        set pmw_folder Pmw_2_0_0
39    }
40    post-patch {
41        reinplace "s|format|fmt|g" ${worksrcpath}/Pmw/${pmw_folder}/demos/Counter.py
42        system  -W ${worksrcpath} "/usr/bin/find . -type f -name '*.py' -print0 | xargs -0 perl -pi -e 's|/usr/bin/env python|${prefix}/bin/python${python.branch}|g'"
43    }
44
45    post-destroot {
46        file attributes ${destroot}${python.pkgd}/Pmw/${pmw_folder}/demos/All.py -permissions +x
47        file attributes ${destroot}${python.pkgd}/Pmw/${pmw_folder}/tests/All.py -permissions +x
48        reinplace "s|\r||g" \
49            ${destroot}${python.pkgd}/Pmw/${pmw_folder}/demos/All.py \
50            ${destroot}${python.pkgd}/Pmw/${pmw_folder}/tests/All.py
51    }
52
53    livecheck.type      none
54} else {
55    livecheck.regex     Pmw-(\[0-9.\]+)${extract.suffix}
56}
Note: See TracBrowser for help on using the repository browser.