aboutsummaryrefslogtreecommitdiff
path: root/recipes-browser/chromium/chromium_19.0.1049.3.bb
blob: e657c48c2abd9279645c0a6119e8d7fd8c2798e2 (plain)
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
DESCRIPTION = "Chromium browser"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3cb55cc4ec38bb01d2ceaaa66b5436c2"
DEPENDS = "xextproto cairo nss gtk+-native zlib-native libxi libgnome-keyring libxss cups"

SRC_URI = "http://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.bz2 \
	file://include.gypi \
	file://unistd.patch \
	file://memset.patch \
	file://softfloat-fix.patch \
"

# include.gypi exists only for armv6 and armv7a and there isn't something like COMPATIBLE_ARCH afaik
COMPATIBLE_MACHINE = "(-)"
COMPATIBLE_MACHINE_armv6 = "(.*)"
COMPATIBLE_MACHINE_armv7a = "(.*)"

PR = "r1"

SRC_URI[md5sum] = "0cdd94b2be21180af93f719e9a9a2883"
SRC_URI[sha256sum] = "3bdce0bd8381cd699014e7ec72ab02c7d8444ba511c27afff76bf015361c4021"

inherit gettext

EXTRA_OEGYP =	" \
	-Duse_system_bzip2=1 \
	\
	-Dproprietary_codecs=1 \
	\
	-Dtarget_arch=${TARGET_ARCH} \ 
	-Ddisable_nacl=1 \
	-Dlinux_use_tcmalloc=0 \
	\
	-Dlinux_link_kerberos=0 \
	-Duse_kerberos=0 \
	-Duse_cups=1 \
	-Duse_gnome_keyring=1 \
	-Dlinux_link_gnome_keyring=1 \
	\
	${@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)} \
"

EXTRA_OEGYP_append_armv6 = " \
	-Darmv7=0 \
	-Darm_neon=0 \
"

EXTRA_OEGYP_append_armv7a = " \
	-Darmv7=1 \
	-Darm_neon=1 \
"

do_configure() {
	cd ${WORKDIR}
	export GYP_GENERATORS=make
	rm -f ${S}/tools/gyp/pylib/gyp/__init__.pyc
	rm -f ${S}/tools/gyp/pylib/gyp/__init__.pyo
	sed -e 's|__PATH__TO_BE_REPLACED__|"${WORKDIR}/include.gypi"|' -i ${S}/tools/gyp/pylib/gyp/__init__.py
	sed -e "s|__PATH__TO_BE_REPLACED__||" -i ${WORKDIR}/include.gypi

	cd ${S}
	build/gyp_chromium --depth=. ${EXTRA_OEGYP}
}

EXTRA_OEMAKE = "-r ${PARALLEL_MAKE} LDFLAGS.host=-L${STAGING_LIBDIR_NATIVE} V=1 BUILDTYPE=Release chrome"

TARGET_CFLAGS += "-I${STAGING_INCDIR}/mozilla/nss -I${STAGING_INCDIR}/dst"
TARGET_CXXFLAGS += "-I${STAGING_INCDIR}/mozilla/nss -I${STAGING_INCDIR}/dst"

TARGET_CC_ARCH += " -Wno-error=deprecated-declarations -Wno-error=narrowing -Wno-error=c++0x-compat"

do_compile_prepend() {
	export CROSSTOOL=${TARGET_PREFIX}
	export AR=${CROSSTOOL}ar
	export AS=${CROSSTOOL}as
	export RANLIB=${CROSSTOOL}ranlib
	# host tools are supposed to be linked with gold so we hack the
	# makefiles to use gold which must be present on the host and named
	# ld.gold.
	# -fuse-ld=gold could be an option but that actually fails on Fedora
	ln -sf `which ld.gold` ${WORKDIR}/ld
	sed -i "s#LDFLAGS.host ?=#LDFLAGS.host = -B${WORKDIR}/#g" Makefile
	for i in `find . -iname *.host*.mk`; do 
		sed -i "s#-B\$(builddir)/../../third_party/gold#-B${WORKDIR}/#g" $i
	done
	# chromium seems to force the usage of its internal copy of a binary
	# gold linker so remove this setting
	for i in `find . -iname *.target*.mk`; do 
		sed -i "s#-B\$(builddir)/../../third_party/gold# #g" $i
	done
}

do_install() {
	install -d ${D}${bindir}
	install -d ${D}${bindir}/chrome/
	install -m 0755 ${S}/out/Release/chrome ${D}${bindir}/chrome/chrome
	install -m 0644 ${S}/out/Release/chrome.pak ${D}${bindir}/chrome/
	install -m 0644 ${S}/out/Release/resources.pak ${D}${bindir}/chrome/
	install -m 0644 ${S}/out/Release/product_logo_48.png ${D}${bindir}/chrome/
	install -d ${D}${bindir}/chrome/locales/
	install -m 0644 ${S}/out/Release/locales/en-US.pak ${D}${bindir}/chrome/locales
	cp -a ${S}/out/Release/obj ${D}${bindir}/chrome/
	cp -a ${S}/out/Release/obj.target ${D}${bindir}/chrome/
	cp -a ${S}/out/Release/resources ${D}${bindir}/chrome/

	mv ${D}${bindir}/chrome/obj.target/third_party/ffmpeg/libffmpegsumo.so ${D}/${bindir}/chrome/libffmpegsumo.so

	find ${D}${bindir}/chrome/ -name "*.d" -delete
	find ${D}${bindir}/chrome/ -name "*.o" -delete
	find ${D}${bindir}/chrome/ -name "*.a" -delete
	find ${D}${bindir}/chrome/ -name "*.cpp" -delete
	find ${D}${bindir}/chrome/ -name "*.h" -delete
	find ${D}${bindir}/chrome/ -name "*.cc" -delete
}

# FIXME : hundred of WARNINGs
FILES_${PN} = "/usr/bin/chrome/"
FILES_${PN}-dbg = " \
	${bindir}/chrome/.debug \
	${bindir}/chrome/obj.target/third_party/WebKit/Source/WebKit/chromium/.debug \
	${bindir}/chrome/obj.target/third_party/ffmpeg/.debug \
	${bindir}/chrome/obj.target/third_party/angle/src/.debug \
	${bindir}/chrome/obj.target/third_party/icu/.debug \
	${bindir}/chrome/obj.target/third_party/icu/.debug \
	${bindir}/chrome/obj.target/content/.debug \
	${bindir}/chrome/obj.target/webkit/support/.debug \
	${bindir}/chrome/obj.target/webkit/support/.debug \
	${bindir}/chrome/obj.target/webkit/support/.debug \
	${bindir}/chrome/obj.target/ui/gfx/surface/.debug \
	${bindir}/chrome/obj.target/ui/gfx/gl/.debug \
	${bindir}/chrome/obj.target/ui/.debug \
	${bindir}/chrome/obj.target/sql/.debug \
	${bindir}/chrome/obj.target/v8/tools/gyp/.debug \
	${bindir}/chrome/obj.target/printing/.debug \
	${bindir}/chrome/obj.target/crypto/.debug \
	${bindir}/chrome/obj.target/net/.debug \
	${bindir}/chrome/obj.target/base/.debug \
	${bindir}/chrome/obj.target/base/.debug \
	${bindir}/chrome/obj.target/ipc/.debug \
	${bindir}/chrome/obj.target/media/.debug \
	${bindir}/chrome/obj.target/skia/.debug \
	${bindir}/chrome/obj.target/gpu/command_buffer/.debug \
	${bindir}/chrome/obj.target/gpu/.debug \
	${bindir}/chrome/obj.target/ppapi/.debug \
	${bindir}/chrome/obj.target/ppapi/.debug \
	${bindir}/chrome/obj.target/build/temp_gyp/.debug \
"