2011-06-18 15:45:42 +00:00
|
|
|
# Template file for 'chromium'
|
|
|
|
pkgname=chromium
|
2014-12-12 12:34:38 +00:00
|
|
|
# See http://www.chromium.org/developers/calendar for the latest version
|
2015-02-06 08:12:34 +00:00
|
|
|
version=40.0.2214.111
|
2014-11-16 10:53:09 +00:00
|
|
|
revision=1
|
2011-06-18 15:45:42 +00:00
|
|
|
short_desc="Google's attempt at creating a safer, faster, and more stable browser"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
|
|
homepage="http://www.chromium.org/"
|
|
|
|
license="BSD"
|
2014-08-28 06:48:54 +00:00
|
|
|
distfiles="https://commondatastorage.googleapis.com/${pkgname}-browser-official/${pkgname}-${version}.tar.xz"
|
2015-02-06 08:12:34 +00:00
|
|
|
checksum=9e1f1a661702217a3fa7bf25a0e70d334a236ca67fadc4bebcfa2e8f7328cd49
|
2012-11-05 21:21:25 +00:00
|
|
|
|
2014-03-13 08:57:36 +00:00
|
|
|
lib32disabled=yes
|
2014-11-16 10:53:09 +00:00
|
|
|
nodebug=yes
|
2014-08-21 10:14:29 +00:00
|
|
|
|
2014-12-02 10:12:05 +00:00
|
|
|
hostmakedepends="yasm python pkg-config perl gperf bison ninja hwids icu-devel"
|
2014-02-03 11:43:01 +00:00
|
|
|
makedepends="libpng-devel>=1.6 gtk+-devel nss-devel pciutils-devel
|
2013-04-20 15:07:44 +00:00
|
|
|
libXi-devel libgcrypt-devel libgnome-keyring-devel cups-devel elfutils-devel
|
|
|
|
libXcomposite-devel speech-dispatcher-devel libXrandr-devel mit-krb5-devel
|
2014-12-02 09:21:12 +00:00
|
|
|
libXScrnSaver-devel alsa-lib-devel icu-devel snappy-devel
|
|
|
|
libxml2-devel libxslt-devel pulseaudio-devel nss-devel libexif-devel
|
2014-02-03 11:38:25 +00:00
|
|
|
libXcursor-devel libflac-devel speex-devel libmtp-devel libwebp-devel>=0.4.0
|
2013-06-24 14:33:07 +00:00
|
|
|
libjpeg-turbo-devel libevent-devel json-c-devel re2-devel harfbuzz-devel
|
2014-10-31 08:38:08 +00:00
|
|
|
minizip-devel jsoncpp-devel zlib-devel libcap-devel libXdamage-devel"
|
2014-12-02 09:21:12 +00:00
|
|
|
depends="hwids desktop-file-utils hicolor-icon-theme"
|
2014-01-01 15:10:11 +00:00
|
|
|
nostrip_files="nacl_irt_x86_64.nexe nacl_irt_x86_32.nexe"
|
2012-02-22 16:38:34 +00:00
|
|
|
|
2014-12-02 10:12:05 +00:00
|
|
|
case "$XBPS_MACHINE" in
|
2014-12-12 12:39:53 +00:00
|
|
|
x86_64) hostmakedepends+=" ca-certificates gcc-c++-multilib";;
|
2014-12-02 10:12:05 +00:00
|
|
|
esac
|
2014-10-29 19:29:33 +00:00
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
2015-01-28 15:54:10 +00:00
|
|
|
armv6l*) broken="http://build.voidlinux.eu:8010/builders/armv6l_builder/builds/8050/steps/shell_3/logs/stdio";;
|
2014-10-29 19:29:33 +00:00
|
|
|
esac
|
2013-10-03 12:11:40 +00:00
|
|
|
|
2014-06-17 12:17:28 +00:00
|
|
|
pre_configure() {
|
2013-10-03 12:11:40 +00:00
|
|
|
# XXX xtraeme: fix gcc{,-c++}-multilib instead.
|
|
|
|
ldconfig &>/dev/null
|
|
|
|
|
2014-12-02 09:21:12 +00:00
|
|
|
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
2014-10-29 19:29:33 +00:00
|
|
|
# Download NaCL toolchains
|
|
|
|
python2 build/download_nacl_toolchains.py \
|
|
|
|
--packages nacl_x86_newlib,pnacl_newlib,pnacl_translator
|
|
|
|
fi
|
2014-12-02 09:21:12 +00:00
|
|
|
# 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
|
2014-06-17 12:17:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_configure() {
|
|
|
|
local conf=""
|
|
|
|
|
2014-09-26 05:33:52 +00:00
|
|
|
export -n CFLAGS CXXFLAGS LDFLAGS
|
2014-10-29 19:29:33 +00:00
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
export GYP_CROSSCOMPILE=1
|
|
|
|
fi
|
2013-08-21 10:48:49 +00:00
|
|
|
|
2013-08-22 16:28:59 +00:00
|
|
|
# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
|
|
|
|
# Note: These are for Void Linux use ONLY.
|
|
|
|
conf+="
|
|
|
|
-Dgoogle_api_key=AIzaSyCIFdBA7eQP43R6kXRwTq7j6Mvj1ITze90
|
|
|
|
-Dgoogle_default_client_id=858256686058.apps.googleusercontent.com
|
|
|
|
-Dgoogle_default_client_secret=sMVx271L_MAz23TW2ek3AASn"
|
|
|
|
|
2013-10-03 12:11:40 +00:00
|
|
|
# Disable glibc Native Client toolchain.
|
2013-08-21 10:48:49 +00:00
|
|
|
conf+=" -Ddisable_glibc=1"
|
|
|
|
|
2014-12-02 09:21:12 +00:00
|
|
|
# Disable clang for native and host builds.
|
|
|
|
conf+=" -Dclang=0 -Dhost_clang=0"
|
2014-10-29 19:29:33 +00:00
|
|
|
|
2013-08-21 10:48:49 +00:00
|
|
|
# Use system-provided libraries.
|
|
|
|
# TODO: use_system_hunspell (upstream changes needed).
|
2013-10-03 12:11:40 +00:00
|
|
|
# TODO: use_system_libsrtp.
|
|
|
|
# TODO: use_system_libusb (http://crbug.com/266149).
|
2013-08-21 10:48:49 +00:00
|
|
|
# TODO: use_system_ssl (http://crbug.com/58087).
|
|
|
|
# TODO: use_system_sqlite (http://crbug.com/22208).
|
2014-04-10 18:31:56 +00:00
|
|
|
#
|
|
|
|
# XXX xtraeme: broken currently
|
2014-10-20 20:03:44 +00:00
|
|
|
# -Duse_system_opus=1 (needs opus_custom.h)
|
2014-10-31 08:38:08 +00:00
|
|
|
# -Duse_system_protobuf
|
|
|
|
# -Duse_system_v8=1
|
2014-06-17 12:17:28 +00:00
|
|
|
# -Duse_system_zlib=1
|
2013-08-21 10:48:49 +00:00
|
|
|
conf+="
|
2014-06-17 12:17:28 +00:00
|
|
|
-Dclang_use_chrome_plugins=0
|
2014-01-30 19:47:48 +00:00
|
|
|
-Dpython_ver=2.7
|
2014-12-02 09:21:12 +00:00
|
|
|
-Dicu_use_data_file_flag=0
|
2013-08-21 10:48:49 +00:00
|
|
|
-Duse_system_bzip2=1
|
|
|
|
-Duse_system_flac=1
|
|
|
|
-Duse_system_harfbuzz=1
|
|
|
|
-Duse_system_jsoncpp=1
|
|
|
|
-Duse_system_libevent=1
|
|
|
|
-Duse_system_libjpeg=1
|
|
|
|
-Duse_system_libpng=1
|
|
|
|
-Duse_system_libxml=1
|
|
|
|
-Duse_system_libxslt=1
|
|
|
|
-Duse_system_minizip=1
|
|
|
|
-Duse_system_nspr=1
|
|
|
|
-Duse_system_re2=1
|
|
|
|
-Duse_system_snappy=1
|
|
|
|
-Duse_system_speex=1
|
|
|
|
-Duse_system_xdg_utils=1
|
|
|
|
-Duse_system_yasm=1
|
2014-12-02 09:21:12 +00:00
|
|
|
-Duse_system_icu=1
|
2013-08-21 10:48:49 +00:00
|
|
|
-Duse_cups=1
|
|
|
|
-Dlinux_link_cups=1
|
|
|
|
-Duse_pulseaudio=1
|
|
|
|
-Dlinux_link_pulseaudio=1
|
2014-06-17 12:17:28 +00:00
|
|
|
-Duse_mojo=0
|
2013-08-21 10:48:49 +00:00
|
|
|
-Duse_gconf=0"
|
2014-10-29 19:29:33 +00:00
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
conf+=" -Denable_webrtc=0"
|
|
|
|
conf+=" -Duse_system_libwebp=0"
|
|
|
|
else
|
|
|
|
conf+=" -Duse_system_libwebp=1"
|
|
|
|
fi
|
2013-08-21 10:48:49 +00:00
|
|
|
|
|
|
|
# TODO: re-enable on vp9 libvpx release (http://crbug.com/174287).
|
|
|
|
# conf+=" -Dmedia_use_libvpx=0"
|
|
|
|
|
|
|
|
# Use explicit library dependencies instead of dlopen.
|
|
|
|
conf+="
|
|
|
|
-Dlinux_link_gsettings=1
|
|
|
|
-Dlinux_link_libpci=1
|
|
|
|
-Dlinux_link_libspeechd=1
|
|
|
|
-Dlibspeechd_h_prefix=speech-dispatcher/"
|
|
|
|
|
|
|
|
# TODO: use the file at run time instead of effectively compiling it in.
|
|
|
|
conf+=" -Dusb_ids_path=/usr/share/hwdata/usb.ids"
|
|
|
|
|
2014-07-17 14:36:38 +00:00
|
|
|
# Never use bundled binutils/gold binary. Disable gold linker flags for now.
|
|
|
|
conf+=" -Dlinux_use_bundled_binutils=0 -Dlinux_use_gold_binary=0 -Dlinux_use_gold_flags=0"
|
2013-08-21 10:48:49 +00:00
|
|
|
|
|
|
|
# Always support proprietary codecs.
|
|
|
|
conf+=" -Dproprietary_codecs=1"
|
|
|
|
|
|
|
|
# Enable H.264 support in bundled ffmpeg.
|
|
|
|
conf+=" -Dffmpeg_branding=Chrome"
|
|
|
|
|
|
|
|
# Make sure that -Werror doesn't get added to CFLAGS by the build system.
|
|
|
|
# Depending on GCC version the warnings are different and we don't want
|
|
|
|
# the build to fail because of that.
|
|
|
|
conf+=" -Dwerror="
|
|
|
|
|
2013-10-03 12:11:40 +00:00
|
|
|
# Save space by removing DLOG and DCHECK messages (about 6% reduction).
|
|
|
|
conf+=" -Dlogging_like_official_build=1"
|
|
|
|
|
2014-10-29 19:29:33 +00:00
|
|
|
case "${XBPS_TARGET_MACHINE}" in
|
2014-12-02 09:21:12 +00:00
|
|
|
i686*) conf+=" -Ddisable_nacl=1 -Ddisable_pnacl=1";;
|
2014-10-29 19:29:33 +00:00
|
|
|
arm*) conf+="
|
|
|
|
-Dtarget_arch=arm
|
|
|
|
-Darm_neon=0
|
2014-12-02 09:21:12 +00:00
|
|
|
-Ddisable_pnacl=1
|
2014-10-29 19:29:33 +00:00
|
|
|
-Ddisable_nacl=1
|
|
|
|
-Dv8_use_arm_eabi_hardfloat=true
|
|
|
|
-Darm_float_abi=hard"
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
sed -i "s/arm-linux-gnueabihf-/${XBPS_CROSS_TRIPLET}-/g" build/common.gypi
|
|
|
|
conf+=" -Dsysroot=${XBPS_CROSS_BASE}"
|
|
|
|
else
|
|
|
|
conf+=" -Dsysroot="
|
2014-12-02 10:12:05 +00:00
|
|
|
fi
|
|
|
|
;;
|
2014-10-29 19:29:33 +00:00
|
|
|
esac
|
|
|
|
case "${XBPS_TARGET_MACHINE}" in
|
|
|
|
armv7*) conf+="
|
|
|
|
-Darmv7=1
|
|
|
|
-Darm_fpu=vfpv3-d16";;
|
|
|
|
armv6*)
|
|
|
|
conf+="
|
|
|
|
-Darmv7=0
|
|
|
|
-Darmv6=1
|
|
|
|
-Darm_fpu=vfp
|
|
|
|
-Darm_thumb=0
|
|
|
|
-Dv8_can_use_vfp_instructions=false
|
|
|
|
-Dv8_can_use_vfp2_instructions=true";;
|
|
|
|
esac
|
|
|
|
|
2013-08-21 10:48:49 +00:00
|
|
|
build/linux/unbundle/replace_gyp_files.py ${conf}
|
2014-12-02 09:21:12 +00:00
|
|
|
build/gyp_chromium --depth=. ${conf} -Drelease_extra_cflags="${CFLAGS}"
|
2011-08-10 09:21:31 +00:00
|
|
|
}
|
2012-02-22 16:38:34 +00:00
|
|
|
do_build() {
|
2014-09-26 05:33:52 +00:00
|
|
|
export -n CFLAGS CXXFLAGS LDFLAGS
|
2014-06-17 12:17:28 +00:00
|
|
|
ninja -C out/Release ${makejobs} chrome chrome_sandbox chromedriver
|
2011-06-18 15:45:42 +00:00
|
|
|
}
|
2012-02-22 16:38:34 +00:00
|
|
|
do_install() {
|
2011-08-10 09:21:31 +00:00
|
|
|
vinstall out/Release/chrome 755 usr/lib/${pkgname} ${pkgname}
|
2014-04-10 18:31:56 +00:00
|
|
|
vinstall out/Release/chromedriver 755 usr/lib/${pkgname} chromedriver
|
2013-10-03 12:11:40 +00:00
|
|
|
vinstall out/Release/chrome_sandbox 4755 usr/lib/${pkgname} chrome-sandbox
|
2012-08-18 10:24:04 +00:00
|
|
|
|
2014-12-02 09:21:12 +00:00
|
|
|
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
2014-10-29 19:29:33 +00:00
|
|
|
cp out/Release/nacl_helper{,_bootstrap} \
|
|
|
|
${DESTDIR}/usr/lib/chromium
|
2014-10-31 08:38:08 +00:00
|
|
|
cp out/Release/nacl_irt_x86_64.nexe ${DESTDIR}/usr/lib/chromium
|
|
|
|
fi
|
2014-10-29 19:29:33 +00:00
|
|
|
cp out/Release/{*.pak,libffmpegsumo.so} \
|
2014-08-28 06:48:54 +00:00
|
|
|
out/Release/libpdf.so \
|
2013-10-03 12:11:40 +00:00
|
|
|
${DESTDIR}/usr/lib/chromium
|
2012-08-18 10:24:04 +00:00
|
|
|
|
2014-12-02 09:21:12 +00:00
|
|
|
cp -a out/Release/locales ${DESTDIR}/usr/lib/chromium
|
2012-08-18 10:24:04 +00:00
|
|
|
|
2014-10-29 19:29:33 +00:00
|
|
|
vman out/Release/chrome.1 chromium.1
|
2011-08-10 09:21:31 +00:00
|
|
|
vinstall ${FILESDIR}/chromium.desktop 644 usr/share/applications
|
2012-08-18 10:24:04 +00:00
|
|
|
|
|
|
|
for size in 22 24 48 64 128 256; do
|
2011-09-19 09:25:31 +00:00
|
|
|
install -Dm644 "chrome/app/theme/chromium/product_logo_${size}.png" \
|
2011-06-18 15:45:42 +00:00
|
|
|
${DESTDIR}/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png
|
|
|
|
done
|
2012-08-18 10:24:04 +00:00
|
|
|
for size in 16 32; do
|
|
|
|
install -Dm644 "chrome/app/theme/default_100_percent/chromium/product_logo_${size}.png" \
|
|
|
|
${DESTDIR}/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png
|
|
|
|
done
|
|
|
|
|
2014-10-29 19:29:33 +00:00
|
|
|
vbin ${FILESDIR}/chromium.sh chromium
|
|
|
|
vlicense LICENSE
|
2014-04-10 18:31:56 +00:00
|
|
|
ln -s /usr/lib/chromium/chromedriver ${DESTDIR}/usr/bin/chromedriver
|
2011-06-18 15:45:42 +00:00
|
|
|
}
|