# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 52413 2009-06-16 04:21:48Z devans@macports.org $

PortSystem 1.0

name                        hunspell
version                     1.2.8
categories                  textproc
maintainers                 nomaintainer
description                 Spell checker and morphological analyzer
homepage                    http://hunspell.sourceforge.net/
platforms                   darwin

long_description            Hunspell is a spell checker and morphological analyzer library and program \
                            designed for languages with rich morphology and complex word compounding or \
                            character encoding. Hunspell interfaces: Ispell-like terminal interface \
                            using Curses library, Ispell pipe interface, OpenOffice.org UNO module.

master_sites                sourceforge

checksums                   md5 1177af54a09e320d2c24015f29c3a93e \
                            sha1  eaa76f82fcf08678e49f7a30afdaa268bcc75235 \
                            rmd160 e4fd39e5fadf96da1311f2aa7163ec17eacf0f83

depends_lib                 port:gettext port:ncurses port:readline

patchfiles                  patch-hunspell.cxx.diff \
                            patch-hunspell-renameexes.diff

configure.cflags-append     -DLIBDIR=\\"${prefix}/share/hunspell:/usr/share/myspell:/usr/share/myspell/dicts\\"
configure.cxxflags-append   -DLIBDIR=\\"${prefix}/share/hunspell:/usr/share/myspell:/usr/share/myspell/dicts\\"
configure.args              --with-ui --with-readline

use_parallel_build          yes

test.run                    yes
test.target                 check


post-install {
    ui_msg "******************************************************************"
    ui_msg "You must install (at least) one of the language dictionaries after"
    ui_msg "installing this port in order for it to work."
    ui_msg "******************************************************************"
}

livecheck.regex             "(?i)<title>${name} (.*) released.*</title>"
