# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           github 1.0

github.setup        roland-bless ps2eps 1.72 v
github.tarball_from archive
categories          print
license             GPL-2+
maintainers         nomaintainer
homepage            http://ctan.org/pkg/ps2eps
description         PostScript to Encapsulated PostScript (EPS) conversion utility

long_description    ps2eps is a tool (written in Perl) to produce Encapsulated \
                    PostScript Files (EPS/EPSF) from usual one-paged PostScript \
                    documents. It calculates correct bounding boxes for those \
                    EPS files and filters some special PostScript command \
                    sequences that can produce erroneous results on printers. \
                    EPS files are often needed for including (scalable) graphics \
                    of high quality into TeX/LaTeX (or even Word) documents.

checksums           rmd160  92a9eb47cb03b328dff44b77263ba1991ac2d264 \
                    sha256  03bd71d8f1cc86369ec865486e8d371f3bd9a3741e86c9f0780797b9ab0a3fd4 \
                    size    104327

depends_run         port:ghostscript \
                    bin:perl:perl5

use_configure       no

variant universal   {}

build.cmd           ${configure.cc} {*}[get_canonical_archflags cc] src/C/bbox.c -o src/C/bbox

build.target

destroot {
    xinstall -m 755 ${worksrcpath}/src/C/bbox ${destroot}${prefix}/bin
    xinstall -m 755 ${worksrcpath}/src/perl/ps2eps ${destroot}${prefix}/bin
    xinstall -m 644 -W ${worksrcpath}/doc/ bbox.1 ps2eps.1 \
        ${destroot}${prefix}/share/man/man1/
}

livecheck.type      regex
livecheck.url       ${homepage}
livecheck.regex     "sion</td><td>(\[0-9.\]+)"
