summaryrefslogtreecommitdiff
path: root/cairo-32
diff options
context:
space:
mode:
authorDanny Rawlins <contact@romster.me>2021-01-19 23:03:10 +1100
committerDanny Rawlins <contact@romster.me>2021-01-19 23:03:10 +1100
commit7c2c9a6ba60672b809573a444674bb1978f97b64 (patch)
tree5ee5b5a5af7d1ef7f37833f0f6e0599ac31b5c4f /cairo-32
parente648543ce47f283080a0d02108e273b943ef1c17 (diff)
downloadcompat-32-7c2c9a6ba60672b809573a444674bb1978f97b64.tar.gz
compat-32-7c2c9a6ba60672b809573a444674bb1978f97b64.tar.xz
cairo-32: add missing patches
Diffstat (limited to 'cairo-32')
-rw-r--r--cairo-32/fix-library-versioning.diff94
-rw-r--r--cairo-32/xlib-xcb.diff25
2 files changed, 119 insertions, 0 deletions
diff --git a/cairo-32/fix-library-versioning.diff b/cairo-32/fix-library-versioning.diff
new file mode 100644
index 00000000..c006f69a
--- /dev/null
+++ b/cairo-32/fix-library-versioning.diff
@@ -0,0 +1,94 @@
+commit e9ccb1d8d095482e4139da658e679d5aad56b184
+Author: Tim-Philipp Müller <tim@centricular.com>
+Date: Tue Dec 15 00:12:55 2020 +0000
+
+ meson: fix library versioning
+
+ Fixes #442
+
+diff --git a/meson.build b/meson.build
+index b159b4071..53a9af343 100644
+--- a/meson.build
++++ b/meson.build
+@@ -3,8 +3,6 @@ project('cairo', 'c', 'cpp',
+ version: run_command(find_program('version.py'), check: true).stdout().strip(),
+ )
+
+-cc = meson.get_compiler('c')
+-
+ # Keep in sync with configure.ac!
+ freetype_required_version = '>= 9.7.3'
+ fontconfig_required_version = '>= 2.2.95'
+@@ -16,6 +14,27 @@ libudev_required_version = '>= 136'
+ libdrm_required_version = '>= 2.4'
+ glib_required_version = '>= 2.14'
+
++# library versioning
++version_arr = meson.project_version().split('.')
++cairo_version_major = version_arr[0].to_int()
++cairo_version_minor = version_arr[1].to_int()
++cairo_version_micro = version_arr[2].to_int()
++
++# The libtool shared library version stuff.
++# Try and maintain compatibility with the previous library versioning.
++cairo_version_sonum = cairo_version_major + 1
++cairo_version = cairo_version_major * 10000 + cairo_version_minor * 100 + cairo_version_micro
++
++if cairo_version_minor % 2 == 1
++ # unstable release
++ cairo_libversion = '@0@.@1@.0'.format(cairo_version_sonum, cairo_version)
++else
++ # stable release
++ cairo_libversion = '@0@.@1@.@2@'.format(cairo_version_sonum, cairo_version, cairo_version_micro)
++endif
++
++cc = meson.get_compiler('c')
++
+ if cc.get_id() == 'msvc'
+ # Basic usage in the cairo type system that causes spammy and useless warnings
+ add_project_arguments('/wd4244', '/wd4146',
+diff --git a/src/meson.build b/src/meson.build
+index 5bd1a57ee..f5d741eae 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -299,8 +299,8 @@ libcairo = library('cairo', cairo_sources,
+ c_args: cairo_no_warn_c_args + pthread_c_args + ['-DHAVE_CONFIG_H'],
+ cpp_args: cairo_no_warn_c_args + pthread_c_args + ['-DHAVE_CONFIG_H'],
+ link_args: extra_link_args,
+- soversion: '2',
+- version: '2.' + ''.join(meson.project_version().split('.')) + '.0',
++ soversion: cairo_version_sonum,
++ version: cairo_libversion,
+ install: true,
+ include_directories: incbase,
+ )
+diff --git a/util/cairo-gobject/meson.build b/util/cairo-gobject/meson.build
+index 200fd8705..bf24242a0 100644
+--- a/util/cairo-gobject/meson.build
++++ b/util/cairo-gobject/meson.build
+@@ -12,8 +12,8 @@ libcairogobject = library('cairo-gobject', cairo_gobject_sources,
+ include_directories: [incbase, incsrc],
+ dependencies: [glib_dep, gobject_dep],
+ link_with: [libcairo],
+- soversion: '2',
+- version: '2.' + ''.join(meson.project_version().split('.')) + '.0',
++ soversion: cairo_version_sonum,
++ version: cairo_libversion,
+ install: true,
+ )
+
+diff --git a/util/cairo-script/meson.build b/util/cairo-script/meson.build
+index a782ec63f..8cedc6834 100644
+--- a/util/cairo-script/meson.build
++++ b/util/cairo-script/meson.build
+@@ -30,8 +30,8 @@ libcairoscript = library('cairo-script-interpreter',
+ include_directories: [incbase, incsrc],
+ dependencies: deps,
+ link_with: [libcairo],
+- soversion: '2',
+- version: '2.' + ''.join(meson.project_version().split('.')) + '.0',
++ soversion: cairo_version_sonum,
++ version: cairo_libversion,
+ install: true,
+ )
+
diff --git a/cairo-32/xlib-xcb.diff b/cairo-32/xlib-xcb.diff
new file mode 100644
index 00000000..bfc1816a
--- /dev/null
+++ b/cairo-32/xlib-xcb.diff
@@ -0,0 +1,25 @@
+diff --git i/meson.build w/meson.build
+index b159b4071..2a1c68891 100644
+--- i/meson.build
++++ w/meson.build
+@@ -313,7 +313,7 @@ endif
+
+ if feature_conf.get('CAIRO_HAS_XCB_SURFACE', 0) == 1 and feature_conf.get('CAIRO_HAS_XLIB_SURFACE', 0) == 1
+ # FIXME: automagic
+- x11xcb_dep = dependency('x11-xcb', required: false)
++ x11xcb_dep = dependency('x11-xcb', required: get_option('xlib-xcb'))
+ if x11xcb_dep.found()
+ deps += [x11xcb_dep]
+ feature_conf.set('CAIRO_HAS_XLIB_XCB_FUNCTIONS', 1)
+diff --git i/meson_options.txt w/meson_options.txt
+index ff11fe7ed..d1ae959e1 100644
+--- i/meson_options.txt
++++ w/meson_options.txt
+@@ -17,6 +17,7 @@ option('qt', type : 'feature', value : 'disabled')
+ option('tee', type : 'feature', value : 'disabled')
+ option('xcb', type : 'feature', value : 'auto')
+ option('xlib', type : 'feature', value : 'auto')
++option('xlib-xcb', type : 'feature', value : 'disabled')
+ #option('xml', type : 'feature', value : 'disabled')
+ option('zlib', type : 'feature', value : 'auto') # script, ps, pdf, xml surfaces
+

Generated by cgit