# -*- 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            ploticus
version         2.42
revision        1
categories      math
maintainers     nomaintainer
license         GPL-2+

description     plot generation program
long_description \
    A free, GPL, non-interactive software package for producing plots, \
    charts, and graphics from data. It was developed in a Unix/C \
    environment and runs on various Unix, Linux, and win32 systems. \
    ploticus is good for automated or just-in-time graph generation, \
    handles date and time data nicely, and has basic statistical \
    capabilities. It allows significant user control over colors, \
    styles, options and details.
homepage        http://ploticus.sourceforge.net/
platforms       darwin

master_sites    sourceforge
distname        ${name}[join [split ${version} .] {}]_src

checksums       rmd160  25535639286ca6caa9cf10971b43181ffa449f7d \
                sha256  3f29e4b9f405203a93efec900e5816d9e1b4381821881e241c08cab7dd66e0b0 \
                size    535755

depends_lib     port:xorg-libX11 port:libpng port:zlib \
                port:gd2 path:include/turbojpeg.h:libjpeg-turbo port:freetype

patchfiles      patch-src-Makefile.diff

use_configure   no

variant universal {}

set worksrcpath ${workpath}/${name}[join [split ${version} .] {}]

build.dir       ${worksrcpath}/src
build.target    {}
build.args      PREFIX=${prefix} \
                CC="${configure.cc} [get_canonical_archflags]"

destroot.args   PREFIX=${prefix}

post-destroot {
    xinstall -d ${destroot}${prefix}/share/${name}
    xinstall -m 444 {*}[glob ${worksrcpath}/prefabs/*] ${destroot}${prefix}/share/${name}
}
