summaryrefslogtreecommitdiffstats
path: root/rules
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2015-12-28 00:36:17 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2016-01-12 14:41:22 +0100
commit86d945e616671e5ed177ea6f53168b5cb35bc1f1 (patch)
treef186d51b2d55f58621813170aa13ddb8c946f9bb /rules
parent2d64a7ce1c9d3468c65cdcaa9b22bd408b8b311c (diff)
downloadptxdist-86d945e616671e5ed177ea6f53168b5cb35bc1f1.tar.gz
ptxdist-86d945e616671e5ed177ea6f53168b5cb35bc1f1.tar.xz
gobject-introspection: new package
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules')
-rw-r--r--rules/gobject-introspection.in18
-rw-r--r--rules/gobject-introspection.make82
-rw-r--r--rules/host-gobject-introspection.in7
-rw-r--r--rules/host-gobject-introspection.make75
4 files changed, 182 insertions, 0 deletions
diff --git a/rules/gobject-introspection.in b/rules/gobject-introspection.in
new file mode 100644
index 000000000..0c527b073
--- /dev/null
+++ b/rules/gobject-introspection.in
@@ -0,0 +1,18 @@
+## SECTION=multimedia_gtk
+
+
+config GOBJECT_INTROSPECTION_HELPER
+ tristate
+ prompt "gobject-introspection"
+ help
+ Generate interface introspection data for GObject libraries
+
+if GOBJECT_INTROSPECTION_HELPER
+
+config GOBJECT_INTROSPECTION
+ tristate
+ default GOBJECT_INTROSPECTION_HELPER
+ select HOST_GOBJECT_INTROSPECTION
+ select GLIB
+
+endif
diff --git a/rules/gobject-introspection.make b/rules/gobject-introspection.make
new file mode 100644
index 000000000..e47fb0842
--- /dev/null
+++ b/rules/gobject-introspection.make
@@ -0,0 +1,82 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2015 by Michael Olbrich <m.olbrich@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_GOBJECT_INTROSPECTION) += gobject-introspection
+
+#
+# Paths and names
+#
+GOBJECT_INTROSPECTION_VERSION := 1.46.0
+GOBJECT_INTROSPECTION_MD5 := adb40a31c7c80b65b0f4c8fd71b493dc
+GOBJECT_INTROSPECTION := gobject-introspection-$(GOBJECT_INTROSPECTION_VERSION)
+GOBJECT_INTROSPECTION_SUFFIX := tar.xz
+GOBJECT_INTROSPECTION_URL := http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/$(basename $(GOBJECT_INTROSPECTION_VERSION))/$(GOBJECT_INTROSPECTION).$(GOBJECT_INTROSPECTION_SUFFIX)
+GOBJECT_INTROSPECTION_SOURCE := $(SRCDIR)/$(GOBJECT_INTROSPECTION).$(GOBJECT_INTROSPECTION_SUFFIX)
+GOBJECT_INTROSPECTION_DIR := $(BUILDDIR)/$(GOBJECT_INTROSPECTION)
+GOBJECT_INTROSPECTION_LICENSE := LGPL-2.1+ AND GPL-2.0+
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+GOBJECT_INTROSPECTION_CONF_TOOL := autoconf
+GOBJECT_INTROSPECTION_CONF_OPT := \
+ $(CROSS_AUTOCONF_USR) \
+ --disable-gtk-doc \
+ --disable-gtk-doc-html \
+ --disable-gtk-doc-pdf \
+ --disable-doctool \
+ --enable-host-gi \
+ --enable-gi-cross-wrapper=$(PTXDIST_SYSROOT_CROSS)/bin/qemu-cross \
+ --without-cairo
+
+# needed so g-ir-compiler runs in qemu
+GOBJECT_INTROSPECTION_LDFLAGS := -Wl,-rpath,$(GOBJECT_INTROSPECTION_DIR)/.libs
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/gobject-introspection.install.post:
+ @$(call targetinfo)
+ @$(call world/install.post, GOBJECT_INTROSPECTION)
+ @sed -i 's;bindir=.*;bindir=$(PTXDIST_SYSROOT_CROSS)/bin;' \
+ $(SYSROOT)/usr/lib/pkgconfig/gobject-introspection-1.0.pc
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/gobject-introspection.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, gobject-introspection)
+ @$(call install_fixup, gobject-introspection,PRIORITY,optional)
+ @$(call install_fixup, gobject-introspection,SECTION,base)
+ @$(call install_fixup, gobject-introspection,AUTHOR,"Michael Olbrich <m.olbrich@pengutronix.de>")
+ @$(call install_fixup, gobject-introspection,DESCRIPTION,missing)
+
+ @$(call install_lib, gobject-introspection, 0, 0, 0644, \
+ libgirepository-1.0)
+ @$(call install_tree, gobject-introspection, 0, 0, -, \
+ /usr/lib/girepository-1.0)
+
+ @$(call install_finish, gobject-introspection)
+
+ @$(call touch)
+
+# vim: syntax=make
diff --git a/rules/host-gobject-introspection.in b/rules/host-gobject-introspection.in
new file mode 100644
index 000000000..4661ce5f7
--- /dev/null
+++ b/rules/host-gobject-introspection.in
@@ -0,0 +1,7 @@
+## SECTION=hosttools_noprompt
+
+config HOST_GOBJECT_INTROSPECTION
+ select HOST_GLIB
+ select HOST_QEMU
+ select HOST_QEMU_USR
+ bool
diff --git a/rules/host-gobject-introspection.make b/rules/host-gobject-introspection.make
new file mode 100644
index 000000000..bfb0a1177
--- /dev/null
+++ b/rules/host-gobject-introspection.make
@@ -0,0 +1,75 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2015 by Michael Olbrich <m.olbrich@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+HOST_PACKAGES-$(PTXCONF_HOST_GOBJECT_INTROSPECTION) += host-gobject-introspection
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+HOST_GOBJECT_INTROSPECTION_CONF_ENV := \
+ $(HOST_ENV) \
+ PYTHON=python
+
+#
+# autoconf
+#
+HOST_GOBJECT_INTROSPECTION_CONF_TOOL := autoconf
+HOST_GOBJECT_INTROSPECTION_CONF_OPT := \
+ $(HOST_AUTOCONF) \
+ --disable-gtk-doc \
+ --disable-gtk-doc-html \
+ --disable-gtk-doc-pdf \
+ --disable-doctool \
+ --disable-host-gi \
+ --without-cairo
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/host-gobject-introspection.install.post:
+ @$(call targetinfo)
+ @$(call world/install.post, HOST_GOBJECT_INTROSPECTION)
+ @echo '#!/bin/sh' > $(PTXDIST_SYSROOT_CROSS)/bin/g-ir-scanner
+ @echo 'export GI_SCANNER_DISABLE_CACHE=1' >> $(PTXDIST_SYSROOT_CROSS)/bin/g-ir-scanner
+ @echo 'export pkg_ldflags="$$(find $${pkg_dir} -name .libs -printf "-Wl,-rpath,%p ")$${pkg_ldflags}"' \
+ >> $(PTXDIST_SYSROOT_CROSS)/bin/g-ir-scanner
+ @echo 'export CC=$(CROSS_CC)' >> $(PTXDIST_SYSROOT_CROSS)/bin/g-ir-scanner
+ @echo 'exec "$(PTXDIST_SYSROOT_HOST)/bin/g-ir-scanner" \
+ --use-binary-wrapper=$(PTXDIST_SYSROOT_CROSS)/bin/qemu-cross \
+ --use-ldd-wrapper=$(PTXDIST_SYSROOT_CROSS)/bin/ldd-cross \
+ "$${@}"' >> $(PTXDIST_SYSROOT_CROSS)/bin/g-ir-scanner
+ @chmod +x $(PTXDIST_SYSROOT_CROSS)/bin/g-ir-scanner
+ @echo -e '#!/bin/sh\n$(PTXDIST_SYSROOT_CROSS)/bin/qemu-cross $(SYSROOT)/usr/bin/g-ir-compiler --includedir $(SYSROOT)/usr/share/gir-1.0 "$${@}"' > $(PTXDIST_SYSROOT_CROSS)/bin/g-ir-compiler
+ @chmod +x $(PTXDIST_SYSROOT_CROSS)/bin/g-ir-compiler
+ @sed -i 's;"/share";"$(PTXDIST_SYSROOT_HOST)/share";' \
+ "$(PTXDIST_SYSROOT_HOST)/bin/g-ir-scanner" \
+ "$(PTXDIST_SYSROOT_HOST)/bin/g-ir-annotation-tool"
+ @sed -i 's;'/lib';'$(PTXDIST_SYSROOT_HOST)/lib';' \
+ "$(PTXDIST_SYSROOT_HOST)/bin/g-ir-scanner" \
+ "$(PTXDIST_SYSROOT_HOST)/bin/g-ir-annotation-tool"
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/host-gobject-introspection.clean:
+ @$(call targetinfo)
+ @$(call clean_pkg, HOST_GOBJECT_INTROSPECTION)
+ @rm \
+ $(PTXDIST_SYSROOT_CROSS)/bin/g-ir-scanner \
+ $(PTXDIST_SYSROOT_CROSS)/bin/g-ir-compiler
+
+# vim: syntax=make