# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit multilib DESCRIPTION="C++ user interface toolkit for X and OpenGL." HOMEPAGE="http://www.fltk.org" SRC_URI="http://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/fltk/snapshots/fltk-2.0.x-r6403.tar.bz2" KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" LICENSE="FLTK LGPL-2" SLOT="2" S="${WORKDIR}/fltk-2.0.x-r6403" INCDIR=/usr/include/ LIBDIR=/usr/$(get_libdir)/fltk IUSE="noxft opengl debug" DEPEND="x11-libs/libXext x11-libs/libICE x11-libs/libSM x11-libs/libXt x11-proto/xextproto !noxft? ( virtual/xft ) media-libs/libpng media-libs/jpeg opengl? ( virtual/opengl )" src_compile() { local myconf myconf="--enable-shared --enable-xdbe --enable-static --enable-threads --enable-png --enable-jpeg" if ! use noxft; then myconf="${myconf} --enable-xft" else myconf="${myconf} --disable-xft" fi use debug && myconf="${myconf} --enable-debug" use opengl || myconf="${myconf} --disable-gl" econf ${myconf} || die "Configuration Failed" emake || die "Parallel Make Failed" } src_install() { einstall \ includedir="${D}${INCDIR}" \ libdir="${D}${LIBDIR}" || die "Installation Failed" ranlib "${D}${LIBDIR}"/*.a dodoc CHANGES README echo "LDPATH=${LIBDIR}" > 99fltk-${SLOT} echo "FLTK_DOCDIR=/usr/share/doc/${PF}/html" >> 99fltk-${SLOT} doenvd 99fltk-${SLOT} dohtml -A xbm,xpm,h,cxx,fl,menu -r "${D}"/usr/share/doc/fltk/* rm -rf "${D}"/usr/share/doc/fltk rm -rf "${D}"/usr/share/man/cat{1,3} } pkg_postinst() { ewarn "the xft USE flag has been changed to noxft. this was because most" ewarn "users want xft, but if you do not, be sure to change the flag" }