mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
161 lines
5.6 KiB
Bash
161 lines
5.6 KiB
Bash
# Contributor: Mikhail Vorozhtsov <mikhail.vorozhtsov@gmail.com>
|
|
# Maintainer: Gustavo Alvarez <sl1pkn07@gmail.com>
|
|
|
|
# ALARM changes were made to the GYP_DEFINES and CFLAGS and to the
|
|
# target architecture.
|
|
|
|
plugrel=2
|
|
noautobuild=1
|
|
|
|
pkgname=chromium-dev
|
|
pkgver=14.0.835.8
|
|
pkgrel=1
|
|
_buildtype=Release
|
|
test "x${DEBUG}" = "xyes" && _buildtype=Debug
|
|
pkgdesc='The open-source project behind Google Chrome (Dev channel)'
|
|
arch=('armv7h')
|
|
url='http://www.chromium.org/'
|
|
license=('BSD')
|
|
depends=('alsa-lib' 'xdg-utils' 'hicolor-icon-theme' 'bzip2' 'libevent' 'libxss' 'libpng' 'libjpeg' 'cairo' 'dbus-glib'
|
|
'glib2' 'gtk2' 'nss' 'nspr' 'ffmpeg' 'libvpx' 'libxml2' 'libxslt' 'libxtst' 'icu')
|
|
makedepends=('git' 'python2' 'gperf' 'yasm' 'mesa' 'gcc>=4.5.0-6' 'libgnome-keyring')
|
|
optdepends=('libgnome-keyring')
|
|
options=()
|
|
test ${_buildtype} = Debug && options[${#options[@]}]=!strip
|
|
install="${pkgname}.install"
|
|
source=(http://build.chromium.org/official/chromium-${pkgver}.tar.bz2
|
|
${pkgname}.desktop
|
|
${pkgname}.sh)
|
|
md5sums=('775b1253214a64fc9eced614870ec374'
|
|
'4d3824048614dd10fcd83d7e5c8ea091'
|
|
'eaeaf4a71707d8a767be9a7d467bb809')
|
|
_use_gconf=0
|
|
if test -x /usr/bin/gconftool-2; then
|
|
_use_gconf=1
|
|
depends[${#depends[@]}]=gconf
|
|
fi
|
|
|
|
|
|
# Build "ffmpegsumo.so" (0) / Use system ffmpeg (1)
|
|
_use_ffmpeg_system_libs=0
|
|
if test $_use_ffmpeg_system_libs = 1; then
|
|
use_system_ffmpeg="use_system_ffmpeg=1"
|
|
build_ffmpegsumo="build_ffmpegsumo=0"
|
|
else
|
|
use_system_ffmpeg="use_system_ffmpeg=0"
|
|
build_ffmpegsumo="build_ffmpegsumo=1"
|
|
fi
|
|
|
|
build() {
|
|
cd "${srcdir}/chromium-${pkgver}"
|
|
|
|
msg "Patching sources..."
|
|
|
|
msg "Save configuration in ~/.config/${pkgname}"
|
|
sed -e "s/'filename': 'chromium-browser'/'filename': '${pkgname}'/" -e "s/'confdir': 'chromium'/'confdir': '${pkgname}'/" -i chrome/chrome_exe.gypi
|
|
sed \
|
|
-e "s/config_dir\.Append(\"chromium\")/config_dir.Append(\"${pkgname}\")/" \
|
|
-e "s/config_dir\.Append(\"chrome-frame\")/config_dir.Append(\"chrome-frame-${pkgname#chromium-}\")/" \
|
|
-i chrome/common/chrome_paths_linux.cc
|
|
msg2 "Done"
|
|
|
|
msg "Force usage of python2"
|
|
#find -type f -a -name '*.py' -exec sed -i -e 's|#![ ]*/usr/bin/python$|#!/usr/bin/python2|' -e 's|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|' {} \;
|
|
#find -type f -a -name '*.gyp*' -exec sed -i -e 's|<!(python |<!(python2 |g' -e "s|'python'|'python2'|g" {} \;
|
|
rm -rf "${srcdir}"/python
|
|
mkdir "${srcdir}"/python
|
|
ln -s /usr/bin/python2 "${srcdir}"/python/python
|
|
export PATH="${srcdir}"/python:$PATH
|
|
msg2 "Done"
|
|
|
|
msg "Patching Sources Sucessfull"
|
|
|
|
msg "Building Chromium..."
|
|
chromium_arch=arm
|
|
GYP_DEFINES="\
|
|
gcc_version=46 \
|
|
werror= \
|
|
no_strict_aliasing=1 \
|
|
linux_sandbox_path=/usr/lib/${pkgname}/chromium-sandbox \
|
|
linux_sandbox_chrome_path=/usr/lib/${pkgname}/chromium \
|
|
release_extra_cflags='${CFLAGS} -DUSE_EABI_HARDFLOAT' \
|
|
disable_nacl=1 \
|
|
${use_system_ffmpeg} \
|
|
${build_ffmpegsumo} \
|
|
use_system_vpx=1 \
|
|
proprietary_codecs=1 \
|
|
use_system_libjpeg=1 \
|
|
use_system_libxslt=1 \
|
|
use_system_libxml=1 \
|
|
use_system_bzip2=1 \
|
|
use_system_zlib=1 \
|
|
use_system_libpng=1 \
|
|
use_system_yasm=1 \
|
|
use_system_libevent=1 \
|
|
use_system_icu=0 \
|
|
use_system_ssl=0 \
|
|
use_gconf=${_use_gconf} \
|
|
use_cups=0 \
|
|
target_arch=${chromium_arch} \
|
|
linux_use_tcmalloc=0 \
|
|
armv7=1 \
|
|
arm_neon=0 \
|
|
arm_fpu=vfpv3-d16 \
|
|
enable_webrtc=0 \
|
|
disable_sse2=1"
|
|
test ${_buildtype} = Release \
|
|
&& GYP_DEFINES="${GYP_DEFINES} \
|
|
linux_strip_binary=1 \
|
|
remove_webcore_debug_symbols=1"
|
|
export GYP_DEFINES
|
|
echo "${pkgver} ${GYP_DEFINES}" > current.config
|
|
if test -f "last.config"; then
|
|
if cmp last.config current.config; then
|
|
msg2 "Configuration has not changed, reusing output files..."
|
|
else
|
|
msg2 "Configuration has changed, removing output files..."
|
|
rm -rf out
|
|
fi
|
|
fi
|
|
mv current.config last.config
|
|
python2 build/gyp_chromium -f make --depth=. build/all.gyp
|
|
make BUILDTYPE=${_buildtype} ${MAKEFLAGS} chrome chrome_sandbox
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/chromium-${pkgver}"
|
|
|
|
chromium_home="${pkgdir}/usr/lib/${pkgname}"
|
|
install -Dm755 -D out/${_buildtype}/chrome "${chromium_home}/chromium"
|
|
install -Dm4555 -o root -g root -D out/${_buildtype}/chrome_sandbox "${chromium_home}/chromium-sandbox"
|
|
install -Dm644 out/${_buildtype}/chrome.pak "${chromium_home}/chrome.pak"
|
|
install -Dm644 out/${_buildtype}/resources.pak "${chromium_home}/resources.pak"
|
|
|
|
if test ${_use_ffmpeg_system_libs} = 1; then
|
|
for n in avcodec avdevice avfilter avformat avutil postproc swscale; do
|
|
if test -e /usr/lib/lib${n}.so.[0-9]; then
|
|
f=`echo /usr/lib/lib${n}.so.[0-9]`
|
|
else
|
|
f=`echo /usr/lib/lib${n}.so.[0-9][0-9]`
|
|
fi
|
|
f=`basename "$f"`
|
|
ln -s ../$f "${chromium_home}/${f}"
|
|
done
|
|
else
|
|
if test -e out/${_buildtype}/libffmpegsumo.so; then
|
|
install -Dm644 out/${_buildtype}/libffmpegsumo.so "${chromium_home}/libffmpegsumo.so"
|
|
fi
|
|
fi
|
|
|
|
cp -a out/${_buildtype}/locales out/${_buildtype}/resources "${chromium_home}/"
|
|
find "${chromium_home}" -type f -name '*.d' -delete
|
|
install -Dm644 out/${_buildtype}/chrome.1 "${pkgdir}/usr/share/man/man1/${pkgname}.1"
|
|
|
|
install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
|
|
for size in 16 22 24 32 48 64 128 256; do
|
|
install -Dm644 chrome/app/theme/chromium/product_logo_${size}.png "${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/${pkgname}.png"
|
|
done
|
|
install -Dm755 ${srcdir}/${pkgname}.sh "${pkgdir}/usr/bin/${pkgname}"
|
|
|
|
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
|
}
|