package/gobject-introspection: fix datarootdir

datarootdir has been removed since version 1.66 and
a88b1ac548
resulting in the following build failures with autotools-based
applications using introspection (e.g. libmediaart or libsecret) if
gobject-introspection is not installed on host since commit
abc110e362:

make[3]: *** No rule to make target 'MediaArt-2.0.typelib', needed by 'all'.  Stop.

or

Makefile:2917: /usr/share/gobject-introspection-1.0/Makefile.introspection: No such file or directory

Fixes:
 - http://autobuild.buildroot.org/results/70585b81fd6aa78e2aa6e5173f35c0f26a1408a9
 - http://autobuild.buildroot.org/results/95aa8e189f3326ecae6133e298c56ffcbbc3198f

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Fabrice Fontaine 2021-08-08 12:16:50 +02:00 committed by Thomas Petazzoni
parent 0a8ef2f3f7
commit 521d387640

View File

@ -116,12 +116,12 @@ define GOBJECT_INTROSPECTION_INSTALL_WRAPPERS
# Gobject-introspection installs Makefile.introspection in
# $(STAGING_DIR)/usr/share which is needed for autotools-based programs to
# build .gir and .typelib files. Unfortuantly, gobject-introspection-1.0.pc
# build .gir and .typelib files. Unfortunately, gobject-introspection-1.0.pc
# uses $(prefix)/share as the directory, which
# causes the host /usr/share being used instead of $(STAGING_DIR)/usr/share.
# Change datarootdir to $(libdir)/../share which will prefix $(STAGING_DIR)
# Change datadir to $(libdir)/../share which will prefix $(STAGING_DIR)
# to the correct location.
$(SED) "s%datarootdir=.*%datarootdir=\$${libdir}/../share%g" \
$(SED) "s%datadir=.*%datadir=\$${libdir}/../share%g" \
$(STAGING_DIR)/usr/lib/pkgconfig/gobject-introspection-1.0.pc
# By default, girdir and typelibdir use datadir and libdir as their prefix,