Skip to contentSkip to conversation

Add Chromium Embedded Framework library

PATCH In review Michael Drake 3 participants 35 messages Dec 5, 2019 – Jan 7, 2022

lore
Share & tools
lore
#0 lore raw

cover Add Chromium Embedded Framework library

Hi all,

This patch series adds the Chromium Embedded Framework library to Buildroot.

We've tried to address all feedback from the RFCs posted to this list, so thank you to everyone who has contributed to that.

If there are any further clarifications, we'll respond directly.

Features:
- cefsimple sample application
- Widevine support
- ARM cross compilation (tested on a Raspberry Pi)
- Intel VA-API
- Tested with internal and external toolchains (Crosstool-NG) for arm and x86_64.

The branch is split up into the following sections:
1. Buildroot changes to support libcef
2. The libcef package itself
3. libcef features, excluding V8 snapshot
4. A series of host packages required by the V8 snapshot feature
5. The V8 snapshot feature

Any more feedback would be greatly appreciated.

Many thanks,

Michael Drake

Changes since RFC v3 (high-level):
- Improved comments.
- Fixed arm cross-compilation.
- Fixed v8 snapshot feature dependency on system libs instead of buildroot host package libs.
- Fixed the generated libcef_dll_wrapper.a to be compatible with the buildroot toolchain. Previously it contained LLVM IR bytecode.
- Using [PATCH v8] which adds compiler-rt, with feedback applied.
- Included pkgconf --keep-system-libs fixup.

Changes since RFC v2 (high-level):
- Updated to CEF 78.2.9+g4907ec5+chromium-78.0.3904.70
- Now using bitbucket auto-archive feature
- Moved staging variables closer to the definition where they are used
- Using the new host-pkg-config wrapper based on pkgconf-personality fixup (we fixed up qt5webengine too).
- Wired up the Chromium use_sysroot and target_sysroot GN defines
- Added "host" architecture to LLVM targets (Chromium needs to build host binaries when cross compiling for ARM)
- Tidied up clang flags
- Added more comments describing is_official_build and the second output build directory (for building libcef_dll_wrapper).
- Removed cefclient because it has ancient dependencies
- Split out features into separate commits
- Moved patching to LIBCEF_PRE_PATCH_HOOKS
- Utilise the toolchain unbundling BUILD.gn
- Removed useless Python2 linking
- Install libEGL.so and libGLESv2.so, which are required by the browser

Joseph Kogut (1):
package/llvm: add config to build backend for host arch

Matt Weber (1):
package/compiler-rt: new package

Michael Drake (22):
package/libkrb5: Add host tools package.
package/webp: Enable host package build. package/Makefile.in: Provide TARGET_CROSS without path and trailing - package/libcef: New package
package/libcef: Add option to enable VA-API HW acceleration. package/libcef: Add proprietary codecs build option. package/widevine: Add package for the widevine CDM library. package/libcef: Widevine support depends on widevine package. package/alsa-lib/alsa-lib: Add host package. package/ffmpeg: Add host package.
package/libvpx: Add host package.
package/x11r7/xcb-util: Add host package. package/x11r7/xlib_libXScrnSaver: Add host package. package/x11r7/xlib_libXcomposite: Add host package. package/x11r7/xlib_libXext: Add host package. package/x11r7/xlib_libXi: Add host package. package/x11r7/xlib_libXrandr: Add host package. package/x11r7/xlib_libXtst: Add host package. package/pciutils: Enable host package.
package/libdrm: Add host package.
package/mesa3d: Add host package.
package/libcef: Add v8 Snapshot option.

Thomas Preston (6):
pkgconf: always keep system libs
pkgconf: Configure using pkgconf-personality package/qt5/qt5webengine: Use Buildroot's host-pkg-config wrapper package/jpeg-turbo: Add host install
package/libcef: Add option to build cefsimple. package/xlib_libXdamage: Add host package

 DEVELOPERS                                    |    1 +
 package/Config.in                             |    3 +
 package/Makefile.in                           |   13 +-
 package/alsa-lib/alsa-lib.mk                  |    1 +
 package/compiler-rt/Config.in                 |   14 +
 package/compiler-rt/compiler-rt.hash          |    3 +
 package/compiler-rt/compiler-rt.mk            |   37 +
 package/ffmpeg/ffmpeg.mk                      |   61 +
 package/jpeg-turbo/jpeg-turbo.mk              |    3 +
 ...et-pkg_config-wrapper-handle-sysroot.patch |   52 +
 ...e-cef_use_gtk-for-cefclient-GTK-deps.patch |   57 +
 .../libcef/0003-stop-widevine-assert.patch    |   24 +
 package/libcef/Config.in                      |  149 +++
 .../build/toolchain/linux/unbundle/BUILD.gn   |   55 +
 package/libcef/libcef.hash                    |    3 +
 package/libcef/libcef.license-files.inc       | 1131 +++++++++++++++++
 package/libcef/libcef.mk                      |  465 +++++++
 .../libcef/scripts/gather-license-files.sh    |   53 +
 package/libcef/scripts/version.sh             |   48 +
 package/libcef/templates/cef_version.h        |   70 +
 package/libdrm/libdrm.mk                      |    6 +
 package/libkrb5/libkrb5.mk                    |    1 +
 package/libvpx/libvpx.mk                      |   29 +
 package/llvm/Config.in                        |    6 +
 package/llvm/llvm.mk                          |   17 +-
 package/mesa3d/mesa3d.mk                      |   18 +
 package/pciutils/pciutils.mk                  |   19 +
 package/pkgconf/host-pkg-config.in            |   11 +
 package/pkgconf/host.personality.in           |    6 +
 package/pkgconf/pkg-config.in                 |   15 +-
 package/pkgconf/pkgconf.mk                    |   30 +-
 package/pkgconf/target.personality.in         |    6 +
 package/qt5/qt5webengine/host-pkg-config.in   |    6 -
 package/qt5/qt5webengine/qt5webengine.mk      |    7 +-
 package/webp/webp.mk                          |    5 +
 package/widevine/Config.in                    |    6 +
 package/widevine/widevine.mk                  |   38 +
 package/x11r7/xcb-util/xcb-util.mk            |    2 +
 .../xlib_libXScrnSaver/xlib_libXScrnSaver.mk  |    5 +
 .../xlib_libXcomposite/xlib_libXcomposite.mk  |    6 +
 .../x11r7/xlib_libXdamage/xlib_libXdamage.mk  |    5 +
 package/x11r7/xlib_libXext/xlib_libXext.mk    |    2 +
 package/x11r7/xlib_libXi/xlib_libXi.mk        |    7 +
 .../x11r7/xlib_libXrandr/xlib_libXrandr.mk    |    2 +
 package/x11r7/xlib_libXtst/xlib_libXtst.mk    |    7 +
 45 files changed, 2474 insertions(+), 31 deletions(-)
 create mode 100644 package/compiler-rt/Config.in
 create mode 100644 package/compiler-rt/compiler-rt.hash
 create mode 100644 package/compiler-rt/compiler-rt.mk
 create mode 100644 package/libcef/0001-pkg_config-Let-pkg_config-wrapper-handle-sysroot.patch
 create mode 100644 package/libcef/0002-BUILD.gn-Use-cef_use_gtk-for-cefclient-GTK-deps.patch
 create mode 100644 package/libcef/0003-stop-widevine-assert.patch
 create mode 100644 package/libcef/Config.in
 create mode 100644 package/libcef/build/toolchain/linux/unbundle/BUILD.gn
 create mode 100644 package/libcef/libcef.hash
 create mode 100644 package/libcef/libcef.license-files.inc
 create mode 100644 package/libcef/libcef.mk
 create mode 100755 package/libcef/scripts/gather-license-files.sh
 create mode 100755 package/libcef/scripts/version.sh
 create mode 100644 package/libcef/templates/cef_version.h
 create mode 100644 package/pkgconf/host-pkg-config.in
 create mode 100644 package/pkgconf/host.personality.in
 create mode 100644 package/pkgconf/target.personality.in
 delete mode 100644 package/qt5/qt5webengine/host-pkg-config.in
 create mode 100644 package/widevine/Config.in
 create mode 100644 package/widevine/widevine.mk
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/30 pkgconf: always keep system libs

From: Thomas Preston <[email protected]>

The previous change to pkgconf 9cc8680fe5, which tells it about the target sysroot system lib and include dirs so that they are not printed by default, introduced a regression where packages relying on libtool could no longer see Libtool Archive (.la) files in the system lib directory.

Since we still rely on pkgconf not printing the system include directory to allow the correct ordering of -I, -isystem and compiler default search paths, and it is still correct behaviour to tell pkgconf about the new system lib dir (in the target sysroot), we should not revert the previous change.

Instead, we should explicitly request pkgconf to print the system libs globally, so that all packages which rely on libtool can find the Libtool Archive files. For system lib directories, this is the same pkgconf behaviour as before the 9cc8680fe5 change.

Fixes:
- http://autobuild.buildroot.org/results/a79e0487135ad90530595d5c6ecc32f9c8cea7c4/
- http://autobuild.buildroot.net/results/089/08952dbf89bf3c49da7697943441cee411940420/

---
 package/pkgconf/pkg-config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/pkgconf/pkg-config.in +1 -1
index f411eb0926..e5a23a10f7 100644
@@ -9,4 +9,4 @@ PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:-${DEFAULT_PKG_CONFIG_LIBDIR}} \
 	PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:-${DEFAULT_PKG_CONFIG_SYSROOT_DIR}} \
 	PKG_CONFIG_SYSTEM_INCLUDE_PATH=${PKG_CONFIG_SYSTEM_INCLUDE_PATH:-${DEFAULT_PKG_CONFIG_SYSTEM_INCLUDE_PATH}} \
 	PKG_CONFIG_SYSTEM_LIBRARY_PATH=${PKG_CONFIG_SYSTEM_LIBRARY_PATH:-${DEFAULT_PKG_CONFIG_SYSTEM_LIBRARY_PATH}} \
-	exec ${PKGCONFDIR}/pkgconf @STATIC@ "$@"
+	exec ${PKGCONFDIR}/pkgconf --keep-system-libs @STATIC@ "$@"
Signature · 1 line
2.20.1
#2 lore raw

PATCH 1/30 pkgconf: always keep system libs

Michael, All,

On 2019-12-05 17:14 +0000, Michael Drake spake thusly:

Quoted 19 lines

From: Thomas Preston <[email protected]>

The previous change to pkgconf 9cc8680fe5, which tells it about the target sysroot system lib and include dirs so that they are not printed by default, introduced a regression where packages relying on libtool could no longer see Libtool Archive (.la) files in the system lib directory.

Since we still rely on pkgconf not printing the system include directory to allow the correct ordering of -I, -isystem and compiler default search paths, and it is still correct behaviour to tell pkgconf about the new system lib dir (in the target sysroot), we should not revert the previous change.

Instead, we should explicitly request pkgconf to print the system libs globally, so that all packages which rely on libtool can find the Libtool Archive files. For system lib directories, this is the same pkgconf behaviour as before the 9cc8680fe5 change.

Quoted 7 lines

Fixes:
- http://autobuild.buildroot.org/results/a79e0487135ad90530595d5c6ecc32f9c8cea7c4/
- http://autobuild.buildroot.net/results/089/08952dbf89bf3c49da7697943441cee411940420/

Applied to master. I added another related build failure to the list, for good measure.

Thanks.

Regards,
Yann E. MORIN.

Quoted 21 lines
---
 package/pkgconf/pkg-config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/pkgconf/pkg-config.in +1 -1
index f411eb0926..e5a23a10f7 100644
@@ -9,4 +9,4 @@ PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:-${DEFAULT_PKG_CONFIG_LIBDIR}} \
 	PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:-${DEFAULT_PKG_CONFIG_SYSROOT_DIR}} \
 	PKG_CONFIG_SYSTEM_INCLUDE_PATH=${PKG_CONFIG_SYSTEM_INCLUDE_PATH:-${DEFAULT_PKG_CONFIG_SYSTEM_INCLUDE_PATH}} \
 	PKG_CONFIG_SYSTEM_LIBRARY_PATH=${PKG_CONFIG_SYSTEM_LIBRARY_PATH:-${DEFAULT_PKG_CONFIG_SYSTEM_LIBRARY_PATH}} \
-	exec ${PKGCONFDIR}/pkgconf @STATIC@ "$@"
+	exec ${PKGCONFDIR}/pkgconf --keep-system-libs @STATIC@ "$@"
Signature · 6 lines
2.20.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 2/30 pkgconf: Configure using pkgconf-personality

In reply to Michael Drake

From: Thomas Preston <[email protected]>

The preferred way to configure pkgconf when cross-compiling is to use pkgconf-personality, rather than using environment variables.

This patch also adds the host pkg-config wrapper script so that packages which configure for the host and target from the same environement can get the correct pkg-config personaility.

However some misbehaving packages just call pkg-config, or even pkgconf directly, so we should still force those cases in the host environment by setting the other {BR2_,}PKG_CONFIG* variables.

The personality can be selected with a symbolic link mechanism, however in Buildroot we also want to configure the --static flag so we continue to use the pkg-config wrapper script and select personality via the flag.

---
 package/Makefile.in                   |  7 ++++++-
 package/pkgconf/host-pkg-config.in    | 11 ++++++++++
 package/pkgconf/host.personality.in   |  6 ++++++
 package/pkgconf/pkg-config.in         | 15 +++++---------
 package/pkgconf/pkgconf.mk            | 30 +++++++++++++++++++++++----
 package/pkgconf/target.personality.in |  6 ++++++
 6 files changed, 60 insertions(+), 15 deletions(-)
 create mode 100644 package/pkgconf/host-pkg-config.in
 create mode 100644 package/pkgconf/host.personality.in
 create mode 100644 package/pkgconf/target.personality.in
package/Makefile.in +6 -1
index 285e2837ef..47808292b0 100644
@@ -284,9 +284,14 @@ TARGET_CONFIGURE_OPTS = \
 	INTLTOOL_PERL=$(PERL)
 
 
+# Packages should respect PKG_CONFIG and use the host-pkg-config wrapper.
+# However some misbehaving packages just call pkg-config, or even pkgconf
+# directly, so we should force those cases in the host environment by setting
+# the other {BR2_,}PKG_CONFIG* variables.
 HOST_MAKE_ENV = \
 	PATH=$(BR_PATH) \
-	PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
+	PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY_HOST)" \
+	BR2_PKGCONF_PERSONALITY="$(GNU_HOST_NAME)" \
 	PKG_CONFIG_SYSROOT_DIR="/" \
 	PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
 	PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
package/pkgconf/host-pkg-config.in new file +11 -0
new file mode 100644
index 0000000000..c7ce8aea80
@@ -0,0 +1,11 @@
+#!/bin/sh
+# This is the Buildroot host pkgconf wrapper which is requried to allow host
+# packages to query system cflags and system libs. It can be used when a package
+# needs to build a binary for the host, but is unable to source the
+# HOST_MAKE_ENV.
+PKGCONFDIR=$(dirname $0)
+BR2_PKGCONF_PERSONALITY=${BR2_PKGCONF_PERSONALITY:- at DEFAULT_HOST_PERSONALITY@}
+exec ${PKGCONFDIR}/pkgconf \
+	--keep-system-cflags \
+	--keep-system-libs \
+	--personality=$BR2_PKGCONF_PERSONALITY "$@"
package/pkgconf/host.personality.in new file +6 -0
new file mode 100644
index 0000000000..8099d26435
@@ -0,0 +1,6 @@
+# Buildroot host pkgconf-personality
+Triplet: @GNU_HOST_NAME@
+SysrootDir: /
+DefaultSearchPaths: @HOST_DIR@/usr/lib/pkgconfig:@HOST_DIR@/usr/share/pkgconfig
+SystemIncludePaths: @HOST_DIR@/usr/include
+SystemLibraryPaths: @HOST_DIR@/usr/lib
package/pkgconf/pkg-config.in +5 -10
index e5a23a10f7..8e90de7f0c 100644
@@ -1,12 +1,7 @@
 #!/bin/sh
+# This is the Buildroot pkgconf wrapper which is requried to build static
+# libraries for the target.
 PKGCONFDIR=$(dirname $0)
-DEFAULT_PKG_CONFIG_LIBDIR=${PKGCONFDIR}/../@STAGING_SUBDIR@/usr/lib/pkgconfig:${PKGCONFDIR}/../@STAGING_SUBDIR@/usr/share/pkgconfig
-DEFAULT_PKG_CONFIG_SYSROOT_DIR=${PKGCONFDIR}/../@STAGING_SUBDIR@
-DEFAULT_PKG_CONFIG_SYSTEM_INCLUDE_PATH=${PKGCONFDIR}/../@STAGING_SUBDIR@/usr/include
-DEFAULT_PKG_CONFIG_SYSTEM_LIBRARY_PATH=${PKGCONFDIR}/../@STAGING_SUBDIR@/usr/lib
-
-PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:-${DEFAULT_PKG_CONFIG_LIBDIR}} \
-	PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:-${DEFAULT_PKG_CONFIG_SYSROOT_DIR}} \
-	PKG_CONFIG_SYSTEM_INCLUDE_PATH=${PKG_CONFIG_SYSTEM_INCLUDE_PATH:-${DEFAULT_PKG_CONFIG_SYSTEM_INCLUDE_PATH}} \
-	PKG_CONFIG_SYSTEM_LIBRARY_PATH=${PKG_CONFIG_SYSTEM_LIBRARY_PATH:-${DEFAULT_PKG_CONFIG_SYSTEM_LIBRARY_PATH}} \
-	exec ${PKGCONFDIR}/pkgconf --keep-system-libs @STATIC@ "$@"
+BR2_PKGCONF_PERSONALITY=${BR2_PKGCONF_PERSONALITY:- at DEFAULT_TARGET_PERSONALITY@}
+exec ${PKGCONFDIR}/pkgconf \
+	--personality=$BR2_PKGCONF_PERSONALITY --keep-system-libs @STATIC@ "$@"
package/pkgconf/pkgconf.mk +26 -4
index 1851ecfca4..28ea12be39 100644
@@ -9,7 +9,11 @@ PKGCONF_SITE = https://distfiles.dereferenced.org/pkgconf
 PKGCONF_SOURCE = pkgconf-$(PKGCONF_VERSION).tar.xz
 PKGCONF_LICENSE = pkgconf license
 PKGCONF_LICENSE_FILES = COPYING
+PKGCONF_HOST_PERSONALITYD = $(HOST_DIR)/share/pkgconfig/personality.d
 
+HOST_PKGCONF_CONF_OPTS += --with-personality-dir=$(PKGCONF_HOST_PERSONALITYD)
+
+PKG_CONFIG_HOST_BINARY_HOST = $(HOST_DIR)/bin/host-pkg-config
 PKG_CONFIG_HOST_BINARY = $(HOST_DIR)/bin/pkg-config
 
 define PKGCONF_LINK_PKGCONFIG
@@ -17,10 +21,28 @@ define PKGCONF_LINK_PKGCONFIG
 endef
 
 define HOST_PKGCONF_INSTALL_WRAPPER
-	$(INSTALL) -m 0755 -D package/pkgconf/pkg-config.in \
-		$(HOST_DIR)/bin/pkg-config
-	$(SED) 's, at STAGING_SUBDIR@,$(STAGING_SUBDIR),g' \
-		$(HOST_DIR)/bin/pkg-config
+	mkdir -p $(PKGCONF_HOST_PERSONALITYD)
+
+	# Install pkgconf target personality
+	sed -e 's, at STAGING_DIR@,$(STAGING_DIR),g' \
+		-e 's, at GNU_TARGET_NAME@,$(GNU_TARGET_NAME),g' \
+		$(PKGCONF_PKGDIR)/target.personality.in \
+		> $(PKGCONF_HOST_PERSONALITYD)/$(GNU_TARGET_NAME).personality
+	$(INSTALL) -m 0755 -D $(PKGCONF_PKGDIR)/pkg-config.in \
+		$(PKG_CONFIG_HOST_BINARY)
+	$(SED) 's, at DEFAULT_TARGET_PERSONALITY@,$(GNU_TARGET_NAME),g' \
+		$(PKG_CONFIG_HOST_BINARY)
+
+	# Install pkgconf host personality
+	sed -e 's, at HOST_DIR@,$(HOST_DIR),g' \
+		-e 's, at GNU_HOST_NAME@,$(GNU_HOST_NAME),g' \
+		$(PKGCONF_PKGDIR)/host.personality.in \
+		> $(PKGCONF_HOST_PERSONALITYD)/$(GNU_HOST_NAME).personality
+	$(INSTALL) -m 0755 -D $(PKGCONF_PKGDIR)/host-pkg-config.in \
+		$(PKG_CONFIG_HOST_BINARY_HOST)
+	$(SED) 's, at DEFAULT_HOST_PERSONALITY@,$(GNU_HOST_NAME),g' \
+		$(PKG_CONFIG_HOST_BINARY_HOST)
+
 endef
 
 define HOST_PKGCONF_STATIC
package/pkgconf/target.personality.in new file +6 -0
new file mode 100644
index 0000000000..3959d833ee
@@ -0,0 +1,6 @@
+# Buildroot target pkgconf-personality
+Triplet: @GNU_TARGET_NAME@
+SysrootDir: @STAGING_DIR@
+DefaultSearchPaths: @STAGING_DIR@/usr/lib/pkgconfig:@STAGING_DIR@/usr/share/pkgconfig
+SystemIncludePaths: @STAGING_DIR@/usr/include
+SystemLibraryPaths: @STAGING_DIR@/usr/lib
Signature · 1 line
2.20.1
#4 lore raw

PATCH 3/30 package/qt5/qt5webengine: Use Buildroot's host-pkg-config wrapper

In reply to Michael Drake

From: Thomas Preston <[email protected]>

Buildroot now has a host package config wrapper to use pkgconf with the host enviornment, so qt5webengine should use that instead of its own one.

---
 package/qt5/qt5webengine/host-pkg-config.in | 6 ------
 package/qt5/qt5webengine/qt5webengine.mk    | 7 +------
 2 files changed, 1 insertion(+), 12 deletions(-)
 delete mode 100644 package/qt5/qt5webengine/host-pkg-config.in
package/qt5/qt5webengine/host-pkg-config.in deleted +0 -6
deleted file mode 100644
index 86a980648b..0000000000
@@ -1,6 +0,0 @@
-#!/bin/sh
-PKG_CONFIG_SYSROOT_DIR="/" \
-PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
-PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
-PKG_CONFIG_LIBDIR="@HOST_DIR@/lib/pkgconfig:@HOST_DIR@/share/pkgconfig" \
-exec @HOST_DIR@/bin/pkgconf "$@"
package/qt5/qt5webengine/qt5webengine.mk +1 -6
index 1d5ee8d819..95666f5469 100644
@@ -55,12 +55,7 @@ QT5WEBENGINE_PRE_CONFIGURE_HOOKS += QT5WEBENGINE_PYTHON2_SYMLINK
 QT5WEBENGINE_ENV += NINJAFLAGS="-j$(PARALLEL_JOBS)"
 
 ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
-define QT5WEBENGINE_CREATE_HOST_PKG_CONFIG
-	sed s%@HOST_DIR@%$(HOST_DIR)%g $(QT5WEBENGINE_PKGDIR)/host-pkg-config.in > $(@D)/host-bin/host-pkg-config
-	chmod +x $(@D)/host-bin/host-pkg-config
-endef
-QT5WEBENGINE_PRE_CONFIGURE_HOOKS += QT5WEBENGINE_CREATE_HOST_PKG_CONFIG
-QT5WEBENGINE_ENV += GN_PKG_CONFIG_HOST=$(@D)/host-bin/host-pkg-config
+QT5WEBENGINE_ENV += GN_PKG_CONFIG_HOST=$(PKG_CONFIG_HOST_BINARY_HOST)
 endif
 
 define QT5WEBENGINE_CONFIGURE_CMDS
Signature · 1 line
2.20.1
#5 lore raw

PATCH 4/30 package/libkrb5: Add host tools package.

In reply to Michael Drake
---
 package/libkrb5/libkrb5.mk | 1 +
 1 file changed, 1 insertion(+)
package/libkrb5/libkrb5.mk +1 -0
index 7c199129a3..b132d49e4f 100644
@@ -58,3 +58,4 @@ LIBKRB5_CONF_OPTS += --disable-thread-support
 endif
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
2.20.1
#6 lore raw

PATCH 5/30 package/jpeg-turbo: Add host install

In reply to Michael Drake

From: Thomas Preston <[email protected]>

---
 package/jpeg-turbo/jpeg-turbo.mk | 3 +++
 1 file changed, 3 insertions(+)
package/jpeg-turbo/jpeg-turbo.mk +3 -0
index 0c75cf1db5..88c61dec94 100644
@@ -14,6 +14,8 @@ JPEG_TURBO_PROVIDES = jpeg
 JPEG_TURBO_DEPENDENCIES = host-pkgconf
 
 JPEG_TURBO_CONF_OPTS = -DWITH_JPEG8=ON
+# x86 simd support improves performance but needs host-nasm, so just turn it off
+HOST_JPEG_TURBO_CONF_OPTS += -DWITH_SIMD=OFF
 
 ifeq ($(BR2_STATIC_LIBS),y)
 JPEG_TURBO_CONF_OPTS += -DENABLE_STATIC=ON -DENABLE_SHARED=OFF
@@ -38,3 +40,4 @@ endef
 JPEG_TURBO_POST_INSTALL_TARGET_HOOKS += JPEG_TURBO_REMOVE_USELESS_TOOLS
 
 $(eval $(cmake-package))
+$(eval $(host-cmake-package))
Signature · 1 line
2.20.1
#7 lore raw

PATCH 6/30 package/llvm: add config to build backend for host arch

In reply to Michael Drake

From: Joseph Kogut <[email protected]>

When cross-compiling for a different architecture to the host, LLVM only has target architecture support. This change adds support for compiling for the host architecture as well.

---
 package/llvm/Config.in | 6 ++++++
 package/llvm/llvm.mk   | 6 +++++-
 2 files changed, 11 insertions(+), 1 deletion(-)
package/llvm/Config.in +6 -0
index 1d21d879da..ae96d30a64 100644
@@ -28,6 +28,12 @@ config BR2_PACKAGE_LLVM
 
 if BR2_PACKAGE_LLVM
 
+config BR2_PACKAGE_HOST_LLVM_HOST_ARCH
+	string
+	default "X86" if BR2_HOSTARCH = "x86" || BR2_HOSTARCH = "x86_64"
+	default "AArch64" if BR2_HOSTARCH="aarch64"
+	default "ARM" if BR2_HOSTARCH = "arm"
+
 config BR2_PACKAGE_LLVM_AMDGPU
 	bool "AMDGPU backend"
 	help
package/llvm/llvm.mk +5 -1
index 2b2bcf336e..300ac3e300 100644
@@ -42,7 +42,10 @@ LLVM_TARGET_ARCH = $(call qstrip,$(BR2_PACKAGE_LLVM_TARGET_ARCH))
 
 # Build backend for target architecture. This include backends like AMDGPU.
 LLVM_TARGETS_TO_BUILD = $(LLVM_TARGET_ARCH)
-HOST_LLVM_CONF_OPTS += -DLLVM_TARGETS_TO_BUILD="$(subst $(space),;,$(LLVM_TARGETS_TO_BUILD))"
+HOST_LLVM_TARGETS_TO_BUILD = \
+	$(LLVM_TARGETS_TO_BUILD) \
+	$(call qstrip,$(BR2_PACKAGE_HOST_LLVM_HOST_ARCH))
+HOST_LLVM_CONF_OPTS += -DLLVM_TARGETS_TO_BUILD="$(subst $(space),;,$(HOST_LLVM_TARGETS_TO_BUILD))"
 LLVM_CONF_OPTS += -DLLVM_TARGETS_TO_BUILD="$(subst $(space),;,$(LLVM_TARGETS_TO_BUILD))"
 
 # LLVM target to use for native code generation. This is required for JIT generation.
@@ -58,6 +61,7 @@ LLVM_CONF_OPTS += -DLLVM_TARGET_ARCH=$(LLVM_TARGET_ARCH)
 # output only $(LLVM_TARGET_ARCH) if not, and mesa3d won't build as
 # it thinks AMDGPU backend is not installed on the target.
 ifeq ($(BR2_PACKAGE_LLVM_AMDGPU),y)
+HOST_LLVM_TARGETS_TO_BUILD += AMDGPU
 LLVM_TARGETS_TO_BUILD += AMDGPU
 endif
 
Signature · 1 line
2.20.1
#8 lore raw

PATCH 6/30 package/llvm: add config to build backend for host arch

Hello Michael,

Le 05/12/2019 ? 18:14, Michael Drake a ?crit?:

Quoted 19 lines

From: Joseph Kogut <[email protected]>

When cross-compiling for a different architecture to the host, LLVM only has target architecture support. This change adds support for compiling for the host architecture as well.

---
 package/llvm/Config.in | 6 ++++++
 package/llvm/llvm.mk   | 6 +++++-
 2 files changed, 11 insertions(+), 1 deletion(-)
package/llvm/Config.in +0 -0
index 1d21d879da..ae96d30a64 100644

package/llvm/Config.in config BR2_PACKAGE_LLVM · line 30

Quoted 3 lines
package/llvm/Config.in +0 -0
@@ -28,6 +28,12 @@ config BR2_PACKAGE_LLVM
 
 if BR2_PACKAGE_LLVM
 

This should be outside of BR2_PACKAGE_LLVM, like BR2_PACKAGE_LLVM_TARGET_ARCH.

Quoted 14 lines
package/llvm/Config.in +6 -0
+config BR2_PACKAGE_HOST_LLVM_HOST_ARCH
+	string
+	default "X86" if BR2_HOSTARCH = "x86" || BR2_HOSTARCH = "x86_64"
+	default "AArch64" if BR2_HOSTARCH="aarch64"
+	default "ARM" if BR2_HOSTARCH = "arm"
+
 config BR2_PACKAGE_LLVM_AMDGPU
 	bool "AMDGPU backend"
 	help
package/llvm/llvm.mk +0 -0
index 2b2bcf336e..300ac3e300 100644

package/llvm/llvm.mk LLVM_TARGET_ARCH = $(call qstrip,$(BR2_PACKAGE_LLVM_TARGET_ARCH)) · line 48

Quoted 8 lines
package/llvm/llvm.mk +4 -1
@@ -42,7 +42,10 @@ LLVM_TARGET_ARCH = $(call qstrip,$(BR2_PACKAGE_LLVM_TARGET_ARCH))
 
 # Build backend for target architecture. This include backends like AMDGPU.
 LLVM_TARGETS_TO_BUILD = $(LLVM_TARGET_ARCH)
-HOST_LLVM_CONF_OPTS += -DLLVM_TARGETS_TO_BUILD="$(subst $(space),;,$(LLVM_TARGETS_TO_BUILD))"
+HOST_LLVM_TARGETS_TO_BUILD = \
+	$(LLVM_TARGETS_TO_BUILD) \
+	$(call qstrip,$(BR2_PACKAGE_HOST_LLVM_HOST_ARCH))
+HOST_LLVM_CONF_OPTS += -DLLVM_TARGETS_TO_BUILD="$(subst $(space),;,$(HOST_LLVM_TARGETS_TO_BUILD))"

Maybe we want to consider the case where llvm is supported by the host (BR2_PACKAGE_HOST_LLVM_HOST_ARCH is set) but not by the selected target (BR2_PACKAGE_LLVM_TARGET_ARCH is not set).

In this case LLVM_TARGETS_TO_BUILD would be -DLLVM_TARGETS_TO_BUILD=";X86" due to a space before the host target string (X86).

Some one may need host-llvm (ex qdoc) [1]

[1] http://patchwork.ozlabs.org/patch/1246516/

package/llvm/llvm.mk LLVM_CONF_OPTS += -DLLVM_TARGET_ARCH=$(LLVM_TARGET_ARCH) · line 64

Quoted 8 lines
package/llvm/llvm.mk +1 -0
 LLVM_CONF_OPTS += -DLLVM_TARGETS_TO_BUILD="$(subst $(space),;,$(LLVM_TARGETS_TO_BUILD))"
 
 # LLVM target to use for native code generation. This is required for JIT generation.
@@ -58,6 +61,7 @@ LLVM_CONF_OPTS += -DLLVM_TARGET_ARCH=$(LLVM_TARGET_ARCH)
 # output only $(LLVM_TARGET_ARCH) if not, and mesa3d won't build as
 # it thinks AMDGPU backend is not installed on the target.
 ifeq ($(BR2_PACKAGE_LLVM_AMDGPU),y)
+HOST_LLVM_TARGETS_TO_BUILD += AMDGPU

Ok, we need to keep AMDGPU here to keep llvm-config working for the cross build process.

Best regards,
Romain

Quoted 4 lines
package/llvm/llvm.mk +0 -0
 LLVM_TARGETS_TO_BUILD += AMDGPU
 endif
 
#9 lore raw

PATCH 7/30 package/compiler-rt: new package

In reply to Michael Drake

From: Matt Weber <[email protected]>

This patch adds support for the compiler-rt (CLANG runtime) library. It builds a set of static libraries and installs them into the CLANG/LLVM toolchain resource folder.

The compiler-rt fuzzer and address sanitizer tools require additional LLVM binary tools installed to allow stack trace decoding actively during executable analysis. This patch conditionally enables these tools.
https://github.com/google/sanitizers/wiki/AddressSanitizerCallStack

Cc Romain Naour <[email protected]>
Cc Ricardo Martincoski <[email protected]>
Cc Valentin Korenblit <[email protected]>
---
 DEVELOPERS                           |  1 +
 package/Config.in                    |  1 +
 package/compiler-rt/Config.in        | 14 +++++++++++
 package/compiler-rt/compiler-rt.hash |  3 +++
 package/compiler-rt/compiler-rt.mk   | 37 ++++++++++++++++++++++++++++
 package/llvm/llvm.mk                 | 11 ++++++++-
 6 files changed, 66 insertions(+), 1 deletion(-)
 create mode 100644 package/compiler-rt/Config.in
 create mode 100644 package/compiler-rt/compiler-rt.hash
 create mode 100644 package/compiler-rt/compiler-rt.mk
DEVELOPERS +1 -0
index a030be7890..b0b5c9153a 100644
@@ -1553,6 +1553,7 @@ F:	package/bridge-utils/
 F:	package/checkpolicy/
 F:	package/checksec/
 F:	package/cgroupfs-mount/
+F:	package/compiler-rt/
 F:	package/crda/
 F:	package/cunit/
 F:	package/dacapo/
package/Config.in +1 -0
index 9e2b78fe6a..e92e3550d7 100644
@@ -1716,6 +1716,7 @@ menu "Other"
 	source "package/clapack/Config.in"
 	source "package/classpath/Config.in"
 	source "package/cmocka/Config.in"
+	source "package/compiler-rt/Config.in"
 	source "package/cppcms/Config.in"
 	source "package/cracklib/Config.in"
 	source "package/dawgdic/Config.in"
package/compiler-rt/Config.in new file +14 -0
new file mode 100644
index 0000000000..9afc0d9d60
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_COMPILER_RT
+	bool "compiler-rt"
+	depends on BR2_PACKAGE_LLVM
+	depends on BR2_TOOLCHAIN_USES_GLIBC # asan lib requires
+	help
+	  A collection of runtime libraries primarily used by clang and
+	  llvm to provide builtins, sanitizer runtimes, and profiling
+	  at runtime.
+
+	  https://compiler-rt.llvm.org/
+
+comment "compiler-rt requires llvm to be enabled and a glibc toolchain"
+	depends on !BR2_PACKAGE_LLVM
+	depends on !BR2_TOOLCHAIN_USES_GLIBC
package/compiler-rt/compiler-rt.hash new file +3 -0
new file mode 100644
index 0000000000..cf2f1890ad
@@ -0,0 +1,3 @@
+# Locally computed:
+sha256 56e4cd96dd1d8c346b07b4d6b255f976570c6f2389697347a6c3dcb9e820d10e  compiler-rt-9.0.0.src.tar.xz
+sha256 dd27f8c290bcdc8368549cd7cd98710a9dbdc34122f2e096a1edb97824ed4148  LICENSE.TXT
package/compiler-rt/compiler-rt.mk new file +37 -0
new file mode 100644
index 0000000000..a661e393e0
@@ -0,0 +1,37 @@
+################################################################################
+#
+# compiler-rt
+#
+################################################################################
+
+# Compiler-RT should be bumped together with LLVM and Clang as the run-time is
+# tied to the version of those tools
+COMPILER_RT_VERSION = 9.0.0
+COMPILER_RT_SOURCE = compiler-rt-$(COMPILER_RT_VERSION).src.tar.xz
+COMPILER_RT_SITE = http://llvm.org/releases/$(COMPILER_RT_VERSION)
+COMPILER_RT_LICENSE = Apache-2.0 with exceptions
+COMPILER_RT_LICENSE_FILES = LICENSE.TXT
+COMPILER_RT_DEPENDENCIES = host-clang llvm
+
+COMPILER_RT_INSTALL_STAGING = YES
+COMPILER_RT_INSTALL_TARGET = NO
+
+COMPILER_RT_CONF_OPTS = \
+	-DCOMPILER_RT_STANDALONE_BUILD=ON \
+	-DCOMPILER_RT_DEFAULT_TARGET_TRIPLE=$(GNU_TARGET_NAME) \
+	-DLLVM_CONFIG_PATH=$(HOST_DIR)/usr/bin/llvm-config
+
+# The installation of the target runtime libraries defaults to DESTDIR, however
+# host-clang resources directory needs a link so Clang can find the runtime
+# libraries in the same location they would be if built as part of the Clang
+# build. The "resources" directory is loosely documented and seems to be
+# assumed, as compiler-rt is usually build at the same time as Clang and not
+# standalone.
+define COMPILER_RT_SETUP_RUNTIME_LIBS
+	mkdir -p $(HOST_DIR)/lib/clang/$(HOST_CLANG_VERSION)/lib
+	ln -sf ../../../../$(GNU_TARGET_NAME)/sysroot/usr/lib/linux $(HOST_DIR)/lib/clang/$(HOST_CLANG_VERSION)/lib/linux
+	ln -sf ../../../$(GNU_TARGET_NAME)/sysroot/usr/share $(HOST_DIR)/lib/clang/$(HOST_CLANG_VERSION)/share
+endef
+COMPILER_RT_POST_INSTALL_STAGING_HOOKS += COMPILER_RT_SETUP_RUNTIME_LIBS
+
+$(eval $(cmake-package))
package/llvm/llvm.mk +10 -1
index 300ac3e300..d15ca80d75 100644
@@ -220,8 +220,17 @@ HOST_LLVM_CONF_OPTS += \
 # We need to activate LLVM_INCLUDE_TOOLS, otherwise it does not generate
 # libLLVM.so
 LLVM_CONF_OPTS += \
-	-DLLVM_INCLUDE_TOOLS=ON \
+	-DLLVM_INCLUDE_TOOLS=ON
+
+# The llvm-symbolizer binary is used by the Compiler-RT Fuzzer
+# and AddressSanitizer tools for stack traces.
+ifeq ($(BR2_PACKAGE_COMPILER_RT),y)
+LLVM_CONF_OPTS += \
+	-DLLVM_BUILD_TOOLS=ON
+else
+LLVM_CONF_OPTS += \
 	-DLLVM_BUILD_TOOLS=OFF
+endif
 
 ifeq ($(BR2_PACKAGE_LLVM_RTTI),y)
 HOST_LLVM_CONF_OPTS += -DLLVM_ENABLE_RTTI=ON
Signature · 1 line
2.20.1
#10 lore raw

PATCH 8/30 package/webp: Enable host package build.

In reply to Michael Drake
---
 package/webp/webp.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/webp/webp.mk +5 -0
index d5df3f5da0..d67fe97bb7 100644
@@ -11,6 +11,10 @@ WEBP_LICENSE = BSD-3-Clause
 WEBP_LICENSE_FILES = COPYING
 WEBP_INSTALL_STAGING = YES
 
+HOST_WEBP_CONF_OPTS += \
+	--enable-libwebpmux \
+	--enable-libwebpdemux
+
 WEBP_CONF_OPTS += \
 	--with-jpegincludedir=$(STAGING_DIR)/usr/include \
 	--with-jpeglibdir=$(STAGING_DIR)/usr/lib \
@@ -54,3 +58,4 @@ WEBP_DEPENDENCIES += $(if $(BR2_PACKAGE_JPEG),jpeg)
 WEBP_DEPENDENCIES += $(if $(BR2_PACKAGE_TIFF),tiff)
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
2.20.1
#11 lore raw

PATCH 9/30 package/Makefile.in: Provide TARGET_CROSS without path and trailing -

In reply to Michael Drake

The LLVM/Clang toolchain takes the target triple as a --target= argument, rather than having separate binaries with different names for each target.

This change exposes just the triple as TARGET_CROSS_TRIPLE.

---
 package/Makefile.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
package/Makefile.in +4 -2
index 47808292b0..273e9de5d9 100644
@@ -192,11 +192,13 @@ TARGET_CXXFLAGS += -mid-shared-library -mshared-library-id=0
 endif
 
 ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
-TARGET_CROSS = $(HOST_DIR)/bin/$(GNU_TARGET_NAME)-
+TARGET_CROSS_TRIPLE = $(GNU_TARGET_NAME)
 else
-TARGET_CROSS = $(HOST_DIR)/bin/$(TOOLCHAIN_EXTERNAL_PREFIX)-
+TARGET_CROSS_TRIPLE = $(TOOLCHAIN_EXTERNAL_PREFIX)
 endif
 
+TARGET_CROSS = $(HOST_DIR)/bin/$(TARGET_CROSS_TRIPLE)-
+
 # Define TARGET_xx variables for all common binutils/gcc
 TARGET_AR       = $(TARGET_CROSS)ar
 TARGET_AS       = $(TARGET_CROSS)as
Signature · 1 line
2.20.1
#12 lore raw

PATCH 9/30 package/Makefile.in: Provide TARGET_CROSS without path and trailing -

Hi Michael,

Le 05/12/2019 ? 18:14, Michael Drake a ?crit?:

Quoted 17 lines

The LLVM/Clang toolchain takes the target triple as a --target= argument, rather than having separate binaries with different names for each target.

This change exposes just the triple as TARGET_CROSS_TRIPLE.

---
 package/Makefile.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
package/Makefile.in +0 -0
index 47808292b0..273e9de5d9 100644

package/Makefile.in TARGET_CXXFLAGS += -mid-shared-library -mshared-library-id=0 · line 195

Quoted 5 lines
package/Makefile.in +1 -1
@@ -192,11 +192,13 @@ TARGET_CXXFLAGS += -mid-shared-library -mshared-library-id=0
 endif
 
 ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
-TARGET_CROSS = $(HOST_DIR)/bin/$(GNU_TARGET_NAME)-
+TARGET_CROSS_TRIPLE = $(GNU_TARGET_NAME)

GNU_TARGET_NAME is used all over the place in Buildroot. Adding TARGET_CROSS_TRIPLE would require in the manual [1] to clarify the use of one or the other.

[1] docs/manual/adding-packages-generic.txt

package/Makefile.in TARGET_CXXFLAGS += -mid-shared-library -mshared-library-id=0 · line 200

Quoted 6 lines
package/Makefile.in +2 -1
 else
-TARGET_CROSS = $(HOST_DIR)/bin/$(TOOLCHAIN_EXTERNAL_PREFIX)-
+TARGET_CROSS_TRIPLE = $(TOOLCHAIN_EXTERNAL_PREFIX)
 endif
 
+TARGET_CROSS = $(HOST_DIR)/bin/$(TARGET_CROSS_TRIPLE)-

TOOLCHAIN_EXTERNAL_PREFIX can be used in a package, see [2] as example.

[2] https://git.buildroot.net/buildroot/tree/package/wine/wine.mk?h=2020.02-rc2#n39

Quoted 5 lines
package/Makefile.in +1 -0
+
 # Define TARGET_xx variables for all common binutils/gcc
 TARGET_AR       = $(TARGET_CROSS)ar
 TARGET_AS       = $(TARGET_CROSS)as
#13 lore raw

PATCH 10/30 package/libcef: New package

In reply to Michael Drake

Adds the Chromium Embedded Framework library.

The libcef library is built using the LLVM (clang) toolchain.

This is a library for creating applications with embedded web browser functionality. The Chromium Embedded Framework library itself does not include the Chromium source code.

The libcef build works by augmenting the Chromium build to include the extra Chromium Embedded Framework sources.

As such, this package fetches the libcef source, and also the corresponding Chromium source release. It extracts first the Chromium source into the package build directory, and then the libcef source into a cef/ subdirectory. This is the source tree layout required by the Chromium Embedded Framework project.

The Chromium Embedded Framework project carries some patches for the Chromium source, and these are applied in a pre-patch hook step.

Since Chromium is an enormous monolithic source tree containing many other projects, there are a lot of licenses involved. As such, we have a script to collect up the list of License files and generate an include makefile to list them. The script is provided in the package's scripts directory.

---
 package/Config.in                             |    1 +
 ...et-pkg_config-wrapper-handle-sysroot.patch |   52 +
 ...e-cef_use_gtk-for-cefclient-GTK-deps.patch |   57 +
 package/libcef/Config.in                      |   88 ++
 .../build/toolchain/linux/unbundle/BUILD.gn   |   55 +
 package/libcef/libcef.hash                    |    3 +
 package/libcef/libcef.license-files.inc       | 1131 +++++++++++++++++
 package/libcef/libcef.mk                      |  401 ++++++
 .../libcef/scripts/gather-license-files.sh    |   53 +
 package/libcef/scripts/version.sh             |   48 +
 package/libcef/templates/cef_version.h        |   70 +
 11 files changed, 1959 insertions(+)
 create mode 100644 package/libcef/0001-pkg_config-Let-pkg_config-wrapper-handle-sysroot.patch
 create mode 100644 package/libcef/0002-BUILD.gn-Use-cef_use_gtk-for-cefclient-GTK-deps.patch
 create mode 100644 package/libcef/Config.in
 create mode 100644 package/libcef/build/toolchain/linux/unbundle/BUILD.gn
 create mode 100644 package/libcef/libcef.hash
 create mode 100644 package/libcef/libcef.license-files.inc
 create mode 100644 package/libcef/libcef.mk
 create mode 100755 package/libcef/scripts/gather-license-files.sh
 create mode 100755 package/libcef/scripts/version.sh
 create mode 100644 package/libcef/templates/cef_version.h
package/Config.in +1 -0
index e92e3550d7..c6940d6694 100644
@@ -1604,6 +1604,7 @@ menu "Networking"
 	source "package/gupnp-dlna/Config.in"
 	source "package/ibrcommon/Config.in"
 	source "package/ibrdtn/Config.in"
+	source "package/libcef/Config.in"
 	source "package/libcgi/Config.in"
 	source "package/libcgicc/Config.in"
 	source "package/libcoap/Config.in"
package/libcef/0001-pkg_config-Let-pkg_config-wrapper-handle-sysroot.patch new file +52 -0

52 lines not on this page · raw message

package/libcef/0002-BUILD.gn-Use-cef_use_gtk-for-cefclient-GTK-deps.patch new file +57 -0

57 lines not on this page · raw message

package/libcef/Config.in new file +88 -0

88 lines not on this page · raw message

package/libcef/build/toolchain/linux/unbundle/BUILD.gn new file +55 -0

55 lines not on this page · raw message

package/libcef/libcef.hash new file +3 -0
new file mode 100644
index 0000000000..83cd0a82d8
@@ -0,0 +1,3 @@
+# Locally computed:
+sha256 ba170ef22a1b099ba5a023853a780a52e2408fbbcd6e36dda45dc82ba91ec03a  4907ec52f3fe52eea2c5b759f6bbf7c99a295afe.tar.bz2
+sha256 ddc5794097d65ba19c1ae359c2057b08921e7b38b7afe9d5ec45f5e8b9a87462  chromium-78.0.3904.70.tar.xz
package/libcef/libcef.license-files.inc new file +1131 -0

1,131 lines not on this page · raw message

package/libcef/libcef.mk new file +401 -0

401 lines not on this page · raw message

package/libcef/scripts/gather-license-files.sh new file +53 -0

53 lines not on this page · raw message

package/libcef/scripts/version.sh new file +48 -0

48 lines not on this page · raw message

package/libcef/templates/cef_version.h new file +70 -0

70 lines not on this page · raw message

Signature · 1 line
2.20.1
#14 lore raw

PATCH 11/30 package/libcef: Add option to build cefsimple.

In reply to Michael Drake

From: Thomas Preston <[email protected]>

This primitive browser is an example application which uses libcef.

Cc Patrick Glaser <[email protected]>
Cc Jon duSaint <[email protected]>
Cc Enis Lavery <[email protected]>
---
 package/libcef/Config.in | 9 +++++++++
 package/libcef/libcef.mk | 9 +++++++++
 2 files changed, 18 insertions(+)
package/libcef/Config.in +9 -0
index e0d8929bce..e74ed961f6 100644
@@ -86,3 +86,12 @@ config BR2_PACKAGE_LIBCEF
 	  Google Chromium web browser.
 
 	  https://bitbucket.org/chromiumembedded/cef
+
+if BR2_PACKAGE_LIBCEF
+
+config BR2_PACKAGE_LIBCEF_CEFSIMPLE
+	bool "Enable libcef example application cefsimple."
+	help
+	  Enables libcef example application cefsimple.
+
+endif
package/libcef/libcef.mk +9 -0
index 4eb9c557c6..c555f0d85b 100644
@@ -214,6 +214,15 @@ else
 LIBCEF_GN_DEFINES += use_pulseaudio=false
 endif
 
+ifeq ($(BR2_PACKAGE_LIBCEF_CEFSIMPLE),y)
+LIBCEF_BUILD_TARGETS += cefsimple
+define LIBCEF_INSTALL_CEFSIMPLE
+	$(INSTALL) -m 0755 -D -t $(TARGET_DIR)/usr/lib \
+		$(@D)/$(LIBCEF_BUILD_OUTPUT_DIR)/cefsimple
+endef
+LIBCEF_POST_INSTALL_TARGET_HOOKS += LIBCEF_INSTALL_CEFSIMPLE
+endif
+
 # To build libcef, the CEF project source must be extracted in a
 # `cef` directory inside the Chromium source tree.  We override
 # the buildroot default extract commands to get the desired source
Signature · 1 line
2.20.1
#15 lore raw

PATCH 12/30 package/libcef: Add option to enable VA-API HW acceleration.

In reply to Michael Drake
Cc Patrick Glaser <[email protected]>
Cc Jon duSaint <[email protected]>
Cc Enis Lavery <[email protected]>
---
 package/libcef/Config.in | 7 +++++++
 package/libcef/libcef.mk | 7 +++++++
 2 files changed, 14 insertions(+)
package/libcef/Config.in +7 -0
index e74ed961f6..b4f76e1dbe 100644
@@ -94,4 +94,11 @@ config BR2_PACKAGE_LIBCEF_CEFSIMPLE
 	help
 	  Enables libcef example application cefsimple.
 
+config BR2_PACKAGE_LIBCEF_VAAPI
+	bool "Enable va-api support in libcef."
+	depends on BR2_x86_64
+	select BR2_PACKAGE_LIBVA
+	help
+	  Enables VA-API-based hardware acceleration.
+
 endif
package/libcef/libcef.mk +7 -0
index c555f0d85b..bc616b6923 100644
@@ -214,6 +214,13 @@ else
 LIBCEF_GN_DEFINES += use_pulseaudio=false
 endif
 
+ifeq ($(BR2_PACKAGE_LIBCEF_VAAPI),y)
+LIBCEF_GN_DEFINES += use_vaapi=true
+LIBCEF_DEPENDENCIES += libva
+else
+LIBCEF_GN_DEFINES += use_vaapi=false
+endif
+
 ifeq ($(BR2_PACKAGE_LIBCEF_CEFSIMPLE),y)
 LIBCEF_BUILD_TARGETS += cefsimple
 define LIBCEF_INSTALL_CEFSIMPLE
Signature · 1 line
2.20.1
#16 lore raw

PATCH 13/30 package/libcef: Add proprietary codecs build option.

In reply to Michael Drake

This uses the Chromium bundled ffmpeg.

Cc Patrick Glaser <[email protected]>
Cc Jon duSaint <[email protected]>
Cc Enis Lavery <[email protected]>
---
 package/libcef/Config.in | 10 +++++++++-
 package/libcef/libcef.mk | 12 +++++++++---
 2 files changed, 18 insertions(+), 4 deletions(-)
package/libcef/Config.in +9 -1
index b4f76e1dbe..67113dacd0 100644
@@ -53,7 +53,7 @@ config BR2_PACKAGE_LIBCEF
 	select BR2_PACKAGE_ALSA_LIB
 	select BR2_PACKAGE_COMPILER_RT
 	select BR2_PACKAGE_DBUS
-	select BR2_PACKAGE_FFMPEG
+	select BR2_PACKAGE_FFMPEG if !BR2_PACKAGE_LIBCEF_PROPRIETARY_CODECS
 	select BR2_PACKAGE_FLAC
 	select BR2_PACKAGE_FREETYPE
 	select BR2_PACKAGE_HARFBUZZ
@@ -66,6 +66,7 @@ config BR2_PACKAGE_LIBCEF
 	select BR2_PACKAGE_LIBGTK3_X11
 	select BR2_PACKAGE_LIBKRB5
 	select BR2_PACKAGE_LIBNSS
+	select BR2_PACKAGE_LIBOPENH264 if BR2_PACKAGE_LIBCEF_PROPRIETARY_CODECS
 	select BR2_PACKAGE_LIBPNG
 	select BR2_PACKAGE_LIBXML2
 	select BR2_PACKAGE_LIBXSLT
@@ -101,4 +102,11 @@ config BR2_PACKAGE_LIBCEF_VAAPI
 	help
 	  Enables VA-API-based hardware acceleration.
 
+config BR2_PACKAGE_LIBCEF_PROPRIETARY_CODECS
+	bool "Enable proprietary codecs in libcef"
+	help
+	  Enable proprietary codecs in libcef. This uses
+	  the ffmpeg bundled in Chromium, rather than the
+	  ffmpeg buildroot package.
+
 endif
package/libcef/libcef.mk +9 -3
index bc616b6923..5508d34d13 100644
@@ -39,7 +39,6 @@ LIBCEF_DEPENDENCIES = \
 	cairo \
 	compiler-rt \
 	dbus \
-	ffmpeg \
 	flac \
 	fontconfig \
 	freetype \
@@ -109,7 +108,6 @@ LIBCEF_GN_DEFINES = \
 
 # Use Buildroot system libraries instead of Chromium third_party libraries
 LIBCEF_SYSTEM_LIBS = \
-	ffmpeg \
 	flac \
 	fontconfig \
 	freetype \
@@ -118,11 +116,19 @@ LIBCEF_SYSTEM_LIBS = \
 	libwebp \
 	libxml \
 	libxslt \
-	openh264 \
 	yasm
 
 LIBCEF_BUILD_TARGETS = libcef.so chrome_sandbox
 
+ifeq ($(BR2_PACKAGE_LIBCEF_PROPRIETARY_CODECS),y)
+LIBCEF_GN_DEFINES += \
+	ffmpeg_branding=\"Chrome\" \
+	proprietary_codecs=true
+else
+LIBCEF_DEPENDENCIES += ffmpeg
+LIBCEF_SYSTEM_LIBS += ffmpeg
+endif
+
 # We need to set our own flags in addition to the standard Buildroot ones.
 # Chromium may set warning flags that the LLVM toolchain in Buildroot
 # doesn't know about yet, because they use a bleeding edge toolchain.
Signature · 1 line
2.20.1
#17 lore raw

PATCH 14/30 package/widevine: Add package for the widevine CDM library.

In reply to Michael Drake
Cc Patrick Glaser <[email protected]>
Cc Jon duSaint <[email protected]>
Cc Enis Lavery <[email protected]>
---
 package/Config.in            |  1 +
 package/widevine/Config.in   |  6 ++++++
 package/widevine/widevine.mk | 38 ++++++++++++++++++++++++++++++++++++
 3 files changed, 45 insertions(+)
 create mode 100644 package/widevine/Config.in
 create mode 100644 package/widevine/widevine.mk
package/Config.in +1 -0
index c6940d6694..fbd780785b 100644
@@ -1697,6 +1697,7 @@ menu "Networking"
 	source "package/usbredir/Config.in"
 	source "package/wampcc/Config.in"
 	source "package/websocketpp/Config.in"
+	source "package/widevine/Config.in"
 	source "package/zeromq/Config.in"
 	source "package/zmqpp/Config.in"
 	source "package/zyre/Config.in"
package/widevine/Config.in new file +6 -0
new file mode 100644
index 0000000000..d730e6f9bd
@@ -0,0 +1,6 @@
+menuconfig BR2_PACKAGE_WIDEVINE
+	bool "widevine"
+	depends on BR2_i386 || BR2_x86_64
+	help
+	  Proprietary content decryption module (CDM) for the digital
+	  rights management (DRM) of internet content.
package/widevine/widevine.mk new file +38 -0
new file mode 100644
index 0000000000..a6e96ae99b
@@ -0,0 +1,38 @@
+################################################################################
+#
+# Widevine
+#
+################################################################################
+
+# Get latest version number from: https://dl.google.com/widevine-cdm/versions.txt
+WIDEVINE_VERSION = 4.10.1440.19
+
+ifeq ($(BR2_i386),y)
+WIDEVINE_ARCH = ia32
+else ifeq ($(BR2_x86_64),y)
+WIDEVINE_ARCH = x64
+endif
+
+WIDEVINE_SOURCE = $(WIDEVINE_VERSION)-linux-$(WIDEVINE_ARCH).zip
+WIDEVINE_SITE = https://dl.google.com/widevine-cdm
+WIDEVINE_LICENSE = Proprietary
+WIDEVINE_LICENSE_FILES = LICENSE.txt
+WIDEVINE_INSTALL_STAGING = YES
+
+define WIDEVINE_EXTRACT_CMDS
+	$(UNZIP) $(WIDEVINE_DL_DIR)/$(WIDEVINE_SOURCE) -d $(@D)
+endef
+
+define WIDEVINE_INSTALL_STAGING_CMDS
+	$(INSTALL) -D -m 0755 -t $(STAGING_DIR)/usr/lib \
+			$(@D)/libwidevinecdm.so \
+			$(@D)/manifest.json
+endef
+
+define WIDEVINE_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 -t $(TARGET_DIR)/usr/lib \
+			$(@D)/libwidevinecdm.so \
+			$(@D)/manifest.json
+endef
+
+$(eval $(generic-package))
Signature · 1 line
2.20.1
#18 lore raw

PATCH 15/30 package/libcef: Widevine support depends on widevine package.

In reply to Michael Drake
Cc Patrick Glaser <[email protected]>
Cc Jon duSaint <[email protected]>
Cc Enis Lavery <[email protected]>
---
 .../libcef/0003-stop-widevine-assert.patch    | 24 +++++++++++++++++++
 package/libcef/Config.in                      |  6 +++++
 package/libcef/libcef.mk                      |  7 ++++++
 3 files changed, 37 insertions(+)
 create mode 100644 package/libcef/0003-stop-widevine-assert.patch
package/libcef/0003-stop-widevine-assert.patch new file +24 -0
new file mode 100644
index 0000000000..da511d8c01
@@ -0,0 +1,24 @@
+From: Michael Drake <[email protected]>
+Date: Thu, 31 Oct 2019 17:14:20 +0000
+Subject: [PATCH] CEF: Don't enforce Widevine.
+
+Allow the library to be built without Widevine support.
+
+Signed-off-by: Michael Drake <[email protected]>
+Signed-off-by: Thomas Preston <[email protected]>
+
+diff --git a/BUILD.gn b/BUILD.gn
+index f5dd5cad..b37080cb 100644
+--- a/cef/BUILD.gn
++++ b/cef/BUILD.gn
+@@ -246,9 +246,6 @@ assert(enable_basic_printing)
+ assert(enable_print_preview)
+ assert(!enable_service_discovery)
+ 
+-# Enable support for Widevine CDM.
+-assert(enable_widevine)
+-
+ if (is_clang) {
+   # Don't use the chrome style plugin.
+   assert(!clang_use_chrome_plugins)
+
package/libcef/Config.in +6 -0
index 67113dacd0..bab584df30 100644
@@ -95,6 +95,12 @@ config BR2_PACKAGE_LIBCEF_CEFSIMPLE
 	help
 	  Enables libcef example application cefsimple.
 
+config BR2_PACKAGE_LIBCEF_WIDEVINE
+	bool "Enable Widevine support in libcef."
+	select BR2_PACKAGE_WIDEVINE
+	help
+	  Enables Widevine key system support.
+
 config BR2_PACKAGE_LIBCEF_VAAPI
 	bool "Enable va-api support in libcef."
 	depends on BR2_x86_64
package/libcef/libcef.mk +7 -0
index 5508d34d13..9d3b305451 100644
@@ -220,6 +220,13 @@ else
 LIBCEF_GN_DEFINES += use_pulseaudio=false
 endif
 
+ifeq ($(BR2_PACKAGE_LIBCEF_WIDEVINE),y)
+LIBCEF_GN_DEFINES += enable_widevine=true
+LIBCEF_DEPENDENCIES += widevine
+else
+LIBCEF_GN_DEFINES += enable_widevine=false
+endif
+
 ifeq ($(BR2_PACKAGE_LIBCEF_VAAPI),y)
 LIBCEF_GN_DEFINES += use_vaapi=true
 LIBCEF_DEPENDENCIES += libva
Signature · 1 line
2.20.1
#19 lore raw

PATCH 16/30 package/alsa-lib/alsa-lib: Add host package.

In reply to Michael Drake
---
 package/alsa-lib/alsa-lib.mk | 1 +
 1 file changed, 1 insertion(+)
package/alsa-lib/alsa-lib.mk +1 -0
index 72e6c34282..026f0be07c 100644
@@ -67,3 +67,4 @@ ALSA_LIB_CONF_ENV = \
 	LDFLAGS="$(TARGET_LDFLAGS) -lm"
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
2.20.1
#20 lore raw

PATCH 17/30 package/ffmpeg: Add host package.

In reply to Michael Drake
---
 package/ffmpeg/ffmpeg.mk | 61 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)
package/ffmpeg/ffmpeg.mk +61 -0
index 3dd2e3ef76..d20209d72b 100644
@@ -56,6 +56,46 @@ FFMPEG_CONF_OPTS = \
 	--disable-symver \
 	--disable-doc
 
+HOST_FFMPEG_CONF_OPTS = \
+	--enable-avfilter \
+	--disable-version3 \
+	--enable-logging \
+	--enable-optimizations \
+	--disable-extra-warnings \
+	--enable-avdevice \
+	--enable-avcodec \
+	--enable-avformat \
+	--enable-network \
+	--disable-gray \
+	--enable-swscale-alpha \
+	--disable-small \
+	--enable-dct \
+	--enable-fft \
+	--enable-mdct \
+	--enable-rdft \
+	--disable-crystalhd \
+	--disable-dxva2 \
+	--enable-runtime-cpudetect \
+	--disable-hardcoded-tables \
+	--disable-mipsdsp \
+	--disable-mipsdspr2 \
+	--disable-msa \
+	--enable-hwaccels \
+	--disable-cuda \
+	--disable-cuvid \
+	--disable-nvenc \
+	--disable-avisynth \
+	--disable-frei0r \
+	--disable-libopencore-amrnb \
+	--disable-libopencore-amrwb \
+	--disable-libdc1394 \
+	--disable-libgsm \
+	--disable-libilbc \
+	--disable-libvo-amrwbenc \
+	--disable-libxcb \
+	--disable-symver \
+	--disable-doc
+
 FFMPEG_DEPENDENCIES += host-pkgconf
 
 ifeq ($(BR2_PACKAGE_FFMPEG_GPL),y)
@@ -413,9 +453,12 @@ endif
 ifeq ($(BR2_X86_CPU_HAS_MMX),y)
 FFMPEG_CONF_OPTS += --enable-x86asm
 FFMPEG_DEPENDENCIES += host-nasm
+HOST_FFMPEG_DEPENDENCIES += host-nasm
 else
 FFMPEG_CONF_OPTS += --disable-x86asm
 FFMPEG_CONF_OPTS += --disable-mmx
+HOST_FFMPEG_CONF_OPTS += --disable-x86asm
+HOST_FFMPEG_CONF_OPTS += --disable-mmx
 endif
 
 ifeq ($(BR2_X86_CPU_HAS_SSE),y)
@@ -560,9 +603,27 @@ define FFMPEG_CONFIGURE_CMDS
 	)
 endef
 
+HOST_FFMPEG_CONF_ENV += CFLAGS="$(HOST_FFMPEG_CFLAGS)"
+
+# Override HOST_FFMPEG_CONFIGURE_CMDS: FFmpeg does not support --target and others
+define HOST_FFMPEG_CONFIGURE_CMDS
+	(cd $(HOST_FFMPEG_SRCDIR) && rm -rf config.cache && \
+	$(HOST_CONFIGURE_OPTS) \
+	$(HOST_CONFIGURE_ARGS) \
+	$(HOST_FFMPEG_CONF_ENV) \
+	./configure \
+		--prefix="$(HOST_DIR)" \
+		--enable-shared --disable-static \
+		--disable-doc \
+		--disable-debug \
+		$(HOST_FFMPEG_CONF_OPTS) \
+	)
+endef
+
 define FFMPEG_REMOVE_EXAMPLE_SRC_FILES
 	rm -rf $(TARGET_DIR)/usr/share/ffmpeg/examples
 endef
 FFMPEG_POST_INSTALL_TARGET_HOOKS += FFMPEG_REMOVE_EXAMPLE_SRC_FILES
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
2.20.1
#21 lore raw

PATCH 18/30 package/libvpx: Add host package.

In reply to Michael Drake
---
 package/libvpx/libvpx.mk | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
package/libvpx/libvpx.mk +29 -0
index aaef708416..c8debf27d5 100644
@@ -15,11 +15,16 @@ LIBVPX_CONF_ENV = \
 	LD="$(TARGET_CC)" \
 	CROSS=$(GNU_TARGET_NAME)
 
+HOST_LIBVPX_CONF_ENV = \
+	LD="$(HOST_CC)"
+
 LIBVPX_CONF_OPTS = \
 	--disable-examples \
 	--disable-docs \
 	--disable-unit-tests
 
+HOST_LIBVPX_CONF_OPTS = $(LIBVPX_CONF_OPTS)
+
 # This is not a true autotools package.  It is based on the ffmpeg build system
 define LIBVPX_CONFIGURE_CMDS
 	(cd $(LIBVPX_SRCDIR) && rm -rf config.cache && \
@@ -35,10 +40,29 @@ define LIBVPX_CONFIGURE_CMDS
 	)
 endef
 
+define HOST_LIBVPX_CONFIGURE_CMDS
+	(cd $(HOST_LIBVPX_SRCDIR) && rm -rf config.cache && \
+	$(HOST_CONFIGURE_OPTS) \
+	$(HOST_CONFIGURE_ARGS) \
+	$(HOST_LIBVPX_CONF_ENV) \
+	./configure \
+		--target=generic-gnu \
+		--enable-pic \
+		--prefix="$(HOST_DIR)" \
+		--enable-shared --disable-static \
+		--disable-debug \
+		$(HOST_LIBVPX_CONF_OPTS) \
+	)
+endef
+
 define LIBVPX_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(LIBVPX_MAKE_ENV) $(MAKE) -C $(@D) all
 endef
 
+define HOST_LIBVPX_BUILD_CMDS
+	$(HOST_MAKE_ENV) $(HOST_LIBVPX_MAKE_ENV) $(MAKE) -C $(@D) all
+endef
+
 define LIBVPX_INSTALL_STAGING_CMDS
 	$(TARGET_MAKE_ENV) $(LIBVPX_MAKE_ENV) $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(@D) install
 endef
@@ -47,4 +71,9 @@ define LIBVPX_INSTALL_TARGET_CMDS
 	$(TARGET_MAKE_ENV) $(LIBVPX_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D) install
 endef
 
+define HOST_LIBVPX_INSTALL_CMDS
+	$(HOST_MAKE_ENV) $(HOST_LIBVPX_MAKE_ENV) $(MAKE) -C $(@D) install
+endef
+
 $(eval $(generic-package))
+$(eval $(host-generic-package))
Signature · 1 line
2.20.1
#22 lore raw

PATCH 19/30 package/x11r7/xcb-util: Add host package.

In reply to Michael Drake
---
 package/x11r7/xcb-util/xcb-util.mk | 2 ++
 1 file changed, 2 insertions(+)
package/x11r7/xcb-util/xcb-util.mk +2 -0
index bb73530f94..9a4f927364 100644
@@ -11,5 +11,7 @@ XCB_UTIL_LICENSE = MIT
 XCB_UTIL_LICENSE_FILES = COPYING
 XCB_UTIL_INSTALL_STAGING = YES
 XCB_UTIL_DEPENDENCIES = libxcb
+HOST_XCB_UTIL_DEPENDENCIES = host-libxcb
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
2.20.1
#23 lore raw

PATCH 20/30 package/x11r7/xlib_libXScrnSaver: Add host package.

In reply to Michael Drake
---
 package/x11r7/xlib_libXScrnSaver/xlib_libXScrnSaver.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/x11r7/xlib_libXScrnSaver/xlib_libXScrnSaver.mk +5 -0
index 92abb902eb..0e37c49338 100644
@@ -11,6 +11,11 @@ XLIB_LIBXSCRNSAVER_LICENSE = MIT
 XLIB_LIBXSCRNSAVER_LICENSE_FILES = COPYING
 XLIB_LIBXSCRNSAVER_INSTALL_STAGING = YES
 XLIB_LIBXSCRNSAVER_DEPENDENCIES = xlib_libX11 xlib_libXext xorgproto
+HOST_XLIB_LIBXSCRNSAVER_DEPENDENCIES = \
+	host-xlib_libX11 \
+	host-xlib_libXext \
+	host-xorgproto
 XLIB_LIBXSCRNSAVER_CONF_OPTS = --disable-malloc0returnsnull
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
2.20.1
#24 lore raw

PATCH 21/30 package/x11r7/xlib_libXcomposite: Add host package.

In reply to Michael Drake
---
 package/x11r7/xlib_libXcomposite/xlib_libXcomposite.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/x11r7/xlib_libXcomposite/xlib_libXcomposite.mk +6 -0
index 80e94fe37c..f790d6fd3a 100644
@@ -11,5 +11,11 @@ XLIB_LIBXCOMPOSITE_LICENSE = MIT
 XLIB_LIBXCOMPOSITE_LICENSE_FILES = COPYING
 XLIB_LIBXCOMPOSITE_INSTALL_STAGING = YES
 XLIB_LIBXCOMPOSITE_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXfixes xorgproto
+HOST_XLIB_LIBXCOMPOSITE_DEPENDENCIES = \
+	host-xlib_libX11 \
+	host-xlib_libXext \
+	host-xlib_libXfixes \
+	host-xorgproto
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
2.20.1
#25 lore raw

PATCH 22/30 package/xlib_libXdamage: Add host package

In reply to Michael Drake

From: Thomas Preston <[email protected]>

---
 package/x11r7/xlib_libXdamage/xlib_libXdamage.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/x11r7/xlib_libXdamage/xlib_libXdamage.mk +5 -0
index cc5493ff6c..c98c28412a 100644
@@ -11,5 +11,10 @@ XLIB_LIBXDAMAGE_LICENSE = MIT
 XLIB_LIBXDAMAGE_LICENSE_FILES = COPYING
 XLIB_LIBXDAMAGE_INSTALL_STAGING = YES
 XLIB_LIBXDAMAGE_DEPENDENCIES = xlib_libX11 xlib_libXfixes xorgproto
+HOST_XLIB_LIBXDAMAGE_DEPENDENCIES = \
+	host-xlib_libX11 \
+	host-xlib_libXfixes \
+	host-xorgproto
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
2.20.1
#26 lore raw

PATCH 23/30 package/x11r7/xlib_libXext: Add host package.

In reply to Michael Drake
---
 package/x11r7/xlib_libXext/xlib_libXext.mk | 2 ++
 1 file changed, 2 insertions(+)
package/x11r7/xlib_libXext/xlib_libXext.mk +2 -0
index c63a3b23cc..90f6357e80 100644
@@ -11,6 +11,8 @@ XLIB_LIBXEXT_LICENSE = MIT
 XLIB_LIBXEXT_LICENSE_FILES = COPYING
 XLIB_LIBXEXT_INSTALL_STAGING = YES
 XLIB_LIBXEXT_DEPENDENCIES = xlib_libX11 xorgproto
+HOST_XLIB_LIBXEXT_DEPENDENCIES = host-xlib_libX11 host-xorgproto
 XLIB_LIBXEXT_CONF_OPTS = --disable-malloc0returnsnull
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
2.20.1
#27 lore raw

PATCH 24/30 package/x11r7/xlib_libXi: Add host package.

In reply to Michael Drake
---
 package/x11r7/xlib_libXi/xlib_libXi.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/x11r7/xlib_libXi/xlib_libXi.mk +7 -0
index de7f3a7d3c..96c4487a7f 100644
@@ -16,7 +16,14 @@ XLIB_LIBXI_DEPENDENCIES = \
 	xlib_libXext \
 	xlib_libXfixes \
 	xorgproto
+HOST_XLIB_LIBXI_DEPENDENCIES = \
+	host-pkgconf \
+	host-xlib_libX11 \
+	host-xlib_libXext \
+	host-xlib_libXfixes \
+	host-xorgproto
 
 XLIB_LIBXI_CONF_OPTS = --disable-malloc0returnsnull
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
2.20.1
#28 lore raw

PATCH 25/30 package/x11r7/xlib_libXrandr: Add host package.

In reply to Michael Drake
---
 package/x11r7/xlib_libXrandr/xlib_libXrandr.mk | 2 ++
 1 file changed, 2 insertions(+)
package/x11r7/xlib_libXrandr/xlib_libXrandr.mk +2 -0
index 23a0d974d0..a8080904af 100644
@@ -11,6 +11,8 @@ XLIB_LIBXRANDR_LICENSE = MIT
 XLIB_LIBXRANDR_LICENSE_FILES = COPYING
 XLIB_LIBXRANDR_INSTALL_STAGING = YES
 XLIB_LIBXRANDR_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXrender xorgproto
+HOST_XLIB_LIBXRANDR_DEPENDENCIES = host-xlib_libX11 host-xlib_libXext host-xlib_libXrender host-xorgproto
 XLIB_LIBXRANDR_CONF_OPTS = --disable-malloc0returnsnull
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
2.20.1
#29 lore raw

PATCH 26/30 package/x11r7/xlib_libXtst: Add host package.

In reply to Michael Drake
---
 package/x11r7/xlib_libXtst/xlib_libXtst.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/x11r7/xlib_libXtst/xlib_libXtst.mk +7 -0
index e0d7e8217c..38878b0e0e 100644
@@ -17,4 +17,11 @@ XLIB_LIBXTST_DEPENDENCIES = \
 	xlib_libXi \
 	xorgproto
 
+HOST_XLIB_LIBXTST_DEPENDENCIES = \
+	host-xlib_libX11 \
+	host-xlib_libXext \
+	host-xlib_libXi \
+	host-xorgproto
+
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
2.20.1
#30 lore raw

PATCH 27/30 package/pciutils: Enable host package.

In reply to Michael Drake
---
 package/pciutils/pciutils.mk | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
package/pciutils/pciutils.mk +19 -0
index 30d429e75a..b4bdbceefb 100644
@@ -19,6 +19,8 @@ PCIUTILS_MAKE_OPTS = \
 	AR=$(TARGET_AR) \
 	DNS=no
 
+HOST_PCIUTILS_MAKE_OPTS = HWDB=no ZLIB=no SHARED=no
+
 ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 PCIUTILS_DEPENDENCIES += udev
 PCIUTILS_MAKE_OPTS += HWDB=yes
@@ -71,4 +73,21 @@ define PCIUTILS_INSTALL_STAGING_CMDS
 		install install-lib install-pcilib
 endef
 
+define HOST_PCIUTILS_CONFIGURE_CMDS
+	$(SED) 's/wget --no-timestamping/wget/' $(PCIUTILS_DIR)/update-pciids.sh
+	$(SED) 's/^STRIP/#STRIP/' $(PCIUTILS_DIR)/Makefile
+endef
+
+define HOST_PCIUTILS_BUILD_CMDS
+	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_PCIUTILS_MAKE_OPTS) \
+		PREFIX=""
+endef
+
+define HOST_PCIUTILS_INSTALL_CMDS
+	$(HOST_MAKE_ENV) $(MAKE1) -C $(@D) $(HOST_PCIUTILS_MAKE_OPTS) \
+		PREFIX=$(HOST_DIR) SBINDIR=$(HOST_DIR)/bin \
+		install install-lib install-pcilib
+endef
+
 $(eval $(generic-package))
+$(eval $(host-generic-package))
Signature · 1 line
2.20.1
#31 lore raw

PATCH 28/30 package/libdrm: Add host package.

In reply to Michael Drake
---
 package/libdrm/libdrm.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/libdrm/libdrm.mk +6 -0
index f7c9205744..c97dfbb083 100644
@@ -18,6 +18,11 @@ LIBDRM_CONF_OPTS = \
 	-Dcairo-tests=false \
 	-Dmanpages=false
 
+HOST_LIBDRM_CONF_OPTS = \
+	-Dcairo-tests=false \
+	-Dmanpages=false \
+	-Dintel=false
+
 ifeq ($(BR2_PACKAGE_LIBATOMIC_OPS),y)
 LIBDRM_DEPENDENCIES += libatomic_ops
 ifeq ($(BR2_sparc_v8)$(BR2_sparc_leon3),y)
@@ -114,3 +119,4 @@ endif
 endif
 
 $(eval $(meson-package))
+$(eval $(host-meson-package))
Signature · 1 line
2.20.1
#32 lore raw

PATCH 29/30 package/mesa3d: Add host package.

In reply to Michael Drake
---
 package/mesa3d/mesa3d.mk | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
package/mesa3d/mesa3d.mk +18 -0
index fff498e777..1c0c592f61 100644
@@ -13,6 +13,23 @@ MESA3D_LICENSE_FILES = docs/license.html
 
 MESA3D_INSTALL_STAGING = YES
 
+HOST_MESA3D_DEPENDENCIES += \
+	host-libdrm \
+	host-libxcb \
+	host-xlib_libX11 \
+	host-xlib_libXext \
+	host-xlib_libXfixes \
+	host-xlib_libXrandr \
+	host-xorgproto
+
+HOST_MESA3D_CONF_OPTS = \
+	-Dplatforms=x11 \
+	-Dgles2=true \
+	-Dglx=xlib \
+	-Dgallium-drivers= \
+	-Dvulkan-drivers= \
+	-Ddri-drivers=
+
 MESA3D_PROVIDES =
 
 MESA3D_DEPENDENCIES = \
@@ -242,3 +259,4 @@ MESA3D_CONF_OPTS += -Dlmsensors=false
 endif
 
 $(eval $(meson-package))
+$(eval $(host-meson-package))
Signature · 1 line
2.20.1
#33 lore raw

PATCH 30/30 package/libcef: Add v8 Snapshot option.

In reply to Michael Drake

This is an optimisation for JavaScript context creation (e.g. opening new tabs).

---
 package/libcef/Config.in | 31 +++++++++++++++++++++++++++++++
 package/libcef/libcef.mk | 35 +++++++++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+)
package/libcef/Config.in +31 -0
index bab584df30..0dedd062e9 100644
@@ -95,6 +95,37 @@ config BR2_PACKAGE_LIBCEF_CEFSIMPLE
 	help
 	  Enables libcef example application cefsimple.
 
+comment "libcef v8 snapshots depends on a 64-bit target arch"
+	depends on !BR2_aarch64 && !BR2_x86_64
+
+config BR2_PACKAGE_LIBCEF_V8_SNAPSHOTS
+	bool "Enable v8 snapshots in libcef"
+	depends on BR2_aarch64 || BR2_x86_64
+	select BR2_PACKAGE_HOST_DBUS
+	select BR2_PACKAGE_HOST_FFMPEG
+	select BR2_PACKAGE_HOST_LIBXCB
+	select BR2_PACKAGE_HOST_PCIUTILS
+	select BR2_PACKAGE_HOST_XCB_UTIL
+	select BR2_PACKAGE_HOST_XLIB_LIBXTST
+	help
+	  Enables V8 snapshots.  This is an optimisation for
+	  JavaScript context creation (e.g. opening new tabs).
+	  It avoids needing to execute a whole load of JavaScript
+	  code that gets run on context initialisation.
+	  It works by building a browser for the host, creating
+	  a JavaScript context, and saving the JavaScript heap
+	  to file.  The target browser can then load the recorded
+	  JavaScript heap from file, instead of executing the
+	  JavaScript code.
+
+	  Note that since this requires building a browser for
+	  the host, it requires a lot of extra host packages
+	  to be built.  These host library packages need to have
+	  the same memory architecture (32 vs. 64 bit) as the
+	  target, because for the captured heap snapshot to be
+	  valid for the target, it must be captured with a binary
+	  which shares the same memory architecture.
+
 config BR2_PACKAGE_LIBCEF_WIDEVINE
 	bool "Enable Widevine support in libcef."
 	select BR2_PACKAGE_WIDEVINE
package/libcef/libcef.mk +35 -0
index 9d3b305451..e5a60e74ee 100644
@@ -220,6 +220,30 @@ else
 LIBCEF_GN_DEFINES += use_pulseaudio=false
 endif
 
+ifeq ($(BR2_PACKAGE_LIBCEF_V8_SNAPSHOTS),y)
+LIBCEF_GN_DEFINES += \
+	v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\" \
+	v8_use_snapshot=true
+LIBCEF_DEPENDENCIES += \
+	host-alsa-lib \
+	host-dbus \
+	host-ffmpeg \
+	host-libxcb \
+	host-mesa3d \
+	host-pciutils \
+	host-xcb-util \
+	host-xlib_libXcomposite \
+	host-xlib_libXcursor \
+	host-xlib_libXdamage \
+	host-xlib_libXrandr \
+	host-xlib_libXScrnSaver \
+	host-xlib_libXtst
+else
+LIBCEF_GN_DEFINES += \
+	v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\" \
+	v8_use_snapshot=false
+endif
+
 ifeq ($(BR2_PACKAGE_LIBCEF_WIDEVINE),y)
 LIBCEF_GN_DEFINES += enable_widevine=true
 LIBCEF_DEPENDENCIES += widevine
@@ -243,6 +267,17 @@ endef
 LIBCEF_POST_INSTALL_TARGET_HOOKS += LIBCEF_INSTALL_CEFSIMPLE
 endif
 
+ifeq ($(BR2_PACKAGE_LIBCEF_V8_SNAPSHOTS),y)
+define LIBCEF_INSTALL_V8_SNAPSHOT_BINARIES
+	# v8 snapshot binaries
+	$(INSTALL) -m 0644 -D -t $(TARGET_DIR)/usr/lib \
+		$(@D)/$(LIBCEF_BUILD_OUTPUT_DIR)/natives_blob.bin \
+		$(@D)/$(LIBCEF_BUILD_OUTPUT_DIR)/snapshot_blob.bin \
+		$(@D)/$(LIBCEF_BUILD_OUTPUT_DIR)/v8_context_snapshot.bin
+endef
+LIBCEF_POST_INSTALL_TARGET_HOOKS += LIBCEF_INSTALL_V8_SNAPSHOT_BINARIES
+endif
+
 # To build libcef, the CEF project source must be extracted in a
 # `cef` directory inside the Chromium source tree.  We override
 # the buildroot default extract commands to get the desired source
Signature · 1 line
2.20.1
#34 lore raw
In reply to Michael Drake

Michael, Thomas, All,

On 2019-12-05 17:14 +0000, Michael Drake spake thusly:

Quoted 2 lines

This patch series adds the Chromium Embedded Framework library to Buildroot.

We've discussed this series with the other maintainers today, and all we can say is that we are very sorry that we could not address it earlier.

You are more than aware that this is a huge series, with a lot of complicated packages. I did not have the guts to delve into it initially, and as more time passed, I dreaded even more going back and look at it. The other maintainers also felt similarly...

On the other hand, except for Romain who dared two comments, no one else ever replied or even pushed forward on that series; no one ever even sent a reply stating it was tested and worked for them..

It would have been nice to have chromium in the tree, I agree, but this is so big a stack that it is very hard to grasp and understand all that is going on in there...

As a consequence, we have marked this series as rejected in patchwork...

Thank you for contribution.

Regards,
Yann E. MORIN.

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot