# -*- 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                plib
version             1.8.5
revision            1
categories          devel graphics games
license             LGPL
maintainers         nomaintainer
description         A Suite of Portable Game Libraries
long_description    \
    PLIB includes sound effects, music, a complete 3D engine, font \
    rendering, a GUI, networking, 3D math library and a collection of handy \
    utility functions.  All are 100% portable across nearly all modern \
    computing platforms.

platforms           darwin

homepage            http://plib.sourceforge.net/
master_sites        ${homepage}dist/

checksums           md5 47a6fbf63668c1eed631024038b2ea90 \
                    sha1 c2cf7e3e1e58f7b63dae4bb21e4fa82c3e4d4cfc \
                    rmd160 55019bf3758ec2542804d8e3994f4bed5a188e60

patchfiles          patch-src_js_jsMacOSX.cxx.diff \
                    patch-src_pui_puGLUT.h.diff \
                    patch-src_ssg_ssgLoadFLT.cxx.diff

platform darwin 8 {
    patchfiles-delete   patch-src_ssg_ssgLoadFLT.cxx.diff
}

configure.args      --with-x
if {${build_arch} eq "x86_64" || ${build_arch} eq "ppc64"} {
    # these components currently use carbon
    configure.args-append --disable-sl --disable-pw
}

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING ChangeLog INSTALL \
        KNOWN_BUGS NOTICE README TODO-1.6 TODO-2.0 TODO_AFTER135 \
        ${destroot}${prefix}/share/doc/${name}
}

livecheck.type      regex
livecheck.url       ${homepage}download.html
livecheck.regex     /${name}-(\[0-9.\]+)${extract.suffix}
