CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
chromium: updated to 54.0.2840.100
[ports/opt-arm.git] / chromium / Pkgfile
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
6 # Depends on: dbus-glib gperf gtk libevent libexif libgcrypt mesa3d ninja nss pciutils speech-dispatcher xorg-libxscrnsaver xorg-libxt xorg-libxtst yasm
7
8 name=chromium
9 version=54.0.2840.100
10
11 release=1
12 source=(http://commondatastorage.googleapis.com/$name-browser-official/$name-$version.tar.xz \
13 last-commit-position.patch $name-build-toolchain.patch $name.sh $name.desktop)
14
15 build() {
16 cd $name-$version
17
18 export CFLAGS="$CFLAGS $(pkg-config --cflags nspr) -lpthread"
19 export LDFLAGS="$LDFLAGS $(pkg-config --libs nspr)"
20
21 # determine some flags depending on SOC
22 USE_ARMV7=0; USE_ARM_THUMB=0; USE_ARM_NEON=0
23 case $(uname -m) in
24 armv7*) USE_ARMV7=1; USE_ARM_THUMB=1;;
25 esac
26 for flag in $CFLAGS; do
27 case $flag in
28 -mfpu=neon*) USE_ARM_NEON=1;;
29 esac
30 done
31
32
33 # we don't use git sources
34 patch -p1 -i $SRC/last-commit-position.patch
35
36 # Let's fix the toolchain
37 patch -p0 -i $SRC/$name-build-toolchain.patch
38
39 _gn_args=(
40 'blink_gc_plugin=false'
41 'clang_use_chrome_plugins=false'
42 'enable_hangout_services_extension=true'
43 'enable_nacl=false'
44 'enable_nacl_nonsfi=false'
45 'fatal_linker_warnings=false'
46 'ffmpeg_branding="Chrome"'
47 'is_clang=false'
48 'is_debug=false'
49 'linux_use_bundled_binutils=false'
50 'proprietary_codecs=true'
51 'remove_webcore_debug_symbols=true'
52 'symbol_level=0'
53 'treat_warnings_as_errors=false'
54 'use_allocator="none"'
55 'use_cups=false'
56 'use_gconf=false'
57 'use_gnome_keyring=false'
58 'use_gold=false'
59 'use_kerberos=false'
60 'use_pulseaudio=false'
61 'use_sysroot=false'
62 'use_system_libjpeg=true'
63 )
64
65 python2 tools/gn/bootstrap/bootstrap.py --gn-gen-args="${_gn_args[*]}"
66 out/Release/gn gen out/Release --args="${_gn_args[*]}" --script-executable=/usr/bin/python2
67
68 ninja -C out/Release chrome chrome_sandbox
69
70 install -m 0755 -D out/Release/chrome $PKG/usr/lib/$name/$name
71 install -m 4755 -o root -g root -D out/Release/chrome_sandbox $PKG/usr/lib/$name/chrome-sandbox
72 install -m 0644 -D out/Release/*.pak $PKG/usr/lib/$name
73 install -d $PKG/usr/lib/$name/locales
74 install -m 0644 out/Release/locales/en-US.pak $PKG/usr/lib/$name/locales
75 cp -a out/Release/resources $PKG/usr/lib/$name
76 install -m 0644 -D out/Release/chrome.1 $PKG/usr/share/man/man1/$name.1
77
78 # fix v8 natives
79 cp -a out/Release/{natives,snapshot}_blob.bin $PKG/usr/lib/$name
80
81 for size in 22 24 48 128 256; do
82 install -m 0644 -D chrome/app/theme/$name/product_logo_${size}.png \
83 $PKG/usr/share/icons/hicolor/${size}x${size}/apps/$name.png
84 done
85
86 # fix icu installation
87 cp -a out/Release/icudtl.dat $PKG/usr/lib/$name
88
89 install -d $PKG/usr/share/pixmaps
90 ln -sf /usr/share/icons/hicolor/48x48/apps/$name.png $PKG/usr/share/pixmaps/$name.png
91 install -m 0644 -D $SRC/$name.desktop $PKG/usr/share/applications/$name.desktop
92 install -m 0755 -D $SRC/$name.sh $PKG/usr/bin/$name
93 }