1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
From 8e675287782534e7e6e2549a5e96f03caf5304b2 Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Tue, 28 Aug 2018 20:27:40 +0530
Subject: [PATCH] meson: Add macOS libtool versioning to maintain ABI
compatibility
---
gio/meson.build | 1 +
glib/meson.build | 1 +
gmodule/meson.build | 1 +
gobject/meson.build | 1 +
gthread/meson.build | 1 +
meson.build | 4 +++-
6 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/gio/meson.build b/gio/meson.build
index 12a3eca..d0837c7 100644
--- a/gio/meson.build
+++ b/gio/meson.build
@@ -788,6 +788,7 @@ libgio = library('gio-2.0',
gio_dtrace_hdr, gio_dtrace_obj,
version : library_version,
soversion : soversion,
+ darwin_versions : darwin_versions,
install : true,
include_directories : [configinc, gioinc],
link_with : internal_deps,
diff --git a/glib/meson.build b/glib/meson.build
index 9f3e087..96dc782 100644
--- a/glib/meson.build
+++ b/glib/meson.build
@@ -240,6 +240,7 @@ libglib = library('glib-2.0',
sources : [deprecated_sources, glib_sources],
version : library_version,
soversion : soversion,
+ darwin_versions : darwin_versions,
install : true,
# intl.lib is not compatible with SAFESEH
link_args : noseh_link_args,
diff --git a/gmodule/meson.build b/gmodule/meson.build
index 3b57fb4..9137f00 100644
--- a/gmodule/meson.build
+++ b/gmodule/meson.build
@@ -99,6 +99,7 @@ libgmodule = library('gmodule-2.0',
sources : gmodule_sources,
version : library_version,
soversion : soversion,
+ darwin_versions : darwin_versions,
install : true,
include_directories : [configinc, gmoduleinc],
dependencies : [libdl_dep, libglib_dep],
diff --git a/gobject/meson.build b/gobject/meson.build
index 1bf0e00..abd7331 100644
--- a/gobject/meson.build
+++ b/gobject/meson.build
@@ -66,6 +66,7 @@ libgobject = library('gobject-2.0',
sources : gobject_sources,
version : library_version,
soversion : soversion,
+ darwin_versions : darwin_versions,
install : true,
include_directories : [configinc],
dependencies : [libffi_dep, libglib_dep],
diff --git a/gthread/meson.build b/gthread/meson.build
index 3787dba..4f296fc 100644
--- a/gthread/meson.build
+++ b/gthread/meson.build
@@ -16,6 +16,7 @@ libgthread = library('gthread-2.0',
sources : gthread_sources,
version : library_version,
soversion : soversion,
+ darwin_versions : darwin_versions,
install : true,
dependencies : [libglib_dep],
c_args : ['-DG_LOG_DOMAIN="GThread"' ] + glib_hidden_visibility_args)
diff --git a/meson.build b/meson.build
index fbccab7..427e776 100644
--- a/meson.build
+++ b/meson.build
@@ -43,7 +43,9 @@ 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, binary_age - interface_age, interface_age)
+current = binary_age - interface_age
+library_version = '@0@.@1@.@2@'.format(soversion, current, interface_age)
+darwin_versions = [current + 1, '@0@.@1@'.format(current + 1, interface_age)]
configinc = include_directories('.')
glibinc = include_directories('glib')
--
2.15.2 (Apple Git-101.1)
|