From patchwork Sun Jan 25 11:34:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 5701091 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 66D4FC058D for ; Sun, 25 Jan 2015 11:37:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A0472017E for ; Sun, 25 Jan 2015 11:37:33 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 7438B201F2 for ; Sun, 25 Jan 2015 11:37:32 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 9B66B260615; Sun, 25 Jan 2015 12:37:31 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 5580326049E; Sun, 25 Jan 2015 12:35:23 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 740B926048E; Sun, 25 Jan 2015 12:35:20 +0100 (CET) Received: from smtp302.phy.lolipop.jp (smtp302.phy.lolipop.jp [210.157.22.85]) by alsa0.perex.cz (Postfix) with ESMTP id A9CC0260444 for ; Sun, 25 Jan 2015 12:35:03 +0100 (CET) Received: from smtp302.phy.lolipop.lan (HELO smtp302.phy.lolipop.jp) (172.17.1.85) (smtp-auth username m12129643-o-takashi, mechanism plain) by smtp302.phy.lolipop.jp (qpsmtpd/0.82) with ESMTPA; Sun, 25 Jan 2015 20:34:59 +0900 Received: from 127.0.0.1 (127.0.0.1) by smtp302.phy.lolipop.jp (LOLIPOP-Fsecure); Sun, 25 Jan 2015 20:34:35 +0900 (JST) X-Virus-Status: clean(LOLIPOP-Fsecure) From: Takashi Sakamoto To: clemens@ladisch.de, tiwai@suse.de, perex@perex.cz Date: Sun, 25 Jan 2015 20:34:26 +0900 Message-Id: <1422185674-16431-6-git-send-email-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1422185674-16431-1-git-send-email-o-takashi@sakamocchi.jp> References: <1422185674-16431-1-git-send-email-o-takashi@sakamocchi.jp> Cc: alsa-devel@alsa-project.org, linux1394-devel@lists.sourceforge.net, ffado-devel@lists.sf.net Subject: [alsa-devel] [PATCH 05/13] libhinawa: support GObject Introspection for language bindings X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP GObject Introspection is a mechanism to give a metadata of library to each language bindings. The library should be written by GObject way. This commit applies this mechanism to this library to produce language bindings, thus adds a dependency with: - GObject Introspaction 1.32.1 or later The comments in each methods and signals are important for GObject Introspection scanner because of a hint to create better metadata. Signed-off-by: Takashi Sakamoto --- libhinawa/README | 1 + libhinawa/configure.ac | 6 +++++- libhinawa/src/Makefile.am | 29 +++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/libhinawa/README b/libhinawa/README index f6a0650..1bd0d52 100644 --- a/libhinawa/README +++ b/libhinawa/README @@ -4,6 +4,7 @@ Requirements - GNU libtool 2.2.6 or later - Glib 2.32.4 or later - GTK-Doc 1.18-2 +- GObject Introspection 1.32.1 or later How to build $ ./autogen.sh diff --git a/libhinawa/configure.ac b/libhinawa/configure.ac index 28ca374..b0d9517 100644 --- a/libhinawa/configure.ac +++ b/libhinawa/configure.ac @@ -26,7 +26,8 @@ AC_CONFIG_SRCDIR([src]) AC_CONFIG_HEADERS([config.h]) # Automake 1.13 or later -AM_INIT_AUTOMAKE([1.10.1]) +# GObject Introspection uses GNU Make-specific functionality. +AM_INIT_AUTOMAKE([1.10.1 -Wno-portability]) # Don't output command lines AM_SILENT_RULES([yes]) @@ -48,6 +49,9 @@ AM_PATH_GLIB_2_0([2.32.4], [], [], [gobject]) # GTK-Doc 1.18-2 or later GTK_DOC_CHECK([1.18-2]) +# GObject introspection 1.32.1 or later +GOBJECT_INTROSPECTION_REQUIRE([1.32.1]) + # The files generated from *.in AC_CONFIG_FILES([ Makefile diff --git a/libhinawa/src/Makefile.am b/libhinawa/src/Makefile.am index 9eda8f4..d9519ab 100644 --- a/libhinawa/src/Makefile.am +++ b/libhinawa/src/Makefile.am @@ -43,3 +43,32 @@ hinawa_sigs_marshal.h: hinawa_sigs_marshal.list hinawa_sigs_marshal.c: hinawa_sigs_marshal.list hinawa_sigs_marshal.h $(AM_V_GEN)(echo '#include "hinawa_sigs_marshal.h"'; \ glib-genmarshal --body --prefix=hinawa_sigs_marshal $< ) > $@ + +-include $(INTROSPECTION_MAKEFILE) +INTROSPECTION_GIRS = +INTROSPECTION_SCANNER_ARGS = --warn-all +INTROSPECTION_COMPILER_ARGS = + +if HAVE_INTROSPECTION +Hinawa-1.0.gir: libhinawa.la +Hinawa_1_0_gir_PACKAGES = +Hinawa_1_0_gir_EXPORT_PACKAGES = hinawa +Hinawa_1_0_gir_INCLUDES = GObject-2.0 +Hinawa_1_0_gir_CFLAGS = +Hinawa_1_0_gir_LIBS = libhinawa.la +Hinawa_1_0_gir_FILES = $(libhinawa_la_SOURCES) +Hinawa_1_0_gir_SCANNERFLAGS = \ + --identifier-prefix=Hinawa \ + --symbol-prefix=hinawa +INTROSPECTION_GIRS += Hinawa-1.0.gir + +girdir = $(datadir)/gir-1.0 +gir_DATA = $(INTROSPECTION_GIRS) + +typelibdir = $(libdir)/girepository-1.0 +typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) + +CLEANFILES += \ + $(gir_DATA) \ + $(typelib_DATA) +endif