# -*- 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

PortSystem              1.0
PortGroup               github 1.0
PortGroup               perl5 1.0

github.setup            k4rthik git-cal 0.9.1 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from     tarball
revision                4
categories              devel
platforms               {darwin any}
supported_archs         noarch
maintainers             {raimue @raimue} \
                        openmaintainer
license                 MIT

description             git contribution calendar
long_description \
    git-cal visualizes the timeline of commits to a git repository \
    on a terminal.

perl5.require_variant   yes
perl5.conflict_variants yes
perl5.branches          5.28 5.30 5.32 5.34
perl5.default_branch    5.34
perl5.create_variants   ${perl5.branches}

checksums               rmd160  9a4b489979fa62c064e8af35c9c968e86d596257 \
                        sha256  21a9ca143a43534e1b3a067e94f6c36c93106be4496740220479e1c5c24b5f7a

depends_lib-append      port:p${perl5.major}-getopt-long
depends_run-append      port:git

configure.cmd           ${perl5.bin}
configure.env           PERL_AUTOINSTALL=--skipdeps
configure.pre_args      Makefile.PL
configure.args          INSTALLDIRS=vendor CC="${configure.cc}" LD="${configure.cc}"

destroot.target         pure_install

post-destroot {
    ln -s ${prefix}/libexec/perl${perl5.major}/git-cal ${destroot}${prefix}/bin/git-cal
    xinstall -d ${destroot}${prefix}/share/man/man1p
    ln -s ${prefix}/share/perl${perl5.major}/man/man1/git-cal.1pm ${destroot}${prefix}/share/man/man1p/git-cal.1pm
}