]> Pileus Git - ~andy/sunrise/blob - media-libs/glfw/glfw-2.6.ebuild
Whitey...
[~andy/sunrise] / media-libs / glfw / glfw-2.6.ebuild
1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils
6
7 DESCRIPTION="The Portable OpenGL FrameWork"
8 HOMEPAGE="http://glfw.sourceforge.net/"
9 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
10
11 LICENSE="ZLIB"
12 SLOT="0"
13 KEYWORDS="~amd64 ~x86"
14 IUSE="examples"
15
16 RDEPEND="x11-libs/libXxf86vm
17         virtual/opengl"
18 DEPEND="${RDEPEND}
19                 x11-proto/xf86vidmodeproto"
20
21 S=${WORKDIR}/${PN}
22
23 src_unpack() {
24         unpack ${A}
25         cd "${S}"
26         sed -i \
27                 -e "s:\"docs/:\"/usr/share/doc/${PF}/pdf/:" \
28                 readme.html \
29                 || die "sed failed"
30         epatch "${FILESDIR}/${P}"-dyn.patch
31 }
32
33 src_compile() {
34         emake x11 || die "emake failed"
35 }
36
37 src_install() {
38         dolib.a lib/x11/libglfw.a || die "dolib.a failed"
39         dolib.so lib/x11/libglfw.so.2.6 || die "dolib.so failed"
40         dosym libglfw.so.2.6 /usr/lib/libglfw.so
41
42         insinto /usr/include/GL
43         doins include/GL/glfw.h || die "doins failed"
44         dohtml -r readme.html
45         insinto /usr/share/doc/${PF}/html/images
46         doins images/*
47         insinto /usr/share/doc/${PF}/pdf
48         doins docs/*.pdf
49
50         if use examples; then
51                 local f
52                 local MY_EXAMPLES="boing gears keytest listmodes mipmaps
53                         mtbench mthello particles pong3d splitview
54                         triangle wave"
55                 local MY_PICS="mipmaps.tga pong3d_field.tga pong3d_instr.tga
56                         pong3d_menu.tga pong3d_title.tga
57                         pong3d_winner1.tga pong3d_winner2.tga"
58
59                 insinto /usr/share/doc/${PF}/examples
60
61                 doins examples/Makefile.x11
62                 for f in $MY_EXAMPLES; do
63                         doins examples/${f}.c
64                 done
65                 for f in $MY_PICS; do
66                         doins examples/${f}
67                 done
68
69                 exeinto /usr/share/doc/${PF}/examples
70                 for f in $MY_EXAMPLES; do
71                         dobin examples/${f}
72                 done
73         fi
74 }