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

name                        pslib
version                     0.4.5
revision                    6
categories                  print
maintainers                 nomaintainer
license                     {GPL-2+ LGPL-2+}
platforms                   darwin
description                 C-library to create PostScript files on the fly
long_description \
                            pslib is a C-library to create PostScript files on the fly. \
                            It offers many drawing primitives, inclusion of png and eps images \
                            and a very sophisticated text rendering including hyphenation, kerning and ligatures. \
                            It can read external Type1 fonts and embed them into the output file. \
                            It supports pdfmarks which makes it in combination with ghostscript's pdfwriter \
                            an alternative for libraries creating PDF.
homepage                    http://pslib.sourceforge.net/
master_sites                sourceforge:project/pslib/pslib/${version} 

checksums                   md5    03f39393628a6d758799b9f845047e27  \
                            sha1   2ad904b650b7d55b7c12be0c99f77073770ece56  \
                            rmd160 8400b078bd643325109e988df7971e0eb164f492 

depends_lib                 port:libpng \
                            port:jpeg \
                            port:giflib \
                            port:tiff

post-extract {
    move ${worksrcpath}/configure.in ${worksrcpath}/configure.ac
}

patchfiles-append           patch-autogen.sh.diff
patchfiles-append           yosemite-libtool.patch

use_autoreconf              yes
autoreconf.cmd              ./autogen.sh

depends_build               port:autoconf \
                            port:automake \
                            port:intltool \
                            port:libtool

configure.args-append       --with-png=${prefix} \
                            --with-jpeg=${prefix} \
                            --with-gif=${prefix} \
                            --with-tiff=${prefix}
configure.cppflags-append   -DHAVE_LIBGIF
configure.ldflags-append    -lgif

destroot.target             install-strip

use_parallel_build          yes