Skip to content

cef,chromium: build chromium from git source #3

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

Closed
wants to merge 1 commit into from
Closed
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

This file was deleted.

55 changes: 41 additions & 14 deletions recipes-browser/chromium/cef3_280796.bb
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,20 @@ RDEPENDS_${PN} += "pango cairo fontconfig pciutils pulseaudio freetype fontconfi
SRCREV_tools = "99bcb0e676eb396bcf8e1af3903aa4b578aeeee0"
SRCREV_cef = "bbad53dfca9f98dddcb31a590410fece0a4f0234"
SRCREV_egl = "a5b81b7617ba6757802b9b5f8c950034d5f961ec"
SRCREV_FORMAT = "cef_egl_tools"
SRCREV_FORMAT = "cef_egl"

SRC_URI = "http://people.linaro.org/~zoltan.kuscsik/chromium-browser/chromium_rev_${PV}.tar.xz \
git://github.com/kuscsik/chromiumembedded.git;protocol=https;destsuffix=src/cef;branch=aura;name=cef \
git://github.com/kuscsik/ozone-egl.git;protocol=https;destsuffix=src/ui/ozone/platform/egl;branch=master;name=egl \
git://chromium.googlesource.com/chromium/tools/depot_tools.git;protocol=https;destsuffix=depot_tools;branch=master;name=tools \
file://01_get_svn_version_from_LASTCHANGE.patch \
file://cef-simple \
"
SRC_URI[md5sum] = "9efbb50283b731042e62b9bd5e312b2f"
SRC_URI[sha256sum] = "f608e97dadf6ea4d885b24fd876896d46840fa39bf743ea2025075aee9fb348d"
SRC_URI = "git://chromium.googlesource.com/chromium/tools/depot_tools.git;protocol=https;destsuffix=depot_tools;branch=master;name=tools \
git://github.com/kuscsik/chromiumembedded.git;protocol=https;destsuffix=${S}/src/cef;branch=aura;name=cef \
git://github.com/kuscsik/ozone-egl.git;protocol=https;destsuffix=${S}/src/ui/ozone/platform/egl;branch=master;name=egl\
file://cef-simple\
"

S = "${WORKDIR}/chromium_rev_${PV}"
export CHROMIUM_SRC_GIT_URL="https://chromium.googlesource.com/chromium/src"
export CHROMIUM_SRC_GIT_COMMIT="e800fe7470fa87dc1ca5b148a7c2c41f603fdcbd"

do_fetch[vardeps] += "SRCREV_FORMAT SRCREV_cef SRCREV_egl SRCREV_tools"
S = "${WORKDIR}/chromium_rev_${PV}/"

do_fetch[vardeps] += "SRCREV_FORMAT SRCREV_cef SRCREV_egl"

GYP_ARCH_DEFINES_armv7a = " target_arch=arm arm_float_abi=hard"
GYP_ARCH_DEFINES_i586 = " target_arch=ia32"
Expand All @@ -30,14 +29,41 @@ export GYP_GENERATORS="ninja"
export BUILD_TARGET_ARCH="${TARGET_ARCH}"
export GYP_DEFINES="${GYP_ARCH_DEFINES} release_extra_cflags='-Wno-error=unused-local-typedefs' sysroot=''"

do_fetch_chromium_source_from_git() {
cd ${S}
export PATH=${WORKDIR}/depot_tools:"$PATH"

# Note: --deps-file needs to set to .DEPS.git for syncing to old
# chromium versions
gclient config ${CHROMIUM_SRC_GIT_URL} --deps-file=".DEPS.git"

# Runhooks is disabled. Running the hooks will trigger the
# gyp_chromium command replaced with cef_create_projects.sh by
# cef3.

gclient sync -f --nohooks --revision src@${CHROMIUM_SRC_GIT_COMMIT}

# We need the lastchange hook to generate the LASTCHANGE revision info
# file.

python src/build/util/lastchange.py -o src/build/util/LASTCHANGE
}

addtask fetch_chromium_source_from_git after do_patch before do_configure

do_configure_append() {
export PATH=${WORKDIR}/depot_tools:"$PATH"
# End of LD Workaround
#-----------------------
# Configure cef
#------------------------
cd cef
./cef_create_projects.sh -I ${BUILD_TARGET_ARCH}_ozone.gypi --depth ../
cd ${S}/src/cef

# Fatal linker warnings need to be disalbed to avoid linker issu
# with GCC 4.9:
# http://lists.openembedded.org/pipermail/openembedded-core/2014-August/095947.html

./cef_create_projects.sh -I ${BUILD_TARGET_ARCH}_ozone.gypi --depth ../ -Ddisable_fatal_linker_warnings=
cd -
}

Expand All @@ -47,5 +73,6 @@ do_qa_configure() {
}

do_compile() {
cd ${S}/src
ninja -C out/${CHROMIUM_BUILD_TYPE} cefsimple
}
2 changes: 1 addition & 1 deletion recipes-browser/chromium/chromium.inc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ do_install() {
install -Dm 0755 ${B}/out/${CHROMIUM_BUILD_TYPE}/cefsimple ${D}${bindir}/${BPN}/cefsimple
fi
if [ -f "${B}/out/${CHROMIUM_BUILD_TYPE}/lib/libcef.so" ]; then
install -Dm 0755 ${B}/out/${CHROMIUM_BUILD_TYPE}/lib/libcef.so ${D}${bindir}/lib/libcef.so
install -Dm 0755 ${B}/out/${CHROMIUM_BUILD_TYPE}/lib/libcef.so ${D}${libdir}/${BPN}/libcef.so
fi
if [ -f "${B}/out/${CHROMIUM_BUILD_TYPE}/chrome" ]; then
install -Dm 0755 ${B}/out/${CHROMIUM_BUILD_TYPE}/chrome ${D}${bindir}/${BPN}/chrome
Expand Down