Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chromium: Add chrome-virtual-keyboard recipe #503

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions meta-chromium/classes/chromium-extension-package.bbclass
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# class for defining extension dir for chromium
CHROMIUM_EXTENSION_DIR = "${datadir}/chromium/extensions"
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
SUMMARY = "Chromium Virtual Keyboard"
DESCRIPTION = "Virtual Keyboard Extension for Chromium/Chrome"
HOMEPAGE = "https://apps.xontab.com/VirtualKeyboard"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a8366463bacd4f2ec5edd419e8a113ff"

SRC_URI = " \
git://github.com/xontab/${BPN}.git \
"
SRCREV = "e2b9adf4885cc4ed600cd9bccb77e0df8ff549aa"
S = "${WORKDIR}/git"
PV = "1.11.3+git${SRCPV}"

inherit allarch chromium-extension-package

do_compile[noexec] = "1"

do_install() {
install -d ${D}${CHROMIUM_EXTENSION_DIR}/
cp -r ${S} ${D}${CHROMIUM_EXTENSION_DIR}/${BPN}

# remove unecessary artifacts
rm -f ${D}${CHROMIUM_EXTENSION_DIR}/${BPN}/_config.yml
rm -rf ${D}${CHROMIUM_EXTENSION_DIR}/${BPN}/.git/
}

FILES_${PN} += "${CHROMIUM_EXTENSION_DIR}/${BPN}"
6 changes: 4 additions & 2 deletions meta-chromium/recipes-browser/chromium/chromium-gn.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ require chromium.inc
require chromium-unbundle.inc
require gn-utils.inc

inherit features_check gtk-icon-cache qemu
inherit features_check gtk-icon-cache qemu chromium-extension-package

# The actual directory name in out/ is irrelevant for GN.
OUTPUT_DIR = "out/Release"
Expand Down Expand Up @@ -327,6 +327,8 @@ GN_ARGS:append:libc-musl = ' use_allocator_shim=false use_allocator="none"'
CHROMIUM_EXTRA_ARGS ?= " \
${@bb.utils.contains('PACKAGECONFIG', 'use-egl', '--use-gl=egl', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'kiosk-mode', '--kiosk --no-first-run --incognito', '', d)} \
--load-extension=\$(find ${CHROMIUM_EXTENSION_DIR} \
-type d -maxdepth 1 2>/dev/null | sed 1d | tr '\\\\n' , ) \
"

# V8's JIT infrastructure requires binaries such as mksnapshot and
Expand Down Expand Up @@ -443,7 +445,7 @@ do_install() {

# Add extra command line arguments to the chromium-wrapper script by
# modifying the dummy "CHROME_EXTRA_ARGS" line
sed -i "s/^CHROME_EXTRA_ARGS=\"\"/CHROME_EXTRA_ARGS=\"${CHROMIUM_EXTRA_ARGS}\"/" ${D}${libdir}/chromium/chromium-wrapper
sed -i "s#^CHROME_EXTRA_ARGS=\"\"#CHROME_EXTRA_ARGS=\"${CHROMIUM_EXTRA_ARGS}\"#" ${D}${libdir}/chromium/chromium-wrapper

# This is ANGLE, not to be confused with the similarly named files under swiftshader/
if [ -e libEGL.so ]; then
Expand Down