# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
PortSystem              1.0
PortGroup               cmake 1.1

name                    physfs
version                 3.0.2
revision                0
checksums               rmd160  621f9c4433d3c3dd2cebbf2355bcf0a5e2b34578 \
                        sha256  304df76206d633df5360e738b138c94e82ccf086e50ba84f456d3f8432f9f863 \
                        size    194888

categories              devel
license                 zlib
maintainers             nomaintainer
platforms               darwin
description             PhysicsFS is a library providing abstract archive access

long_description        ${description} to various archives. It is intended for \
                        use in video games, and the design was somewhat inspired \
                        by Quake 3's file subsystem.

homepage                http://icculus.org/physfs/
master_sites            ${homepage}downloads/ gentoo
use_bzip2               yes

depends_build-append    path:bin/doxygen:doxygen

depends_lib-append      port:zlib \
                        port:readline \
                        port:ncurses

# these patches could be always applied, but tuck them in a "gcc" only block
# to minimize any chances of unforseen complications with current MacPorts builds
if {[string match *gcc* ${configure.cc}]} {

    # allow build with gcc compilers that don't understand @autoreleasepool
    patchfiles              patch-physfs-autoreleasepool.diff

    # cmakelists was setting CMAKE_SKIP_RPATH when using gcc, which has
    # the ultimate effect of installing the library without any path component
    # in the install name
    patchfiles-append       patch-physfs-cmakelists-dont-force-skip-runpath-with-gcc.diff
}

livecheck.type          regex
livecheck.url           [lindex ${master_sites} 0]LATEST_VERSION.html
livecheck.regex         ${name}-(\\d+(?:\\.\\d+)*)
