Ticket #54256: Portfile-grc.diff

File Portfile-grc.diff, 3.8 KB (added by 1-61803, 7 years ago)
  • textproc/grc/Portfile

    old new  
    22
    33PortSystem          1.0
    44PortGroup           github 1.0
     5PortGroup           python 1.0
     6
     7github.setup        garabik grc 1.11.1 v
    58
    6 github.setup        garabik grc 1.10 v
    79conflicts           cc65
     10
    811categories          textproc
    912platforms           darwin
    1013license             GPL-2
    1114maintainers         nomaintainer
    1215supported_archs     noarch
    1316
    14 description         Generic Colouriser for colourising logfiles and output of commands.
    15 
    16 long_description    Generic Colouriser provides colourised output of logfiles \
    17                     and commands. It provides the grc and grcat Python scripts \
    18                     for filtering text output and colourising it.
     17description         Generic Colouriser for colourising logfiles and output of commands
     18long_description    Generic Colouriser makes text files or outputs of different programs \
     19                    more readable by inserting ANSI colour control codes into them. \
     20                    It provides the grc and grcat Python scripts for filtering \
     21                    text output and colourising it.
    1922
    2023homepage            http://kassiopeia.juls.savba.sk/~garabik/software/grc.html
    2124
    22 checksums           rmd160  8d5395923fa9d406a951580a9d0739da5fdd9bee \
    23                     sha256  50a43e884832cda5ef3e2aa4da91d68555a1fb98fd1ac69b16435e04db3993bf
    24 
    25 depends_lib         port:python27
     25checksums           rmd160  70e3c1a513e0b545bb23ed1e26024d53268700a9 \
     26                    sha256  74cd25fdca3fa8a572ad086d09c0cb4597a47de9e839903bad1826ed7ca50935
    2627
    27 use_configure       no
     28python.versions     27 34 35 36
    2829
    29 build               {}
     30variant python27 conflicts python34 python35 python36 description {Use Python 2.7} {
     31    python.default_version 27
     32}
     33variant python34 conflicts python27 python35 python36 description {Use Python 3.4} {
     34    python.default_version 34
     35}
     36variant python35 conflicts python27 python34 python36 description {Use Python 3.5} {
     37    python.default_version 35
     38}
     39variant python36 conflicts python27 python34 python35 description {Use Python 3.6} {
     40    python.default_version 36
     41}
     42if {![variant_isset python34] && ![variant_isset python35] && ![variant_isset python36]} {
     43    default_variants +python27
     44}
    3045
     46build {}
     47destroot {}
    3148post-destroot {
    32     reinplace "s|#! /usr/bin/python|#!${prefix}/bin/python2.7|" \
     49    reinplace "s|#! /usr/bin/env python3|#!${python.bin}|" \
    3350        ${worksrcpath}/grc ${worksrcpath}/grcat
    3451    reinplace "s|/etc|${prefix}/etc|g" \
    3552        ${worksrcpath}/grc ${worksrcpath}/grc.1
     
    3754        ${worksrcpath}/grcat ${worksrcpath}/grcat.1
    3855    xinstall -m 755 -W ${worksrcpath} \
    3956        grc grcat ${destroot}${prefix}/bin
     57    xinstall -m 644 -W ${worksrcpath} \
     58        grc.1 grcat.1 ${destroot}${prefix}/share/man/man1
     59    xinstall -m 644 -W ${worksrcpath} \
     60        grc.conf ${destroot}${prefix}/etc
    4061    xinstall -m 755 -d ${destroot}${prefix}/share/${name}
    41     xinstall -m 644 {*}[glob ${worksrcpath}/conf.*] \
     62    xinstall -m 644 {*}[glob ${worksrcpath}/colourfiles/conf.*] \
    4263        ${destroot}${prefix}/share/${name}
     64    xinstall -m 755 -d ${destroot}${prefix}/etc/${name}.d
    4365    xinstall -m 644 -W ${worksrcpath} \
    44         grc.conf ${destroot}${prefix}/etc
     66        grc.bashrc grc.zsh grc.fish ${destroot}${prefix}/etc/${name}.d
     67    set docdir ${prefix}/share/doc/${subport}
     68    xinstall -d ${destroot}${docdir}
    4569    xinstall -m 644 -W ${worksrcpath} \
    46         grc.1 grcat.1 ${destroot}${prefix}/share/man/man1
     70        CHANGES \
     71        COPYING \
     72        CREDITS \
     73        INSTALL \
     74        README.markdown \
     75        Regexp.txt \
     76        ${destroot}${docdir}
    4777}