mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-25 02:58:34 +00:00
Require Cairo 1.10 or above
This is needed because the CAIRO_STATUS_INVALID_SIZE constant was added in that version. 1.10 is old enough that this change shouldn't cause problems for anyone. For example, Debian Wheezy (2013) has Cairo 1.12.2.
This commit is contained in:
parent
21ef86bfa8
commit
6b8273e003
@ -640,6 +640,7 @@ if(ENABLE_GAME OR ENABLE_TESTS)
|
||||
if(NOT MSVC)
|
||||
find_package(VorbisFile REQUIRED)
|
||||
find_package( PkgConfig REQUIRED )
|
||||
pkg_check_modules( CAIRO REQUIRED cairo>=1.10 )
|
||||
pkg_check_modules( PANGOCAIRO REQUIRED pangocairo>=1.21.3 )
|
||||
pkg_check_modules( FONTCONFIG REQUIRED fontconfig>=2.4.1 )
|
||||
pkg_check_modules( SYSTEMD systemd )
|
||||
|
@ -306,7 +306,7 @@ def Warning(message):
|
||||
|
||||
from metasconf import init_metasconf
|
||||
configure_args = dict(
|
||||
custom_tests = init_metasconf(env, ["ieee_754", "cplusplus", "python_devel", "sdl", "boost", "pango", "pkgconfig", "gettext", "lua"]),
|
||||
custom_tests = init_metasconf(env, ["ieee_754", "cplusplus", "python_devel", "sdl", "boost", "cairo", "pango", "pkgconfig", "gettext", "lua"]),
|
||||
config_h = "$build_dir/config.h",
|
||||
log_file="$build_dir/config.log", conf_dir="$build_dir/sconf_temp")
|
||||
|
||||
@ -384,6 +384,7 @@ if env["prereqs"]:
|
||||
conf.CheckOgg())) & \
|
||||
conf.CheckPNG() & \
|
||||
conf.CheckJPG() & \
|
||||
conf.CheckCairo(min_version = "1.10") & \
|
||||
conf.CheckPango("cairo", require_version = "1.21.3") & \
|
||||
conf.CheckPKG("fontconfig") & \
|
||||
conf.CheckBoost("program_options", require_version = boost_version) & \
|
||||
|
16
scons/cairo.py
Normal file
16
scons/cairo.py
Normal file
@ -0,0 +1,16 @@
|
||||
from os import environ
|
||||
|
||||
def CheckCairo(context, min_version):
|
||||
context.Message("Checking for Cairo... ")
|
||||
env = context.env
|
||||
try:
|
||||
env["ENV"]["PKG_CONFIG_PATH"] = environ.get("PKG_CONFIG_PATH", "")
|
||||
version_arg = env["ESCAPE"](" >= ") + min_version
|
||||
env.ParseConfig("pkg-config --libs --cflags $PKGCONFIG_FLAGS cairo" + version_arg)
|
||||
context.Result("yes")
|
||||
return True
|
||||
except OSError:
|
||||
context.Result("no")
|
||||
return False
|
||||
|
||||
config_checks = { "CheckCairo" : CheckCairo }
|
Loading…
x
Reference in New Issue
Block a user