Ticket #52622: patch-Portfile.diff

File patch-Portfile.diff, 3.1 KB (added by slewsys (Andrew L. Moore), 8 years ago)

py-docutils Portfile diff

  • Portfile

     
    11# -*- 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
    22# $Id$
    33
    4 PortSystem 1.0
    5 PortGroup python 1.0
     4PortSystem          1.0
     5PortGroup python    1.0
     6PortGroup select    1.0
    67
    78name                py-docutils
    8 version             0.12
     9version             0.13
    910categories-append   textproc
    1011license             GPL-3+ PSF-2.1.1 BSD
    1112maintainers         jmr alexnicksay.com:alex openmaintainer
     
    2021
    2122homepage            http://docutils.sourceforge.net/
    2223master_sites        sourceforge:project/docutils/docutils/${version}/
    23 distname            docutils-${version}
     24fetch.type          svn
     25svn.url             https://svn.code.sf.net/p/docutils/code/trunk/docutils
     26svn.revision        7973
    2427
    25 checksums           md5    4622263b62c5c771c03502afa3157768 \
    26                     sha1   002450621b33c5690060345b0aac25bc2426d675 \
    27                     rmd160 1eb12ed88a334a154c8548f404ea82c7a65fa9ba
    28 
    2928python.versions     26 27 33 34 35
    3029
     30select.group        docutils
     31select.file         ${name}
     32
     33worksrcdir          docutils
     34
    3135if {$subport ne $name} {
    3236    depends_lib         port:py${python.version}-roman
    3337   
    3438    # we want e.g. *-2.7.py not *.py-2.7
    3539    python.link_binaries no
     40
     41
     42    notes "
     43To make ${subport} the default, please run:
     44
     45sudo port select --set ${select.group} ${subport}
     46
     47To generate HTML documentation, run:
     48
     49cd ${prefix}/share/doc/${subport} && sudo buildhtml
     50"
     51
    3652    post-destroot {
    37         foreach f {rst2html rst2latex rst2man rst2odt rst2odt_prepstyles rst2pseudoxml rst2s5 rst2xml rstpep2html rst2xetex} {
    38             ln -s ${python.prefix}/bin/${f}.py ${destroot}${prefix}/bin/${f}-${python.branch}.py
     53
     54        # Install `buildhtml.py' to generate HTML documentation from
     55        # ReST files in a directory.
     56        copy ${worksrcpath}/tools/buildhtml.py ${destroot}${python.prefix}/bin/
     57
     58        xinstall -m 0755 -d ${destroot}${prefix}/share/doc/${subport}
     59        foreach f [glob ${worksrcpath}/docs/*] {
     60            copy ${f} ${destroot}${prefix}/share/doc/${subport}/
    3961        }
     62
     63        foreach f {buildhtml rst2html rst2html5 rst2latex rst2man
     64            rst2odt rst2odt_prepstyles rst2pseudoxml rst2s5 rst2xml
     65            rstpep2html rst2xetex} {
     66            ln -s ${python.prefix}/bin/${f}.py \
     67                ${destroot}${prefix}/bin/${f}-${python.branch}.py
     68        }
     69
     70        # Manually install select/${subport} and base...
     71        copy ${filespath}/${name} \
     72            ${destroot}${prefix}/etc/select/${select.group}/base
     73        move ${destroot}${prefix}/etc/select/${select.group}/${name} \
     74            ${destroot}${prefix}/etc/select/${select.group}/${subport}
     75        reinplace "s|$|-${python.branch}.py|" \
     76            ${destroot}${prefix}/etc/select/${select.group}/${subport}
    4077    }
     78
    4179    livecheck.type  none
    4280} else {
    4381    livecheck.url   http://sourceforge.net/api/file/index/project-id/38414/rss