# $Id: Portfile 61460 2009-12-11 22:16:58Z ryandesign@macports.org $

PortSystem          1.0

name                libdevil
version             1.7.8
revision            1
categories          devel multimedia
platforms           darwin
maintainers         simon openmaintainer
description         Library to develop applications with powerful image \
                    loading capabilities
long_description    Developer's Image Library (DevIL) is a programmer's \
                    library to develop applications with very powerful image \
                    loading capabilities, yet is easy for a developer to \
                    learn and use. Ultimate control of images is left to the \
                    developer, so unnecessary conversions, etc. are not \
                    performed. DevIL utilizes a simple, yet powerful, \
                    syntax. DevIL can load, save, convert, manipulate, \
                    filter and display a wide variety of image formats. \
                    Formerly known as OpenIL, but the name was changed due \
                    to SGI's request.

homepage            http://openil.sourceforge.net/
master_sites        sourceforge:openil
distname            DevIL-${version}
checksums           md5     7918f215524589435e5ec2e8736d5e1d \
                    sha1    bc27e3e830ba666a3af03548789700d10561fcb1 \
                    rmd160  a3cdb14fcca5e75ada240a53cbdc3e749a759da5
worksrcdir          devil-${version}

depends_lib         port:lcms \
                    port:libmng \
                    port:libpng \
                    port:jasper

patchfiles          patch-ilur.c

configure.args      --disable-exr \
                    --enable-ILU \
                    --enable-ILUT \
                    --disable-allegro \
                    --disable-sdl \
                    --disable-opengl \
                    --disable-x11 \
                    --disable-render \
                    --disable-shm
if {${configure.build_arch} == "i386"} {
    configure.args-append   --enable-x86
} elseif {${configure.build_arch} == "x86_64"} {
    configure.args-append   --enable-x86_64
} else {
    configure.args-append   --enable-ppc
}

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING CREDITS ChangeLog \
        NEWS README TODO ${destroot}${prefix}/share/doc/${name}
    file copy ${worksrcpath}/docs/html ${destroot}${prefix}/share/doc/${name}
}

livecheck.type      regex
livecheck.url       http://sourceforge.net/project/showfiles.php?group_id=4470&package_id=24273
livecheck.regex     "DevIL-(.+?).tar.gz"
