summaryrefslogtreecommitdiffstats
path: root/rules/gobject-introspection.make
blob: e730db3b6fc271d0f51a53d300be2efb80ce4c13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# -*-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:
	@$(call targetinfo)
	@$(call world/install, GOBJECT_INTROSPECTION)
#	# the rpath is only needed while building the package itself
	@chrpath --delete $(GOBJECT_INTROSPECTION_PKGDIR)/usr/bin/g-ir-compiler
	@chrpath --delete $(GOBJECT_INTROSPECTION_PKGDIR)/usr/lib/libgirepository-1.0.so
	@$(call touch)

$(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