Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ endif

configure_file(output: 'config.h', configuration: config_h)

raqm_ver_major = raqm_version[0].to_int()
raqm_ver_minor = raqm_version[1].to_int()
raqm_ver_micro = raqm_version[2].to_int()

version_h = configuration_data()
version_h.set('RAQM_VERSION_MAJOR', raqm_version[0].to_int())
version_h.set('RAQM_VERSION_MINOR', raqm_version[1].to_int())
version_h.set('RAQM_VERSION_MICRO', raqm_version[2].to_int())
version_h.set('RAQM_VERSION_MAJOR', raqm_ver_major)
version_h.set('RAQM_VERSION_MINOR', raqm_ver_minor)
version_h.set('RAQM_VERSION_MICRO', raqm_ver_micro)
version_h.set('RAQM_VERSION', meson.project_version())

configure_file(
Expand All @@ -32,11 +36,22 @@ configure_file(
raqm_headers = files('raqm.h')
install_headers(raqm_headers)

# ABI compatibility version should be that used for last non-meson release, 0.7.1
raqm_ver_compat = 701
raqm_ver_current = raqm_ver_major * 10000 + raqm_ver_minor * 100 + raqm_ver_micro
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t understand the significance of the last non-meson release here. All releases should be API and ABI-compatible.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So raqm_ver_compat should be at 0?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So raqm_ver_compat should be at 0?

No, that only works if older versions used zero, but they didn't.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really still don’t understand any of this. What part of autotools build was setting this dylib versioning? We should replicate the same behavior, not hard-code a specific version.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really still don’t understand any of this. What part of autotools build was setting this dylib versioning? We should replicate the same behavior, not hard-code a specific version.

We'd have to go back and look at the precise behavior of the autosools build to know for sure. But what I can say, is that one of the last releases set the version to that value.

So I agree, some research is needed.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really still don’t understand any of this. What part of autotools build was setting this dylib versioning?

I think it's libtool: https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html


raqm_dylib_ver_compat = '@0@.0.0'.format(raqm_ver_compat)
raqm_dylib_ver_current = '@0@.0.0'.format(raqm_ver_current)
message('raqm_dylib_ver_compat: ', raqm_dylib_ver_compat)
message('raqm_dylib_ver_current: ', raqm_dylib_ver_current)
raqm_darwin_versions = [raqm_dylib_ver_compat, raqm_dylib_ver_current]

libraqm = library(
'raqm',
'raqm.c',
'raqm.h',
version: meson.project_version(),
darwin_versions: raqm_darwin_versions,
dependencies: deps,
c_args: ['-DHAVE_CONFIG_H'],
install: true,
Expand Down