# -*- 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.22
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  9f45e9b21043f9ec71eaac5633631f4c5e6a7674 \
                    sha256  dc097f4f273d1258f311c69184577d2c21a4bc3a886091e733d7130056006ae6 \
                    size    808055

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}
        }
    }
}

