aboutsummaryrefslogtreecommitdiffstats
path: root/testing/chromium/APKBUILD
blob: 2adaf905fa0057ea3e10eb17474b7fb8e2232af5 (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
149
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: Unmaintained <unmaintained@alpinelinux.org>
pkgname=chromium
pkgver=17.0.942.0
pkgrel=0
pkgdesc="chromium web browser"
url="http://www.chromium.org/"
arch=""
#arch="x86 x86_64"
license="BSD"
depends=
depends_dev="alsa-lib-dev libevent-dev libpng-dev jpeg-dev cairo-dev cups-dev mesa-dev
	     dbus-glib-dev gtk+-dev libxml2-dev freetype-dev
	     libxslt-dev libxtst-dev icu-dev flac-dev speex-dev
	     hunspell-dev libxinerama-dev ffmpeg-dev nss-dev
	     libwebp-dev v8-dev bzip2-dev libevent-dev libvpx-dev
	     sqlite-dev"
makedepends="$depends_dev xdg-utils yasm gperf elfutils bison flex"
install=""
subpackages="$pkgname-dev $pkgname-doc"
source="http://build.chromium.org/official/chromium-$pkgver.tar.bz2
	chromium-c99math.patch
	chromium-futimens.patch
	chromium-uclibc-resolv.patch
	chromium-dlfcn.patch
	chromium-yasm.patch
	chromium-no-mit-screensaver.patch
	chromium-tcmalloc.patch
	chromium-no-sbrk.patch
	chromium-stdstring.patch"

_builddir="$srcdir"/chromium-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done

	msg "Stripping Google cruft..."
	find third_party -type f \! -iname '*.gyp*' \
		\! -path 'third_party/WebKit/*' \
		\! -path 'third_party/angle/*' \
		\! -path 'third_party/cacheinvalidation/*' \
		\! -path 'third_party/cld/*' \
		\! -path 'third_party/expat/*' \
		\! -path 'third_party/ffmpeg/*' \
		\! -path 'third_party/flac/flac.h' \
		\! -path 'third_party/gpsd/*' \
		\! -path 'third_party/harfbuzz/*' \
		\! -path 'third_party/hunspell/*' \
		\! -path 'third_party/iccjpeg/*' \
		\! -path 'third_party/jsoncpp/*' \
		\! -path 'third_party/launchpad_translations/*' \
		\! -path 'third_party/leveldb/*' \
		\! -path 'third_party/leveldatabase/*' \
		\! -path 'third_party/libjingle/*' \
		\! -path 'third_party/libphonenumber/*' \
		\! -path 'third_party/libvpx/*' \
		\! -path 'third_party/lss/*' \
		\! -path 'third_party/mesa/*' \
		\! -path 'third_party/modp_b64/*' \
		\! -path 'third_party/mongoose/*' \
		\! -path 'third_party/npapi/*' \
		\! -path 'third_party/openmax/*' \
		\! -path 'third_party/ots/*' \
		\! -path 'third_party/protobuf/*' \
		\! -path 'third_party/scons-2.0.1/*' \
		\! -path 'third_party/sfntly/*' \
		\! -path 'third_party/skia/*' \
		\! -path 'third_party/smhasher/*' \
		\! -path 'third_party/speex/speex.h' \
		\! -path 'third_party/sqlite/*' \
		\! -path 'third_party/tcmalloc/*' \
		\! -path 'third_party/tlslite/*' \
		\! -path 'third_party/undoview/*' \
		\! -path 'third_party/v8-i18n/*' \
		\! -path 'third_party/webdriver/*' \
		\! -path 'third_party/webgl_conformance/*' \
		\! -path 'third_party/webrtc/*' \
		\! -path 'third_party/zlib/contrib/minizip/*' \
		-delete || return 1

	msg "Hacking source tree to use system V8 headers..."
	find v8 -type f \! -iname '*.gyp*' -delete || return 1
	rmdir v8/include || return 1
	ln -s /usr/include v8/include || return 1
}

build() {
	cd "$_builddir"

	chromium_arch=ia32
	test ${CARCH} = x86_64 && chromium_arch=x64

	# enabling SSE2 causes psABI breakage.
	msg "chromium architecture is ${chromium_arch}"
	GYP_DEFINES="\
		werror= \
		disable_sse2=1 \
		no_strict_aliasing=1 \
		linux_sandbox_path=/usr/lib/${pkgname}/chromium-sandbox \
		linux_sandbox_chrome_path=/usr/lib/${pkgname}/chromium \
		release_extra_cflags='${CFLAGS}' \
		proprietary_codecs=1 \
		use_system_libjpeg=1 \
		use_system_libxslt=1 \
		use_system_libxml=1 \
		use_system_bzip2=1 \
		use_system_zlib=1 \
		use_system_libpng=1 \
		use_system_yasm=1 \
		use_system_libevent=1 \
		use_system_icu=1 \
		use_system_v8=1 \
		use_system_libwebp=1 \
		use_system_ffmpeg=1 \
		use_system_vpx=1 \
		use_system_ssl=1 \
		use_system_sqlite=1 \
		use_gconf=0 \
		use_gnome_keyring=0 \
		remoting=0 \
		target_arch=${chromium_arch}"
	export GYP_DEFINES

	msg "setting up makefiles"
	python build/gyp_chromium -f make --depth=. build/all.gyp

	msg "building chrome and chrome_sandbox targets"
	make BUILDTYPE=Release chrome chrome_sandbox || return 1
}

package() {
	cd "$_builddir"
}

md5sums="85d73864cc3b78dab29f8851965fc5fa  chromium-13.0.754.0.tar.bz2
320d611dba59a881a4f178df743c4912  chromium-c99math.patch
1328245f1f21cf3abf54223ed06a70f4  chromium-futimens.patch
4a391028c9d1b8930fc299b6af0767d8  chromium-uclibc-resolv.patch
768d2ca4daa2db611fd4aeb561701f4e  chromium-dlfcn.patch
76cb0975e631d54fb57bd298041cec05  chromium-yasm.patch
f8c8711a358d43ecbd8e1859aa71cfa0  chromium-no-mit-screensaver.patch
014dd7f7a9decb1d89c0d72f0258ca96  chromium-tcmalloc.patch
e6302ae2635dc4d0c75c32e97a4bd3b0  chromium-no-sbrk.patch
eb05d2763beaa02e20ddeaf51dadf327  chromium-stdstring.patch"