void-packages/srcpkgs/chromium/template

107 lines
4.5 KiB
Text

# Template file for 'chromium'
pkgname=chromium
#See http://www.chromium.org/developers/calendar for the latest version
version=27.0.1453.93
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"
_url_base="http://commondatastorage.googleapis.com"
distfiles="${_url_base}/${pkgname}-browser-official/${pkgname}-${version}.tar.xz"
checksum="6dd8c01a4d72acc512652332d67e92ff9bcb3533b621f2b281c30f00ce26ad40"
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."
hostmakedepends="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 which protobuf-devel
libxml2-devel libxslt-devel sqlite-devel yasm opus-devel ffmpeg-devel
libvpx-devel libflac-devel speex-devel libusb-devel libmtp-devel
libjpeg-turbo-devel libevent-devel v8-devel json-c-devel re2-devel
libwebp-devel minizip-devel libsrtp-devel jsoncpp-devel pulseaudio-devel
MesaLib-devel"
do_configure() {
unset LD LDFLAGS
# TODO
# See https://crbug.com/28287
# use_system_libsrtp=1 (check if https://bugs.gentoo.org/show_bug.cgi?id=459932 reproducible)
# use_system_v8=1 (http://crbug.com/29050 fixed for chromium-27)
# use_system_libvpx=1 (http://crbug.com/174287 fixed for chromium-27)
# use_system_ffmpeg=1 (most likely libvpx-related, check on chromium-27)
# disable_pnacl=0 (http://crbug.com/224169)
# use_system_sqlite=1 (http://crbug.com/22208)
# use_system_ssl=1 (http://crbug.com/58087)
# use_system_tcmalloc=1 (https://crbug.com/174634 WontFix?)
# use_system_hyphen=1 (http://crbug.com/176285)
# use_system_hunspell=1 (likely https://crbug.com/24517)
if [ "$XBPS_TARGET_MACHINE" != "i686" ]; then
# XXX disable system mesa for now.
# /usr/include/GL/glext.h:6153:19: error: 'GLsizeiptr' has a previous declaration as 'typedef ptrdiff_t GLsizeiptr'
# ./gpu/command_buffer/common/gles2_cmd_format.h:40:26: error: conflicting declaration 'typedef khronos_intptr_t GLintptr'
local _system_mesa="-Duse_system_mesa=1"
fi
build/gyp_chromium -f make build/all.gyp --depth=. -Dwerror= \
-Dlinux_use_gold_binary=0 -Dlinux_use_gold_flags=0 \
-Dlinux_sandbox_path=/usr/lib/chromium/chromium-sandbox \
-Ddisable_sse2=1 -Drelease_extra_cflags="$CFLAGS" \
-Dffmpeg_branding=Chrome -Dproprietary_codecs=1 \
-Duse_gconf=0 -Dlinux_use_tcmalloc=0 -Dlinux_link_gsettings=1 \
-Ddisable_nacl=1 -Duse_system_bzip2=1 -Duse_system_expat=1 \
-Duse_system_flac=1 -Duse_system_harfbuzz=1 -Duse_system_icu=1 \
-Duse_system_jsoncpp=1 -Duse_system_libevent=1 -Duse_system_libexif=1 \
-Duse_system_libjpeg=1 -Duse_system_libmtp=1 -Duse_system_libpng=1 \
-Duse_system_libsrtp=1 -Duse_system_libusb=1 -Duse_system_libwebp=1 \
-Duse_system_libxml=1 -Duse_system_minizip=1 \
-Duse_system_nspr=1 -Duse_system_opus=1 -Duse_system_protobuf=1 \
-Duse_system_re2=1 -Duse_system_speex=1 -Duse_system_stlport=1 \
-Duse_system_yasm=1 -Duse_system_zlib=1 -Duse_system_xdg=1 \
${_system_mesa}
}
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} ${pkgname}-sandbox
cp out/Release/{*.pak,libffmpegsumo.so} ${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}
}
chromium_package() {
depends="desktop-file-utils hicolor-icon-theme"
pkg_install() {
vmove all
}
}