mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-16 18:31:32 +00:00
Added custom check for pango(not used for now).
This commit is contained in:
parent
a18fb6a73f
commit
c079143228
@ -88,7 +88,7 @@ opts.AddOptions(
|
|||||||
# Setup
|
# Setup
|
||||||
#
|
#
|
||||||
|
|
||||||
sys.path.append("./scons")
|
sys.path.insert(0, "./scons")
|
||||||
env = Environment(tools=["tar", "gettext", "install"], options = opts, toolpath = ["scons"])
|
env = Environment(tools=["tar", "gettext", "install"], options = opts, toolpath = ["scons"])
|
||||||
|
|
||||||
opts.Save('.scons-option-cache', env)
|
opts.Save('.scons-option-cache', env)
|
||||||
@ -179,7 +179,7 @@ def Warning(message):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
from metasconf import init_metasconf
|
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["prereqs"]:
|
||||||
if env["gettextdir"]:
|
if env["gettextdir"]:
|
||||||
@ -191,6 +191,7 @@ if env["prereqs"]:
|
|||||||
conf.CheckCHeader("libintl.h", "<>") and \
|
conf.CheckCHeader("libintl.h", "<>") and \
|
||||||
conf.CheckSDL(require_version = '1.2.7') or Die("Base prerequisites are not met.")
|
conf.CheckSDL(require_version = '1.2.7') or Die("Base prerequisites are not met.")
|
||||||
|
|
||||||
|
# conf.CheckPango("cairo") and \
|
||||||
have_client_prereqs = \
|
have_client_prereqs = \
|
||||||
conf.CheckBoost("regex") and \
|
conf.CheckBoost("regex") and \
|
||||||
conf.CheckSDL("SDL_ttf", require_version = "2.0.8") and \
|
conf.CheckSDL("SDL_ttf", require_version = "2.0.8") and \
|
||||||
|
21
scons/pango.py
Normal file
21
scons/pango.py
Normal file
@ -0,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 }
|
Loading…
x
Reference in New Issue
Block a user