Ticket #34087: Portfile

File Portfile, 1.9 KB (added by erik_nolte@…, 12 years ago)
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$
3
4PortSystem          1.0
5PortGroup           python 1.0
6
7name                py-yaml
8version             3.10
9python.versions     24 24 26 27 31 32 33
10python.default_version 27
11categories          python devel
12platforms           darwin
13maintainers         akitada lightnin openmaintainer
14description         YAML 1.1 parser and emitter for Python
15long_description    PyYAML is a YAML parser and emitter for Python, which \
16                    supports YAML 1.1, unicode input and output, low-level \
17                    event-based parser and emitter API, high-level API for \
18                    serializing and deserializing native Python objects.
19
20homepage            http://pyyaml.org/wiki/PyYAML
21master_sites        http://pyyaml.org/download/pyyaml/
22distname            PyYAML-${version}
23checksums           sha256 e713da45c96ca53a3a8b48140d4120374db622df16ab71759c9ceb5b8d46fe7c \
24                    rmd160 0fe20d93030c15b0ea6dcfc8dfee0f1f0d418aeb
25livecheck.type      none
26
27variant libyaml description {Enable LibYAML bindings} {
28    depends_lib-append      port:libyaml \
29                            port:py${python.version}-pyrex-LOCAL
30    patchfiles              patch-setup.py
31}
32
33post-patch {
34    reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/setup.py
35}
36
37post-destroot {
38    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport}
39    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport}/examples
40    xinstall -m 755 -d \
41      ${destroot}${prefix}/share/doc/${subport}/examples/yaml-highlight
42    xinstall -m 644 -W ${worksrcpath} LICENSE README \
43      ${destroot}${prefix}/share/doc/${subport}
44    xinstall -m 644 -W ${worksrcpath}/examples/yaml-highlight yaml_hl.cfg \
45      yaml_hl.py \
46      ${destroot}${prefix}/share/doc/${subport}/examples/yaml-highlight
47}