Commit | Line | Data |
---|---|---|
0826c9bd JB |
1 | # Description: Open source version of Google Chrome web browser. |
2 | # URL: http://chromium.org/ | |
3 | # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu | |
4 | # Maintainer: Jose V Beneyto, sepen at crux dot nu | |
5 | # Packager: Tadeusz Sosnierz, tadzikes gmail com | |
e78af32e | 6 | # Depends on: ninja dbus-glib gtk libevent nss xorg-libxscrnsaver xorg-libxtst libgcrypt xorg-libxdamage yasm xorg-libxt gperf speech-dispatcher libdrm libexif pciutils |
0826c9bd JB |
7 | |
8 | name=chromium | |
341726c1 | 9 | version=50.0.2661.102 |
6ce72368 | 10 | |
0826c9bd | 11 | release=1 |
6a3c14de VM |
12 | source=(http://commondatastorage.googleapis.com/$name-browser-official/$name-$version.tar.xz \ |
13 | $name.sh $name.desktop) | |
0826c9bd JB |
14 | |
15 | build() { | |
16 | cd $name-$version | |
17 | ||
6ce72368 VM |
18 | touch chrome/test/data/webui/i18n_process_css_test.html |
19 | ||
7b8c3be9 | 20 | export CFLAGS="$CFLAGS $(pkg-config --cflags nspr) -lpthread" |
0826c9bd JB |
21 | export LDFLAGS="$LDFLAGS $(pkg-config --libs nspr)" |
22 | ||
23 | # determine some flags depending on SOC | |
24 | USE_ARMV7=0; USE_ARM_THUMB=0; USE_ARM_NEON=0 | |
25 | case $(uname -m) in | |
26 | armv7*) USE_ARMV7=1; USE_ARM_THUMB=1;; | |
27 | esac | |
28 | for flag in $CFLAGS; do | |
29 | case $flag in | |
30 | -mfpu=neon*) USE_ARM_NEON=1;; | |
31 | esac | |
32 | done | |
33 | ||
6a3c14de | 34 | build/gyp_chromium build/all.gyp --depth=. \ |
6570d746 | 35 | -Dtarget_arch=arm \ |
0826c9bd JB |
36 | -Darm_float_abi=hard \ |
37 | -Darmv7=$USE_ARMV7 \ | |
38 | -Darm_thumb=$USE_ARM_THUMB \ | |
39 | -Darm_neon=$USE_ARM_NEON \ | |
40 | -Dv8_target_arch=arm \ | |
41 | -Dv8_use_arm_eabi_hardfloat=1 \ | |
42 | -Dsysroot= \ | |
6a3c14de | 43 | -Dclang=0 \ |
6570d746 JB |
44 | -Dpython_ver="2.7" \ |
45 | -Dno_strict_aliasing=1 \ | |
46 | -Dwerror= \ | |
6a3c14de | 47 | -Dlinux_sandbox_path=/usr/lib/$name/chrome-sandbox \ |
6570d746 | 48 | -Dlinux_strip_binary=1 \ |
0826c9bd JB |
49 | -Dlinux_use_gold_binary=0 \ |
50 | -Dlinux_use_gold_flags=0 \ | |
0826c9bd JB |
51 | -Drelease_extra_cflags="$CFLAGS" \ |
52 | -Dproprietary_codecs=1 \ | |
53 | -Dffmpeg_branding=Chrome \ | |
6a3c14de | 54 | -Dlibspeechd_h_prefix=speech-dispatcher/ \ |
6570d746 JB |
55 | -Duse_system_libjpeg=1 \ |
56 | -Duse_system_libxslt=1 \ | |
57 | -Duse_system_libxml=1 \ | |
58 | -Duse_system_bzip2=1 \ | |
59 | -Duse_system_zlib=0 \ | |
60 | -Duse_system_libpng=0 \ | |
61 | -Duse_system_ffmpeg=0 \ | |
6a3c14de | 62 | -Duse_system_yasm=1 \ |
6570d746 JB |
63 | -Duse_system_libevent=1 \ |
64 | -Duse_system_sqlite=0 \ | |
6a3c14de | 65 | -Duse_system_ssl=0 \ |
595c6bdf | 66 | -Duse_system_icu=0 \ |
6570d746 JB |
67 | -Dremove_webcore_debug_symbols=1 \ |
68 | -Duse_gconf=0 \ | |
69 | -Duse_cups=0 \ | |
70 | -Duse_gnome_keyring=0 \ | |
0826c9bd JB |
71 | -Duse_kerberos=0 \ |
72 | -Duse_pulseaudio=0 \ | |
6570d746 | 73 | -Dlinux_link_gnome_keyring=0 \ |
0826c9bd JB |
74 | -Dlinux_link_libpci=1 \ |
75 | -Dlinux_link_libspeechd=1 \ | |
6570d746 | 76 | -Denable_webrtc=1 \ |
6a3c14de | 77 | -Ddisable_nacl=1 \ |
595c6bdf | 78 | -Dicu_use_data_file_flag=1 |
0826c9bd | 79 | |
6a3c14de | 80 | ninja -C out/Release chrome chrome_sandbox |
0826c9bd | 81 | |
6a3c14de VM |
82 | install -m 0755 -D out/Release/chrome $PKG/usr/lib/$name/$name |
83 | install -m 4755 -o root -g root -D out/Release/chrome_sandbox $PKG/usr/lib/$name/chrome-sandbox | |
84 | install -m 0644 -D out/Release/*.pak $PKG/usr/lib/$name | |
6a3c14de VM |
85 | install -d $PKG/usr/lib/$name/locales |
86 | install -m 0644 out/Release/locales/en-US.pak $PKG/usr/lib/$name/locales | |
87 | cp -a out/Release/resources $PKG/usr/lib/$name | |
6c6668f9 | 88 | install -m 0644 -D out/Release/chrome.1 $PKG/usr/share/man/man1/$name.1 |
0826c9bd | 89 | |
6a3c14de VM |
90 | # fix v8 natives |
91 | cp -a out/Release/{natives,snapshot}_blob.bin $PKG/usr/lib/$name | |
0826c9bd JB |
92 | |
93 | for size in 22 24 48 128 256; do | |
6a3c14de VM |
94 | install -m 0644 -D chrome/app/theme/$name/product_logo_${size}.png \ |
95 | $PKG/usr/share/icons/hicolor/${size}x${size}/apps/$name.png | |
0826c9bd JB |
96 | done |
97 | ||
2fd1611b VM |
98 | # fix icu installation |
99 | cp -a out/Release/icudtl.dat $PKG/usr/lib/$name | |
100 | ||
6a3c14de VM |
101 | install -d $PKG/usr/share/pixmaps |
102 | ln -sf /usr/share/icons/hicolor/48x48/apps/$name.png $PKG/usr/share/pixmaps/$name.png | |
103 | install -m 0644 -D $SRC/$name.desktop $PKG/usr/share/applications/$name.desktop | |
104 | install -m 0755 -D $SRC/$name.sh $PKG/usr/bin/$name | |
0826c9bd | 105 | } |