blob: 9d1e454d49da2204bc51e43782af910aa5dd126b (
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
|
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=chromium
pkgver=43.0.2357.132
pkgrel=1
pkgdesc="chromium web browser"
url="http://www.chromium.org/"
arch="x86_64"
license="BSD"
depends="bash"
depends_dev="alsa-lib-dev libevent-dev libpng-dev jpeg-dev cairo-dev cups-dev
mesa-dev libcap-dev dbus-glib-dev gtk+-dev libxml2-dev freetype-dev
jpeg-dev libxslt-dev libxtst-dev icu-dev flac-dev speex-dev
hunspell-dev libxinerama-dev ffmpeg-dev nss-dev libwebp-dev bzip2-dev
libvpx-dev sqlite-dev libelf-dev libgcrypt-dev zlib-dev
gnutls-dev mesa-dev libxcursor-dev libxcomposite-dev krb5-dev
libxrandr-dev libxscrnsaver-dev pciutils-dev udev-dev libexif-dev
hwdata-usb ninja libbsd-dev harfbuzz-dev snappy-dev
bsd-compat-headers openssl-dev libre2-dev jsoncpp-dev minizip-dev"
makedepends="$depends_dev xdg-utils yasm gperf bison flex perl python bash
paxmark findutils"
install=""
options=suid
subpackages="$pkgname-doc"
source="https://commondatastorage.googleapis.com/chromium-browser-official/$pkgname-$pkgver.tar.xz
chromium-launcher.sh
chromium.default
chromium.desktop
gcc5-fixes.patch
musl-fixes.patch
no-execinfo.patch
resolver.patch
no-mallinfo.patch
no-getcontext.patch
musl-sandbox.patch
chromium-hotwording-2403.patch
chromium-system-libvpx-r0.patch
chromium-system-jinja-r7.patch
chromium-widevine.patch
"
##############################################################
# Please dont use these keys outside of Alpine Linux project #
# You can create your own at: #
# http://www.chromium.org/developers/how-tos/api-keys #
##############################################################
_google_api_key="-Dgoogle_api_key=AIzaSyCzJlvmpxdW-WUOULKUzow_a98uubu9Ro4"
_google_default_client_id="-Dgoogle_default_client_id=755214983505-7ramulm762nd0qvsnct55n9kqrd8d65e.apps.googleusercontent.com"
_google_default_client_secret="-Dgoogle_default_client_secret=TYDXT0NX-GtnRHrb3x4myEQs"
_builddir="$srcdir"/$pkgname-$pkgver
case "${CARCH}" in
x86_64) target_arch=x64;;
x86) target_arch=ia32;;
arm) target_arch=arm;;
esac
prepare() {
cd "$_builddir"
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
# Remove bundled ICU; its header files appear to get picked up instead of
# the system ones, leading to errors during the final link stage.
# https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/BNGvJc08B6Q
find third_party/icu -type f \! -regex '.*\.\(gyp\|gypi\|isolate\)' -delete
}
build() {
cd "$_builddir"
# reusable system library settings
local use_system="
-Duse_system_bzip2=1
-Duse_system_flac=1
-Duse_system_harfbuzz=1
-Duse_system_icu=1
-Duse_system_jsoncpp=1
-Duse_system_libevent=1
-Duse_system_libjpeg=1
-Duse_system_libpng=1
-Duse_system_libvpx=1
-Duse_system_libxml=1
-Duse_system_snappy=1
-Duse_system_xdg_utils=1
-Duse_system_yasm=1
-Duse_system_nspr=1
-Duse_system_re2=1
-Duse_system_speex=1
-Duse_system_libwebp=1
-Duse_system_libxslt=1
-Duse_system_zlib=1
-Duse_system_minizip=1
"
msg "Replacing gyp files"
build/linux/unbundle/replace_gyp_files.py ${use_system} || return 1
msg "Running gyp_chromium"
build/gyp_chromium --depth=. \
${use_system} \
-Dgoogle_api_key="$_google_api_key" \
-Dgoogle_default_client_id="$_google_default_client_id" \
-Dgoogle_default_client_secret="$_google_default_client_secret" \
-Dwerror= \
-Dclang=0 \
-Dpython_ver=2.7 \
-Dlinux_link_gsettings=1 \
-Dlinux_link_libpci=1 \
-Dlinux_link_libspeechd=0 \
-Dlinux_strip_binary=1 \
-Dlinux_use_bundled_binutils=0 \
-Dlinux_use_bundled_gold=0 \
-Dlinux_use_gold_flags=0 \
-Dicu_use_data_file_flag=0 \
-Dlogging_like_official_build=1 \
-Dlibspeechd_h_prefix=speech-dispatcher/ \
-Dffmpeg_branding=Chrome \
-Dproprietary_codecs=1 \
-Duse_allocator=none \
-Duse_gnome_keyring=0 \
-Dusb_ids_path=/usr/share/hwdata/usb.ids \
-Duse_mojo=0 \
-Duse_gconf=0 \
-Duse_pulseaudio=0 \
-Denable_hotwording=0 \
-Ddisable_fatal_linker_warnings=1 \
-Ddisable_glibc=1 \
-Ddisable_nacl=1 \
-Ddisable_pnacl=1 \
-Dtarget_arch="$target_arch" \
-Drelease_extra_cflags="$CFLAGS" \
-Ddisable_sse2=1 \
|| return 1
msg "Ninja turtles GO!"
# build mksnapshot and paxmark it
ninja -C out/Release mksnapshot || return 1
paxmark -m out/Release/mksnapshot || return 1
# finish rest of the build
ninja -C out/Release chrome chrome_sandbox chromedriver || return 1
paxmark -m out/Release/chrome || return 1
}
package() {
cd "$_builddir"
local bin pak
for bin in chrome libffmpegsumo.so natives_blob.bin snapshot_blob.bin; do
install -Dm755 out/Release/$bin \
"$pkgdir"/usr/lib/$pkgname/$bin || return 1
done
install -Dm4755 "$_builddir"/out/Release/chrome_sandbox \
"$pkgdir"/usr/lib/$pkgname/chrome-sandbox || return 1
install -Dm755 "$_builddir"/out/Release/chromedriver \
"$pkgdir"/usr/lib/$pkgname/chromedriver || return 1
for pak in out/Release/*.pak; do
install -Dm644 $pak \
"$pkgdir"/usr/lib/$pkgname/${pak##*/} || return 1
done
#TODO do we really need bash for this simple script?
install -Dm755 "$srcdir"/chromium-launcher.sh \
"$pkgdir"/usr/lib/$pkgname/chromium-launcher.sh || return 1
install -Dm755 chrome/tools/build/linux/chrome-wrapper \
"$pkgdir"/usr/lib/$pkgname/chrome-wrapper || return 1
cp -r out/Release/locales "$pkgdir"/usr/lib/$pkgname/ || return 1
install -Dm644 out/Release/chrome.1 \
"$pkgdir"/usr/share/man/man1/chrome.1 || return 1
install -Dm644 out/Release/chrome.1 \
"$pkgdir"/usr/share/man/man1/chromium.1 || return 1
# It is important that we name the target "chromium-browser",
# xdg-utils expect it; bug #355517.
mkdir -p "$pkgdir"/usr/bin || return 1
cd "$pkgdir"/usr/bin || return 1
ln -sf /usr/lib/$pkgname/chromium-launcher.sh \
chromium-browser || return 1
ln -sf /usr/lib/$pkgname/chromedriver || return 1
cd "$_builddir"
install -Dm644 "$srcdir"/chromium.default \
"$pkgdir"/etc/chromium/chromium.default || return 1
install -Dm644 "$srcdir"/chromium.desktop \
"$pkgdir"/usr/share/applications/chromium.desktop
for size in 22 24 48 64 128 256; do
install -Dm644 "chrome/app/theme/chromium/product_logo_$size.png" \
"$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
done
for size in 16 32; do
install -Dm644 "chrome/app/theme/default_100_percent/chromium/product_logo_$size.png" \
"$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
done
}
md5sums="aba8a1b9945d2c0f203294e43b68cdab chromium-43.0.2357.132.tar.xz
cdd5fd06a4138a7b6bc954f532193817 chromium-launcher.sh
c8be238104e757beafaae31e6804421a chromium.default
2962ac6259e39a797d441daf43aa49c9 chromium.desktop
96277e7ddc26c8bdd50fb63eff2f4ce0 gcc5-fixes.patch
1b6076a7fac1d056fd6064f5b1b98320 musl-fixes.patch
00ae59dd9d09c60a116fd0133f9f3a60 no-execinfo.patch
af047840f31e99aa36be04edc3482afd resolver.patch
a11a60155a9faf6ca648aaa06c81f29e no-mallinfo.patch
2c8de771a7c0e5e0e9fc68fa978785f7 no-getcontext.patch
f99bb2ee8947418720a270ffa027c189 musl-sandbox.patch
2b7291195c467f8135473e543c1c7dad chromium-hotwording-2403.patch
9a73cf075dc321dfe781f5bed4920d6c chromium-system-libvpx-r0.patch
97b1578585ab600ed9adef4f341ccd80 chromium-system-jinja-r7.patch
de717d6430532f34fe161035dfdafcdf chromium-widevine.patch"
sha256sums="405f52c6649f1d2937952fbcfcd238ba058db7d13edf4705f7027805f3ce1809 chromium-43.0.2357.132.tar.xz
9bceb14a6c171754b77bcc7e6095285fcb58a9ca10e2e4a9c9e13dc561fc0c01 chromium-launcher.sh
bc6e879bdf3311394213801a6e6bb1c731be8115624bbcf202bfeacd46b6af87 chromium.default
3ae90cea7503d0039de53448ed112b9bc0cb5a09f6b0045506eb777fc23517e5 chromium.desktop
ee32d8a89cc51cb71a8d4aa82b196b145f43a2fc3ba9687f9c06c053601d5fe7 gcc5-fixes.patch
ac38e2d1238b7062ee8c99ff7772477fa2d5328a750eab47553687e3782dc7a9 musl-fixes.patch
505a55c28e971e067f189e3a1ce697d711cec82a765d81f78eb49ec1f6df56cf no-execinfo.patch
f16c63d4188fe56732dc6760307795ba4059452c4cf3de1460cbcb2616011511 resolver.patch
3e732ba5bbe324932a06a782bae655003089f5dc52a7bb2b790aa4837e20be8e no-mallinfo.patch
ea79f9a46116c8b56bbc69d226abd9252e4ae4d946ca695203f2298279cc2211 no-getcontext.patch
8ed74cce08d0825e46eb21500a787d38ff2ac536b2ac1dff0bffc08d1257d278 musl-sandbox.patch
7d20f05bbd2b9ba363b28ed591cd0c770b4d7365a7ca9d20b5f6a268f6af2122 chromium-hotwording-2403.patch
06b26f3459e2f60866eb28803f129c59e064b082eae76126de60463706739f8c chromium-system-libvpx-r0.patch
872f5a38d8263b14308bb117828496a4093d0e6ad755d39d2c5e6857314fe071 chromium-system-jinja-r7.patch
1d1ead77250475228524770e57c17282aff9098c5efc3d7719b0df76229b8874 chromium-widevine.patch"
sha512sums="077539f267a8a196a251334546219f3459b30dff3e56d2573b011464cef3b60da49243a123834bd59ad32c78d82b6a90fb2cea95f57bf50a440f689b251a4eba chromium-43.0.2357.132.tar.xz
f1909314ae74985c85740d26c9bfab694f3202de8ccc392a1c4ec5c8760db21b6cc46146c78a9abebd09e6d24f37e19466f0c4d2d61815400b48d859f8ce154d chromium-launcher.sh
930f1f390e41c2a986e67a3d7aff45afa116f7c79c4b9f1895225a3851dd12dd2fa2906171ba00f6e43aacfb3d12b20a57934931fcb10a9f88c2048eefc85742 chromium.default
e182c998a43d22d1c76a86c561619afd1fca8c2be668265ad5e2f81a3806f7a154272cc027a2f8b370fb69446892c69e5967a4be76082325c14245ee7915234c chromium.desktop
e2390cdeb2a75aad51d5da07819e1375fcf2092535eaa86545b9bc0160eff9e3981f946029ed8fc337df4c56a8b8cc7945821d2636b09e320dea2c8884022a59 gcc5-fixes.patch
febb6a204bcffda8dc3d80e75563710745e383cb30e460db5d8c5ded3d40f8a872461719283260f573be378e085924ddf3af000b0a50b519fafd9f6fc392920e musl-fixes.patch
4f756d3e404033f7a36b38266176b7302f7e2a2e78c9f8b8d362a53a3dbdc675cdaa581393a70c23a29135b34566cf4109513cb13a289dc111bbce65ec065ebd no-execinfo.patch
987f18d37824676e5d874a6fde1099bcc558920e7781de5f34e612411013e4fac9ca421a3cce1ed5f82401c4d54212b6f47a0a856892a78543b8e400a4bb0489 resolver.patch
511a3852d6172c14c651c316f1f874cfd23be0fde1c4285565dfead02e5865a1b240c40e270c940a23c55e2d3f2cfecbf3b5477bf9e6d3cf920d7c60331dc3c3 no-mallinfo.patch
42d9a6ebea2d95cdc169b921cc1a1b846cf500997059fd3084de09e21f00b63b76e60c6124f4af247d402ff5ca3f4bf8867a6f2c78198c05b4273ca01fb29241 no-getcontext.patch
4075743c74a58e207eea77c2d1e25c7b7b4e5351d3bb2ed47cf9ac620dbe3b55e0f847c955d9d96d49db536fdd36b9f220aded337813d4ccfbd80c4ae7737f11 musl-sandbox.patch
38dcbae0d9bc63c044d50bd395692007642af705e1bbb9b704f3f349a48e45ca2b7f8495dbafbb4333b8bdb84ac53e5611eba4fe3d4fc7e841b319b4d744c324 chromium-hotwording-2403.patch
fe5801b63e7cb58c4653e6f4542de070cb5bf88e0d99fdd0bb7b45ba928be065ebda41fb1f5fa32f4a55d321b8765df53a977bf2d1418b030846a9e2b2fd1c1d chromium-system-libvpx-r0.patch
10bcc6a467b6766d13b5e41e7b7dcdbd62de7c04daad16c83037e88043032a0c118627029f91ef8a2a57faaaebc8b6f4ee16e8d1fecb5921d0d49efd60a27863 chromium-system-jinja-r7.patch
4a11b46afa8ce84bd23a8c506301b5848ee4291a764f3aed282b8a98706ece16cf9346dec6cc71b1e17812b15f43a5cbc7bc6d38ed4dcc88c12d6fcb03bd9295 chromium-widevine.patch"
|