Portfile

# $Id: Portfile 21859 2007-02-10 17:04:17Z rhwood@macports.org $

PortSystem 1.0
name fltk
version 1.1.7
categories x11
maintainers nomaintainer@macports.org
description Fast Light Tool Kit
homepage http://www.fltk.org/
platforms darwin

long_description FLTK (pronounced fulltick) \
is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), \
Microsoft Windows, and MacOS X. \
FLTK provides modern GUI functionality without the bloat \
and supports 3D graphics via OpenGL and \
its built-in GLUT emulation. \
\
FLTK is designed to be small and modular enough to be \
statically linked, but works fine as a shared library. \
FLTK also includes an excellent UI builder called FLUID \
that can be used to create applications in minutes.

master_sites http://ftp.easysw.com/pub/fltk/1.1.7/

use_bzip2 yes
distfiles ${name}-${version}-source${extract.suffix}
checksums md5 2e29319119adc9d63b2f26b72cae0a88

depends_lib lib:libX11.6:XFree86 port:jpeg \
port:libpng port:Xft2 port:zlib

patchfiles patch-configure patch-fltk-config.in patch-makeinclude.in patch-fluid-Makefile

post-patch {
reinplace "s|Carbon.H|Carbon.h|g" \
${worksrcpath}/src/Fl_Menu.cxx \
${worksrcpath}/src/Fl_Preferences.cxx
}

configure.env LDFLAGS="-L${prefix}/lib" \
CFLAGS="-I${prefix}/include" \
CPPFLAGS="-I${prefix}/include"

configure.args --enable-xft --enable-shared \
--mandir=${prefix}/share/man \
--with-x

post-activate {
ui_msg "
==============================================================
You need to do
'sudo fltk-config --post /Applications/MacPorts/fltk/fluid'
before using fluid
=============================================================="
}

files