diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-06-09 21:27:13 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-06-09 21:27:13 +0100 |
commit | f4d34a005ad6bedf7fd36c7a20f1ca9f7ac27e61 (patch) | |
tree | 9015f9cd4ec0985f7061dea06bfde8d09ea0c4e7 /meta | |
parent | 111ea0d5cc3246b2899a2db223882a1cce04b193 (diff) | |
download | poky-f4d34a005ad6bedf7fd36c7a20f1ca9f7ac27e61.tar.gz |
qemugl: Use mesa-dri as the main gl provider and just swap libs at runtime
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/packages/mesa/qemugl/gl.pc | 12 | ||||
-rw-r--r-- | meta/packages/mesa/qemugl/headers.tgz | bin | 134048 -> 0 bytes | |||
-rw-r--r-- | meta/packages/mesa/qemugl/versionfix.patch | 30 | ||||
-rw-r--r-- | meta/packages/mesa/qemugl_git.bb | 32 |
4 files changed, 38 insertions, 36 deletions
diff --git a/meta/packages/mesa/qemugl/gl.pc b/meta/packages/mesa/qemugl/gl.pc deleted file mode 100644 index 18cdb4e665..0000000000 --- a/meta/packages/mesa/qemugl/gl.pc +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | prefix=/usr | ||
2 | exec_prefix=${prefix} | ||
3 | libdir=/usr/lib | ||
4 | includedir=/usr/include | ||
5 | |||
6 | Name: gl | ||
7 | Description: QEMU OpenGL library | ||
8 | Requires.private: x11 xext xfixes | ||
9 | Version: 7.3.0 | ||
10 | Libs: -L${libdir} -lGL | ||
11 | Libs.private: -lm -lpthread -ldl | ||
12 | Cflags: -I${includedir} | ||
diff --git a/meta/packages/mesa/qemugl/headers.tgz b/meta/packages/mesa/qemugl/headers.tgz deleted file mode 100644 index 79e4968288..0000000000 --- a/meta/packages/mesa/qemugl/headers.tgz +++ /dev/null | |||
Binary files differ | |||
diff --git a/meta/packages/mesa/qemugl/versionfix.patch b/meta/packages/mesa/qemugl/versionfix.patch new file mode 100644 index 0000000000..a3d33e8303 --- /dev/null +++ b/meta/packages/mesa/qemugl/versionfix.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | Index: git/Makefile | ||
2 | =================================================================== | ||
3 | --- git.orig/Makefile 2009-01-19 23:37:36.000000000 +0000 | ||
4 | +++ git/Makefile 2009-06-09 20:30:37.000000000 +0100 | ||
5 | @@ -1,9 +1,9 @@ | ||
6 | GL_CFLAGS := -Wall -g -O2 -fno-strict-aliasing | ||
7 | |||
8 | -all: libGL.so | ||
9 | +all: libGL.so.1.2 | ||
10 | |||
11 | -libGL.so: client_stub.c opengl_client.c glgetv_cst.h opengl_func.h opengl_utils.h opengl_client_xfonts.c mesa_gl.h mesa_glext.h mesa_glx.h mesa_glxext.h | ||
12 | - $(CC) -fPIC $(GL_CFLAGS) opengl_client.c -shared -o libGL.so -lX11 -lXfixes -lm -L$(D)/usr/X11R6/lib -lpthread -I. | ||
13 | +libGL.so.1.2: client_stub.c opengl_client.c glgetv_cst.h opengl_func.h opengl_utils.h opengl_client_xfonts.c mesa_gl.h mesa_glext.h mesa_glx.h mesa_glxext.h | ||
14 | + $(CC) -fPIC $(GL_CFLAGS) opengl_client.c -shared -o libGL.so.1.2 -lX11 -lXfixes -lm -L$(D)/usr/X11R6/lib -lpthread -I. | ||
15 | |||
16 | opengl_func.h: gl_func.h | ||
17 | |||
18 | Index: git/opengl_client.c | ||
19 | =================================================================== | ||
20 | --- git.orig/opengl_client.c 2009-06-09 21:07:15.000000000 +0100 | ||
21 | +++ git/opengl_client.c 2009-06-09 21:07:33.000000000 +0100 | ||
22 | @@ -11578,7 +11578,7 @@ | ||
23 | tab_assoc = calloc(tabSize, sizeof(AssocProcAdress)); | ||
24 | |||
25 | #ifndef WIN32 | ||
26 | - handle = dlopen(getenv("REAL_LIBGL") ? getenv("REAL_LIBGL") : "libGL.so" ,RTLD_LAZY); | ||
27 | + handle = dlopen(getenv("REAL_LIBGL") ? getenv("REAL_LIBGL") : "libGL.so.1.2" ,RTLD_LAZY); | ||
28 | if (!handle) { | ||
29 | log_gl("%s\n", dlerror()); | ||
30 | exit(1); | ||
diff --git a/meta/packages/mesa/qemugl_git.bb b/meta/packages/mesa/qemugl_git.bb index 272f47b898..bfc447392f 100644 --- a/meta/packages/mesa/qemugl_git.bb +++ b/meta/packages/mesa/qemugl_git.bb | |||
@@ -8,36 +8,20 @@ DEPENDS = "virtual/libx11 xproto glproto libxfixes" | |||
8 | COMPATIBLE_HOST = '(x86_64|i.86.*)-(linux|freebsd.*)' | 8 | COMPATIBLE_HOST = '(x86_64|i.86.*)-(linux|freebsd.*)' |
9 | 9 | ||
10 | SRC_URI = "git://git.o-hand.com/qemugl.git;protocol=git \ | 10 | SRC_URI = "git://git.o-hand.com/qemugl.git;protocol=git \ |
11 | file://headers.tgz \ | 11 | file://versionfix.patch;patch=1" |
12 | file://gl.pc" | ||
13 | S = "${WORKDIR}/git" | 12 | S = "${WORKDIR}/git" |
14 | 13 | ||
15 | PV = "0.0+git${SRCREV}" | 14 | PV = "0.0+git${SRCREV}" |
16 | PR = "r1" | 15 | PR = "r5" |
17 | |||
18 | PROVIDES = "virtual/libgl" | ||
19 | 16 | ||
20 | DEFAULT_PREFERENCE = "-1" | 17 | DEFAULT_PREFERENCE = "-1" |
21 | 18 | ||
22 | # Multiple virtual/gl providers being built breaks staging | ||
23 | EXCLUDE_FROM_WORLD = "1" | ||
24 | |||
25 | do_install () { | 19 | do_install () { |
26 | install -d ${D}${libdir} | 20 | install -d ${D}${libdir}/ |
27 | install -m 0755 ${S}/libGL.so ${D}${libdir}/ | 21 | install -m 0755 ${S}/libGL.so.1.2 ${D}${libdir}/libGL-qemu.so.1.2 |
28 | ln -s libGL.so ${D}${libdir}/libGL.so.1 | ||
29 | install -d ${D}{includedir}/GL/ | ||
30 | cp -pPR ${WORKDIR}/headers/* ${D}{includedir}/GL/ | ||
31 | install -d ${D}${libdir}/pkgconfig/ | ||
32 | cp ${WORKDIR}/gl.pc ${D}${libdir}/pkgconfig/ | ||
33 | } | 22 | } |
34 | 23 | ||
35 | do_stage () { | 24 | pkg_postinst_${PN} () { |
36 | install -d ${STAGING_LIBDIR}/ | 25 | rm -f $D${libdir}/libGL.so.1.2 |
37 | install -m 0755 ${S}/libGL.so ${STAGING_LIBDIR}/ | 26 | ln -s libGL-qemu.so.1.2 $D${libdir}/libGL.so.1.2 |
38 | ln -s libGL.so ${STAGING_LIBDIR}/libGL.so.1 | 27 | } \ No newline at end of file |
39 | install -d ${STAGING_INCDIR}/GL/ | ||
40 | cp -pPR ${WORKDIR}/headers/* ${STAGING_INCDIR}/GL/ | ||
41 | install -d ${STAGING_LIBDIR}/pkgconfig/ | ||
42 | cp ${WORKDIR}/gl.pc ${STAGING_LIBDIR}/pkgconfig/ | ||
43 | } | ||