1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
DESCRIPTION = "Chromium browser"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=537e0b52077bf0a616d0a0c8a79bc9d5"
DEPENDS = "xz-native pciutils pulseaudio xextproto cairo nss gtk+ zlib-native libav libxi libgnome-keyring libxss cups ninja-native gconf"
SRC_URI = "\
http://gsdview.appspot.com/chromium-browser-official/${P}.tar.xz \
file://include.gypi \
file://oe-defaults.gypi \
${@bb.utils.contains('PACKAGECONFIG', 'component-build', 'file://component-build.gypi', '', d)} \
file://unistd-2.patch \
file://google-chrome \
file://google-chrome.desktop \
"
SRC_URI[md5sum] = "c0659bc3c6b540e106e043fd27f54358"
SRC_URI[sha256sum] = "666d5948c6508072f9f5d6acff82290fa5939e1da1b94b042a1e05daf3357b61"
# include.gypi exists only for armv6 and armv7a and there isn't something like COMPATIBLE_ARCH afaik
COMPATIBLE_MACHINE = "(-)"
COMPATIBLE_MACHINE_i586 = "(.*)"
COMPATIBLE_MACHINE_x86-64 = "(.*)"
COMPATIBLE_MACHINE_armv6 = "(.*)"
COMPATIBLE_MACHINE_armv7a = "(.*)"
inherit gettext
EXTRA_OEGYP = " \
${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '', '-Dlinux_use_gold_binary=0', d)} \
${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '', '-Dlinux_use_gold_flags=0', d)} \
-I ${WORKDIR}/oe-defaults.gypi \
-I ${WORKDIR}/include.gypi \
${@bb.utils.contains('PACKAGECONFIG', 'component-build', '-I ${WORKDIR}/component-build.gypi', '', d)} \
-f ninja \
"
ARMFPABI_armv7a = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'arm_float_abi=hard', 'arm_float_abi=softfp', d)}"
export GYP_DEFINES="${ARMFPABI} release_extra_cflags='-Wno-error=unused-local-typedefs' sysroot=''"
do_configure() {
cd ${S}
# replace LD with CXX, to workaround a possible gyp issue?
LD="${CXX}" export LD
CC="${CC}" export CC
CXX="${CXX}" export CXX
CC_host="gcc" export CC_host
CXX_host="g++" export CXX_host
build/gyp_chromium --depth=. ${EXTRA_OEGYP}
}
do_compile() {
# build with ninja
ninja -C ${S}/out/Release chrome chrome_sandbox
}
do_install() {
install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/google-chrome ${D}${bindir}/
install -d ${D}${datadir}/applications
install -m 0644 ${WORKDIR}/google-chrome.desktop ${D}${datadir}/applications/
install -d ${D}${bindir}/chrome/
install -m 0755 ${S}/out/Release/chrome ${D}${bindir}/chrome/chrome
install -m 0644 ${S}/out/Release/resources.pak ${D}${bindir}/chrome/
install -m 0644 ${S}/out/Release/icudtl.dat ${D}${bindir}/chrome/
install -m 0644 ${S}/out/Release/content_resources.pak ${D}${bindir}/chrome/
install -m 0644 ${S}/out/Release/keyboard_resources.pak ${D}${bindir}/chrome/
install -m 0644 ${S}/out/Release/chrome_100_percent.pak ${D}${bindir}/chrome/
install -m 0644 ${S}/out/Release/product_logo_48.png ${D}${bindir}/chrome/
install -m 0755 ${S}/out/Release/libffmpegsumo.so ${D}${bindir}/chrome/
# Always adding this libdir (not just with component builds), because the
# LD_LIBRARY_PATH line in the google-chromium script refers to it
install -d ${D}${libdir}/chrome/
if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'component-build', 'component-build', '', d)}" ]; then
install -m 0755 ${S}/out/Release/lib/*.so ${D}${libdir}/chrome/
fi
install -d ${D}${sbindir}
install -m 4755 ${S}/out/Release/chrome_sandbox ${D}${sbindir}/chrome-devel-sandbox
install -d ${D}${bindir}/chrome/locales/
install -m 0644 ${S}/out/Release/locales/en-US.pak ${D}${bindir}/chrome/locales
}
FILES_${PN} = "${bindir}/chrome/ ${bindir}/google-chrome ${datadir}/applications ${sbindir}/ ${libdir}/chrome/"
FILES_${PN}-dbg += "${bindir}/chrome/.debug/ ${libdir}/chrome/.debug/"
PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src"
|