Skip to content

Commit

Permalink
ARROW-3912: [Plasma][GLib] Add support for creating and referring obj…
Browse files Browse the repository at this point in the history
…ects

Author: Kouhei Sutou <[email protected]>

Closes apache#3056 from kou/glib-plasma-create-get and squashes the following commits:

e6bc59f <Kouhei Sutou> Add missing status check for Disconnect()
623ce41 <Kouhei Sutou> Add missing return on error
d90d896 <Kouhei Sutou> Add missing status check for Release()
1d5bf10 <Kouhei Sutou> Add missing include
7ac27db <Kouhei Sutou> Support old GObject Introspection
84df184 <Kouhei Sutou> Support old GObject Introspection
26b2926 <Kouhei Sutou>  Add support for creating and referring objects
  • Loading branch information
kou authored and shiro615 committed Dec 2, 2018
1 parent bfedd3a commit 8f02a1b
Show file tree
Hide file tree
Showing 19 changed files with 1,317 additions and 67 deletions.
36 changes: 20 additions & 16 deletions c_glib/arrow-gpu-glib/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,23 @@ pkgconfig.generate(filebase: 'arrow-gpu-glib',
requires: ['arrow-glib', 'arrow-gpu'],
libraries: [libarrow_gpu_glib])

gnome.generate_gir(libarrow_gpu_glib,
dependencies: declare_dependency(sources: arrow_glib_gir),
sources: sources + c_headers,
namespace: 'ArrowGPU',
nsversion: api_version,
identifier_prefix: 'GArrowGPU',
symbol_prefix: 'garrow_gpu',
export_packages: 'arrow-gpu-glib',
includes: [
'Arrow-1.0',
],
install: true,
extra_args: [
'--warn-all',
'--include-uninstalled=./arrow-glib/Arrow-1.0.gir',
])
gir_dependencies = [
declare_dependency(sources: arrow_glib_gir),
]
gir_extra_args = [
'--warn-all',
'--include-uninstalled=./arrow-glib/Arrow-1.0.gir',
]
arrow_gpu_glib_gir = gnome.generate_gir(libarrow_gpu_glib,
dependencies: gir_dependencies,
sources: sources + c_headers,
namespace: 'ArrowGPU',
nsversion: api_version,
identifier_prefix: 'GArrowGPU',
symbol_prefix: 'garrow_gpu',
export_packages: 'arrow-gpu-glib',
includes: [
'Arrow-1.0',
],
install: true,
extra_args: gir_extra_args)
4 changes: 4 additions & 0 deletions c_glib/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,12 @@ fi

AM_CONDITIONAL([HAVE_ARROW_GPU], [test "$HAVE_ARROW_GPU" = "yes"])
if test "$HAVE_ARROW_GPU" = "yes"; then
ARROW_GPU_GLIB_PACKAGE="arrow-gpu-glib"
AC_DEFINE(HAVE_ARROW_GPU, [1], [Define to 1 if Apache Arrow supports GPU.])
else
ARROW_GPU_GLIB_PACKAGE=""
fi
AC_SUBST(ARROW_GPU_GLIB_PACKAGE)

AM_CONDITIONAL([HAVE_GANDIVA], [test "$HAVE_GANDIVA" = "yes"])
if test "$HAVE_GANDIVA" = "yes"; then
Expand Down
7 changes: 7 additions & 0 deletions c_glib/doc/plasma-glib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
# specific language governing permissions and limitations
# under the License.

PLASMA_ARROW_GPU_GTKDOC_LIBS =
if HAVE_ARROW_GPU
PLASMA_ARROW_GPU_GTKDOC_LIBS += \
$(top_builddir)/arrow-gpu-glib/libarrow-gpu-glib.la
endif

if HAVE_PLASMA
DOC_MODULE = plasma-glib

Expand Down Expand Up @@ -50,6 +56,7 @@ AM_CFLAGS = \

GTKDOC_LIBS = \
$(top_builddir)/arrow-glib/libarrow-glib.la \
$(PLASMA_ARROW_GPU_GTKDOC_LIBS) \
$(top_builddir)/plasma-glib/libplasma-glib.la

include $(top_srcdir)/gtk-doc.make
Expand Down
3 changes: 3 additions & 0 deletions c_glib/doc/plasma-glib/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ dependencies = [
arrow_glib,
plasma_glib,
]
if arrow_gpu.found()
dependencies += [arrow_gpu_glib]
endif
ignore_headers = []
gnome.gtkdoc(project_name,
main_xml: project_name + '-docs.xml',
Expand Down
8 changes: 6 additions & 2 deletions c_glib/doc/plasma-glib/plasma-glib-docs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,16 @@
</releaseinfo>
</bookinfo>

<part id="plasma-client">
<title>PlasmaClient</title>
<part id="client-side">
<title>Client side</title>
<chapter id="client">
<title>Client</title>
<xi:include href="xml/client.xml"/>
</chapter>
<chapter id="object">
<title>Object</title>
<xi:include href="xml/object.xml"/>
</chapter>
</part>

<chapter id="object-tree">
Expand Down
59 changes: 49 additions & 10 deletions c_glib/plasma-glib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,42 @@ EXTRA_DIST = \

AM_CPPFLAGS = \
-I$(top_builddir) \
-I$(top_srcdir)
-I$(top_srcdir) \
-DG_LOG_DOMAIN=\"Plasma\"

AM_CFLAGS = \
$(GLIB_CFLAGS) \
$(GARROW_CFLAGS) \
$(GPLASMA_CFLAGS)

PLASMA_ARROW_GPU_LIBS =
PLASMA_ARROW_GPU_GLIB_PKG_CONFIG_PATH =
PLASMA_INTROSPECTION_COMPILER_ARROW_GPU_ARGS =
PLASMA_GIR_ARROW_GPU_PACKAGE =
PLASMA_GIR_ARROW_GPU_SCANNER_ADD_INCLUDE_PATH =
PLASMA_GIR_ARROW_GPU_LIBS_MACOS =
PLASMA_GIR_ARROW_GPU_SCANNER_LIBRARY_PATH_MACOS =
PLASMA_GIR_ARROW_GPU_LIBS =
if HAVE_ARROW_GPU
PLASMA_ARROW_GPU_LIBS += \
$(ARROW_GPU_LIBS) \
../arrow-gpu-glib/libarrow-gpu-glib.la
PLASMA_ARROW_GPU_GLIB_PKG_CONFIG_PATH += \
:${abs_top_builddir}/arrow-gpu-glib
PLASMA_INTROSPECTION_COMPILER_ARROW_GPU_ARGS += \
--includedir=$(abs_top_builddir)/arrow-gpu-glib
PLASMA_GIR_ARROW_GPU_PACKAGE += \
arrow-gpu-glib
PLASMA_GIR_ARROW_GPU_SCANNER_ADD_INCLUDE_PATH += \
--add-include-path=$(abs_top_builddir)/arrow-gpu-glib
PLASMA_GIR_ARROW_GPU_LIBS_MACOS += \
arrow-gpu-glib
PLASMA_GIR_ARROW_GPU_SCANNER_LIBRARY_PATH_MACOS += \
--library-path=$(abs_top_builddir)/arrow-gpu-glib/.libs
PLASMA_GIR_ARROW_GPU_LIBS += \
$(abs_top_builddir)/arrow-gpu-glib/libarrow-gpu-glib.la
endif

if HAVE_PLASMA
lib_LTLIBRARIES = \
libplasma-glib.la
Expand All @@ -49,26 +78,30 @@ libplasma_glib_la_LIBADD = \
$(GLIB_LIBS) \
$(ARROW_LIBS) \
$(PLASMA_LIBS) \
../arrow-glib/libarrow-glib.la
../arrow-glib/libarrow-glib.la \
$(PLASMA_ARROW_GPU_LIBS)

libplasma_glib_la_headers = \
client.h \
object.h \
plasma-glib.h

libplasma_glib_la_sources = \
client.cpp \
object.cpp \
$(libplasma_glib_la_headers)

libplasma_glib_la_cpp_headers = \
libplasma_glib_la_cpp_headers = \
client.hpp \
object.hpp \
plasma-glib.hpp

libplasma_glib_la_SOURCES = \
$(libplasma_glib_la_sources) \
$(libplasma_glib_la_cpp_headers)

plasma_glib_includedir = $(includedir)/plasma-glib
plasma_glib_include_HEADERS = \
plasma_glib_include_HEADERS = \
$(libplasma_glib_la_headers) \
$(libplasma_glib_la_cpp_headers)

Expand All @@ -84,17 +117,19 @@ INTROSPECTION_SCANNER_ARGS =
INTROSPECTION_SCANNER_ENV =
if USE_ARROW_BUILD_DIR
INTROSPECTION_SCANNER_ENV += \
PKG_CONFIG_PATH=${abs_top_builddir}/arrow-glib:$(ARROW_BUILD_DIR)/src/arrow:$${PKG_CONFIG_PATH}
PKG_CONFIG_PATH=${abs_top_builddir}/arrow-glib$(PLASMA_ARROW_GPU_GLIB_PKG_CONFIG_PATH):$(ARROW_BUILD_DIR)/src/arrow:$${PKG_CONFIG_PATH}
else
INTROSPECTION_SCANNER_ENV += \
PKG_CONFIG_PATH=${abs_top_builddir}/arrow-glib:$${PKG_CONFIG_PATH}
PKG_CONFIG_PATH=${abs_top_builddir}/arrow-glib$(PLASMA_ARROW_GPU_GLIB_PKG_CONFIG_PATH):$${PKG_CONFIG_PATH}
endif
INTROSPECTION_COMPILER_ARGS = \
--includedir=$(abs_top_builddir)/arrow-glib
INTROSPECTION_COMPILER_ARGS = \
--includedir=$(abs_top_builddir)/arrow-glib \
$(PLASMA_INTROSPECTION_COMPILER_ARROW_GPU_INCLUDEDIR)

Plasma-1.0.gir: libplasma-glib.la
Plasma_1_0_gir_PACKAGES = \
arrow-glib
arrow-glib \
$(PLASMA_GIR_ARROW_GPU_PACKAGE)
Plasma_1_0_gir_EXPORT_PACKAGES = \
plasma-glib
Plasma_1_0_gir_INCLUDES = \
Expand All @@ -103,23 +138,27 @@ Plasma_1_0_gir_CFLAGS = \
$(AM_CPPFLAGS)
Plasma_1_0_gir_LIBS =
Plasma_1_0_gir_FILES = $(libplasma_glib_la_sources)
Plasma_1_0_gir_SCANNERFLAGS = \
Plasma_1_0_gir_SCANNERFLAGS = \
--add-include-path=$(abs_top_builddir)/arrow-glib \
$(PLASMA_GIR_ARROW_GPU_SCANNER_ADD_INCLUDE_PATH) \
--library-path=$(ARROW_LIB_DIR) \
--warn-all \
--identifier-prefix=GPlasma \
--symbol-prefix=gplasma
if OS_MACOS
Plasma_1_0_gir_LIBS += \
arrow-glib \
$(PLASMA_GIR_ARROW_GPU_LIBS_MACOS) \
plasma-glib
Plasma_1_0_gir_SCANNERFLAGS += \
--no-libtool \
--library-path=$(abs_top_builddir)/arrow-glib/.libs \
$(PLASMA_GIR_ARROW_GPU_SCANNER_LIBRARY_PATH_MACOS) \
--library-path=$(abs_builddir)/.libs
else
Plasma_1_0_gir_LIBS += \
$(abs_top_builddir)/arrow-glib/libarrow-glib.la \
$(PLASMA_GIR_ARROW_GPU_LIBS) \
libplasma-glib.la
endif
INTROSPECTION_GIRS += Plasma-1.0.gir
Expand Down
Loading

0 comments on commit 8f02a1b

Please sign in to comment.