[meta-intel] [fido][PATCH 2/2] common/intel-gpu-tools: Modularize and make X11 dependency optional

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Tue Oct 20 01:43:24 PDT 2015


Modularize the recipe to allow extending the recipe and also make the X11
distro dependency optional.

Signed-off-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
---
 .../intel-gpu-tools/intel-gpu-tools.inc            | 44 ++++++++++++++++++++++
 .../intel-gpu-tools/intel-gpu-tools_1.9.bb         | 16 +-------
 2 files changed, 45 insertions(+), 15 deletions(-)
 create mode 100644 common/recipes-graphics/intel-gpu-tools/intel-gpu-tools.inc

diff --git a/common/recipes-graphics/intel-gpu-tools/intel-gpu-tools.inc b/common/recipes-graphics/intel-gpu-tools/intel-gpu-tools.inc
new file mode 100644
index 0000000..f6cfd22
--- /dev/null
+++ b/common/recipes-graphics/intel-gpu-tools/intel-gpu-tools.inc
@@ -0,0 +1,44 @@
+SUMMARY = "Intel GPU Tools"
+DESCRIPTION = "A collection of tools for development and testing of the Intel DRM driver."
+HOMEPAGE = "https://01.org/linuxgraphics"
+BUGTRACKER = "https://bugs.freedesktop.org"
+SECTION = "devel"
+
+INC_PR = "r0"
+
+LICENSE = "MIT-X"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0918806acfedc3e8c0488f2dd61616dd"
+
+SRC_URI = "${XORG_MIRROR}/individual/app/${BPN}-${PV}.tar.bz2"
+
+inherit autotools pkgconfig distro_features_check gtk-doc
+
+DEPENDS = "\
+	util-macros-native libdrm libpciaccess udev glib-2.0 cairo \
+	${@bb.utils.contains("DISTRO_FEATURES", "x11", "virtual/libx11 libxv libx11 libxext libxrandr", "",d)} \
+	"
+
+RDEPENDS_${PN} += "bash"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind,libunwind"
+
+EXTRA_OECONF = "--disable-nouveau --disable-shader-debugger --disable-dumper"
+COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
+
+libexecdir = "${libdir}"
+
+FILES_${PN} += " \
+	${libdir}/intel_*.so \
+	"
+
+FILES_${PN}-dbg += " \
+       	${libexecdir}/${PN}/tests/.debug \
+       	${libexecdir}/${PN}/benchmarks/.debug \
+      	"
+
+gputools_sysroot_preprocess() {
+	rm -f ${SYSROOT_DESTDIR}${libdir}/pkgconfig/intel-gen4asm.pc
+}
+SYSROOT_PREPROCESS_FUNCS += "gputools_sysroot_preprocess"
+
diff --git a/common/recipes-graphics/intel-gpu-tools/intel-gpu-tools_1.9.bb b/common/recipes-graphics/intel-gpu-tools/intel-gpu-tools_1.9.bb
index b98fc75..1053712 100644
--- a/common/recipes-graphics/intel-gpu-tools/intel-gpu-tools_1.9.bb
+++ b/common/recipes-graphics/intel-gpu-tools/intel-gpu-tools_1.9.bb
@@ -1,19 +1,5 @@
-require ${COREBASE}/meta/recipes-graphics/xorg-app/xorg-app-common.inc
-
-SUMMARY = "Intel GPU tools"
-DESCRIPTION = "Variety of small tools for testing intel graphics."
+require intel-gpu-tools.inc
 
 SRC_URI[md5sum] = "1e768f2b1edc8613911b1d33bb361a7f"
 SRC_URI[sha256sum] = "1de4c28ae0fe1e6c198ab559dbffcec6762798dc4adbdfdac54b2c7a9b0a1ed3"
 
-LIC_FILES_CHKSUM = "file://COPYING;md5=0918806acfedc3e8c0488f2dd61616dd"
-
-DEPENDS += "libdrm libpciaccess cairo udev glib-2.0 libxv libx11 libxext libxrandr"
-
-EXTRA_OECONF = "--disable-nouveau --disable-shader-debugger --disable-dumper"
-COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
-
-gputools_sysroot_preprocess() {
-	rm -f ${SYSROOT_DESTDIR}${libdir}/pkgconfig/intel-gen4asm.pc
-}
-SYSROOT_PREPROCESS_FUNCS += "gputools_sysroot_preprocess"
-- 
2.4.3



More information about the meta-intel mailing list