Skip to content

Commit 9c4faee

Browse files
authored
GH-48616: [GLib] Use Arrow-${MAJOR}.${MINOR}.typelib not Arrow-1.0.typelib (#48617)
### Rationale for this change Our deb/RPM GLib library packages include version information such as `libarrow2300-glib.deb` and `arrow2300-glib-libs.rpm`. It's for installing multiple versions in the same system. But all version library packages include `Arrow-1.0.typelib`. If we install multiple GLib library package versions in the same system, `Arrow-1.0.typelib` is conflicted. If we use `Arrow-${MAJOR}.${MINOR}.typelib` not `Arrow-1.0.typelib`, we can really install multiple GLib library package versions in the same system. ### What changes are included in this PR? * Use `XXX-${MAJOR}.${MINOR}.{gir,typelib}` not `XXX-1.0.{gir,typelib}` * Update release script to substitute versions automatically ### Are these changes tested? Yes. ### Are there any user-facing changes? Yes. * GitHub Issue: #48616 Authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
1 parent bd8ab75 commit 9c4faee

27 files changed

+124
-77
lines changed

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ indent_style = space
4242
indent_size = 2
4343
indent_style = space
4444

45+
[{meson.build,meson_options.txt}]
46+
indent_size = 4
47+
indent_style = space
48+
4549
[*.cs]
4650
indent_size = 4
4751
indent_style = space

c_glib/arrow-cuda-glib/meson.build

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- indent-tabs-mode: nil -*-
2-
#
31
# Licensed to the Apache Software Foundation (ASF) under one
42
# or more contributor license agreements. See the NOTICE file
53
# distributed with this work for additional information
@@ -77,7 +75,7 @@ endif
7775
if have_gi
7876
gir_dependencies = [declare_dependency(sources: arrow_glib_gir)]
7977
gir_extra_args = gir_scanner_extra_args + [
80-
'--include-uninstalled=./arrow-glib/Arrow-1.0.gir',
78+
'--include-uninstalled=arrow-glib/Arrow-@0@.gir'.format(gi_api_version),
8179
]
8280
arrow_cuda_glib_gir = gnome.generate_gir(
8381
libarrow_cuda_glib,
@@ -86,7 +84,7 @@ if have_gi
8684
extra_args: gir_extra_args,
8785
header: 'arrow-cuda-glib/arrow-cuda-glib.h',
8886
identifier_prefix: 'GArrowCUDA',
89-
includes: ['Arrow-1.0'],
87+
includes: ['Arrow-@0@'.format(gi_api_version)],
9088
kwargs: generate_gi_common_args,
9189
namespace: 'ArrowCUDA',
9290
sources: sources + c_headers,

c_glib/arrow-dataset-glib/meson.build

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- indent-tabs-mode: nil -*-
2-
#
31
# Licensed to the Apache Software Foundation (ASF) under one
42
# or more contributor license agreements. See the NOTICE file
53
# distributed with this work for additional information
@@ -120,11 +118,13 @@ if have_gi
120118
dependencies: declare_dependency(sources: arrow_glib_gir),
121119
export_packages: 'arrow-dataset-glib',
122120
extra_args: gir_scanner_extra_args + [
123-
'--include-uninstalled=./arrow-glib/Arrow-1.0.gir',
121+
'--include-uninstalled=arrow-glib/Arrow-@[email protected]'.format(
122+
gi_api_version,
123+
),
124124
],
125125
header: 'arrow-dataset-glib/arrow-dataset-glib.h',
126126
identifier_prefix: 'GADataset',
127-
includes: ['Arrow-1.0'],
127+
includes: ['Arrow-@0@'.format(gi_api_version)],
128128
kwargs: generate_gi_common_args,
129129
namespace: 'ArrowDataset',
130130
sources: sources + c_headers + enums,

c_glib/arrow-flight-glib/meson.build

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- indent-tabs-mode: nil -*-
2-
#
31
# Licensed to the Apache Software Foundation (ASF) under one
42
# or more contributor license agreements. See the NOTICE file
53
# distributed with this work for additional information
@@ -84,11 +82,13 @@ if have_gi
8482
dependencies: declare_dependency(sources: arrow_glib_gir),
8583
export_packages: 'arrow-flight-glib',
8684
extra_args: gir_scanner_extra_args + [
87-
'--include-uninstalled=./arrow-glib/Arrow-1.0.gir',
85+
'--include-uninstalled=arrow-glib/Arrow-@[email protected]'.format(
86+
gi_api_version,
87+
),
8888
],
8989
header: 'arrow-flight-glib/arrow-flight-glib.h',
9090
identifier_prefix: 'GAFlight',
91-
includes: ['Arrow-1.0'],
91+
includes: ['Arrow-@0@'.format(gi_api_version)],
9292
kwargs: generate_gi_common_args,
9393
namespace: 'ArrowFlight',
9494
sources: sources + c_headers,

c_glib/arrow-flight-sql-glib/meson.build

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- indent-tabs-mode: nil -*-
2-
#
31
# Licensed to the Apache Software Foundation (ASF) under one
42
# or more contributor license agreements. See the NOTICE file
53
# distributed with this work for additional information
@@ -82,12 +80,19 @@ if have_gi
8280
dependencies: arrow_flight_sql_glib_gir_dependencies,
8381
export_packages: 'arrow-flight-sql-glib',
8482
extra_args: gir_scanner_extra_args + [
85-
'--include-uninstalled=./arrow-glib/Arrow-1.0.gir',
86-
'--include-uninstalled=./arrow-flight-glib/ArrowFlight-1.0.gir',
83+
'--include-uninstalled=arrow-glib/Arrow-@[email protected]'.format(
84+
gi_api_version,
85+
),
86+
'--include-uninstalled=arrow-flight-glib/ArrowFlight-@[email protected]'.format(
87+
gi_api_version,
88+
),
8789
],
8890
header: 'arrow-flight-sql-glib/arrow-flight-sql-glib.h',
8991
identifier_prefix: 'GAFlightSQL',
90-
includes: ['Arrow-1.0', 'ArrowFlight-1.0'],
92+
includes: [
93+
'Arrow-@0@'.format(gi_api_version),
94+
'ArrowFlight-@0@'.format(gi_api_version),
95+
],
9196
kwargs: generate_gi_common_args,
9297
namespace: 'ArrowFlightSQL',
9398
sources: sources + c_headers,

c_glib/arrow-glib/meson.build

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- indent-tabs-mode: nil -*-
2-
#
31
# Licensed to the Apache Software Foundation (ASF) under one
42
# or more contributor license agreements. See the NOTICE file
53
# distributed with this work for additional information
@@ -280,6 +278,11 @@ if have_gi
280278
)
281279

282280
if generate_vapi
281+
configure_file(
282+
copy: true,
283+
input: 'Arrow.metadata',
284+
output: 'Arrow-@[email protected]'.format(gi_api_version),
285+
)
283286
arrow_glib_vapi = gnome.generate_vapi(
284287
'arrow-glib',
285288
install: true,

c_glib/doc/meson.build

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- indent-tabs-mode: nil -*-
2-
#
31
# Licensed to the Apache Software Foundation (ASF) under one
42
# or more contributor license agreements. See the NOTICE file
53
# distributed with this work for additional information

c_glib/example/lua/meson.build

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- indent-tabs-mode: nil -*-
2-
#
31
# Licensed to the Apache Software Foundation (ASF) under one
42
# or more contributor license agreements. See the NOTICE file
53
# distributed with this work for additional information

c_glib/example/meson.build

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- indent-tabs-mode: nil -*-
2-
#
31
# Licensed to the Apache Software Foundation (ASF) under one
42
# or more contributor license agreements. See the NOTICE file
53
# distributed with this work for additional information

0 commit comments

Comments
 (0)