# -*- 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 79061 2011-05-31 17:23:55Z raphael@macports.org $

PortSystem              1.0
PortGroup               cmake 1.0

name                    cuneiform
version                 1.1.0
set branch              [join [lrange [split ${version} .] 0 1] .]
platforms               darwin
maintainers             nomaintainer
categories              textproc graphics

description             Cuneiform is an OCR system with layout analysis.
long_description        Cuneiform is an OCR system originally developed and \
                        open sourced by Cognitive technologies. \
                        In addition to text recognition it also does layout \
                        analysis and text format recognition. \
                        Cuneiform supports several languages.

homepage                https://launchpad.net/cuneiform-linux
license                 BSD

master_sites            http://launchpad.net/cuneiform-linux/${branch}/${branch}/+download/
distname                ${name}-linux-${version}
use_bzip2               yes

checksums               sha1    b78ebcf987c4792c360f23bdbe054d554ce2251c \
                        rmd160  bc23f83103316ce635635899cf6d4d797edefc45

depends_lib             port:ImageMagick

post-extract {
    file mkdir ${worksrcpath}/build
}

platform darwin powerpc {
    patchfiles          patch-perc.c.diff \
                        patch-CMakeLists.txt.diff
}

configure.dir           ${worksrcpath}/build
configure.args-append   ${worksrcpath}

build.dir               ${worksrcpath}/build

livecheck.type          regex
livecheck.regex         ${name}-linux-(\[0-9.\]+)${extract.suffix}
