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

set langcode        bg
name                aspell-dict-${langcode}
version             4.1-0
categories          textproc
license             GPL-2
maintainers         nomaintainer
description         Bulgarian dictionary for aspell
homepage            http://aspell.net/
platforms           darwin
supported_archs     noarch

long_description    ${description}

master_sites        gnu:aspell/dict/${langcode}

distname            aspell6-${langcode}-${version}
checksums           size    138940 \
                    rmd160  fb90f9055641936d6187522bf4a803d31e6204f1 \
                    sha256  74570005dc2be5a244436fa2b46a5f612be84c6843f881f0cb1e4c775f658aaa

use_bzip2           yes

depends_build       port:aspell

configure.pre_args  {}
configure.args      --vars \
                    ASPELL=${prefix}/bin/aspell \
                    WORD_LIST_COMPRESS=${prefix}/bin/word-list-compress

pre-destroot {
    system -W ${worksrcpath} \
        "iconv -f CP1251 -t UTF-8 bulgarian.kbd > bulgarian.kbd.tmp"
    move -force ${worksrcpath}/bulgarian.kbd.tmp ${worksrcpath}/bulgarian.kbd
}

livecheck.type      regex
livecheck.url       https://ftp.gnu.org/gnu/aspell/dict/0index.html
livecheck.regex     >aspell6-${langcode}-(.*?)\\.tar\\.