[gcab: 1/2] meson: fix libtool versioning



commit 2c8048f74ec8c088397d47730aa47c574526918f
Author: Marc-André Lureau <marcandre lureau redhat com>
Date:   Tue Dec 3 11:31:45 2019 +0400

    meson: fix libtool versioning
    
    libtool versions must be translated to maj.min.rev, where maj =
    current - age.
    
    Also fix lt_current usage, quoting Samuel Thibault:
    
    soversion is not the same as lt_current. soversion must be lt_current
    - lt_age, so that the soname stays the same when binary compatibility
    is preserved (here, 0), and gets bumped on compatibility break. Yes,
    on compatibility break the bump will be big. That's because non-soname
    OSes the compatibility support is different. The details are hairy,
    yes :)
    
    Instead, rely on meson doing the right thing with soversion by
    default.
    
    Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>

 libgcab/meson.build |  1 -
 meson.build         | 10 +++++-----
 2 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/libgcab/meson.build b/libgcab/meson.build
index 7d93125..d78cecd 100644
--- a/libgcab/meson.build
+++ b/libgcab/meson.build
@@ -39,7 +39,6 @@ libgcab = shared_library(
     'cabinet.c',
     'decomp.c',
   ],
-  soversion : lt_current,
   version : lt_version,
   darwin_versions: darwin_versions,
   dependencies : [
diff --git a/meson.build b/meson.build
index 5c7913f..7737ab3 100644
--- a/meson.build
+++ b/meson.build
@@ -12,11 +12,11 @@ if git.found()
 endif
 
 # libtool versioning
-lt_current = '0'
-lt_revision = '0'
-lt_age = '0'
-lt_version = '@0@.@1@.@2@'.format(lt_current, lt_age, lt_revision)
-darwin_versions = [lt_current.to_int() + 1, '@0@.@1@.0'.format(lt_current.to_int() + 1, lt_revision)]
+lt_current = 0
+lt_revision = 0
+lt_age = 0
+lt_version = '@0@.@1@.@2@'.format(lt_current - lt_age, lt_age, lt_revision)
+darwin_versions = [lt_current + 1, '@0@.@1@.0'.format(lt_current + 1, lt_revision)]
 
 # get suported warning flags
 test_args = [


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