Skip to contentSkip to conversation

binutils: install libiberty for host build.

PATCH Superseded aduskett at gmail.com 3 participants 7 messages Dec 15, 2018 – Feb 6, 2019 Kbuild

v9 of 10 Superseded Latest is v10 →

lore
Share & tools
lore
#0 lore raw

PATCH v9 1/4 binutils: install libiberty for host build.

From: Adam Duskett <[email protected]>

Add --enable-install-libiberty to HOST_BINUTILS_CONF_OPTS to allow prelink-cross to build properly.

---
Changes v1 -> v7:
- Add patch to series.

Changes v7 -> v9:
- None

 package/binutils/binutils.mk | 1 +
 1 file changed, 1 insertion(+)
package/binutils/binutils.mk +1 -0
index 4531b8d9c8..388e2192b4 100644
@@ -84,6 +84,7 @@ HOST_BINUTILS_CONF_OPTS = \
 	--target=$(GNU_TARGET_NAME) \
 	--disable-shared \
 	--enable-static \
+	--enable-install-libiberty \
 	--with-sysroot=$(STAGING_DIR) \
 	--enable-poison-system-directories \
 	$(BINUTILS_DISABLE_GDB_CONF_OPTS) \
Signature · 1 line
2.19.2
#1 lore raw

PATCH v9 2/4 prelink-cross: new package

From: Adam Duskett <[email protected]>

Prelink-cross emulates a runtime linker for a given sysroot. This is necessary to allow gobject-introspection to build it's typelib files during cross-compiling.

---
Changes v1 -> v7:
- Add patch to series.

Changes v7 -> v8:
- None

Changes v8 -> v9:
- Add the package to the DEVELOPERS file under my name.
- Bump version to a853a5d715d84eec93aa68e8f2df26b7d860f5b2
- Add host-elfutils as a dependency.

 DEVELOPERS                               |  1 +
 package/Config.in.host                   |  1 +
 package/prelink-cross/Config.in.host     |  9 +++++++++
 package/prelink-cross/prelink-cross.hash |  3 +++
 package/prelink-cross/prelink-cross.mk   | 15 +++++++++++++++
 5 files changed, 29 insertions(+)
 create mode 100644 package/prelink-cross/Config.in.host
 create mode 100644 package/prelink-cross/prelink-cross.hash
 create mode 100644 package/prelink-cross/prelink-cross.mk
DEVELOPERS +1 -0
index 4192681bf8..5bbb458151 100644
@@ -51,6 +51,7 @@ F:	package/libsemanage/
 F:	package/libsepol/
 F:	package/nginx-naxsi/
 F:	package/policycoreutils/
+F:	package/prelink-cross/
 F:	package/python-flask-sqlalchemy/
 F:	package/python-mutagen/
 F:	package/python-pip/
package/Config.in.host +1 -0
index 16b474fc9d..f7384af979 100644
@@ -44,6 +44,7 @@ menu "Host utilities"
 	source "package/parted/Config.in.host"
 	source "package/patchelf/Config.in.host"
 	source "package/pkgconf/Config.in.host"
+	source "package/prelink-cross/Config.in.host"
 	source "package/pru-software-support/Config.in.host"
 	source "package/pwgen/Config.in.host"
 	source "package/python-cython/Config.in.host"
package/prelink-cross/Config.in.host new file +9 -0
new file mode 100644
index 0000000000..0c54f6a8c4
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_HOST_PRELINK_CROSS
+	bool "host prelink-cross"
+	help
+	  The prelink package contains a utility which modifies
+	  ELF shared libraries and executables, so that far fewer
+	  relocations need to be resolved at runtime and thus
+	  programs come up faster.
+
+	  https://wiki.yoctoproject.org/wiki/Cross-Prelink
package/prelink-cross/prelink-cross.hash new file +3 -0
new file mode 100644
index 0000000000..3ac33ac3d0
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  cb3f5d833cd74b7e90e38465c9c948b0f4138c017509cb91e391b0931063429e  prelink-cross-a853a5d715d84eec93aa68e8f2df26b7d860f5b2.tar.gz
+sha256  b8a2f73f743dc1a51aff23f1aacbca4b868564db52496fa3c0caba755bfd1eaf  COPYING
package/prelink-cross/prelink-cross.mk new file +15 -0
new file mode 100644
index 0000000000..ab7a967f95
@@ -0,0 +1,15 @@
+################################################################################
+#
+# host-prelink-cross
+#
+################################################################################
+
+HOST_PRELINK_CROSS_VERSION = a853a5d715d84eec93aa68e8f2df26b7d860f5b2
+HOST_PRELINK_CROSS_SITE = git://git.yoctoproject.org/prelink-cross
+HOST_PRELINK_CROSS_SITE_METHOD = git
+HOST_PRELINK_CROSS_LICENSE = GPL-2.0
+HOST_PRELINK_CROSS_LICENSE_FILES = COPYING
+HOST_PRELINK_CROSS_AUTORECONF = YES
+HOST_PRELINK_CROSS_DEPENDENCIES = host-binutils host-elfutils
+
+$(eval $(host-autotools-package))
Signature · 1 line
2.19.2
#2 lore raw

PATCH v9 3/4 gobject-introspection: new package

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

GObject introspection is a middleware layer between C libraries (using GObject) and language bindings. The C library can be scanned at compile time and generate a metadata file, in addition to the actual native C library. Then at runtime, language bindings can read this metadata and automatically provide bindings to call into the C library.

There's an XML format called GIR used by GObject-Introspection. The purpose of it is to provide a standard structure to access the complete available API that a library or other unit of code exports. It is meant to be language agnostic using namespaces to separate core, language or library specific functionality.

Cross-compiling gobject-introspection is not an easy task. The main issue is that in the process of creating the XML files, gobject-introspection must first run and scan the binary, which, if the binary is cross-compiled, would not typically be possible from the host system.

Because of this limitation, several wrappers are used to call instead first out qemu which will then run the native scanner to create the binaries.

There are seven total patches and four different wrapper files needed to successfully cross-compile and run this package, many of them are from open-embedded, but two of them are of my own doing.

1) Revert a previous, incomplete attempt at adding cross-compiling support.

2) Add support for the various wrappers. (See patch for details.)

3) Add an option to use a binary wrapper; this patch will force giscanner to use a wrapper executable to run binaries it's producing, instead of attempting to run them from the host.

4) Add an option to use an LDD wrapper, again, useful for cross-compiled environments.

5) Overwrite python includes during the initial configure stage.

6) Add a --lib-dirs-envar option to pass to giscanner. (See patch for details.)

7) Add rpath-links to ccompiler: when passing the PACKAGE_GIR_EXTRA_LIBS_PATH to the ccompiler.py script, ccompiler.py needs to add -Wl,-rpath-link to the environment for the package to correctly link against the passed on paths.

---
Changes v1 -> v2:
- Fixed wrappers
- Added 0007-giscanner-add-a-lib-dirs-envvar-option.patch
- Added 0008-add-Float128.patch

Changes v2 -> v3:
- Removed Linux kernel dependency (baruch)
- Changed $(LINUX_VERSION) to $(BR2_TOOLCHAIN_HEADERS_AT_LEAST) (baruch)
- Changed @LINUX_VERSION@ in g-ir-scanner-qemuwrapper.in to @TOOLCHAIN_HEADERS_VERSION@ to match the above variable change.
- Added BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS_TARGET in Config.in with only BR2_arm selected for now.
- Removed BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS in favor of the above change.
- Added two new lines in the base Makefile which removes any remaining .gir or .rnc files from the target filing system, as these are not needed for runtime, only compile time.

Changes v3 -> v4:
- Removed RFC tag.
- Added 0007-Add-rpath-links-to-ccompiler.patch
- Removed config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch as it is not Yocto specific.
- Added the _GIR_EXTRA_LIBS_PATH to pkg-autotools.mk. This allows package specific Gir libraries to be passed on to g-ir-scanner-qemuwrapper.
- Fixed a typo in g-ir-scanner-qemuwrapper.in.
- Remove BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS_TARGET in favor of BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS

Changes v4 -> v5:
- Added a more detailed commit message (Yann)
- Removed $HOST_DIR/bin/qemu- at HOST_QEMU_ARCH@ @HOST_QEMU_CPU_TUNE@ in favor of @QEMU_USER@ (Thanks Yann)

Changes v5 -> v6:
- Update gobject-introspection to 1.56.1
- Remove upstreamed 0008-add-Float128.patch

Changes v6 -> v7:
- Remove the cross-ldd script in favor of the prelink-cross package.
- Install the ldd and qemu wrappers in a post patch hook seperate of the other wrappers.
- Set --enable-introspection-data in the configure options.

Changes v7 -> v8:
- Add "select BR2_PACKAGE_HOST_PRELINK_CROSS" to Config.in

Changes v8 -> v9:
- Create the $(STAGING_DIR)/usr/lib/gio/modules-dummy directory in the GOBJECT_INTROSPECTION_POST_PATCH_HOOKS to prevent qemu from segfaulting when g-ir-scanner-qemuwrapper is ran.
- Remove the $(STAGING_DIR) prefix from gobject-introspection-1.0.pc to prevent pkg-config from appending a second staging_dir to the path of the g-ir-compiler. This prevents packages such a gstreamer1 from trying to call $(STAGING_DIR)/$(STAGING_DIR)/usr/bin/g-ir-compiler, which will break the build.

 DEVELOPERS                                    |   1 +
 Makefile                                      |   2 +
 package/Config.in                             |   1 +
 ...lete-upstream-attempt-at-cross-compi.patch |  50 +++++
 ...-host-gi-gi-cross-wrapper-gi-ldd-wra.patch | 203 ++++++++++++++++++
 ...canner-add-use-binary-wrapper-option.patch |  52 +++++
 ...scanner-add-a-use-ldd-wrapper-option.patch |  48 +++++
 .../0005-add-PYTHON_INCLUDES-override.patch   |  39 ++++
 ...scanner-add-a-lib-dirs-envvar-option.patch |  73 +++++++
 .../0007-Add-rpath-links-to-ccompiler.patch   |  29 +++
 package/gobject-introspection/Config.in       |  31 +++
 .../gobject-introspection/g-ir-compiler.in    |   2 +
 .../g-ir-scanner-lddwrapper.in                |   2 +
 .../g-ir-scanner-qemuwrapper.in               |  10 +
 package/gobject-introspection/g-ir-scanner.in |   3 +
 .../gobject-introspection.hash                |   4 +
 .../gobject-introspection.mk                  | 101 +++++++++
 package/pkg-autotools.mk                      |   3 +
 18 files changed, 654 insertions(+)
 create mode 100644 package/gobject-introspection/0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch
 create mode 100644 package/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch
 create mode 100644 package/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch
 create mode 100644 package/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch
 create mode 100644 package/gobject-introspection/0005-add-PYTHON_INCLUDES-override.patch
 create mode 100644 package/gobject-introspection/0006-giscanner-add-a-lib-dirs-envvar-option.patch
 create mode 100644 package/gobject-introspection/0007-Add-rpath-links-to-ccompiler.patch
 create mode 100644 package/gobject-introspection/Config.in
 create mode 100644 package/gobject-introspection/g-ir-compiler.in
 create mode 100644 package/gobject-introspection/g-ir-scanner-lddwrapper.in
 create mode 100644 package/gobject-introspection/g-ir-scanner-qemuwrapper.in
 create mode 100644 package/gobject-introspection/g-ir-scanner.in
 create mode 100644 package/gobject-introspection/gobject-introspection.hash
 create mode 100644 package/gobject-introspection/gobject-introspection.mk
DEVELOPERS +1 -0
index 5bbb458151..29ebce9cdc 100644
@@ -34,6 +34,7 @@ F:	package/audit/
 F:	package/busybox/
 F:	package/checkpolicy/
 F:	package/cppdb/
+F:	package/gobject-introspection/
 F:	package/gstreamer1/gstreamer1/
 F:	package/gstreamer1/gstreamer1-mm/
 F:	package/gstreamer1/gst1-plugins-bad/
Makefile +2 -0
index c5b78b3274..7068bdb0ca 100644
@@ -719,6 +719,8 @@ target-finalize: $(PACKAGES) host-finalize
 		$(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \
 		$(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake
 	find $(TARGET_DIR)/usr/{lib,share}/ -name '*.cmake' -print0 | xargs -0 rm -f
+	find $(TARGET_DIR)/usr/share/ -name '*.gir' -print0 | xargs -0 rm -f
+	find $(TARGET_DIR)/usr/share/ -name '*.rnc' -print0 | xargs -0 rm -f
 	find $(TARGET_DIR)/lib/ $(TARGET_DIR)/usr/lib/ $(TARGET_DIR)/usr/libexec/ \
 		\( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
 ifneq ($(BR2_PACKAGE_GDB),y)
package/Config.in +1 -0
index bdc63f71f1..5b37d4ee37 100644
@@ -1639,6 +1639,7 @@ menu "Other"
 	source "package/glibmm/Config.in"
 	source "package/glm/Config.in"
 	source "package/gmp/Config.in"
+	source "package/gobject-introspection/Config.in"
 	source "package/gsl/Config.in"
 	source "package/gtest/Config.in"
 	source "package/jemalloc/Config.in"
package/gobject-introspection/0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch new file +50 -0

50 lines not on this page · raw message

package/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch new file +203 -0

203 lines not on this page · raw message

package/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch new file +52 -0

52 lines not on this page · raw message

package/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch new file +48 -0

48 lines not on this page · raw message

package/gobject-introspection/0005-add-PYTHON_INCLUDES-override.patch new file +39 -0
new file mode 100644
index 0000000000..21bcd9db94
@@ -0,0 +1,39 @@
+From 08ee7e704d3ebbb783e26768074a5969d6843204 Mon Sep 17 00:00:00 2001
+From: Adam Duskett <[email protected]>
+Date: Wed, 18 Oct 2017 17:31:19 -0400
+Subject: [PATCH] add PYTHON_INCLUDES override
+
+As the configure script mixes up host/target python. Equivalent to the
+similar code in dbus-python.
+
+Signed-off-by: Adam Duskett <[email protected]>
+---
+ m4/python.m4 | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/m4/python.m4 b/m4/python.m4
+index ed5559d..9853263 100644
+--- a/m4/python.m4
++++ b/m4/python.m4
+@@ -43,7 +43,17 @@ AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
+ [AC_REQUIRE([AM_PATH_PYTHON])
+ AC_MSG_CHECKING(for headers required to compile python extensions)
+ dnl deduce PYTHON_INCLUDES
+-PYTHON_INCLUDES=`$PYTHON-config --includes`
++if test "${PYTHON_INCLUDES+set}" = set; then
++  AC_MSG_NOTICE([PYTHON_INCLUDES overridden to: $PYTHON_INCLUDES])
++else
++  if test -x "$PYTHON_CONFIG"; then
++    PYTHON_INCLUDES=`$PYTHON_CONFIG --includes 2>/dev/null`
++  else
++    PYTHON_INCLUDES=`$PYTHON -c "import distutils.sysconfig, sys; sys.stdout.write(distutils.sysconfig.get_python_inc(True))"`
++    PYTHON_INCLUDES="-I$PYTHON_INCLUDES"
++  fi
++fi
++
+ AC_SUBST(PYTHON_INCLUDES)
+ dnl check if the headers exist:
+ save_CPPFLAGS="$CPPFLAGS"
+--
+2.13.6
+
package/gobject-introspection/0006-giscanner-add-a-lib-dirs-envvar-option.patch new file +73 -0

73 lines not on this page · raw message

package/gobject-introspection/0007-Add-rpath-links-to-ccompiler.patch new file +29 -0
new file mode 100644
index 0000000000..02fcdbeb25
@@ -0,0 +1,29 @@
+From 72a427bc50daee8f1ded0e9221e53dbbf2a80f08 Mon Sep 17 00:00:00 2001
+From: Adam Duskett <[email protected]>
+Date: Wed, 14 Mar 2018 12:07:10 -0400
+Subject: [PATCH] Add rpath links to ccompiler
+
+This patch allows gobject-introspection to process extra paths passed to the
+compiler via the GIR_EXTRA_LIBS_PATH variable.
+
+Signed-off-by: Adam Duskett <[email protected]>
+---
+ giscanner/ccompiler.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
+index a8bd5b1..51bb9bc 100644
+--- a/giscanner/ccompiler.py
++++ b/giscanner/ccompiler.py
+@@ -163,6 +163,8 @@ class CCompiler(object):
+ 
+         for envvar in runtime_path_envvar:
+             if envvar in os.environ:
++                for envvar_path in os.environ[envvar].split(':'):
++                    args.append("-Wl,-rpath-link," + envvar_path)
+                 os.environ[envvar] = \
+                     os.pathsep.join(runtime_paths + [os.environ[envvar]])
+             else:
+-- 
+2.14.3
+
package/gobject-introspection/Config.in new file +31 -0
new file mode 100644
index 0000000000..1da3cfa000
@@ -0,0 +1,31 @@
+config BR2_PACKAGE_GOBJECT_INTROSPECTION
+	bool "gobject-introspection"
+	depends on BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libffi, libglib2
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	depends on BR2_USE_MMU # python3, libglib2
+	depends on BR2_USE_WCHAR # python3, libglib2 -> gettext
+	depends on !BR2_STATIC_LIBS
+	depends on !BR2_MIPS_NABI32
+	select BR2_PACKAGE_LIBFFI
+	select BR2_PACKAGE_ZLIB
+	select BR2_PACKAGE_LIBGLIB2
+	select BR2_PACKAGE_HOST_PRELINK_CROSS
+	select BR2_PACKAGE_HOST_QEMU
+	select BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE
+	select BR2_PACKAGE_PYTHON3 if !BR2_PACKAGE_PYTHON
+	help
+	  GObject introspection is a middleware layer between C
+	  libraries (using GObject) and language bindings. The C library
+	  can be scanned at compile time and generate a metadata file,
+	  in addition to the actual native C library. Then at runtime,
+	  language bindings can read this metadata and automatically
+	  provide bindings to call into the C library.
+
+	  https://wiki.gnome.org/action/show/Projects/GObjectIntrospection
+
+comment "gobject-introspection needs a glibc toolchain w/ wchar, threads, dynamic library"
+	depends on BR2_USE_MMU
+	depends on BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS_TARGET
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
+		BR2_STATIC_LIBS || !BR2_TOOLCHAIN_USES_GLIBC
package/gobject-introspection/g-ir-compiler.in new file +2 -0
new file mode 100644
index 0000000000..b2f97ea870
@@ -0,0 +1,2 @@
+#!/bin/sh
+$STAGING_DIR/usr/bin/g-ir-scanner-qemuwrapper $STAGING_DIR/usr/bin/g-ir-compiler.real "$@"
package/gobject-introspection/g-ir-scanner-lddwrapper.in new file +2 -0
new file mode 100644
index 0000000000..12b064e4ad
@@ -0,0 +1,2 @@
+#!/bin/sh
+${HOST_DIR}/sbin/prelink-rtld --root=${STAGING_DIR} "$@"
package/gobject-introspection/g-ir-scanner-qemuwrapper.in new file +10 -0
new file mode 100644
index 0000000000..e793ce193f
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Use a modules directory which does not exist so we don't load random things
+# which may then get deleted (or their dependencies) and potentially segfault
+export GIO_MODULE_DIR=$STAGING_DIR/usr/lib/gio/modules-dummy
+PSEUDO_UNLOAD=1 @QEMU_USER@ -r @TOOLCHAIN_HEADERS_VERSION@ -L $STAGING_DIR -E LD_LIBRARY_PATH=$GIR_EXTRA_LIBS_PATH:.libs:$STAGING_DIR/usr/lib:$STAGING_DIR/lib "$@"
+if [[ $? -ne 0 ]]; then
+    echo "If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the .mk file should help."
+    echo '(typically like this: GIR_EXTRA_LIBS_PATH="$(@D)/.libs")'
+    exit 1
+fi
package/gobject-introspection/g-ir-scanner.in new file +3 -0
new file mode 100644
index 0000000000..71b1871cfd
@@ -0,0 +1,3 @@
+#!/bin/sh
+export GI_SCANNER_DISABLE_CACHE=1
+$HOST_DIR/bin/g-ir-scanner --lib-dirs-envvar=GIR_EXTRA_LIBS_PATH --use-binary-wrapper=$STAGING_DIR/usr/bin/g-ir-scanner-qemuwrapper --use-ldd-wrapper=$STAGING_DIR/usr/bin/g-ir-scanner-lddwrapper --add-include-path=$STAGING_DIR/usr/share/gir-1.0 "$@"
package/gobject-introspection/gobject-introspection.hash new file +4 -0
new file mode 100644
index 0000000000..6524da8909
@@ -0,0 +1,4 @@
+#From http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/1.56/gobject-introspection-1.56.1.sha256sum
+sha256 5b2875ccff99ff7baab63a34b67f8c920def240e178ff50add809e267d9ea24b gobject-introspection-1.56.1.tar.xz
+sha256 d245807f90032872d1438d741ed21e2490e1175dc8aa3afa5ddb6c8e529b58e5 COPYING.LGPL
+sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 COPYING.GPL
package/gobject-introspection/gobject-introspection.mk new file +101 -0

101 lines not on this page · raw message

package/pkg-autotools.mk +3 -0
index 45de99356f..06021f95c1 100644
@@ -162,6 +162,7 @@ endif
 
 $(2)_CONF_ENV			?=
 $(2)_CONF_OPTS			?=
+$(2)_GIR_EXTRA_LIBS_PATH	?=
 $(2)_MAKE_ENV			?=
 $(2)_MAKE_OPTS			?=
 $(2)_INSTALL_OPTS                ?= install
@@ -239,6 +240,8 @@ endef
 endif
 endif
 
+export GIR_EXTRA_LIBS_PATH=$$($$(PKG)_GIR_EXTRA_LIBS_PATH)
+
 $(2)_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK
 
 ifeq ($$($(2)_AUTORECONF),YES)
Signature · 1 line
2.19.2
#3 lore raw

PATCH v9 3/4 gobject-introspection: new package

Hello,

Here are a number of other comments, in addition to the live discussion we had.

Makefile target-finalize: $(PACKAGES) host-finalize · line 723

Quoted 10 lines · On Sat, 15 Dec 2018 18:35:54 -0500 aduskett at gmail.com wrote:
Makefile +2 -0
index c5b78b3274..7068bdb0ca 100644
@@ -719,6 +719,8 @@ target-finalize: $(PACKAGES) host-finalize
 		$(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \
 		$(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake
 	find $(TARGET_DIR)/usr/{lib,share}/ -name '*.cmake' -print0 | xargs -0 rm -f
+	find $(TARGET_DIR)/usr/share/ -name '*.gir' -print0 | xargs -0 rm -f
+	find $(TARGET_DIR)/usr/share/ -name '*.rnc' -print0 | xargs -0 rm -f

Probably this should be moved to gobject-introspection.mk into a GOBJECT_INTROSPECTION_TARGET_FINALIZE_HOOKS.

Quoted 6 lines
package/gobject-introspection/Config.in new file +0 -0
new file mode 100644
index 0000000000..1da3cfa000

package/gobject-introspection/Config.in line 9

Quoted 9 lines
package/gobject-introspection/Config.in new file +9 -0
@@ -0,0 +1,31 @@
+config BR2_PACKAGE_GOBJECT_INTROSPECTION
+	bool "gobject-introspection"
+	depends on BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libffi, libglib2
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	depends on BR2_USE_MMU # python3, libglib2
+	depends on BR2_USE_WCHAR # python3, libglib2 -> gettext
+	depends on !BR2_STATIC_LIBS
+	depends on !BR2_MIPS_NABI32

A comment above this one to explain why ?

Quoted 10 lines
package/gobject-introspection/Config.in new file +10 -0
+	select BR2_PACKAGE_LIBFFI
+	select BR2_PACKAGE_ZLIB
+	select BR2_PACKAGE_LIBGLIB2
+	select BR2_PACKAGE_HOST_PRELINK_CROSS
+	select BR2_PACKAGE_HOST_QEMU
+	select BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE
+	select BR2_PACKAGE_PYTHON3 if !BR2_PACKAGE_PYTHON
+	help
+	  GObject introspection is a middleware layer between C
+	  libraries (using GObject) and language bindings. The C library

package/gobject-introspection/Config.in line 29

Quoted 10 lines
package/gobject-introspection/Config.in new file +10 -0
+	  can be scanned at compile time and generate a metadata file,
+	  in addition to the actual native C library. Then at runtime,
+	  language bindings can read this metadata and automatically
+	  provide bindings to call into the C library.
+
+	  https://wiki.gnome.org/action/show/Projects/GObjectIntrospection
+
+comment "gobject-introspection needs a glibc toolchain w/ wchar, threads, dynamic library"
+	depends on BR2_USE_MMU
+	depends on BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS_TARGET

This option does not exist anywhere. It should be BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS + !BR2_MIPS_NABI32

package/gobject-introspection/g-ir-compiler.in line 2

Quoted 8 lines
package/gobject-introspection/g-ir-compiler.in new file +2 -0
new file mode 100644
index 0000000000..b2f97ea870
@@ -0,0 +1,2 @@
+#!/bin/sh
+$STAGING_DIR/usr/bin/g-ir-scanner-qemuwrapper $STAGING_DIR/usr/bin/g-ir-compiler.real "$@"

Instead of $STAGING_DIR/usr/bin, please use $(dirname $0)

package/gobject-introspection/g-ir-scanner-lddwrapper.in line 2

Quoted 8 lines
package/gobject-introspection/g-ir-scanner-lddwrapper.in new file +2 -0
new file mode 100644
index 0000000000..12b064e4ad
@@ -0,0 +1,2 @@
+#!/bin/sh
+${HOST_DIR}/sbin/prelink-rtld --root=${STAGING_DIR} "$@"

We also want to use paths based on $(dirname $0) so that those tools work even when HOST_DIR and STAGING_DIR are not defined.

package/gobject-introspection/g-ir-scanner-qemuwrapper.in line 4

Quoted 10 lines
package/gobject-introspection/g-ir-scanner-qemuwrapper.in new file +4 -0
new file mode 100644
index 0000000000..e793ce193f
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Use a modules directory which does not exist so we don't load random things
+# which may then get deleted (or their dependencies) and potentially segfault
+export GIO_MODULE_DIR=$STAGING_DIR/usr/lib/gio/modules-dummy

Does this needs to be exported, instead of being passed on the command line below ?

package/gobject-introspection/g-ir-scanner-qemuwrapper.in line 5

Quoted 1 line
package/gobject-introspection/g-ir-scanner-qemuwrapper.in new file +1 -0
+PSEUDO_UNLOAD=1 @QEMU_USER@ -r @TOOLCHAIN_HEADERS_VERSION@ -L $STAGING_DIR -E LD_LIBRARY_PATH=$GIR_EXTRA_LIBS_PATH:.libs:$STAGING_DIR/usr/lib:$STAGING_DIR/lib "$@"

Is the PSEUDO_UNLOAD=1 variable really needed ? It seems to be related to the "pseudo" tool that OpenEmbedded is using, so we probably don't care.

Maybe this line could be written as:

GIO_MODULE_DIR=... \
	-r ... \
	-L ... \
	-E ... \
	"$@"

Also, like the ther scripts above, I think we prefer to avoid using $STAGING_DIR.

package/gobject-introspection/g-ir-scanner.in line 3

Quoted 9 lines
package/gobject-introspection/g-ir-scanner.in new file +3 -0
new file mode 100644
index 0000000000..71b1871cfd
@@ -0,0 +1,3 @@
+#!/bin/sh
+export GI_SCANNER_DISABLE_CACHE=1
+$HOST_DIR/bin/g-ir-scanner --lib-dirs-envvar=GIR_EXTRA_LIBS_PATH --use-binary-wrapper=$STAGING_DIR/usr/bin/g-ir-scanner-qemuwrapper --use-ldd-wrapper=$STAGING_DIR/usr/bin/g-ir-scanner-lddwrapper --add-include-path=$STAGING_DIR/usr/share/gir-1.0 "$@"

Same comments here.

Quoted 10 lines
package/gobject-introspection/gobject-introspection.mk new file +4 -0
new file mode 100644
index 0000000000..d36db1d66f
@@ -0,0 +1,101 @@
+################################################################################
+#
+# gobject-introspection
+#

package/gobject-introspection/gobject-introspection.mk line 14

Quoted 10 lines
package/gobject-introspection/gobject-introspection.mk new file +10 -0
+################################################################################
+
+GOBJECT_INTROSPECTION_VERSION_MAJOR = 1.56
+GOBJECT_INTROSPECTION_VERSION = $(GOBJECT_INTROSPECTION_VERSION_MAJOR).1
+GOBJECT_INTROSPECTION_SITE = http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/$(GOBJECT_INTROSPECTION_VERSION_MAJOR)
+GOBJECT_INTROSPECTION_SOURCE = gobject-introspection-$(GOBJECT_INTROSPECTION_VERSION).tar.xz
+GOBJECT_INTROSPECTION_DEPENDENCIES = libffi zlib libglib2 host-qemu host-gobject-introspection host-prelink-cross
+GOBJECT_INTROSPECTION_INSTALL_STAGING = YES
+GOBJECT_INTROSPECTION_AUTORECONF = YES
+GOBJECT_INTROSPECTION_LICENSE = Dual LGPLv2+/GPLv2+

LGPL-2.0+ or GPL-2.0+

(but I haven't checked the actual licensing)

package/gobject-introspection/gobject-introspection.mk line 20

Quoted 6 lines
package/gobject-introspection/gobject-introspection.mk new file +6 -0
+GOBJECT_INTROSPECTION_LICENSE_FILES = COPYING.LGPL COPYING.GPL
+HOST_GOBJECT_INTROSPECTION_DEPENDENCIES = host-libglib2 host-flex host-bison
+
+GOBJECT_INTROSPECTION_CONF_OPTS = \
+	--enable-host-gi \
+	--disable-static \

As we discussed, this option should go away.

package/gobject-introspection/gobject-introspection.mk line 26

Quoted 6 lines
package/gobject-introspection/gobject-introspection.mk new file +6 -0
+	--enable-gi-cross-wrapper=$(STAGING_DIR)/usr/bin/g-ir-scanner-qemuwrapper \
+	--enable-gi-ldd-wrapper=$(STAGING_DIR)/usr/bin/g-ir-scanner-lddwrapper \
+	--enable-introspection-data
+
+ifeq ($(BR2_PACKAGE_CAIRO),y)
+GOBJECT_INTROSPECTION_DEPENDENCIES += cairo

Please add the appropriate with/without options.

package/gobject-introspection/gobject-introspection.mk line 30

Quoted 4 lines
package/gobject-introspection/gobject-introspection.mk new file +4 -0
+endif
+ifeq ($(BR2_PACKAGE_LIBFFI),y)
+GOBJECT_INTROSPECTION_DEPENDENCIES += libffi
+endif

This is not needed, libffi is a mandatory dependency.

package/gobject-introspection/gobject-introspection.mk line 35

Quoted 5 lines
package/gobject-introspection/gobject-introspection.mk new file +5 -0
+
+ifeq ($(BR2_PACKAGE_PYTHON),y)
+GOBJECT_INTROSPECTION_DEPENDENCIES += python
+HOST_GOBJECT_INTROSPECTION_DEPENDENCIES += host-python
+GOBJECT_INTROSPECTION_PYTHON_PATH="$(STAGING_DIR)/usr/bin/python2"

Spaces around =, no need for double quotes. Please name
this ...PYTHON_CONFIG, and make it point to python config. Calling this PYTHON_PATH is confusing, because PYTHON_PATH is generally "where Python modules are installed".

package/gobject-introspection/gobject-introspection.mk line 39

Quoted 4 lines
package/gobject-introspection/gobject-introspection.mk new file +4 -0
+else
+GOBJECT_INTROSPECTION_DEPENDENCIES += python3
+HOST_GOBJECT_INTROSPECTION_DEPENDENCIES += host-python3
+GOBJECT_INTROSPECTION_PYTHON_PATH="$(STAGING_DIR)/usr/bin/python3"

Ditto.

package/gobject-introspection/gobject-introspection.mk line 45

Quoted 6 lines
package/gobject-introspection/gobject-introspection.mk new file +6 -0
+endif
+
+# GI_SCANNER_DISABLE_CACHE=1 prevents g-ir-scanner from writing cache data to $HOME
+HOST_GOBJECT_INTROSPECTION_CONF_ENV = \
+	GI_SCANNER_DISABLE_CACHE=1 \
+	HOST_GOBJECT_INTROSPECTION_GIR_EXTRA_LIBS_PATH=$(@D)/.libs

Why HOST_GOBJECT_INTROSPECTION_CONF_ENV contains a variable that itself is prefixed with HOST_GOBJECT_INTROSPECTION ? this looks weird.

package/gobject-introspection/gobject-introspection.mk line 50

Quoted 5 lines
package/gobject-introspection/gobject-introspection.mk new file +5 -0
+
+# GI_SCANNER_DISABLE_CACHE=1 prevents g-ir-scanner from writing cache data to $HOME
+GOBJECT_INTROSPECTION_CONF_ENV = \
+	GI_SCANNER_DISABLE_CACHE=1 \
+	GOBJECT_INTROSPECTION_GIR_EXTRA_LIBS_PATH=$(@D)/.libs \

Same question.

package/gobject-introspection/gobject-introspection.mk line 51

Quoted 1 line
package/gobject-introspection/gobject-introspection.mk new file +1 -0
+	PYTHON_INCLUDES="`$(GOBJECT_INTROSPECTION_PYTHON_PATH)-config --includes`"

Use PYTHON_CONFIG as we discussed live.

package/gobject-introspection/gobject-introspection.mk line 55

Quoted 4 lines
package/gobject-introspection/gobject-introspection.mk new file +4 -0
+
+# Make sure g-ir-tool-template uses the host python.
+define GOBJECT_INTROSPECTION_FIX_TOOLTEMPLATE_PYTHON_PATH
+	sed -i -e '1s,#!.*,#!$(HOST_DIR)/bin/python,' $(@D)/tools/g-ir-tool-template.in

I'm not sure why you need this. g-ir-tool-template.in contains:

#!/usr/bin/env @PYTHON@

Where @PYTHON@ is I guess replaced by the autoconf machinery with the detected Python, which should be $(HOST_DIR)/bin/python.

package/gobject-introspection/gobject-introspection.mk line 58

Quoted 3 lines
package/gobject-introspection/gobject-introspection.mk new file +3 -0
+endef
+GOBJECT_INTROSPECTION_PRE_CONFIGURE_HOOKS = GOBJECT_INTROSPECTION_FIX_TOOLTEMPLATE_PYTHON_PATH
+HOST_GOBJECT_INTROSPECTION_PRE_CONFIGURE_HOOKS = GOBJECT_INTROSPECTION_FIX_TOOLTEMPLATE_PYTHON_PATH

Use += when registering hooks.

package/gobject-introspection/gobject-introspection.mk line 62

Quoted 4 lines
package/gobject-introspection/gobject-introspection.mk new file +4 -0
+
+GOBJECT_INTROSPECTION_WRAPPERS = \
+	g-ir-compiler \
+	g-ir-scanner

This list is only used once, I'm not sure it's really useful to have it as a separate variable.

package/gobject-introspection/gobject-introspection.mk line 70

Quoted 8 lines
package/gobject-introspection/gobject-introspection.mk new file +8 -0
+
+# These wrappers allow gobject-introspection to build the internal introspection
+# libraries during the build process.
+define GOBJECT_INTROSPECTION_INSTALL_PRE_WRAPPERS
+	$(INSTALL) -D -m 755 package/gobject-introspection/g-ir-scanner-lddwrapper.in $(STAGING_DIR)/usr/bin/g-ir-scanner-lddwrapper
+	$(INSTALL) -D -m 755 package/gobject-introspection/g-ir-scanner-qemuwrapper.in $(STAGING_DIR)/usr/bin/g-ir-scanner-qemuwrapper
+	$(SED) "s|@QEMU_USER@|$(QEMU_USER)|g" $(STAGING_DIR)/usr/bin/g-ir-scanner-qemuwrapper
+	$(SED) "s|@TOOLCHAIN_HEADERS_VERSION@|$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)|g" $(STAGING_DIR)/usr/bin/g-ir-scanner-qemuwrapper

Could you split those long lines ?

I'm wondering if preparing those wrappers belong to the target variant or not, but the boundary between what the host variant and what the target variant does is still a bit fuzzy to me. Let's keep herere for now.

package/gobject-introspection/gobject-introspection.mk line 75

Quoted 5 lines
package/gobject-introspection/gobject-introspection.mk new file +5 -0
+	# Use a modules directory which does not exist so we don't load random things
+	# which may then get deleted (or their dependencies) and potentially segfault
+	mkdir -p $(STAGING_DIR)/usr/lib/gio/modules-dummy
+endef
+GOBJECT_INTROSPECTION_POST_PATCH_HOOKS = GOBJECT_INTROSPECTION_INSTALL_PRE_WRAPPERS

+=

package/gobject-introspection/gobject-introspection.mk line 81

Quoted 5 lines
package/gobject-introspection/gobject-introspection.mk new file +5 -0
+# In order for gobject-introspection to work, qemu needs to run temporarily
+# to create binaries on the fly by g-ir-scanner. This involves creating
+# several wrapper scripts to accomplish the task:
+# g-ir-scanner-qemuwrapper, g-ir-compiler-wrapper,
+# g-ir-scanner-lddwrapper, g-ir-scanner-wrapper, g-ir-compiler-wrapper.

Well, the below only does something with g-ir-compiler and g-ir-scanner.

package/gobject-introspection/gobject-introspection.mk line 88

Quoted 7 lines
package/gobject-introspection/gobject-introspection.mk new file +7 -0
+define GOBJECT_INTROSPECTION_INSTALL_WRAPPERS
+	# Move the real binaries to their names.real, then replace them with
+	# the wrappers.
+	$(foreach w,$(GOBJECT_INTROSPECTION_WRAPPERS),
+		mv $(STAGING_DIR)/usr/bin/$(w) $(STAGING_DIR)/usr/bin/$(w).real
+		$(INSTALL) -D -m 755 \
+		package/gobject-introspection/$(w).in $(STAGING_DIR)/usr/bin/$(w)

Indent this second line.

package/gobject-introspection/gobject-introspection.mk line 91

Quoted 3 lines
package/gobject-introspection/gobject-introspection.mk new file +3 -0
+	)
+	$(SED) "s at g_ir_scanner=.*@g_ir_scanner=/usr/bin/g-ir-scanner at g" \
+	$(STAGING_DIR)/usr/lib/pkgconfig/gobject-introspection-1.0.pc

Ditto.

package/gobject-introspection/gobject-introspection.mk line 96

Quoted 5 lines
package/gobject-introspection/gobject-introspection.mk new file +5 -0
+
+	# The pkgconfig file needs to point towards the wrappers instead of the native
+	# binaries.
+	$(SED) "s at g_ir_compiler=.*@g_ir_compiler=/usr/bin/g-ir-compiler at g" \
+	$(STAGING_DIR)/usr/lib/pkgconfig/gobject-introspection-1.0.pc

Ditto.

Maybe you can standardize a bit on the SED separator, you're using comma, @ and | within this package.

package/gobject-introspection/gobject-introspection.mk line 97

Quoted 2 lines
package/gobject-introspection/gobject-introspection.mk new file +2 -0
+endef
+GOBJECT_INTROSPECTION_POST_INSTALL_STAGING_HOOKS = GOBJECT_INTROSPECTION_INSTALL_WRAPPERS

+=

package/pkg-autotools.mk endif · line 165

Quoted 12 lines
package/gobject-introspection/gobject-introspection.mk new file +3 -0
+
+$(eval $(autotools-package))
+$(eval $(host-autotools-package))
package/pkg-autotools.mk +1 -0
index 45de99356f..06021f95c1 100644
@@ -162,6 +162,7 @@ endif
 
 $(2)_CONF_ENV			?=
 $(2)_CONF_OPTS			?=
+$(2)_GIR_EXTRA_LIBS_PATH	?=

Why ?

package/pkg-autotools.mk endef · line 243

Quoted 8 lines
package/pkg-autotools.mk +1 -0
 $(2)_MAKE_ENV			?=
 $(2)_MAKE_OPTS			?=
 $(2)_INSTALL_OPTS                ?= install
@@ -239,6 +240,8 @@ endef
 endif
 endif
 
+export GIR_EXTRA_LIBS_PATH=$$($$(PKG)_GIR_EXTRA_LIBS_PATH)

This is horrible and just doesn't work. You're going to export GIR_EXTRA_LIBS_PATH with the value of whatever is the last parsed package. I don't see how this can work, and it's anyway not the Buildroot way of doing things.

Could you explain what you are trying to achieve ? Infrastructure changes also probably need to be split into a separate patch.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

PATCH v9 3/4 gobject-introspection: new package

Quoted 6 lines · Thomas Petazzoni
Quoted 1 line

+export GIR_EXTRA_LIBS_PATH=$$($$(PKG)_GIR_EXTRA_LIBS_PATH)

This is horrible and just doesn't work. You're going to export GIR_EXTRA_LIBS_PATH with the value of whatever is the last parsed package. I don't see how this can work, and it's anyway not the Buildroot way of doing things.

Of course it works - same way as exporting STAGING_DIR works in PPSH...

Both $(PKG) and $(<PKG>_GIR_EXTRA_LIBS_PATH) are only expanded when the
(configure, build, install) rule is executed. And those rules have a PKG=... modifier to make sure it is set to the actual package name.

Quoted 2 lines

Could you explain what you are trying to achieve ? Infrastructure changes also probably need to be split into a separate patch.

It makes it possible for an individual package using GIR to add extra libs. I
guess this will be required by some consumer.

I would only add this as a follow-up patch, to prepare for a package that is
actually going to use it. That makes the use case much clearer.

Regards,
Arnout

#5 lore raw

PATCH v9 3/4 gobject-introspection: new package

All;

Quoted 5 lines · Arnout Vandecappelle

On 05/02/2019 19:22, Thomas Petazzoni wrote:

Quoted 9 lines
Quoted 6 lines
Quoted 1 line

+export GIR_EXTRA_LIBS_PATH=$$($$(PKG)_GIR_EXTRA_LIBS_PATH)

This is horrible and just doesn't work. You're going to export GIR_EXTRA_LIBS_PATH with the value of whatever is the last parsed package. I don't see how this can work, and it's anyway not the Buildroot way of doing things.

Of course it works - same way as exporting STAGING_DIR works in PPSH...

Yes, this is why I use this syntax.

Quoted 11 lines

Both $(PKG) and $(<PKG>_GIR_EXTRA_LIBS_PATH) are only expanded when the
(configure, build, install) rule is executed. And those rules have a PKG=... modifier to make sure it is set to the actual package name.

Quoted 2 lines

Could you explain what you are trying to achieve ? Infrastructure changes also probably need to be split into a separate patch.

It makes it possible for an individual package using GIR to add extra libs. I
guess this will be required by some consumer.

Gstreamer specifically needs this.

Quoted 5 lines

I would only add this as a follow-up patch, to prepare for a package that is
actually going to use it. That makes the use case much clearer.

Regards,
Arnout

#6 lore raw

PATCH v9 4/4 gstreamer1 packages: add support for introspection

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

Now that there is support for gobject-introspection, we can add the appropriate configuration options to support compiling against gobject-introspection.

In addition: gst1-plugins-base requires a patch to drop a incorrect reference to sdp when compiling the rtsp gir file.

---
Changes v1 -> v4:
- Add patch to series.

Changes v4 -> v5:
- Changed --enable-introspection=yes to --enable-introspection (Yann)
- Changed += GIR_EXTRA_LIBS_PATH="$(@D)/gst/.libs:$(@D)/libs/gst/base/.libs"

    to GSTREAMER1_GIR_EXTRA_LIBS_PATH=$(@D)/gst/.libs:$(@D)/libs/gst/base/.libs

Chagnes v5 -> v6:
- None

Changes v6 -> v7:
- Refresh for changes since v6.

Changes v7 -> v9:
- None

 .../gst1-plugins-bad/gst1-plugins-bad.mk      |  5 ++++
 ...ect-reference-to-gstreamer-sdp-in-Ma.patch | 26 +++++++++++++++++++
 .../gst1-plugins-base/gst1-plugins-base.mk    |  5 ++++
 package/gstreamer1/gstreamer1/gstreamer1.mk   |  6 +++++
 4 files changed, 42 insertions(+)
 create mode 100644 package/gstreamer1/gst1-plugins-base/0001-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch
package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk +5 -0
index ac39f1e5ce..77795d8c69 100644
@@ -63,6 +63,11 @@ GST1_PLUGINS_BAD_CONF_OPTS += \
 
 GST1_PLUGINS_BAD_DEPENDENCIES = gst1-plugins-base gstreamer1
 
+ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
+GST1_PLUGINS_BAD_CONF_OPTS += --enable-introspection
+GST1_PLUGINS_BAD_GIR_EXTRA_LIBS_PATH=$(@D)/gst-libs/gst/allocators/.libs
+endif
+
 ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
 # RPI has odd locations for several required headers.
 GST1_PLUGINS_BAD_CONF_ENV += \
package/gstreamer1/gst1-plugins-base/0001-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch new file +26 -0
new file mode 100644
index 0000000000..07d4d8c476
@@ -0,0 +1,26 @@
+From 4330915d88dc4dd46eb4c28d756482b767c2747f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <[email protected]>
+Date: Mon, 26 Oct 2015 17:30:14 +0200
+Subject: [PATCH] rtsp: drop incorrect reference to gstreamer-sdp in Makefile.am
+
+Upstream-Status: Pending [review on oe-core maillist]
+Signed-off-by: Alexander Kanavin <[email protected]>
+Signed-off-by: Adam Duskett <[email protected]>
+---
+ gst-libs/gst/rtsp/Makefile.am | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am
+index 4f6d9f8..0afa370 100644
+--- a/gst-libs/gst/rtsp/Makefile.am
++++ b/gst-libs/gst/rtsp/Makefile.am
+@@ -79,7 +79,6 @@ GstRtsp- at [email protected]: $(INTROSPECTION_SCANNER) libgstrtsp- at GST_API_VERS
+ 		--libtool="$(LIBTOOL)" \
+ 		--pkg gio-2.0 \
+ 		--pkg gstreamer- at GST_API_VERSION@ \
+-		--pkg gstreamer-sdp- at GST_API_VERSION@ \
+ 		--pkg-export gstreamer-rtsp- at GST_API_VERSION@ \
+ 		--add-init-section="$(INTROSPECTION_INIT)" \
+ 		--output $@ \
+-- 
+2.6.2
package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk +5 -0
index fb976f9a94..d788d65495 100644
@@ -25,6 +25,11 @@ GST1_PLUGINS_BASE_CONF_OPTS += \
 
 GST1_PLUGINS_BASE_DEPENDENCIES = gstreamer1
 
+ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
+GST1_PLUGINS_BASE_CONF_OPTS += --enable-introspection
+GST1_PLUGINS_BASE_GIR_EXTRA_LIBS_PATH=$(@D)/gst-libs/gst/tag/.libs:$(@D)/gst-libs/gst/video/.libs:$(@D)/gst-libs/gst/audio/.libs:$(@D)/gst-libs/gst/rtp/.libs
+endif
+
 # These plugins are listed in the order from ./configure --help
 ifeq ($(BR2_PACKAGE_ORC),y)
 GST1_PLUGINS_BASE_DEPENDENCIES += orc
package/gstreamer1/gstreamer1/gstreamer1.mk +6 -0
index 76a74a0806..ae22a1985a 100644
@@ -32,4 +32,10 @@ GSTREAMER1_DEPENDENCIES = \
 	libglib2 \
 	$(if $(BR2_PACKAGE_LIBUNWIND),libunwind)
 
+ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
+GSTREAMER1_DEPENDENCIES += gobject-introspection
+GSTREAMER1_CONF_OPTS += --enable-introspection
+GSTREAMER1_GIR_EXTRA_LIBS_PATH=$(@D)/gst/.libs:$(@D)/libs/gst/base/.libs
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.19.2