# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils flag-o-matic libtool DESCRIPTION="A free implementation of the OpenGL Character Renderer supporting Unicode based on the FreeType library" HOMEPAGE="http://quesoglc.sourceforge.net/" SRC_URI="mirror://sourceforge/quesoglc/${P}.tar.bz2" LICENSE="LGPL-2.1" SLOT="0" KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd" IUSE="glew glew-multi-ctx bidi doc examples" DEPEND="virtual/glu virtual/opengl virtual/glut media-libs/freetype media-libs/fontconfig glew? ( media-libs/glew ) bidi? ( dev-libs/fribidi ) doc? ( app-doc/doxygen )" RDEPEND="${DEPEND}" src_compile() { local myconf if use glew ; then if use glew-multi-ctx ; then myconf="${myconf} --enable-glew-multiple-contexts" fi fi econf \ $(use_enable examples executables) \ $(use_with glew) \ $(use_with bidi fribidi) \ ${myconf} || die "econf failed" emake || die "emake failed" use doc && ( emake doc || die "emake doc failed" ) } src_install() { emake DESTDIR="${D}" install || die "emake install failed" use doc && dodoc AUTHORS COPYING INSTALL INSTALL.win ChangeLog README THANKS && dohtml -r docs/html/* insinto /usr/share/doc/${P}/examples use examples && doins examples/*.c && doins \ examples/demo \ examples/glcdemo \ examples/glclogo \ examples/tutorial \ examples/tutorial2 \ examples/unicode }