# -*- 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
# $Id: Portfile 99715 2012-11-14 20:55:58Z ryandesign@macports.org $

PortSystem          1.0

name                libstemmer
version             0.1-20110629
categories          textproc
platforms           darwin
maintainers         nomaintainer
license             BSD

description         Algorithmic Stemmer Library

long_description    Snowball is a language in which stemming algorithms can \
                    be easily represented. The Snowball compiler translates a \
                    Snowball script (a .sbl file) into either a thread-safe \
                    ANSI C program or a Java program. For ANSI C, each \
                    Snowball script produces a program file and corresponding \
                    header file (with .c and .h extensions). This port \
                    delivers the ANSI C library build

homepage            http://snowball.tartarus.org/
fetch.type          svn
svn.url             svn://snowball.tartarus.org/snowball/trunk/snowball/
svn.revision        546

worksrcdir          snowball

use_configure       no

variant universal {}

build.target        libstemmer.o
build.args-append   CC="${configure.cc} [get_canonical_archflags cc]"

post-build {
    copy ${worksrcpath}/libstemmer.o ${worksrcpath}/libstemmer.a
    system -W ${worksrcpath} "ranlib libstemmer.a"
}

destroot {
    # install header files
    xinstall -m 644 -W ${worksrcpath}/include libstemmer.h ${destroot}${prefix}/include
    # install libraries
    xinstall -m 644 -W ${worksrcpath} libstemmer.a ${destroot}${prefix}/lib
}

livecheck.type      regex
livecheck.url       http://svn.tartarus.org/snowball/trunk/snowball/
livecheck.version   ${svn.revision}
livecheck.regex     {revision=(\d+)}
