# $Id$

PortSystem      1.0

name            libsdl2_ttf
set my_name	    SDL2_ttf
version         2.0.14
categories      devel graphics
platforms       darwin
license         zlib
maintainers     jmr openmaintainer
description     add on library for libSDL for rendering TrueType fonts

long_description \
    This library is a wrapper around FreeType and \
    allows rendering TrueType fonts in SDL applications.

homepage        http://www.libsdl.org/projects/SDL_ttf/
master_sites    ${homepage}release/
distname        ${my_name}-${version}

checksums       rmd160 a3cfa00535220c8dc9034bc94dce064fb22c4b85 \
                sha256 34db5e20bcf64e7071fe9ae25acaa7d72bdc4f11ab3ce59acc768ab62fe39276

depends_build   port:pkgconfig
depends_lib     port:libsdl2 \
                port:freetype

configure.args  --disable-sdltest \
                ac_cv_path_FREETYPE_CONFIG="pkg-config freetype2"

post-destroot {
    set docdir ${prefix}/share/doc/${name}
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 -W ${worksrcpath} CHANGES.txt COPYING.txt README.txt \
        ${destroot}${docdir}
}

livecheck.type  regex
livecheck.url   ${homepage}
livecheck.regex ${my_name}-(\\d+(?:\\.\\d+)*)