Skip to content

Commit

Permalink
apacheGH-39935: [GLib][Docs] Use GI-DocGen instead of GTK-Doc (apache…
Browse files Browse the repository at this point in the history
…#40427)

### Rationale for this change

DI-DocGen is a new documentation generator for GObject-based libraries. GTK-Doc is still maintained but abandoned.

### What changes are included in this PR?

Use GI-DocGen.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.
* GitHub Issue: apache#39935

Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
  • Loading branch information
kou authored Mar 10, 2024
1 parent 6a7a6ee commit 4de0874
Show file tree
Hide file tree
Showing 75 changed files with 712 additions and 1,565 deletions.
2 changes: 0 additions & 2 deletions c_glib/Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,5 @@
# under the License.

brew "gobject-introspection"
brew "gtk-doc"
brew "libtool"
brew "meson"
brew "vala"
4 changes: 1 addition & 3 deletions c_glib/arrow-cuda-glib/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,13 @@ if have_gi
dependencies: gir_dependencies,
export_packages: 'arrow-cuda-glib',
extra_args: gir_extra_args,
fatal_warnings: gi_fatal_warnings,
header: 'arrow-cuda-glib/arrow-cuda-glib.h',
identifier_prefix: 'GArrowCUDA',
includes: [
'Arrow-1.0',
],
install: true,
kwargs: generate_gi_common_args,
namespace: 'ArrowCUDA',
nsversion: api_version,
sources: sources + c_headers,
symbol_prefix: 'garrow_cuda')

Expand Down
8 changes: 3 additions & 5 deletions c_glib/arrow-dataset-glib/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -88,23 +88,21 @@ pkgconfig.generate(libarrow_dataset_glib,
version: version)

if have_gi
dataset_glib_gir = \
arrow_dataset_glib_gir = \
gnome.generate_gir(libarrow_dataset_glib,
dependencies: declare_dependency(sources: arrow_glib_gir),
export_packages: 'arrow-dataset-glib',
extra_args: [
'--warn-all',
'--include-uninstalled=./arrow-glib/Arrow-1.0.gir',
],
fatal_warnings: gi_fatal_warnings,
header: 'arrow-dataset-glib/arrow-dataset-glib.h',
identifier_prefix: 'GADataset',
includes: [
'Arrow-1.0',
],
install: true,
kwargs: generate_gi_common_args,
namespace: 'ArrowDataset',
nsversion: api_version,
sources: sources + c_headers + enums,
symbol_prefix: 'gadataset')

Expand All @@ -115,6 +113,6 @@ if have_gi
arrow_glib_vapi,
'gio-2.0',
],
sources: [dataset_glib_gir[0]])
sources: [arrow_dataset_glib_gir[0]])
endif
endif
10 changes: 4 additions & 6 deletions c_glib/arrow-flight-glib/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -65,34 +65,32 @@ pkgconfig.generate(libarrow_flight_glib,
version: version)

if have_gi
flight_glib_gir = \
arrow_flight_glib_gir = \
gnome.generate_gir(libarrow_flight_glib,
dependencies: declare_dependency(sources: arrow_glib_gir),
export_packages: 'arrow-flight-glib',
extra_args: [
'--warn-all',
'--include-uninstalled=./arrow-glib/Arrow-1.0.gir',
],
fatal_warnings: gi_fatal_warnings,
header: 'arrow-flight-glib/arrow-flight-glib.h',
identifier_prefix: 'GAFlight',
includes: [
'Arrow-1.0',
],
install: true,
kwargs: generate_gi_common_args,
namespace: 'ArrowFlight',
nsversion: api_version,
sources: sources + c_headers,
symbol_prefix: 'gaflight')

if generate_vapi
flight_glib_vapi = \
arrow_flight_glib_vapi = \
gnome.generate_vapi('arrow-flight-glib',
install: true,
packages: [
arrow_glib_vapi,
'gio-2.0',
],
sources: [flight_glib_gir[0]])
sources: [arrow_flight_glib_gir[0]])
endif
endif
16 changes: 7 additions & 9 deletions c_glib/arrow-flight-sql-glib/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -63,38 +63,36 @@ pkgconfig.generate(libarrow_flight_sql_glib,
version: version)

if have_gi
flight_sql_glib_gir_dependencies = \
declare_dependency(sources: [arrow_glib_gir, flight_glib_gir])
flight_sql_glib_gir = \
arrow_flight_sql_glib_gir_dependencies = \
declare_dependency(sources: [arrow_glib_gir, arrow_flight_glib_gir])
arrow_flight_sql_glib_gir = \
gnome.generate_gir(libarrow_flight_sql_glib,
dependencies: flight_sql_glib_gir_dependencies,
dependencies: arrow_flight_sql_glib_gir_dependencies,
export_packages: 'arrow-flight-sql-glib',
extra_args: [
'--warn-all',
'--include-uninstalled=./arrow-glib/Arrow-1.0.gir',
'--include-uninstalled=./arrow-flight-glib/ArrowFlight-1.0.gir',
],
fatal_warnings: gi_fatal_warnings,
header: 'arrow-flight-sql-glib/arrow-flight-sql-glib.h',
identifier_prefix: 'GAFlightSQL',
includes: [
'Arrow-1.0',
'ArrowFlight-1.0',
],
install: true,
kwargs: generate_gi_common_args,
namespace: 'ArrowFlightSQL',
nsversion: api_version,
sources: sources + c_headers,
symbol_prefix: 'gaflightsql')

if generate_vapi
gnome.generate_vapi('arrow-flight-sql-glib',
install: true,
packages: [
flight_glib_vapi,
arrow_flight_glib_vapi,
arrow_glib_vapi,
'gio-2.0',
],
sources: [flight_sql_glib_gir[0]])
sources: [arrow_flight_sql_glib_gir[0]])
endif
endif
6 changes: 2 additions & 4 deletions c_glib/arrow-glib/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -279,18 +279,16 @@ if have_gi
extra_args: [
'--warn-all',
],
fatal_warnings: gi_fatal_warnings,
header: 'arrow-glib/arrow-glib.h',
identifier_prefix: 'GArrow',
includes: [
'GObject-2.0',
'Gio-2.0',
],
install: true,
namespace: 'Arrow',
nsversion: api_version,
sources: sources + c_headers + enums,
symbol_prefix: 'garrow')
symbol_prefix: 'garrow',
kwargs: generate_gi_common_args)

if generate_vapi
arrow_glib_vapi = gnome.generate_vapi('arrow-glib',
Expand Down
55 changes: 55 additions & 0 deletions c_glib/doc/arrow-cuda-glib.toml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

[library]
name = "Apache Arrow CUDA GLib"
version = "@VERSION@"
browse_url = "https://github.com/apache/arrow/tree/@SOURCE_REFERENCE@/c_glib/arrow-cuda-glib/"
repository_url = "https://github.com/apache/arrow.git"
website_url = "https://arrow.apache.org/docs/c_glib/arrow-cuda-glib/"
authors = "The Apache Software Foundation"
license = "Apache-2.0"
description = "Apache Arrow CUDA GLib API"
dependencies = ["Arrow-1.0"]
related = ["Gio-2.0", "GObject-2.0"]
search_index = true

[dependencies."Arrow-1.0"]
name = "Arrow"
description = "Apache Arrow GLib API"
docs_url = "https://arrow.apache.org/docs/c_glib/arrow-glib/"

[related."Gio-2.0"]
name = "GIO"
description = "GObject Interfaces and Objects, Networking, IPC, and I/O"
docs_url = "https://docs.gtk.org/gio/"

[related."GObject-2.0"]
name = "GObject"
description = "The base type system library"
docs_url = "https://docs.gtk.org/gobject/"

[source-location]
base_url = "https://github.com/apache/arrow/blob/@SOURCE_REFERENCE@/c_glib/arrow-cuda-glib"

[extra]
content_base_url = "https://github.com/apache/arrow/blob/@SOURCE_REFERENCE@/c_glib/doc/"
content_files = [
]
content_images = [
]
urlmap_file = "urlmap.js"
55 changes: 55 additions & 0 deletions c_glib/doc/arrow-dataset-glib.toml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

[library]
name = "Apache Arrow Dataset GLib"
version = "@VERSION@"
browse_url = "https://github.com/apache/arrow/tree/@SOURCE_REFERENCE@/c_glib/arrow-dataset-glib/"
repository_url = "https://github.com/apache/arrow.git"
website_url = "https://arrow.apache.org/docs/c_glib/arrow-dataset-glib/"
authors = "The Apache Software Foundation"
license = "Apache-2.0"
description = "Apache Arrow Dataset GLib API"
dependencies = ["Arrow-1.0"]
related = ["Gio-2.0", "GObject-2.0"]
search_index = true

[dependencies."Arrow-1.0"]
name = "Arrow"
description = "Apache Arrow GLib API"
docs_url = "https://arrow.apache.org/docs/c_glib/arrow-glib/"

[related."Gio-2.0"]
name = "GIO"
description = "GObject Interfaces and Objects, Networking, IPC, and I/O"
docs_url = "https://docs.gtk.org/gio/"

[related."GObject-2.0"]
name = "GObject"
description = "The base type system library"
docs_url = "https://docs.gtk.org/gobject/"

[source-location]
base_url = "https://github.com/apache/arrow/blob/@SOURCE_REFERENCE@/c_glib/arrow-dataset-glib"

[extra]
content_base_url = "https://github.com/apache/arrow/blob/@SOURCE_REFERENCE@/c_glib/doc/"
content_files = [
]
content_images = [
]
urlmap_file = "urlmap.js"
92 changes: 0 additions & 92 deletions c_glib/doc/arrow-dataset-glib/arrow-dataset-glib-docs.xml

This file was deleted.

24 changes: 0 additions & 24 deletions c_glib/doc/arrow-dataset-glib/entities.xml.in

This file was deleted.

Loading

0 comments on commit 4de0874

Please sign in to comment.