[Scummvm-cvs-logs] scummvm master -> f841831729a77f1ca4a4a2937ac7df768e0be913
wjp
wjp at usecode.org
Fri Aug 31 23:07:50 CEST 2012
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1cc58ce679 CONFIGURE: Allow dependency checks for engines.
f841831729 Merge pull request #274 from lordhoto/engine-deps
Commit: 1cc58ce6795005b05a018209d05c002fc8d746ac
https://github.com/scummvm/scummvm/commit/1cc58ce6795005b05a018209d05c002fc8d746ac
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2012-08-31T13:30:25-07:00
Commit Message:
CONFIGURE: Allow dependency checks for engines.
Also adds PNG as a dependency for sword25 and removes the hardcoded check for
it.
Changed paths:
configure
engines/configure.engines
diff --git a/configure b/configure
index 2a86a5a..29c5f6c 100755
--- a/configure
+++ b/configure
@@ -72,6 +72,7 @@ add_engine() {
set_var _engine_${1}_build "${3}"
set_var _engine_${1}_build_default "${3}"
set_var _engine_${1}_subengines "${4}"
+ set_var _engine_${1}_deps "${5}"
for sub in ${4}; do
set_var _engine_${sub}_sub "yes"
done
@@ -464,6 +465,11 @@ get_engine_subengines() {
get_var _engine_$1_subengines
}
+# Get the dependencies
+get_engine_dependencies() {
+ get_var _engine_$1_deps
+}
+
# Ask if this is a subengine
get_engine_sub() {
sub=`get_var _engine_$1_sub`
@@ -532,6 +538,28 @@ engine_disable() {
fi
}
+# Check whether the engine's dependencies are met
+# If that is not the case disable the engine
+check_engine_deps() {
+ unmet_deps=""
+
+ # Check whether the engine is enabled
+ if test `get_engine_build $1` = yes ; then
+ # Collect unmet dependencies
+ for dep in `get_engine_dependencies $1`; do
+ if test `get_var _${dep}` = no ; then
+ unmet_deps="${unmet_deps}${dep} "
+ fi
+ done
+
+ # Check whether there is any unmet dependency
+ if test -n "$unmet_deps"; then
+ echo "WARNING: Disabling engine "`get_engine_name $1`" because the following dependencies are unmet: "$unmet_deps
+ engine_disable $1
+ fi
+ fi
+}
+
# Show the configure help line for a given engine
show_engine_help() {
name=`get_engine_name $1`
@@ -3204,11 +3232,6 @@ fi
define_in_config_if_yes "$_png" 'USE_PNG'
echo "$_png"
-if test `get_engine_build sword25` = yes && test ! "$_png" = yes ; then
- echo "...disabling Broken Sword 2.5 engine. PNG is required"
- engine_disable sword25
-fi
-
#
# Check for Theora Decoder
#
@@ -3870,6 +3893,9 @@ sh -c "
fi" 2>/dev/null &
for engine in $_engines; do
+ # Check whether all dependencies are available
+ check_engine_deps $engine
+
if test "`get_engine_sub $engine`" = "no" ; then
# It's a main engine
if test `get_engine_build $engine` = no ; then
diff --git a/engines/configure.engines b/engines/configure.engines
index 8eaee73..f88b3fe 100644
--- a/engines/configure.engines
+++ b/engines/configure.engines
@@ -36,7 +36,7 @@ add_engine sci32 "SCI32 games" no
add_engine sky "Beneath a Steel Sky" yes
add_engine sword1 "Broken Sword" yes
add_engine sword2 "Broken Sword II" yes
-add_engine sword25 "Broken Sword 2.5" no
+add_engine sword25 "Broken Sword 2.5" no "" "png"
add_engine teenagent "Teen Agent" yes
add_engine testbed "TestBed: the Testing framework" no
add_engine tinsel "Tinsel" yes
Commit: f841831729a77f1ca4a4a2937ac7df768e0be913
https://github.com/scummvm/scummvm/commit/f841831729a77f1ca4a4a2937ac7df768e0be913
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2012-08-31T14:07:22-07:00
Commit Message:
Merge pull request #274 from lordhoto/engine-deps
CONFIGURE: Allow dependency checks for engines.
Changed paths:
configure
engines/configure.engines
More information about the Scummvm-git-logs
mailing list