Mesa (master): scons: Handle Python OSError exception when missing libdrm_radeon.

Vinson Lee vlee at kemper.freedesktop.org
Thu Jun 3 00:08:56 PDT 2010


Module: Mesa
Branch: master
Commit: d062d2141618e5f5950410b4da84b4d62d43c1be
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d062d2141618e5f5950410b4da84b4d62d43c1be

Author: Vinson Lee <vlee at vmware.com>
Date:   Thu Jun  3 00:03:18 2010 -0700

scons: Handle Python OSError exception when missing libdrm_radeon.

Instead of crashing when libdrm_radeon is unavailable, the SCons build
just does not build r600g.

---

 src/gallium/drivers/r600/SConscript |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/r600/SConscript b/src/gallium/drivers/r600/SConscript
index 8c9edd8..26e2f19 100644
--- a/src/gallium/drivers/r600/SConscript
+++ b/src/gallium/drivers/r600/SConscript
@@ -2,7 +2,11 @@ Import('*')
 
 env = env.Clone()
 
-env.ParseConfig('pkg-config --cflags libdrm_radeon')
+try:
+    env.ParseConfig('pkg-config --cflags libdrm_radeon')
+except OSError:
+    print 'warning: not building r600'
+    Return()
 
 env.Append(CPPPATH = [
     '#/include', 



More information about the mesa-commit mailing list