13
0

Fix buildstack revision report

This commit is contained in:
Robin Gareus 2017-09-20 14:06:04 +02:00
parent 9fbcecf2f5
commit 3a5f98ba65
2 changed files with 5 additions and 2 deletions

View File

@ -75,6 +75,7 @@ fi
CFLAGS="-mstackrealign$OPT" \ CFLAGS="-mstackrealign$OPT" \
CXXFLAGS="-mstackrealign$OPT" \ CXXFLAGS="-mstackrealign$OPT" \
LDFLAGS="-L${PREFIX}/lib" ./waf configure \ LDFLAGS="-L${PREFIX}/lib" ./waf configure \
DEPSTACK_ROOT="$PREFIX" \
--keepflags \ --keepflags \
--dist-target=mingw \ --dist-target=mingw \
--also-include=${PREFIX}/include \ --also-include=${PREFIX}/include \

View File

@ -307,7 +307,7 @@ def create_stored_revision():
def get_depstack_rev(depstack_root): def get_depstack_rev(depstack_root):
try: try:
with open(depstack_root + '/../.vers', 'r') as f: with open(depstack_root + '/../.vers', 'r') as f:
return f.readline() return f.readline().decode('utf-8').strip()[:7]
except IOError: except IOError:
return '-unknown-'; return '-unknown-';
@ -874,7 +874,9 @@ def configure(conf):
pkg_config_path = os.getenv('PKG_CONFIG_PATH') pkg_config_path = os.getenv('PKG_CONFIG_PATH')
user_gtk_root = os.path.expanduser (Options.options.depstack_root + '/gtk/inst') 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 # told to search user_gtk_root
prefinclude = ''.join ([ '-I', user_gtk_root + '/include']) prefinclude = ''.join ([ '-I', user_gtk_root + '/include'])
preflib = ''.join ([ '-L', user_gtk_root + '/lib']) preflib = ''.join ([ '-L', user_gtk_root + '/lib'])