# $Id$

PortSystem          1.0

name                lua-lua-gd
version             2.0.33r2
categories          devel graphics
maintainers         nomaintainer
license             MIT

description         Lua interface to the gd library
long_description \
   Lua-GD is a set of Lua bindings to the Thomas Boutell's gd library that \
   allows your code to quickly draw complete images with lines, polygons, \
   arcs, text, multiple colors, cut and paste from other images, flood \
   fills, read in or write out images in the PNG, JPEG or GIF format. It is \
   not a kitchen-sink graphics package, but it does include most frequently \
   requested features, including both truecolor and palette images, \
   resampling (smooth resizing of truecolor images) and so forth.

platforms           darwin

homepage            http://lua-gd.luaforge.net/
master_sites        http://luaforge.net/frs/download.php/1592/ \
                    sourceforge

checksums           md5     69e9c07ce208ce13d4373177c2e24df0 \
                    sha1    5e7a4e3a62c005de6d243e891411175957ff087e \
                    rmd160  806cd4210a6eb6d4da40167c5b1225fdaf786f71
distname			lua-gd-${version}

depends_build       port:pkgconfig
depends_lib         port:lua port:gd2

patchfiles          patch-Makefile.diff

use_configure       no

pre-destroot {
   # This needs to be updated when lua's version goes past 5.1.x
   xinstall -m 755 -d ${destroot}${prefix}/lib/lua/5.1
}
post-destroot {
   xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} \
      ${destroot}${prefix}/share/examples/${name}
   eval copy [glob ${worksrcpath}/doc/*] ${destroot}${prefix}/share/doc/${name}
   xinstall -m 644 -W ${worksrcpath} COPYING README \
      ${destroot}${prefix}/share/doc/${name}
   eval copy [glob ${worksrcpath}/demos/*] \
      ${destroot}${prefix}/share/examples/${name}
}