summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/mesa.inc
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2013-06-13 01:19:54 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-14 12:44:34 +0100
commit6efefdf21cf31f5f195f62ca60c9f5f5b36ea449 (patch)
tree1f83c1aef23a6b0701f5b483e782cae3c49aa3ad /meta/recipes-graphics/mesa/mesa.inc
parenteba5d155f2598fb5de2a11b9946dac53cb23503d (diff)
downloadpoky-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.inc108
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 @@
1DEPENDS += "libdrm expat udev" 1SUMMARY = "A free implementation of the OpenGL API"
2X11_DEPS += "dri2proto" 2DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - \
3a system for rendering interactive 3D graphics. \
4A variety of device drivers allows Mesa to be used in many different environments \
5ranging from software emulation to complete hardware acceleration for modern GPUs. \
6Mesa is used as part of the overall Direct Rendering Infrastructure and X.org \
7environment."
8
9HOMEPAGE = "http://mesa3d.org"
10BUGTRACKER = "https://bugs.freedesktop.org"
11SECTION = "x11"
12LICENSE = "MIT"
13
14INC_PR = "r9"
15PE = "2"
16
17DEPENDS = "expat makedepend-native flex-native bison-native libdrm expat udev"
18
19PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl"
20
21inherit autotools pkgconfig pythonnative
22
23EXTRA_OECONF = "--enable-shared-glapi"
24
25PACKAGECONFIG ??= "egl gles \
26 ${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}\
27 ${@base_contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}\
28 "
29
30X11_DEPS = "xf86driproto glproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes dri2proto"
31PACKAGECONFIG[x11] = "--enable-glx-tls,--disable-glx,${X11_DEPS}"
32PACKAGECONFIG[wayland] = ",,wayland"
3 33
4DRIDRIVERS = "swrast" 34DRIDRIVERS = "swrast"
5DRIDRIVERS_append_x86 = ",radeon,r200,nouveau,i965,i915" 35DRIDRIVERS_append_x86 = ",radeon,r200,nouveau,i965,i915"
@@ -16,9 +46,58 @@ EGL_PLATFORMS .="${@base_contains('DISTRO_FEATURES', 'x11', ',x11', '', d)}"
16EGL_PLATFORMS .="${@base_contains('DISTRO_FEATURES', 'wayland', ',wayland', '', d)}" 46EGL_PLATFORMS .="${@base_contains('DISTRO_FEATURES', 'wayland', ',wayland', '', d)}"
17PACKAGECONFIG[egl] = "--enable-egl --with-egl-platforms=${EGL_PLATFORMS}, --disable-egl" 47PACKAGECONFIG[egl] = "--enable-egl --with-egl-platforms=${EGL_PLATFORMS}, --disable-egl"
18 48
49# Multiple virtual/gl providers being built breaks staging
50EXCLUDE_FROM_WORLD = "1"
51
52# Remove the mesa dependency on mesa-dev, as mesa is empty
53RDEPENDS_${PN}-dev = ""
54
55PACKAGES =+ "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
67do_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.
78python __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
19python populate_packages_prepend() { 98python 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
32FILES_${PN}-dbg += "${libdir}/dri/.debug/*" 111FILES_${PN}-dbg += "${libdir}/dri/.debug/*"
33 112
113FILES_libdricore = "${sysconfdir}/drirc ${libdir}/libdricore*.so.*"
114FILES_libegl-mesa = "${libdir}/libEGL.so.*"
115FILES_libgbm = "${libdir}/libgbm.so.*"
116FILES_libgles1-mesa = "${libdir}/libGLESv1*.so.*"
117FILES_libgles2-mesa = "${libdir}/libGLESv2.so.*"
118FILES_libgl-mesa = "${libdir}/libGL.so.*"
119FILES_libglapi = "${libdir}/libglapi.so.*"
120FILES_libosmesa = "${libdir}/libOSMesa.so.*"
121FILES_libwayland-egl = "${libdir}/libwayland-egl.so.*"
122
123FILES_${PN}-dev = "${libdir}/pkgconfig/dri.pc"
124FILES_libdricore-dev = "${libdir}/libdricore*.*"
125FILES_libegl-mesa-dev = "${libdir}/libEGL.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc"
126FILES_libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h"
127FILES_libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc"
128FILES_libglapi-dev = "${libdir}/libglapi.*"
129FILES_libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc"
130FILES_libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc"
131FILES_libgles3-mesa-dev = "${includedir}/GLES3"
132FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/osmesa.h ${libdir}/pkgconfig/osmesa.pc"
133FILES_libwayland-egl-dev = "${libdir}/pkgconfig/wayland-egl.pc ${libdir}/libwayland-egl.*"
134
135FILES_${PN}-dbg += "${libdir}/dri/.debug/* ${libdir}/egl/.debug/*"