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

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}

name                perlprimer
version             1.1.21
revision            4
categories          science perl
license             GPL-2+
maintainers         nomaintainer
supported_archs     noarch
platforms           any

description         Perl-based primer designer
long_description    PerlPrimer is a free, open-source GUI application written in Perl that \
                    designs primers for standard PCR, bisulphite PCR, real-time PCR (QPCR) \
                    and sequencing. It aims to automate and simplify the process of primer \
                    design.

# homepage doesn't support https
homepage            http://perlprimer.sourceforge.net/
master_sites        sourceforge
use_bzip2           yes

# prerequisites
# HTTP::Request (p5-http-message)
# LWP::UserAgent (p5-libwww-perl)
# Tk (p5-tk)
depends_run         port:p${perl5.major}-http-message \
                    port:p${perl5.major}-libwww-perl \
                    port:p${perl5.major}-tk

checksums           rmd160  5e96efc1c8a6a792b4333b5e4c4218506870c74b \
                    sha256  19fe2202c18ad65a05d7b90ef642103e9db8e6993fe76d87c7c7cc3586e4fd20 \
                    size    356704

use_configure       no

build               {}

destroot {
    xinstall -m 755 -W ${worksrcpath} perlprimer.pl ${destroot}${prefix}/bin
    ln -s perlprimer.pl ${destroot}${prefix}/bin/perlprimer
    reinplace -locale C "s|#!/usr/bin/perl|#!${perl5.bin}|g" \
        ${destroot}${prefix}/bin/perlprimer.pl
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} Changelog ReadMe ReadMe.txt gcg.603 \
       todo tutorial.html ${destroot}${prefix}/share/doc/${name}
}

livecheck.type      regex
livecheck.url       ${homepage}download.html
livecheck.regex     ${name}-(\[0-9.\]+)\\.