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

github.setup        jca02266 lha 20211125 release-
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
epoch               20211125
revision            1

homepage            https://lha.osdn.jp

description         Utility for creating and opening lzh archives
long_description    {*}${description}

categories          archivers sysutils
license             Restrictive/Distributable
maintainers         nomaintainer

checksums           rmd160  f84555b6bead094eaa2be176c057a403cb7ba4de \
                    sha256  8ee996a1baf97a89d18b2b474e93ec2ed526fc80ca64c707f779f771281a173b \
                    size    229334

patchfiles          c89.patch

depends_lib-append  port:libiconv

use_autoreconf      yes
autoreconf.args     -fvi

configure.cflags-append \
                    -Wno-error=implicit-int

test.run            yes
test.target         check

post-destroot {
    set docdir ${prefix}/share/doc/${name}
    xinstall -m 0755 -d ${destroot}${docdir}/olddoc
    xinstall -m 0644 -W ${worksrcpath} README.jp.md Hacking_of_LHa header.doc.jp \
        ${destroot}${docdir}
    xinstall -m 0644 {*}[glob ${worksrcpath}/olddoc/*.{txt,euc,eng}] \
        ${destroot}${docdir}/olddoc
}

