Ticket #54256: Portfile

File Portfile, 2.8 KB (added by 1-61803, 7 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
3PortSystem          1.0
4PortGroup           github 1.0
5PortGroup           python 1.0
6
7github.setup        garabik grc 1.11.1 v
8
9conflicts           cc65
10
11categories          textproc
12platforms           darwin
13license             GPL-2
14maintainers         nomaintainer
15supported_archs     noarch
16
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.
22
23homepage            http://kassiopeia.juls.savba.sk/~garabik/software/grc.html
24
25checksums           rmd160  70e3c1a513e0b545bb23ed1e26024d53268700a9 \
26                    sha256  74cd25fdca3fa8a572ad086d09c0cb4597a47de9e839903bad1826ed7ca50935
27
28python.versions     27 34 35 36
29
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}
45
46build {}
47destroot {}
48post-destroot {
49    reinplace "s|#! /usr/bin/env python3|#!${python.bin}|" \
50        ${worksrcpath}/grc ${worksrcpath}/grcat
51    reinplace "s|/etc|${prefix}/etc|g" \
52        ${worksrcpath}/grc ${worksrcpath}/grc.1
53    reinplace "s|/usr/local|${prefix}|g" \
54        ${worksrcpath}/grcat ${worksrcpath}/grcat.1
55    xinstall -m 755 -W ${worksrcpath} \
56        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
61    xinstall -m 755 -d ${destroot}${prefix}/share/${name}
62    xinstall -m 644 {*}[glob ${worksrcpath}/colourfiles/conf.*] \
63        ${destroot}${prefix}/share/${name}
64    xinstall -m 755 -d ${destroot}${prefix}/etc/${name}.d
65    xinstall -m 644 -W ${worksrcpath} \
66        grc.bashrc grc.zsh grc.fish ${destroot}${prefix}/etc/${name}.d
67    set docdir ${prefix}/share/doc/${subport}
68    xinstall -d ${destroot}${docdir}
69    xinstall -m 644 -W ${worksrcpath} \
70        CHANGES \
71        COPYING \
72        CREDITS \
73        INSTALL \
74        README.markdown \
75        Regexp.txt \
76        ${destroot}${docdir}
77}