1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8::et:sw=4:ts=4:sts=4 |
---|
2 | # $Id: Portfile 97335 2012-09-04 06:07:50Z ryandesign@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup python 1.0 |
---|
6 | PortGroup active_variants 1.0 |
---|
7 | |
---|
8 | name py-cairo |
---|
9 | set my_name pycairo |
---|
10 | version 1.10.0 |
---|
11 | categories python x11 |
---|
12 | license {LGPL-2.1 MPL-1.1} |
---|
13 | platforms darwin |
---|
14 | maintainers gmail.com:sean.michael.farley openmaintainer |
---|
15 | description Pycairo is set of Python bindings for the cairo graphics library |
---|
16 | |
---|
17 | long_description ${description} |
---|
18 | |
---|
19 | homepage http://cairographics.org/pycairo/ |
---|
20 | master_sites http://cairographics.org/releases/ |
---|
21 | |
---|
22 | use_bzip2 yes |
---|
23 | |
---|
24 | checksums rmd160 7d1c1c05113e5bbad32dbe96c65c918b170cac33 \ |
---|
25 | sha256 9aa4078e7eb5be583aeabbe8d87172797717f95e8c4338f0d4a17b683a7253be |
---|
26 | |
---|
27 | python.versions 26 27 31 32 33 |
---|
28 | python.default_version 27 |
---|
29 | |
---|
30 | depends_build port:pkgconfig |
---|
31 | depends_lib path:lib/pkgconfig/cairo.pc:cairo |
---|
32 | |
---|
33 | patchfiles-append setup.py.patch |
---|
34 | |
---|
35 | if {${name} != ${subport}} { |
---|
36 | depends_build-append port:py${python.version}-numpy |
---|
37 | |
---|
38 | # pycairo distributes python 2.x versions as py2cairo |
---|
39 | if {${python.version} < 31} { |
---|
40 | set my_name py2cairo |
---|
41 | |
---|
42 | checksums rmd160 ce75db9af32ef1a3e90f6aaa649cbb2493a941a4 \ |
---|
43 | sha256 d30439f06c2ec1a39e27464c6c828b6eface3b22ee17b2de05dc409e429a7431 |
---|
44 | |
---|
45 | post-patch { |
---|
46 | reinplace "s|py3cairo|pycairo|g" ${worksrcpath}/setup.py |
---|
47 | } |
---|
48 | } |
---|
49 | |
---|
50 | distname ${my_name}-${version} |
---|
51 | |
---|
52 | livecheck.type none |
---|
53 | } else { |
---|
54 | livecheck.type regex |
---|
55 | livecheck.regex "${my_name}-(\\d+(?:\\.\\d+)*)${extract.suffix}" |
---|
56 | } |
---|
57 | |
---|
58 | post-configure { |
---|
59 | if {[variant_isset x11]} { |
---|
60 | require_active_variants cairo x11 |
---|
61 | } |
---|
62 | } |
---|
63 | |
---|
64 | platform darwin 9 { |
---|
65 | post-patch { |
---|
66 | reinplace "s| -export-symbols-regex.*||g" ${worksrcpath}/cairo/Makefile.in |
---|
67 | } |
---|
68 | } |
---|
69 | |
---|
70 | post-extract { |
---|
71 | fs-traverse item ${worksrcpath} { |
---|
72 | if {[file isdirectory ${item}]} { |
---|
73 | file attributes ${item} -permissions a+rx |
---|
74 | } elseif {[file isfile ${item}]} { |
---|
75 | file attributes ${item} -permissions a+r |
---|
76 | } |
---|
77 | } |
---|
78 | } |
---|
79 | |
---|
80 | variant x11 {} |
---|
81 | |
---|
82 | default_variants +x11 |
---|