[Buildroot] [git commit branch/2021.02.x] package/gstreamer1/gstreamer1: fix girdir
Peter Korsgaard
peter at korsgaard.com
Sun Dec 12 17:26:17 UTC 2021
commit: https://git.buildroot.net/buildroot/commit/?id=a77f4e255caede0e8546a8171e9a376d9db81927
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2021.02.x
As already done for libglib2 in commit
b094f88a4d501101bfba9b65491209e6a0fe0397, fix girdir to avoid the
following build failure with gst1-plugins-base and introspection:
/home/giuliobenetti/autobuild/run/instance-3/output-1/host/riscv32-buildroot-linux-gnu/sysroot/usr/bin/g-ir-compiler gst-libs/gst/tag/GstTag-1.0.gir --output gst-libs/gst/tag/GstTag-1.0.typelib --includedir=/usr/share/gir-1.0
Could not find GIR file 'Gst-1.0.gir'; check XDG_DATA_DIRS or use --includedir
Fixes:
- http://autobuild.buildroot.org/results/d1e2bdde97777ff61c185d375ba412a93e7ca467
Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
(cherry picked from commit ff420a3195281460322c82e9d6f6106113699531)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
package/gstreamer1/gstreamer1/gstreamer1.mk | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/package/gstreamer1/gstreamer1/gstreamer1.mk b/package/gstreamer1/gstreamer1/gstreamer1.mk
index 9bdd00caec..1aab035e05 100644
--- a/package/gstreamer1/gstreamer1/gstreamer1.mk
+++ b/package/gstreamer1/gstreamer1/gstreamer1.mk
@@ -49,4 +49,14 @@ endif
GSTREAMER1_LDFLAGS = $(TARGET_LDFLAGS) $(TARGET_NLS_LIBS)
+# By default, girdir uses datadir as its prefix of which pkg-config will not
+# append the sysroot directory. This results in a build failure with
+# gst1-plugins-base. Changing prefix to ${libdir}/../share prevents this error.
+define GSTREAMER1_FIX_GIRDIR
+ $(SED) "s%girdir=.*%girdir=\$${libdir}/../share/gir-1.0%g" \
+ $(STAGING_DIR)/usr/lib/pkgconfig/gstreamer-1.0.pc \
+ $(STAGING_DIR)/usr/lib/pkgconfig/gstreamer-base-1.0.pc
+endef
+GSTREAMER1_POST_INSTALL_STAGING_HOOKS += GSTREAMER1_FIX_GIRDIR
+
$(eval $(meson-package))
More information about the buildroot
mailing list