# -*- 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
# $Id: Portfile 98506 2012-10-07 18:08:37Z blair@macports.org $

PortSystem      1.0

name            ftgl
version         2.1.3-rc5
set my_version  [strsed ${version} g/-/~/]
platforms       darwin
categories      graphics
license         MIT
maintainers     blair free.fr:krugazor openmaintainer
description     Freetype / OpenGL bridge

long_description \
    FTGL takes freetype fonts, decodes them, and generate an OpenGL \
    object out of it.  It supports a lot of rendering modes.

homepage        http://ftgl.wiki.sourceforge.net/
checksums       md5 fcf4d0567b7de9875d4e99a9f7423633
            
master_sites    sourceforge

depends_lib     port:freetype

depends_build   port:gsed

worksrcdir      ${name}-${my_version}

patchfiles      patch-docs-Makefile.in.diff

# Note, this package finds OpenGL.framework... perhaps there should be
# an x11 variant for mesa?

# Skip building the example program by failing to find GLUT
configure.args  --with-glut-inc=/dev/null --with-glut-lib=/dev/null

variant doc description {build documentation} {
    depends_build-append    bin:doxygen:doxygen \
                            bin:dvips:texlive-basic \
                            bin:pdflatex:texlive-latex \
                            bin:epstopdf:texlive-fontutils \
                            bin:convert:ImageMagick
}

if {![variant_isset doc]} {
    configure.args-append   ac_cv_path_DOXYGEN=no \
                            ac_cv_path_DVIPS=no \
                            ac_cv_path_LATEX=no \
                            ac_cv_path_KPSEWHICH=no \
                            ac_cv_path_EPSTOPDF=no \
                            ac_cv_path_CONVERT=no
}

livecheck.version   ${my_version}
livecheck.distname  FTGL Source
