Skip to content

Commit 953a6de

Browse files
koutaozuhong
andcommitted
ARROW-15671: [GLib] Add support for Vala
Closes #12993 from kou/glib-vapi Lead-authored-by: Sutou Kouhei <[email protected]> Co-authored-by: Tao Zuhong <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
1 parent d8173f7 commit 953a6de

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1152
-164
lines changed

.dir-locals.el

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515
;;; specific language governing permissions and limitations
1616
;;; under the License.
1717

18-
((sh-mode . ((indent-tabs-mode . nil)
18+
((cmake-mode . ((indent-tabs-mode . nil)))
19+
(powershell-mode . ((indent-tabs-mode . nil)))
20+
(sh-mode . ((indent-tabs-mode . nil)
1921
(sh-indentation . 2)
2022
(sh-basic-offset . 2)))
21-
(cmake-mode . ((indent-tabs-mode . nil)))
22-
(powershell-mode . ((indent-tabs-mode . nil))))
23+
(vala-mode . ((indent-tabs-mode . nil))))

c_glib/Brewfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ brew "gobject-introspection"
2020
brew "gtk-doc"
2121
brew "libtool"
2222
brew "meson"
23+
brew "vala"

c_glib/arrow-cuda-glib/meson.build

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,30 @@ if have_gi
6565
'--warn-all',
6666
'--include-uninstalled=./arrow-glib/Arrow-1.0.gir',
6767
]
68-
arrow_cuda_glib_gir = gnome.generate_gir(libarrow_cuda_glib,
69-
dependencies: gir_dependencies,
70-
sources: sources + c_headers,
71-
namespace: 'ArrowCUDA',
72-
nsversion: api_version,
73-
identifier_prefix: 'GArrowCUDA',
74-
symbol_prefix: 'garrow_cuda',
75-
export_packages: 'arrow-cuda-glib',
76-
includes: [
77-
'Arrow-1.0',
78-
],
79-
install: true,
80-
extra_args: gir_extra_args)
68+
arrow_cuda_glib_gir = \
69+
gnome.generate_gir(libarrow_cuda_glib,
70+
dependencies: gir_dependencies,
71+
export_packages: 'arrow-cuda-glib',
72+
extra_args: gir_extra_args,
73+
header: 'arrow-cuda-glib/arrow-cuda-glib.h',
74+
identifier_prefix: 'GArrowCUDA',
75+
includes: [
76+
'Arrow-1.0',
77+
],
78+
install: true,
79+
namespace: 'ArrowCUDA',
80+
nsversion: api_version,
81+
sources: sources + c_headers,
82+
symbol_prefix: 'garrow_cuda')
83+
84+
if generate_vapi
85+
arrow_cuda_glib_vapi = \
86+
gnome.generate_vapi('arrow-cuda-glib',
87+
install: true,
88+
packages: [
89+
arrow_glib_vapi,
90+
'gio-2.0',
91+
],
92+
sources: [arrow_cuda_glib_gir[0]])
93+
endif
8194
endif

c_glib/arrow-dataset-glib/meson.build

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,32 @@ pkgconfig.generate(libarrow_dataset_glib,
8585
requires: ['arrow-glib', 'arrow-dataset'])
8686

8787
if have_gi
88-
gnome.generate_gir(libarrow_dataset_glib,
89-
dependencies: declare_dependency(sources: arrow_glib_gir),
90-
sources: sources + c_headers + enums,
91-
namespace: 'ArrowDataset',
92-
nsversion: api_version,
93-
identifier_prefix: 'GADataset',
94-
symbol_prefix: 'gadataset',
95-
export_packages: 'arrow-dataset-glib',
96-
includes: [
97-
'Arrow-1.0',
98-
],
99-
install: true,
100-
extra_args: [
101-
'--warn-all',
102-
'--include-uninstalled=./arrow-glib/Arrow-1.0.gir',
103-
])
88+
dataset_glib_gir = \
89+
gnome.generate_gir(libarrow_dataset_glib,
90+
dependencies: declare_dependency(sources: arrow_glib_gir),
91+
export_packages: 'arrow-dataset-glib',
92+
extra_args: [
93+
'--warn-all',
94+
'--include-uninstalled=./arrow-glib/Arrow-1.0.gir',
95+
],
96+
header: 'arrow-dataset-glib/arrow-dataset-glib.h',
97+
identifier_prefix: 'GADataset',
98+
includes: [
99+
'Arrow-1.0',
100+
],
101+
install: true,
102+
namespace: 'ArrowDataset',
103+
nsversion: api_version,
104+
sources: sources + c_headers + enums,
105+
symbol_prefix: 'gadataset')
106+
107+
if generate_vapi
108+
gnome.generate_vapi('arrow-dataset-glib',
109+
install: true,
110+
packages: [
111+
arrow_glib_vapi,
112+
'gio-2.0',
113+
],
114+
sources: [dataset_glib_gir[0]])
115+
endif
104116
endif

c_glib/arrow-flight-glib/meson.build

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,32 @@ pkgconfig.generate(libarrow_flight_glib,
6363
requires: ['arrow-glib', 'arrow-flight'])
6464

6565
if have_gi
66-
gnome.generate_gir(libarrow_flight_glib,
67-
dependencies: declare_dependency(sources: arrow_glib_gir),
68-
sources: sources + c_headers,
69-
namespace: 'ArrowFlight',
70-
nsversion: api_version,
71-
identifier_prefix: 'GAFlight',
72-
symbol_prefix: 'gaflight',
73-
export_packages: 'arrow-flight-glib',
74-
includes: [
75-
'Arrow-1.0',
76-
],
77-
install: true,
78-
extra_args: [
79-
'--warn-all',
80-
'--include-uninstalled=./arrow-glib/Arrow-1.0.gir',
81-
])
66+
flight_glib_gir = \
67+
gnome.generate_gir(libarrow_flight_glib,
68+
dependencies: declare_dependency(sources: arrow_glib_gir),
69+
export_packages: 'arrow-flight-glib',
70+
extra_args: [
71+
'--warn-all',
72+
'--include-uninstalled=./arrow-glib/Arrow-1.0.gir',
73+
],
74+
header: 'arrow-flight-glib/arrow-flight-glib.h',
75+
identifier_prefix: 'GAFlight',
76+
includes: [
77+
'Arrow-1.0',
78+
],
79+
install: true,
80+
namespace: 'ArrowFlight',
81+
nsversion: api_version,
82+
sources: sources + c_headers,
83+
symbol_prefix: 'gaflight')
84+
85+
if generate_vapi
86+
gnome.generate_vapi('arrow-flight-glib',
87+
install: true,
88+
packages: [
89+
arrow_glib_vapi,
90+
'gio-2.0',
91+
],
92+
sources: [flight_glib_gir[0]])
93+
endif
8294
endif
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
18+
DecimalDataType.new skip
19+
// SourceNodeOptions.record_batch#property name="get_record_batch"
20+
SourceNodeOptions.record_batch#property skip

c_glib/arrow-glib/meson.build

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -266,18 +266,26 @@ endif
266266

267267
if have_gi
268268
arrow_glib_gir = gnome.generate_gir(libarrow_glib,
269-
sources: sources + c_headers + enums,
270-
namespace: 'Arrow',
271-
nsversion: api_version,
272-
identifier_prefix: 'GArrow',
273-
symbol_prefix: 'garrow',
274269
export_packages: 'arrow-glib',
270+
extra_args: [
271+
'--warn-all',
272+
],
273+
header: 'arrow-glib/arrow-glib.h',
274+
identifier_prefix: 'GArrow',
275275
includes: [
276276
'GObject-2.0',
277277
'Gio-2.0',
278278
],
279279
install: true,
280-
extra_args: [
281-
'--warn-all',
282-
])
280+
namespace: 'Arrow',
281+
nsversion: api_version,
282+
sources: sources + c_headers + enums,
283+
symbol_prefix: 'garrow')
284+
285+
if generate_vapi
286+
arrow_glib_vapi = gnome.generate_vapi('arrow-glib',
287+
install: true,
288+
packages: ['gio-2.0'],
289+
sources: [arrow_glib_gir[0]])
290+
endif
283291
endif

c_glib/example/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ Here are example codes in this directory:
3232
* `build.c`: It shows how to create an array by array builder.
3333

3434
<!---
35-
* `write-batch.c`: It shows how to write Arrow array to file in batch
36-
mode.
35+
* `write-file.c`: It shows how to write Arrow array to file in file
36+
format.
3737
-->
3838

39-
* `read-batch.c`: It shows how to read Arrow array from file in batch
40-
mode.
39+
* `read-file.c`: It shows how to read Arrow array from file in file
40+
format.
4141

4242
<!---
4343
* `write-stream.c`: It shows how to write Arrow array to file in
44-
stream mode.
44+
stream format.
4545
-->
4646

4747
* `read-stream.c`: It shows how to read Arrow array from file in
48-
stream mode.
48+
stream format.

c_glib/example/lua/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,23 @@ Arrow GLib based bindings.
2828

2929
Here are command lines to install LGI on Debian GNU/Linux and Ubuntu:
3030

31-
```text
32-
% sudo apt install -y luarocks
33-
% sudo luarocks install lgi
31+
```console
32+
$ sudo apt install -y luarocks
33+
$ sudo luarocks install lgi
3434
```
3535

3636
## Lua example codes
3737

3838
Here are example codes in this directory:
3939

40-
* `write-batch.lua`: It shows how to write Arrow array to file in
41-
batch mode.
40+
* `write-file.lua`: It shows how to write Arrow array to file in
41+
file format.
4242

43-
* `read-batch.lua`: It shows how to read Arrow array from file in
44-
batch mode.
43+
* `read-file.lua`: It shows how to read Arrow array from file in
44+
file format.
4545

4646
* `write-stream.lua`: It shows how to write Arrow array to file in
47-
stream mode.
47+
stream format.
4848

4949
* `read-stream.lua`: It shows how to read Arrow array from file in
50-
stream mode.
50+
stream format.

c_glib/example/lua/meson.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
# under the License.
1919

2020
install_data('README.md',
21-
'read-batch.lua',
21+
'read-file.lua',
2222
'read-stream.lua',
23-
'write-batch.lua',
23+
'write-file.lua',
2424
'write-stream.lua',
2525
install_dir: join_paths(data_dir,
2626
meson.project_name(),

0 commit comments

Comments
 (0)