[totem-pl-parser] meson: Correctly set the version kwarg for libraries



commit 9ccc3c78a5a41b86bdd2c9fb63ad4963e65e4f63
Author: Nirbheek Chauhan <nirbheek centricular com>
Date:   Wed Aug 9 15:11:21 2017 +0530

    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

 meson.build         |    8 +++++++-
 plparse/meson.build |    4 ++--
 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]