summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-graphics/mesa/mesa-dri.inc20
-rw-r--r--meta/recipes-graphics/mesa/mesa-dri_7.11.bb22
-rw-r--r--meta/recipes-graphics/mesa/mesa-dri_git.bb19
3 files changed, 23 insertions, 38 deletions
diff --git a/meta/recipes-graphics/mesa/mesa-dri.inc b/meta/recipes-graphics/mesa/mesa-dri.inc
new file mode 100644
index 0000000000..603438ef0b
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-dri.inc
@@ -0,0 +1,20 @@
+PROTO_DEPS += "dri2proto"
+LIB_DEPS += "libdrm expat"
+
+# most of our targets do not have DRI so will use mesa-xlib
+DEFAULT_PREFERENCE = "-1"
+
+EXTRA_OECONF += "--with-driver=dri --disable-egl --disable-gallium --without-gallium-drivers"
+
+python populate_packages_prepend() {
+ import os.path
+
+ dri_drivers_root = os.path.join(bb.data.getVar('libdir', d, 1), "dri")
+
+ do_split_packages(d, dri_drivers_root, '^(.*)_dri\.so$', 'mesa-dri-driver-%s', 'Mesa %s DRI driver', extra_depends='')
+}
+
+PACKAGES_DYNAMIC = "mesa-dri-driver-*"
+
+FILES_${PN}-dbg += "${libdir}/dri/.debug/*"
+
diff --git a/meta/recipes-graphics/mesa/mesa-dri_7.11.bb b/meta/recipes-graphics/mesa/mesa-dri_7.11.bb
index 8ab1941a36..2cb2e055b3 100644
--- a/meta/recipes-graphics/mesa/mesa-dri_7.11.bb
+++ b/meta/recipes-graphics/mesa/mesa-dri_7.11.bb
@@ -1,28 +1,10 @@
include mesa-common.inc
include mesa-${PV}.inc
-
-PROTO_DEPS += "dri2proto"
-LIB_DEPS += "libdrm expat"
-
+include mesa-dri.inc
PR = "${INC_PR}.0"
-# most of our targets do not have DRI so will use mesa-xlib
-DEFAULT_PREFERENCE = "-1"
-
LEAD_SONAME = "libGL.so.1"
-EXTRA_OECONF += "--with-driver=dri --disable-egl -with-dri-drivers=swrast,i915,i965 --without-gallium-drivers"
-
-python populate_packages_prepend() {
- import os.path
-
- dri_drivers_root = os.path.join(bb.data.getVar('libdir', d, 1), "dri")
-
- do_split_packages(d, dri_drivers_root, '^(.*)_dri\.so$', 'mesa-dri-driver-%s', 'Mesa %s DRI driver', extra_depends='')
-}
+EXTRA_OECONF += "--with-dri-drivers=swrast,i915,i965"
COMPATIBLE_HOST = '(i.86.*-linux|x86_64.*-linux)'
-
-PACKAGES_DYNAMIC = "mesa-dri-driver-*"
-
-FILES_${PN}-dbg += "${libdir}/dri/.debug/*"
diff --git a/meta/recipes-graphics/mesa/mesa-dri_git.bb b/meta/recipes-graphics/mesa/mesa-dri_git.bb
index 10ebd1c7ad..aaa3073ee0 100644
--- a/meta/recipes-graphics/mesa/mesa-dri_git.bb
+++ b/meta/recipes-graphics/mesa/mesa-dri_git.bb
@@ -1,4 +1,5 @@
include mesa-common.inc
+include mesa-dri.inc
SRC_URI = "git://anongit.freedesktop.org/git/mesa/mesa;protocol=git \
file://cross2.patch \
@@ -6,26 +7,16 @@ SRC_URI = "git://anongit.freedesktop.org/git/mesa/mesa;protocol=git \
# file://mesa-DRI2Swapbuffer.patch "
S = "${WORKDIR}/git"
-PROTO_DEPS += "dri2proto"
-LIB_DEPS += "libdrm expat"
-
SRCREV = "1bf94d419805538ac23a4d0b04d31ac5e4487aca"
PV = "7.7+git${SRCPV}"
PR = "${INC_PR}.0"
-# most of our targets do not have DRI so will use mesa-xlib
-DEFAULT_PREFERENCE = "-1"
-
PACKAGES =+ "${PN}-xprogs"
-PACKAGES_DYNAMIC = "mesa-dri-driver-*"
-FILES_${PN}-dbg += "${libdir}/dri/.debug/*"
FILES_${PN}-xprogs = "${bindir}/glxdemo ${bindir}/glxgears ${bindir}/glxheads ${bindir}/glxinfo"
LEAD_SONAME = "libGL.so.1"
-EXTRA_OECONF += "--with-driver=dri --disable-egl --disable-gallium"
-
do_configure_prepend () {
cp ${WORKDIR}/matypes.h ${S}/src/mesa/x86
touch ${S}/src/mesa/x86/matypes.h
@@ -44,12 +35,4 @@ do_install_append () {
install -m 0755 ${S}/progs/xdemos/{glxdemo,glxgears,glxheads,glxinfo} ${D}/usr/bin/
}
-python populate_packages_prepend() {
- import os.path
-
- dri_drivers_root = os.path.join(bb.data.getVar('libdir', d, 1), "dri")
-
- do_split_packages(d, dri_drivers_root, '^(.*)_dri\.so$', 'mesa-dri-driver-%s', 'Mesa %s DRI driver', extra_depends='')
-}
-
COMPATIBLE_HOST = '(i.86|x86_64).*-linux'