Author: loonycyborg
Date: Thu Jul 10 20:34:07 2008
New Revision: 27900

URL: http://svn.gna.org/viewcvs/wesnoth?rev=27900&view=rev
Log:
Added custom check for pango(not used for now).

Added:
    trunk/scons/pango.py
Modified:
    trunk/SConstruct

Modified: trunk/SConstruct
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=27900&r1=27899&r2=27900&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Thu Jul 10 20:34:07 2008
@@ -88,7 +88,7 @@
 # Setup
 #
 
-sys.path.append("./scons")
+sys.path.insert(0, "./scons")
 env = Environment(tools=["tar", "gettext", "install"], options = opts, 
toolpath = ["scons"])
 
 opts.Save('.scons-option-cache', env)
@@ -179,7 +179,7 @@
     return False
 
 from metasconf import init_metasconf
-conf = Configure(env, custom_tests = init_metasconf(env, ["cplusplus", 
"python_devel", "sdl", "boost"]), config_h = "config.h")
+conf = Configure(env, custom_tests = init_metasconf(env, ["cplusplus", 
"python_devel", "sdl", "boost", "pango"]), config_h = "config.h")
 
 if env["prereqs"]:
     if env["gettextdir"]:
@@ -191,6 +191,7 @@
     conf.CheckCHeader("libintl.h", "<>") and \
     conf.CheckSDL(require_version = '1.2.7') or Die("Base prerequisites are 
not met.")
 
+#        conf.CheckPango("cairo") and \
     have_client_prereqs = \
         conf.CheckBoost("regex") and \
         conf.CheckSDL("SDL_ttf", require_version = "2.0.8") and \

Added: trunk/scons/pango.py
URL: http://svn.gna.org/viewcvs/wesnoth/trunk/scons/pango.py?rev=27900&view=auto
==============================================================================
--- trunk/scons/pango.py (added)
+++ trunk/scons/pango.py Thu Jul 10 20:34:07 2008
@@ -1,0 +1,21 @@
+# vi: syntax=python:et:ts=4
+import os
+from os.path import join
+
+def CheckPango(context, backend):
+    context.Message("Checking for Pango with " + backend + " backend... ")
+    env = context.env
+    gtkdir = os.environ.get("GTK_BASEPATH")
+    if gtkdir:
+        env.AppendENVPath("PATH", join(gtkdir, "bin"))
+        env.AppendENVPath("PKG_CONFIG_PATH", join(gtkdir, "lib/pkgconfig"))
+    result, output = context.TryAction("pkg-config --libs --cflags pango" + 
backend + " > $TARGET")
+    if result:
+        env.MergeFlags(output)
+        context.Result("yes")
+        return True
+    else:
+        context.Result("no")
+        return False
+
+config_checks = { "CheckPango" : CheckPango }


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to