# $Id: Portfile 83777 2011-09-10 21:16:56Z jmr@macports.org $

PortSystem 1.0

name             ploticus
version          2.41
revision         2
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         pl[join [split ${version} .] {}]src

checksums        md5     ed68bd653488bbe86301077e12d3265a \
                 sha1    f12aa6d5d2d0d284f69b589263f0ee39ed8e0317 \
                 rmd160  25dfca2d40d7da44235292587aaf7e3b47cac12c

depends_lib      port:xorg-libX11 port:libpng port:zlib \
                 port:gd2 port:jpeg port:freetype

patchfiles       patch-src-Makefile.diff

use_configure    no

variant universal {}

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

destroot.args    PREFIX=${prefix}

post-destroot {
    xinstall -m 444 ${worksrcpath}/man/man1/pl.1 ${destroot}${prefix}/share/man/man1/ploticus.1
    xinstall -d ${destroot}${prefix}/share/${name}
    eval xinstall -m 444 [glob ${worksrcpath}/prefabs/*] ${destroot}${prefix}/share/${name}
}
