# $Id: Portfile 64763 2010-03-15 16:31:33Z nox@macports.org $

PortSystem 1.0

name             ploticus
set major_version 2
set minor_version 40
version          ${major_version}.${minor_version}
revision         3
categories       math
maintainers      nomaintainer
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:${name}
distname         pl${major_version}${minor_version}src
checksums        md5 560bf4ede9d7a132261ba36574434962 \
                 sha1 824860a41a46ad15cc8c6cb37fa6f59176f4e01e \
                 rmd160 4e36b4cff635042213a4693a44fb03298782edfc

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

patchfiles       patch-src-Makefile.diff

post-patch {
	reinplace s|__PREFIX__|${prefix}| ${worksrcpath}/src/Makefile
}

use_configure    no

build.dir        ${worksrcpath}/src
build.target

post-destroot {
    xinstall -d ${destroot}${prefix}/share/man/man1
    xinstall -m 444 ${worksrcpath}/man/man1/pl.1 ${destroot}${prefix}/share/man/man1/ploticus.1
}
