# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="The Portable OpenGL FrameWork" HOMEPAGE="http://glfw.sourceforge.net/" ## note that the package changed to .bz2 from .gz starting with 2.5.0 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" LICENSE="ZLIB" SLOT="0" KEYWORDS="x86" IUSE="examples" DEPEND="virtual/x11 virtual/opengl" src_compile() { ## THIS IS UGLY -- IS THERE A BETTER WAY? ## ## The problem is that 2.5.0 has its files in ## glfw-2.5 not glfw-2.5.0 the way we'd like. ## Ideally, this move would go in unpack so ## ${S} would start out set properly, but I ## couldn't find an eunpack function, so I ## figured it was better to put this hack here ## rather than try to reimplement the default ## src_unpack function. mv work/${PN}* work/${P} S="${WORKDIR}/${P}" cd ${S} emake x11 || die "emake failed" } src_install() { dolib.a lib/x11/libglfw.a || die "dolib.a failed" insinto /usr/include/GL doins include/GL/glfw.h || die "doins failed" dohtml readme.html insinto /usr/share/doc/${PF}/html/images doins images/* insinto /usr/share/doc/${PF}/pdf doins docs/*.pdf if use examples; then insinto /usr/share/doc/${PF}/examples doins examples/Makefile.x11 find examples -iname '*\.c' \ -exec doins '{}' ';' find examples -iname '*\.tga' \ -exec doins '{}' ';' insopts -m0755 find examples -perm +111 \ '!' -iname '*\.sh' \ -exec doins '{}' ';' fi ## There are now bindings for other languages included ## I don't know what to do with them, though... }