The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Depend on a specific verison of xmlbird

These changes was commited to the Birdfont repository Sun, 10 Jan 2016 12:35:56 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 10 Jan 2016 12:35:56 +0000 (13:35 +0100)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 10 Jan 2016 12:35:56 +0000 (13:35 +0100)
commit e89b6addd13e7a1bb1f91de6a292a11fa078c0a2
tree 8a82785a5bc38bf8eaa0c602f1b6c554ecffa9ab
parent 07e24257a09062ba8749f424f421df9ad8791dd4
Depend on a specific verison of xmlbird

configure
--- a/configure +++ b/configure @@ -49,12 +49,34 @@ version = [int(n) for n in v.split ('.')] return [a,b,c] <= version - def test_library_version (lib): + def test_library_version (lib, required=True, version=None): print ('Looking for library: ' + lib + '\t\t') process = subprocess.Popen ('pkg-config --modversion ' + lib, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + v = process.stdout.readline().decode('utf-8') process.communicate()[0] - return process.returncode == 0 - + + if not process.returncode == 0: + if required: + print (FAIL + lib + ' not found' + ENDC) + exit (1) + else: + return False + + if version == None: + return True + + installed_version = v.split ('.'); + library_version = version.split ('.'); + + if installed_version < library_version: + if required: + print (FAIL + lib + ' version >= ' + version + ' not found.' + ENDC) + exit (1) + else: + return False + + return True + def has_posixvala (): posixvala = test_library_version ('posixvala') if not posixvala: @@ -82,7 +104,6 @@ 'libsoup-2.4', 'libnotify', 'sqlite3', - 'xmlbird' ] else: libs = [ @@ -90,25 +111,23 @@ 'glib-2.0', 'sqlite3', 'fontconfig', - 'xmlbird' ] + + test_library_version ('xmlbird', True, '1.1.0') for lib in libs: - if not test_library_version (lib): - print (FAIL + 'Can not find ' + lib + ENDC) - exit (1) + test_library_version (lib) if libbgee == 'Any': - if test_library_version ('gee-0.8'): + if test_library_version ('gee-0.8', False): gee = 'gee-0.8' - elif test_library_version ('gee-1.0'): + elif test_library_version ('gee-1.0', False): gee = 'gee-1.0' else: print (FAIL + 'Can not find libgee (version 0.8 or version 1.0).' + ENDC) exit (1) else: if not test_library_version (libbgee): - print (FAIL + 'Can not find lib gee.' + ENDC) exit (1) gee = libbgee;