189 lines
6.7 KiB
Plaintext
189 lines
6.7 KiB
Plaintext
# Template file for 'chromium'
|
|
pkgname=chromium
|
|
#See http://www.chromium.org/developers/calendar for the latest version
|
|
version=30.0.1599.66
|
|
revision=1
|
|
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"
|
|
long_desc="
|
|
Chromium is an open-source browser project that aims to build a safer,
|
|
faster, and more stable way for all Internet users to experience the web.
|
|
|
|
Chromium serves as a base for Google Chrome, which is Chromium rebranded
|
|
(name and logo) with very few additions such as usage tracking and an
|
|
auto-updater system."
|
|
|
|
_url_base="https://commondatastorage.googleapis.com"
|
|
_toolchains_rev=12029
|
|
|
|
create_srcdir=yes
|
|
|
|
distfiles="
|
|
${_url_base}/${pkgname}-browser-official/${pkgname}-${version}.tar.xz
|
|
${_url_base}/nativeclient-archive2/toolchain/${_toolchains_rev}/naclsdk_linux_x86.tgz
|
|
${_url_base}/nativeclient-archive2/toolchain/${_toolchains_rev}/naclsdk_pnacl_linux_x86.tgz
|
|
${_url_base}/nativeclient-archive2/toolchain/${_toolchains_rev}/naclsdk_pnacl_translator.tgz
|
|
${_url_base}/nativeclient-archive2/toolchain/${_toolchains_rev}/naclsdk_pnacl_translator.tgz.sha1hash"
|
|
checksum="
|
|
8fe8262fd69b59c759916d17eaf4225d1d5b64c468629cb9a684144d3cd15724
|
|
641e2acf0e755bfe052016164e9e0198104130b612a042eacf259a2f2630d6cd
|
|
6ce53b1af8fef34c1557c7fbb764cfbca29cb70b8ee3367746a31976cf115e01
|
|
0b7afcbad1461336e7062d7c8d64e67e670a1fce07214e24313204af1f3a5a70
|
|
d6c5ed767ee9ee4e92b4de958cd32b0152783f170c1483fe99d2199fc2623813"
|
|
skip_extraction="
|
|
naclsdk_linux_x86.tgz
|
|
naclsdk_pnacl_linux_x86.tgz
|
|
naclsdk_pnacl_translator.tgz
|
|
naclsdk_pnacl_translator.tgz.sha1hash"
|
|
|
|
hostmakedepends="which yasm python pkg-config perl gperf bison"
|
|
makedepends="libpng-devel>=1.6 gtk+-devel nss-devel GConf-devel pciutils-devel
|
|
libXi-devel libgcrypt-devel libgnome-keyring-devel cups-devel elfutils-devel
|
|
libXcomposite-devel speech-dispatcher-devel libXrandr-devel mit-krb5-devel
|
|
libXScrnSaver-devel alsa-lib-devel icu-devel protobuf-devel snappy-devel
|
|
libxml2-devel libxslt-devel opus-devel pulseaudio-devel nss-devel
|
|
libXcursor-devel libflac-devel speex-devel libmtp-devel v8-devel>=3.20
|
|
libjpeg-turbo-devel libevent-devel json-c-devel re2-devel harfbuzz-devel
|
|
libwebp-devel minizip-devel jsoncpp-devel zlib-devel hwids"
|
|
depends="desktop-file-utils hicolor-icon-theme"
|
|
nostrip_files="nacl_irt_x86_64.nexe nacl_irt_x86_32.nexe"
|
|
|
|
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
|
makedepends+=" gcc-c++-multilib"
|
|
fi
|
|
|
|
do_configure() {
|
|
local conf=""
|
|
|
|
# XXX xtraeme: fix gcc{,-c++}-multilib instead.
|
|
ldconfig &>/dev/null
|
|
|
|
mkdir native_client/toolchain/{.tars,pnacl_translator}
|
|
ln -sf ${XBPS_SRCDISTDIR}/${pkgver%_*}/naclsdk_linux_x86.tgz \
|
|
native_client/toolchain/.tars/naclsdk_linux_x86.tgz
|
|
ln -sf ${XBPS_SRCDISTDIR}/${pkgver%_*}/naclsdk_pnacl_linux_x86.tgz \
|
|
native_client/toolchain/.tars/naclsdk_pnacl_linux_x86.tgz
|
|
ln -sf ${XBPS_SRCDISTDIR}/${pkgver%_*}/naclsdk_pnacl_translator.tgz \
|
|
native_client/toolchain/.tars/naclsdk_pnacl_translator.tgz
|
|
ln -sf ${XBPS_SRCDISTDIR}/${pkgver%_*}/naclsdk_pnacl_translator.tgz.sha1hash \
|
|
native_client/toolchain/pnacl_translator/SOURCE_SHA1
|
|
|
|
export LD="$CXX"
|
|
|
|
# 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"
|
|
|
|
# Never tell the build system to "enable" SSE2, it has a few unexpected issues.
|
|
conf+=" -Ddisable_sse2=1"
|
|
|
|
# Disable glibc Native Client toolchain.
|
|
conf+=" -Ddisable_glibc=1"
|
|
|
|
# Use system-provided libraries.
|
|
# TODO: use_system_hunspell (upstream changes needed).
|
|
# TODO: use_system_libsrtp.
|
|
# TODO: use_system_libusb (http://crbug.com/266149).
|
|
# TODO: use_system_ssl (http://crbug.com/58087).
|
|
# TODO: use_system_sqlite (http://crbug.com/22208).
|
|
conf+="
|
|
-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_libwebp=1
|
|
-Duse_system_libxml=1
|
|
-Duse_system_libxslt=1
|
|
-Duse_system_minizip=1
|
|
-Duse_system_nspr=1
|
|
-Duse_system_opus=1
|
|
-Duse_system_protobuf=1
|
|
-Duse_system_re2=1
|
|
-Duse_system_snappy=1
|
|
-Duse_system_speex=1
|
|
-Duse_system_v8=1
|
|
-Duse_system_xdg_utils=1
|
|
-Duse_system_zlib=1
|
|
-Duse_system_yasm=1
|
|
-Duse_cups=1
|
|
-Dlinux_link_cups=1
|
|
-Duse_pulseaudio=1
|
|
-Dlinux_link_pulseaudio=1
|
|
-Duse_gconf=0"
|
|
|
|
# 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"
|
|
|
|
# Never use bundled gold binary. Disable gold linker flags for now.
|
|
conf+=" -Dlinux_use_gold_binary=0 -Dlinux_use_gold_flags=0"
|
|
|
|
# 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="
|
|
|
|
# Disable tcmalloc.
|
|
conf+=" -Dlinux_use_tcmalloc=0"
|
|
|
|
# Save space by removing DLOG and DCHECK messages (about 6% reduction).
|
|
conf+=" -Dlogging_like_official_build=1"
|
|
|
|
build/linux/unbundle/replace_gyp_files.py ${conf}
|
|
build/gyp_chromium --depth=. -f make ${conf} -Drelease_extra_cflags="$CFLAGS"
|
|
}
|
|
|
|
do_build() {
|
|
make BUILDTYPE=Release ${makejobs} chrome chrome_sandbox
|
|
}
|
|
|
|
do_install() {
|
|
vinstall out/Release/chrome 755 usr/lib/${pkgname} ${pkgname}
|
|
vinstall out/Release/chrome_sandbox 4755 usr/lib/${pkgname} chrome-sandbox
|
|
|
|
cp out/Release/{*.pak,libffmpegsumo.so,nacl_helper{,_bootstrap}} \
|
|
out/Release/{libppGoogleNaClPluginChrome.so,nacl_irt_*.nexe} \
|
|
${DESTDIR}/usr/lib/chromium
|
|
|
|
cp -a out/Release/locales ${DESTDIR}/usr/lib/chromium
|
|
|
|
vinstall out/Release/chrome.1 644 usr/share/man/man1 chromium.1
|
|
vinstall ${FILESDIR}/chromium.desktop 644 usr/share/applications
|
|
|
|
for size in 22 24 48 64 128 256; do
|
|
install -Dm644 "chrome/app/theme/chromium/product_logo_${size}.png" \
|
|
${DESTDIR}/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" \
|
|
${DESTDIR}/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png
|
|
done
|
|
|
|
vinstall ${FILESDIR}/chromium.sh 755 usr/bin chromium
|
|
vinstall LICENSE 644 usr/share/licenses/${pkgname}
|
|
}
|