Added version check for pango to scons

This commit is contained in:
Sergey Popov 2013-02-16 12:09:50 +00:00
parent 2b939cebc7
commit 61997d771c
2 changed files with 6 additions and 3 deletions

View file

@ -329,7 +329,7 @@ if env["prereqs"]:
conf = client_env.Configure(**configure_args)
have_client_prereqs = have_server_prereqs and \
CheckAsio(conf, not env["use_network_ana"]) and \
conf.CheckPango("cairo") and \
conf.CheckPango("cairo", require_version = "1.24.4") and \
conf.CheckPKG("fontconfig") and \
conf.CheckBoost("program_options", require_version="1.35.0") and \
conf.CheckBoost("regex", require_version = "1.35.0") and \

View file

@ -4,7 +4,7 @@ from os.path import join
from os import environ
from SCons.Util import AppendPath
def CheckPango(context, backend):
def CheckPango(context, backend, require_version = None):
context.Message("Checking for Pango with " + backend + " backend... ")
env = context.env
gtkdir = env.get("gtkdir", os.environ.get("GTK_BASEPATH"))
@ -16,7 +16,10 @@ def CheckPango(context, backend):
try:
env["ENV"]["PKG_CONFIG_PATH"] = environ.get("PKG_CONFIG_PATH")
env.ParseConfig("pkg-config --libs --cflags $PKGCONFIG_FLAGS pango" + backend)
version_arg = ""
if require_version:
version_arg = "--atleast-version=" + require_version
env.ParseConfig("pkg-config --libs --cflags %s $PKGCONFIG_FLAGS pango" % version_arg + backend)
context.Result("yes")
return True
except OSError: