Ticket #54054: Portfile-grc.diff

File Portfile-grc.diff, 3.5 KB (added by 1-61803, 8 years ago)

rewritten with portgroup python

  • Portfile

    old new  
    22
    33PortSystem          1.0
    44PortGroup           github 1.0
     5PortGroup           python 1.0
     6
     7github.setup        garabik grc 1.11 v
    58
    6 github.setup        garabik grc 1.10 v
    79categories          textproc
    810platforms           darwin
    911license             GPL-2
    1012maintainers         nomaintainer
    1113supported_archs     noarch
    1214
    13 description         Generic Colouriser for colourising logfiles and output of commands.
    14 
    15 long_description    Generic Colouriser provides colourised output of logfiles \
    16                     and commands. It provides the grc and grcat Python scripts \
    17                     for filtering text output and colourising it.
     15description         Generic Colouriser for colourising logfiles and output of commands
     16long_description    Generic Colouriser makes text files or outputs of different programs \
     17                    more readable by inserting ANSI colour control codes into them. \
     18                    It provides the grc and grcat Python scripts for filtering \
     19                    text output and colourising it.
    1820
    1921homepage            http://kassiopeia.juls.savba.sk/~garabik/software/grc.html
    2022
    21 checksums           rmd160  8d5395923fa9d406a951580a9d0739da5fdd9bee \
    22                     sha256  50a43e884832cda5ef3e2aa4da91d68555a1fb98fd1ac69b16435e04db3993bf
     23checksums           rmd160  e1f29a499fb2a06b7dce0aabd39ea9173db615a9 \
     24                    sha256  769cc911657f2e29ce621059a63b048f2d52fdcbafe340892d1017af4b65d606
    2325
    24 depends_lib         port:python27
     26python.versions     34 35 36
    2527
    26 use_configure       no
    27 
    28 build               {}
     28variant python34 conflicts python35 python36 description {Use Python 3.4} {
     29    python.default_version 34
     30}
     31variant python35 conflicts python34 python36 description {Use Python 3.5} {
     32    python.default_version 35
     33}
     34variant python36 conflicts python34 python35 description {Use Python 3.6} {
     35    python.default_version 36
     36}
     37if {![variant_isset python34] && ![variant_isset python35]} {
     38    default_variants +python36
     39}
    2940
     41build {}
     42destroot {}
    3043post-destroot {
    31     reinplace "s|#! /usr/bin/python|#!${prefix}/bin/python2.7|" \
     44    reinplace "s|#! /usr/bin/env python3|#!${python.bin}|" \
    3245        ${worksrcpath}/grc ${worksrcpath}/grcat
    3346    reinplace "s|/etc|${prefix}/etc|g" \
    3447        ${worksrcpath}/grc ${worksrcpath}/grc.1
     
    3649        ${worksrcpath}/grcat ${worksrcpath}/grcat.1
    3750    xinstall -m 755 -W ${worksrcpath} \
    3851        grc grcat ${destroot}${prefix}/bin
     52    xinstall -m 644 -W ${worksrcpath} \
     53        grc.1 grcat.1 ${destroot}${prefix}/share/man/man1
     54    xinstall -m 644 -W ${worksrcpath} \
     55        grc.conf ${destroot}${prefix}/etc
    3956    xinstall -m 755 -d ${destroot}${prefix}/share/${name}
    40     xinstall -m 644 {*}[glob ${worksrcpath}/conf.*] \
     57    xinstall -m 644 {*}[glob ${worksrcpath}/colourfiles/conf.*] \
    4158        ${destroot}${prefix}/share/${name}
     59    xinstall -m 755 -d ${destroot}${prefix}/etc/${name}.d
    4260    xinstall -m 644 -W ${worksrcpath} \
    43         grc.conf ${destroot}${prefix}/etc
     61        grc.bashrc grc.zsh grc.fish ${destroot}${prefix}/etc/${name}.d
     62    set docdir ${prefix}/share/doc/${subport}
     63    xinstall -d ${destroot}${docdir}
    4464    xinstall -m 644 -W ${worksrcpath} \
    45         grc.1 grcat.1 ${destroot}${prefix}/share/man/man1
     65        CHANGES \
     66        COPYING \
     67        CREDITS \
     68        INSTALL \
     69        README.markdown \
     70        Regexp.txt \
     71        ${destroot}${docdir}
    4672}