From 3a5f98ba654b1064a07e57e3a4597e0ad49dee26 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 20 Sep 2017 14:06:04 +0200 Subject: [PATCH] Fix buildstack revision report --- tools/x-win/compile.sh | 1 + wscript | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/x-win/compile.sh b/tools/x-win/compile.sh index d778e921b5..643e3d84e6 100755 --- a/tools/x-win/compile.sh +++ b/tools/x-win/compile.sh @@ -75,6 +75,7 @@ fi CFLAGS="-mstackrealign$OPT" \ CXXFLAGS="-mstackrealign$OPT" \ LDFLAGS="-L${PREFIX}/lib" ./waf configure \ +DEPSTACK_ROOT="$PREFIX" \ --keepflags \ --dist-target=mingw \ --also-include=${PREFIX}/include \ diff --git a/wscript b/wscript index bfe133aa29..6d1324ab96 100644 --- a/wscript +++ b/wscript @@ -307,7 +307,7 @@ def create_stored_revision(): def get_depstack_rev(depstack_root): try: with open(depstack_root + '/../.vers', 'r') as f: - return f.readline() + return f.readline().decode('utf-8').strip()[:7] except IOError: return '-unknown-'; @@ -874,7 +874,9 @@ def configure(conf): pkg_config_path = os.getenv('PKG_CONFIG_PATH') user_gtk_root = os.path.expanduser (Options.options.depstack_root + '/gtk/inst') - if pkg_config_path is not None and pkg_config_path.find (user_gtk_root) >= 0: + if os.getenv('DEPSTACK_ROOT') is not None and os.path.exists (os.getenv('DEPSTACK_ROOT') + '/lib'): + conf.env['DEPSTACK_REV'] = get_depstack_rev (os.getenv('DEPSTACK_ROOT') + '/lib') + elif pkg_config_path is not None and pkg_config_path.find (user_gtk_root) >= 0: # told to search user_gtk_root prefinclude = ''.join ([ '-I', user_gtk_root + '/include']) preflib = ''.join ([ '-L', user_gtk_root + '/lib'])