summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-08-09 15:11:21 +0530
committerBastien Nocera <hadess@hadess.net>2017-08-10 10:48:13 +0200
commit9ccc3c78a5a41b86bdd2c9fb63ad4963e65e4f63 (patch)
tree2d04a5034d24b2c9a86da6340355265e1b11f36c
parent3e7dca0293da9adbf743dae8ec9ababbc78226ed (diff)
downloadtotem-pl-parser-9ccc3c78a5a41b86bdd2c9fb63ad4963e65e4f63.tar.gz
meson: Correctly set the version kwarg for libraries
This ensures that a libtotem-plparser*.so.X symlink is created to the libtotem-plparser*.so.X.Y.Z library, and that the values of X, Y, and Z match the library naming used by the old Autotools build. https://bugzilla.gnome.org/show_bug.cgi?id=786071
-rw-r--r--meson.build8
-rw-r--r--plparse/meson.build4
2 files changed, 9 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 85e4fb2..3a73630 100644
--- a/meson.build
+++ b/meson.build
@@ -21,7 +21,13 @@ plparse_major_version = plparse_version.split('.')[0].to_int()
plparse_minor_version = plparse_version.split('.')[1].to_int()
plparse_micro_version = plparse_version.split('.')[2].to_int()
-plparse_soversion = '.'.join(plparser_lt_version.split(':'))
+plparse_lt_current = plparser_lt_version.split(':')[0].to_int()
+plparse_lt_revision = plparser_lt_version.split(':')[1].to_int()
+plparse_lt_age = plparser_lt_version.split(':')[2].to_int()
+plparse_soversion = plparse_lt_current - plparse_lt_age
+# Convert the lt_version to libtool library naming to maintain ABI compat with
+# the old Autotools build. This can be changed with the next ABI break.
+plparse_libversion = '@0@.@1@.@2@'.format(plparse_soversion, plparse_lt_age, plparse_lt_revision)
# Requirements
glib_req = '>= 2.36.0'
diff --git a/plparse/meson.build b/plparse/meson.build
index bd8bac5..bbc3757 100644
--- a/plparse/meson.build
+++ b/plparse/meson.build
@@ -69,7 +69,7 @@ plparser_lib = library('totem-plparser',
link_args : symbol_link_args,
link_with: totem_glibc_lib,
link_depends : symbol_map,
- soversion: plparse_soversion,
+ version: plparse_libversion,
install: true)
plparser_dep = declare_dependency(sources: [totem_pl_parser_builtins_h, features_h],
@@ -104,7 +104,7 @@ plparser_mini_lib = library('totem-plparser-mini',
link_args : mini_symbol_link_args,
link_with: totem_glibc_lib,
link_depends : mini_symbol_map,
- soversion: plparse_soversion,
+ version: plparse_libversion,
install: true)
if have_quvi