[glib/meson-for-merge] meson: Use the appropriate interface and binary ages
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/meson-for-merge] meson: Use the appropriate interface and binary ages
- Date: Fri, 14 Jul 2017 13:22:16 +0000 (UTC)
commit 065a8a488ad2ee4a7523fb673e1555e5cf8762b5
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Jul 14 13:56:02 2017 +0100
meson: Use the appropriate interface and binary ages
We need to build them out of the project version, and then propagate
them.
glib/tests/meson.build | 2 +-
gobject/tests/meson.build | 2 +-
meson.build | 15 +++++++++------
3 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/glib/tests/meson.build b/glib/tests/meson.build
index 8b9a889..6b7e323 100644
--- a/glib/tests/meson.build
+++ b/glib/tests/meson.build
@@ -86,7 +86,7 @@ endif
# FIXME: use new environment() object
# Not entirely random of course, but at least it changes over time
-random_number = minor_version.to_int() + meson.version().split('.').get(1).to_int()
+random_number = minor_version + meson.version().split('.').get(1).to_int()
test_env = [
'G_TEST_SRCDIR=' + meson.current_source_dir(),
diff --git a/gobject/tests/meson.build b/gobject/tests/meson.build
index 69d4fac..38002f2 100644
--- a/gobject/tests/meson.build
+++ b/gobject/tests/meson.build
@@ -20,7 +20,7 @@ gobject_tests = [
# FIXME: use new environment() object
# FIXME: put common bits of test environment() in one location
# Not entirely random of course, but at least it changes over time
-random_number = minor_version.to_int() + meson.version().split('.').get(1).to_int()
+random_number = minor_version + meson.version().split('.').get(1).to_int()
test_env = [
'G_TEST_SRCDIR=' + meson.current_source_dir(),
diff --git a/meson.build b/meson.build
index 65c4431..55ad798 100644
--- a/meson.build
+++ b/meson.build
@@ -30,14 +30,17 @@ host_system = host_machine.system()
glib_version = meson.project_version()
glib_api_version = '2.0'
version_arr = glib_version.split('.')
-major_version = version_arr[0]
-minor_version = version_arr[1]
-micro_version = version_arr[2]
+major_version = version_arr[0].to_int()
+minor_version = version_arr[1].to_int()
+micro_version = version_arr[2].to_int()
+
+interface_age = minor_version.is_odd() ? 0 : micro_version
+binary_age = 100 * minor_version + micro_version
soversion = 0
# Maintain compatibility with previous libtool versioning
# current = minor * 100 + micro
-library_version = '@0@.@1@.@2@'.format(soversion, minor_version.to_int() * 100, micro_version.to_int())
+library_version = '@0@.@1@.@2@'.format(soversion, binary_age - interface_age, interface_age)
configinc = include_directories('.')
glibinc = include_directories('glib')
@@ -68,8 +71,8 @@ glib_conf.set('GLIB_VERSION', glib_version)
glib_conf.set('GLIB_MAJOR_VERSION', major_version)
glib_conf.set('GLIB_MINOR_VERSION', minor_version)
glib_conf.set('GLIB_MICRO_VERSION', micro_version)
-glib_conf.set('GLIB_INTERFACE_AGE', micro_version)
-glib_conf.set('GLIB_BINARY_AGE', 100 * minor_version.to_int() + micro_version.to_int())
+glib_conf.set('GLIB_INTERFACE_AGE', interface_age)
+glib_conf.set('GLIB_BINARY_AGE', binary_age)
glib_conf.set_quoted('GETTEXT_PACKAGE', 'glib20')
glib_conf.set_quoted('PACKAGE_BUGREPORT', 'http://bugzilla.gnome.org/enter_bug.cgi?product=glib')
glib_conf.set_quoted('PACKAGE_NAME', 'glib')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]