# -*- 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        nijel enca 1.20
github.tarball_from archive
revision            0
categories          textproc
license             GPL-2
maintainers         {khindenburg @kurthindenburg} openmaintainer
description         character set analyser
long_description    Enca is an Extremely Naive Charset Analyser. It \
                    detects character set and encoding of text files and \
                    can also convert them to other encodings.

homepage            http://cihar.com/software/enca

checksums           rmd160  19929740f53d387171cced259e4d840bb8228573 \
                    sha256  df67fc1fb5fa4e15b2ae9581aa79485bbf00082c557d9c156c870ac8d7a59fea \
                    size    759975

depends_lib         port:libiconv

test.run            yes
# We need a current shell for tests
depends_test-append port:bash
pre-test {
    fs-traverse f ${worksrcpath}/test {
        if {[string match *.sh ${f}]} {
            reinplace -q "s|#! /bin/sh|#! ${prefix}/bin/bash|" ${f}
        }
    }
}

