# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ # inherit libtool DESCRIPTION="The Portable OpenGL FrameWork (GLFW)" HOMEPAGE="http://glfw.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" LICENSE="ZLIB" SLOT="0" # Should work on more than just x86, but it's untested # Also, src_compile() and src_install() will need to be changed KEYWORDS="~x86" IUSE="doc pdf examples" # Unchecked DEPEND="virtual/x11 virtual/opengl" src_compile() { cd "${S}/${P}" make x11 || die "make failed" } src_install() { cd ${S} dolib.a lib/x11/libglfw.a || die "libtools" insinto /usr/include/GL doins ${S}/include/GL/glfw.h || die "headers" if use doc; then dodoc license.txt || die "doc1" dohtml readme.html || die "doc2" if use pdf; then insinto /usr/share/doc/${PF}/pdf doins docs/UsersGuide.pdf || die "pdf1" doins docs/Reference.pdf || die "pdf2" fi # use pdf if use examples; then MY_EXAMPLES="boing gears keytest listmodes mipmaps mtbench mthello particles pong3d splitview triangle wave" MY_PICS="mipmaps.tga pong3d_field.tga pong3d_instr.tga pong3d_menu.tga pong3d_title.tga pong3d_winner1.tga pong3d_winner2.tga" # I use ins ( instread of doc ) here so that the # tgas don't get gzipped insinto /usr/share/doc/${PF}/examples for my_f in $MY_EXAMPLES; do doins examples/${my_f}.c || die "${my_f}.c" done for my_p in $MY_PICS; do doins examples/${my_p} || die "${my_p}" done insopts -m0755 for my_f in $MY_EXAMPLES; do doins ${S}/examples/${my_f} || die "${my_f}" done insopts -m644 fi # use examples fi # use doc }