Skip to content

Commit

Permalink
GH-45491: [GLib] Require Meson 0.61.2 or later (#45492)
Browse files Browse the repository at this point in the history
### Rationale for this change

Ubuntu 20.04 that provides Meson 0.53.2 will reach EOL on 2025-05.

Ubuntu 22.04 provides Meson 0.61.2. So we can require Meson 0.61.2 or later.

### What changes are included in this PR?

* Require Meson 0.61.2 or later
* Remove codes for old Meson

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* GitHub Issue: #45491

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
  • Loading branch information
kou authored Feb 13, 2025
1 parent 25d8bed commit f8ba543
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 16 deletions.
18 changes: 7 additions & 11 deletions c_glib/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ project(
# Ubuntu:
# https://packages.ubuntu.com/search?keywords=meson
#
# * 20.04: 0.53.2
# * 22.04: 0.61.2
meson_version: '>=0.53.2',
# * 24.04: 1.3.2
meson_version: '>=0.61.2',
version: '20.0.0-SNAPSHOT',
)

version = '20.0.0-SNAPSHOT'
version = meson.project_version()
if version.endswith('-SNAPSHOT')
version_numbers = version.split('-')[0].split('.')
version_tag = version.split('-')[1]
Expand All @@ -53,13 +54,8 @@ so_version = version_major * 100 + version_minor
so_version_patch = version_micro
library_version = '@0@.@1@.@2@'.format(so_version, so_version_patch, 0)

if meson.version().version_compare('>=0.56.0')
project_build_root = meson.project_build_root()
project_source_root = meson.project_source_root()
else
project_build_root = meson.build_root()
project_source_root = meson.source_root()
endif
project_build_root = meson.project_build_root()
project_source_root = meson.project_source_root()

prefix = get_option('prefix')
include_dir = join_paths(prefix, get_option('includedir'))
Expand All @@ -75,7 +71,7 @@ pkgconfig_variables = []
base_include_directories = [include_directories('.')]

generate_gi_common_args = {'install': true, 'nsversion': api_version}
if get_option('werror') and meson.version().version_compare('>=0.55.0')
if get_option('werror')
generate_gi_common_args += {'fatal_warnings': true}
endif
have_gi = dependency('gobject-introspection-1.0', required: false).found()
Expand Down
4 changes: 2 additions & 2 deletions dev/release/01-prepare-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ def test_version_pre_tag
{
path: "c_glib/meson.build",
hunks: [
["-version = '#{@snapshot_version}'",
"+version = '#{@release_version}'"],
["- version: '#{@snapshot_version}',",
"+ version: '#{@release_version}',"],
],
},
{
Expand Down
4 changes: 2 additions & 2 deletions dev/release/post-12-bump-versions-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ def test_version_post_tag
{
path: "c_glib/meson.build",
hunks: [
["-version = '#{@snapshot_version}'",
"+version = '#{@next_snapshot_version}'"],
["- version: '#{@snapshot_version}',",
"+ version: '#{@next_snapshot_version}',"],
],
},
{
Expand Down
2 changes: 1 addition & 1 deletion dev/release/utils-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ update_versions() {

pushd "${ARROW_DIR}/c_glib"
sed -i.bak -E -e \
"s/^version = '.+'/version = '${version}'/" \
"s/^ version: '.+'/ version: '${version}'/" \
meson.build
rm -f meson.build.bak
git add meson.build
Expand Down

0 comments on commit f8ba543

Please sign in to comment.