]> code.ossystems Code Review - openembedded-core.git/commitdiff
piglit: fix floating dependence on freeglut
authorRoy Li <rongqing.li@windriver.com>
Thu, 18 Jun 2015 09:18:57 +0000 (17:18 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 26 Jun 2015 13:08:03 +0000 (14:08 +0100)
cmake can not handle "ifdef" and make floating dependence on freeglut_ext.h
when make_depend, so remove to include freeglut_ext.h from header file if
freegult is not in PACKAGECONFIG to fix this issue

Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-graphics/piglit/piglit_git.bb

index 9e6dc2c406ac0021b343d845337f3bdcda15831a..3a8b0acfa285c61738f8b02bff0bf162292c3cd4 100644 (file)
@@ -21,6 +21,12 @@ REQUIRED_DISTRO_FEATURES = "x11"
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut,"
 
+do_configure_prepend() {
+   if [ "${@bb.utils.contains('PACKAGECONFIG', 'freeglut', 'yes', 'no', d)}" = "no" ]; then
+        sed -i -e "/^#.*include <GL\/freeglut_ext.h>$/d" ${S}/src/piglit/glut_wrap.h
+   fi
+}
+
 FILES_${PN}-dbg += "${libdir}/piglit/*/.debug/"
 
 RDEPENDS_${PN} = "waffle python python-mako python-json python-subprocess \