1 |
commit: 25bda4c76ca04ddd48bd767fc6616725c249ca82 |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Aug 28 23:29:06 2015 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 28 23:57:43 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25bda4c7 |
7 |
|
8 |
x11-apps/mesa-progs: Add git ebuild. |
9 |
|
10 |
x11-apps/mesa-progs/mesa-progs-9999.ebuild | 106 +++++++++++++++++++++++++++++ |
11 |
1 file changed, 106 insertions(+) |
12 |
|
13 |
diff --git a/x11-apps/mesa-progs/mesa-progs-9999.ebuild b/x11-apps/mesa-progs/mesa-progs-9999.ebuild |
14 |
new file mode 100644 |
15 |
index 0000000..4ecd9ec |
16 |
--- /dev/null |
17 |
+++ b/x11-apps/mesa-progs/mesa-progs-9999.ebuild |
18 |
@@ -0,0 +1,106 @@ |
19 |
+# Copyright 1999-2015 Gentoo Foundation |
20 |
+# Distributed under the terms of the GNU General Public License v2 |
21 |
+# $Id$ |
22 |
+ |
23 |
+EAPI=5 |
24 |
+ |
25 |
+MY_PN=${PN/progs/demos} |
26 |
+MY_P=${MY_PN}-${PV} |
27 |
+EGIT_REPO_URI="git://anongit.freedesktop.org/${MY_PN/-//}" |
28 |
+ |
29 |
+if [[ ${PV} = 9999* ]]; then |
30 |
+ GIT_ECLASS="git-r3" |
31 |
+ EXPERIMENTAL="true" |
32 |
+fi |
33 |
+ |
34 |
+inherit base autotools toolchain-funcs ${GIT_ECLASS} |
35 |
+ |
36 |
+DESCRIPTION="Mesa's OpenGL utility and demo programs (glxgears and glxinfo)" |
37 |
+HOMEPAGE="http://mesa3d.sourceforge.net/" |
38 |
+if [[ ${PV} == 9999* ]]; then |
39 |
+ SRC_URI="" |
40 |
+ KEYWORDS="" |
41 |
+else |
42 |
+ SRC_URI="ftp://ftp.freedesktop.org/pub/${MY_PN/-//}/${PV}/${MY_P}.tar.bz2" |
43 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux" |
44 |
+fi |
45 |
+ |
46 |
+LICENSE="LGPL-2" |
47 |
+SLOT="0" |
48 |
+IUSE="egl gles1 gles2" |
49 |
+ |
50 |
+RDEPEND=" |
51 |
+ egl? ( media-libs/glew ) |
52 |
+ gles1? ( media-libs/glew ) |
53 |
+ gles2? ( media-libs/glew ) |
54 |
+ media-libs/mesa[egl?,gles1?,gles2?] |
55 |
+ virtual/opengl |
56 |
+ x11-libs/libX11" |
57 |
+DEPEND="${RDEPEND} |
58 |
+ virtual/glu |
59 |
+ x11-proto/xproto" |
60 |
+ |
61 |
+S=${WORKDIR}/${MY_P} |
62 |
+EGIT_CHECKOUT_DIR=${S} |
63 |
+ |
64 |
+src_unpack() { |
65 |
+ default |
66 |
+ [[ $PV = 9999* ]] && git-r3_src_unpack |
67 |
+} |
68 |
+ |
69 |
+src_prepare() { |
70 |
+ base_src_prepare |
71 |
+ |
72 |
+ eautoreconf |
73 |
+} |
74 |
+ |
75 |
+src_configure() { |
76 |
+ # We're not using the complete buildsystem if we only want to build |
77 |
+ # glxinfo and glxgears. |
78 |
+ if use egl || use gles1 || use gles2; then |
79 |
+ default_src_configure |
80 |
+ fi |
81 |
+} |
82 |
+ |
83 |
+src_compile() { |
84 |
+ if ! use egl && ! use gles1 && ! use gles2; then |
85 |
+ tc-export CC |
86 |
+ emake LDLIBS='-lX11 -lGL' src/xdemos/glxinfo |
87 |
+ emake LDLIBS='-lX11 -lGL -lm' src/xdemos/glxgears |
88 |
+ else |
89 |
+ emake -C src/xdemos glxgears glxinfo |
90 |
+ fi |
91 |
+ |
92 |
+ if use egl; then |
93 |
+ emake LDLIBS="-lEGL" -C src/egl/opengl/ eglinfo |
94 |
+ emake -C src/egl/eglut/ libeglut_screen.la libeglut_x11.la |
95 |
+ emake LDLIBS="-lGL -lEGL -lX11 -lm" -C src/egl/opengl/ eglgears_x11 |
96 |
+ emake LDLIBS="-lGL -lEGL -lm" -C src/egl/opengl/ eglgears_screen |
97 |
+ |
98 |
+ if use gles1; then |
99 |
+ emake LDLIBS="-lGLESv1_CM -lEGL -lX11" -C src/egl/opengles1/ es1_info |
100 |
+ emake LDLIBS="-lGLESv1_CM -lEGL -lX11 -lm" -C src/egl/opengles1/ gears_x11 |
101 |
+ emake LDLIBS="-lGLESv1_CM -lEGL -lm" -C src/egl/opengles1/ gears_screen |
102 |
+ fi |
103 |
+ if use gles2; then |
104 |
+ emake LDLIBS="-lGLESv2 -lEGL -lX11" -C src/egl/opengles2/ es2_info |
105 |
+ emake LDLIBS="-lGLESv2 -lEGL -lX11 -lm" -C src/egl/opengles2/ es2gears_x11 |
106 |
+ emake LDLIBS="-lGLESv2 -lEGL -lm" -C src/egl/opengles2/ es2gears_screen |
107 |
+ fi |
108 |
+ fi |
109 |
+} |
110 |
+ |
111 |
+src_install() { |
112 |
+ dobin src/xdemos/{glxgears,glxinfo} |
113 |
+ if use egl; then |
114 |
+ dobin src/egl/opengl/egl{info,gears_{screen,x11}} |
115 |
+ |
116 |
+ if use gles1; then |
117 |
+ dobin src/egl/opengles1/es1_info |
118 |
+ newbin src/egl/opengles1/gears_screen es1gears_screen |
119 |
+ newbin src/egl/opengles1/gears_x11 es1gears_x11 |
120 |
+ fi |
121 |
+ |
122 |
+ use gles2 && dobin src/egl/opengles2/es2{_info,gears_{screen,x11}} |
123 |
+ fi |
124 |
+} |