diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2013-06-13 01:19:54 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-06-14 12:44:34 +0100 |
commit | 6efefdf21cf31f5f195f62ca60c9f5f5b36ea449 (patch) | |
tree | 1f83c1aef23a6b0701f5b483e782cae3c49aa3ad /meta/recipes-graphics/mesa/mesa.inc | |
parent | eba5d155f2598fb5de2a11b9946dac53cb23503d (diff) | |
download | poky-6efefdf21cf31f5f195f62ca60c9f5f5b36ea449.tar.gz |
mesa: merge mesa-common.inc to mesa.inc
(From OE-Core rev: 72afb46920202588948e256738ee80d585519974)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/mesa/mesa.inc')
-rw-r--r-- | meta/recipes-graphics/mesa/mesa.inc | 108 |
1 files changed, 105 insertions, 3 deletions
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index a692bb7a04..3f00237f71 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc | |||
@@ -1,5 +1,35 @@ | |||
1 | DEPENDS += "libdrm expat udev" | 1 | SUMMARY = "A free implementation of the OpenGL API" |
2 | X11_DEPS += "dri2proto" | 2 | DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - \ |
3 | a system for rendering interactive 3D graphics. \ | ||
4 | A variety of device drivers allows Mesa to be used in many different environments \ | ||
5 | ranging from software emulation to complete hardware acceleration for modern GPUs. \ | ||
6 | Mesa is used as part of the overall Direct Rendering Infrastructure and X.org \ | ||
7 | environment." | ||
8 | |||
9 | HOMEPAGE = "http://mesa3d.org" | ||
10 | BUGTRACKER = "https://bugs.freedesktop.org" | ||
11 | SECTION = "x11" | ||
12 | LICENSE = "MIT" | ||
13 | |||
14 | INC_PR = "r9" | ||
15 | PE = "2" | ||
16 | |||
17 | DEPENDS = "expat makedepend-native flex-native bison-native libdrm expat udev" | ||
18 | |||
19 | PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl" | ||
20 | |||
21 | inherit autotools pkgconfig pythonnative | ||
22 | |||
23 | EXTRA_OECONF = "--enable-shared-glapi" | ||
24 | |||
25 | PACKAGECONFIG ??= "egl gles \ | ||
26 | ${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}\ | ||
27 | ${@base_contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}\ | ||
28 | " | ||
29 | |||
30 | X11_DEPS = "xf86driproto glproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes dri2proto" | ||
31 | PACKAGECONFIG[x11] = "--enable-glx-tls,--disable-glx,${X11_DEPS}" | ||
32 | PACKAGECONFIG[wayland] = ",,wayland" | ||
3 | 33 | ||
4 | DRIDRIVERS = "swrast" | 34 | DRIDRIVERS = "swrast" |
5 | DRIDRIVERS_append_x86 = ",radeon,r200,nouveau,i965,i915" | 35 | DRIDRIVERS_append_x86 = ",radeon,r200,nouveau,i965,i915" |
@@ -16,9 +46,58 @@ EGL_PLATFORMS .="${@base_contains('DISTRO_FEATURES', 'x11', ',x11', '', d)}" | |||
16 | EGL_PLATFORMS .="${@base_contains('DISTRO_FEATURES', 'wayland', ',wayland', '', d)}" | 46 | EGL_PLATFORMS .="${@base_contains('DISTRO_FEATURES', 'wayland', ',wayland', '', d)}" |
17 | PACKAGECONFIG[egl] = "--enable-egl --with-egl-platforms=${EGL_PLATFORMS}, --disable-egl" | 47 | PACKAGECONFIG[egl] = "--enable-egl --with-egl-platforms=${EGL_PLATFORMS}, --disable-egl" |
18 | 48 | ||
49 | # Multiple virtual/gl providers being built breaks staging | ||
50 | EXCLUDE_FROM_WORLD = "1" | ||
51 | |||
52 | # Remove the mesa dependency on mesa-dev, as mesa is empty | ||
53 | RDEPENDS_${PN}-dev = "" | ||
54 | |||
55 | PACKAGES =+ "libegl-mesa libegl-mesa-dev \ | ||
56 | libosmesa libosmesa-dev \ | ||
57 | libgl-mesa libgl-mesa-dev \ | ||
58 | libdricore libdricore-dev \ | ||
59 | libglapi libglapi-dev \ | ||
60 | libgbm libgbm-dev \ | ||
61 | libgles1-mesa libgles1-mesa-dev \ | ||
62 | libgles2-mesa libgles2-mesa-dev \ | ||
63 | libgles3-mesa libgles3-mesa-dev \ | ||
64 | libwayland-egl libwayland-egl-dev \ | ||
65 | " | ||
66 | |||
67 | do_install_append () { | ||
68 | # GLU is now in libglu (this shouldn't be required in Mesa 9.x) | ||
69 | rm -f ${D}${includedir}/GL/glu* | ||
70 | |||
71 | # Drivers never need libtool .la files | ||
72 | rm -f ${D}${libdir}/dri/*.la | ||
73 | } | ||
74 | |||
75 | # For the packages that make up the OpenGL interfaces, inject variables so that | ||
76 | # they don't get Debian-renamed (which would remove the -mesa suffix), and | ||
77 | # RPROVIDEs/RCONFLICTs on the generic libgl name. | ||
78 | python __anonymous() { | ||
79 | for p in (("libegl", "libegl1"), ("libgl", "libgl1"), | ||
80 | ("libgles1", "libglesv1-cm1"), ("libgles2", "libglesv2-2"), | ||
81 | ("libgles3",)): | ||
82 | fullp = p[0] + "-mesa" | ||
83 | pkgs = " ".join(p) | ||
84 | d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1") | ||
85 | d.appendVar("RREPLACES_" + fullp, pkgs) | ||
86 | d.appendVar("RPROVIDES_" + fullp, pkgs) | ||
87 | d.appendVar("RCONFLICTS_" + fullp, pkgs) | ||
88 | |||
89 | # For -dev, the first element is both the Debian and original name | ||
90 | fullp += "-dev" | ||
91 | pkgs = p[0] + "-dev" | ||
92 | d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1") | ||
93 | d.appendVar("RREPLACES_" + fullp, pkgs) | ||
94 | d.appendVar("RPROVIDES_" + fullp, pkgs) | ||
95 | d.appendVar("RCONFLICTS_" + fullp, pkgs) | ||
96 | } | ||
97 | |||
19 | python populate_packages_prepend() { | 98 | python populate_packages_prepend() { |
20 | dri_drivers_root = os.path.join(d.getVar('libdir', True), "dri") | 99 | dri_drivers_root = os.path.join(d.getVar('libdir', True), "dri") |
21 | 100 | ||
22 | pkgs = ['mesa', 'mesa-dev', 'mesa-dbg'] | 101 | pkgs = ['mesa', 'mesa-dev', 'mesa-dbg'] |
23 | pkgs += do_split_packages(d, dri_drivers_root, '^(.*)_dri\.so$', 'mesa-driver-%s', 'Mesa %s DRI driver', extra_depends='') | 102 | pkgs += do_split_packages(d, dri_drivers_root, '^(.*)_dri\.so$', 'mesa-driver-%s', 'Mesa %s DRI driver', extra_depends='') |
24 | for pkg in pkgs: | 103 | for pkg in pkgs: |
@@ -31,3 +110,26 @@ PACKAGES_DYNAMIC += "^mesa-driver-.*" | |||
31 | 110 | ||
32 | FILES_${PN}-dbg += "${libdir}/dri/.debug/*" | 111 | FILES_${PN}-dbg += "${libdir}/dri/.debug/*" |
33 | 112 | ||
113 | FILES_libdricore = "${sysconfdir}/drirc ${libdir}/libdricore*.so.*" | ||
114 | FILES_libegl-mesa = "${libdir}/libEGL.so.*" | ||
115 | FILES_libgbm = "${libdir}/libgbm.so.*" | ||
116 | FILES_libgles1-mesa = "${libdir}/libGLESv1*.so.*" | ||
117 | FILES_libgles2-mesa = "${libdir}/libGLESv2.so.*" | ||
118 | FILES_libgl-mesa = "${libdir}/libGL.so.*" | ||
119 | FILES_libglapi = "${libdir}/libglapi.so.*" | ||
120 | FILES_libosmesa = "${libdir}/libOSMesa.so.*" | ||
121 | FILES_libwayland-egl = "${libdir}/libwayland-egl.so.*" | ||
122 | |||
123 | FILES_${PN}-dev = "${libdir}/pkgconfig/dri.pc" | ||
124 | FILES_libdricore-dev = "${libdir}/libdricore*.*" | ||
125 | FILES_libegl-mesa-dev = "${libdir}/libEGL.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc" | ||
126 | FILES_libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h" | ||
127 | FILES_libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc" | ||
128 | FILES_libglapi-dev = "${libdir}/libglapi.*" | ||
129 | FILES_libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc" | ||
130 | FILES_libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc" | ||
131 | FILES_libgles3-mesa-dev = "${includedir}/GLES3" | ||
132 | FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/osmesa.h ${libdir}/pkgconfig/osmesa.pc" | ||
133 | FILES_libwayland-egl-dev = "${libdir}/pkgconfig/wayland-egl.pc ${libdir}/libwayland-egl.*" | ||
134 | |||
135 | FILES_${PN}-dbg += "${libdir}/dri/.debug/* ${libdir}/egl/.debug/*" | ||