aboutsummaryrefslogblamecommitdiffstats
path: root/testing/chromium/APKBUILD
blob: 1372d9e1d21d62e95738e4fe4aa2388256a8184f (plain) (tree)
1
2
3
4
5
6
7
8
9


                                                         
                 


                              
                     
             
                   


                                                                                      

                                                                 
                                                            
                                                                      
          

                                                                                     

                               


                                         



                                    

                                    








                                                       







                                                                        
















































                                                                 







                                                   
                                              


                                                       
                                
                                      

                                                                    
                                      
                                                  







                                      
                                   

                                       



                                      




                                        

                                     


                                       







                                                                 
                                                                                         



                       












                                                                                                       
                                      



                                                                             

 
                                                                      

                                                         

                                                      




                                                                   
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: Unmaintained <unmaintained@alpinelinux.org>
pkgname=chromium
pkgver=17.0.942.0
pkgrel=0
pkgdesc="chromium web browser"
url="http://www.chromium.org/"
arch="x86 x86_64 arm"
license="BSD"
depends="xdg-utils"
depends_dev="alsa-lib-dev libevent-dev libpng-dev jpeg-dev cairo-dev cups-dev mesa-dev
	     dbus-glib-dev gtk+-dev libxml2-dev freetype-dev
	     libxslt-dev libxtst-dev icu-dev flac-dev speex-dev
	     hunspell-dev libxinerama-dev ffmpeg-dev nss-dev
	     libwebp-dev v8-dev bzip2-dev libevent-dev libvpx-dev
	     sqlite-dev libelf-dev libgcrypt-dev gnutls-dev"
makedepends="$depends_dev xdg-utils yasm gperf bison flex perl python"
install=""
subpackages="$pkgname-doc"
source="http://gsdview.appspot.com/chromium-browser-official/chromium-$pkgver.tar.bz2
	chromium-c99math.patch
	chromium-futimens.patch
	chromium-dlfcn.patch
	chromium-yasm.patch
	chromium-no-mit-screensaver.patch
	chromium-uclibc-resolv.patch
	chromium-breakpad.patch
	chromium-webrtc.patch
	chromium-malloc.patch"

_builddir="$srcdir"/chromium-$pkgver

CHROMIUM_HOME="/usr/lib/${pkgname}"
CHROMIUM_IMAGE="${_builddir}/out/Release"

# ugly hack to deal with google shipping weird tarballs
unpack() {
	default_unpack || return 0
}

prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done

	msg "Stripping Google cruft..."
	find third_party -type f \! -iname '*.gyp*' \
		\! -path 'third_party/WebKit/*' \
		\! -path 'third_party/angle/*' \
		\! -path 'third_party/cacheinvalidation/*' \
		\! -path 'third_party/cld/*' \
		\! -path 'third_party/expat/*' \
		\! -path 'third_party/ffmpeg/*' \
		\! -path 'third_party/flac/flac.h' \
		\! -path 'third_party/gpsd/*' \
		\! -path 'third_party/harfbuzz/*' \
		\! -path 'third_party/hunspell/*' \
		\! -path 'third_party/iccjpeg/*' \
		\! -path 'third_party/jsoncpp/*' \
		\! -path 'third_party/launchpad_translations/*' \
		\! -path 'third_party/leveldb/*' \
		\! -path 'third_party/leveldatabase/*' \
		\! -path 'third_party/libjingle/*' \
		\! -path 'third_party/libphonenumber/*' \
		\! -path 'third_party/libvpx/*' \
		\! -path 'third_party/lss/*' \
		\! -path 'third_party/mesa/*' \
		\! -path 'third_party/modp_b64/*' \
		\! -path 'third_party/mongoose/*' \
		\! -path 'third_party/npapi/*' \
		\! -path 'third_party/openmax/*' \
		\! -path 'third_party/ots/*' \
		\! -path 'third_party/protobuf/*' \
		\! -path 'third_party/scons-2.0.1/*' \
		\! -path 'third_party/sfntly/*' \
		\! -path 'third_party/skia/*' \
		\! -path 'third_party/smhasher/*' \
		\! -path 'third_party/speex/speex.h' \
		\! -path 'third_party/sqlite/*' \
		\! -path 'third_party/tcmalloc/*' \
		\! -path 'third_party/tlslite/*' \
		\! -path 'third_party/undoview/*' \
		\! -path 'third_party/v8-i18n/*' \
		\! -path 'third_party/webdriver/*' \
		\! -path 'third_party/webgl_conformance/*' \
		\! -path 'third_party/webrtc/*' \
		\! -path 'third_party/zlib/contrib/minizip/*' \
		-delete || return 1

	msg "Hacking source tree to use system V8 headers..."
	find v8 -type f \! -iname '*.gyp*' -delete || return 1
	rmdir v8/include || return 1
	ln -s /usr/include v8/include || return 1
}

build() {
	cd "$_builddir"

	chromium_arch=ia32
	test ${CARCH} = x86_64 && chromium_arch=x64

	# enabling SSE2 causes psABI breakage.
	msg "chromium architecture is ${chromium_arch}"
	GYP_DEFINES="\
		werror= \
		disable_sse2=1 \
		no_strict_aliasing=1 \
		linux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox \
		linux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome \
		linux_use_tcmalloc=0 \
		release_extra_cflags='${CFLAGS}' \
		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_flac=1 \
		use_system_libevent=1 \
		use_system_icu=1 \
		use_system_v8=1 \
		use_system_libwebp=1 \
		use_system_ffmpeg=1 \
		use_system_vpx=1 \
		use_system_ssl=0 \
		use_system_sqlite=0 \
		use_system_speex=1 \
		use_system_xdg_utils=1 \
		use_cups=1 \
		use_gconf=0 \
		use_gnome_keyring=0 \
		use_kerberos=0 \
		linux_link_kerberos=0 \
		disable_nacl=1 \
		remoting=0 \
		target_arch=${chromium_arch}"
	export GYP_DEFINES

	msg "setting up makefiles"
	python build/gyp_chromium -f make --depth=. build/all.gyp

	msg "building chrome and chrome_sandbox targets"
	make V=1 BUILDTYPE=Release -j$JOBS chrome chrome_sandbox chromedriver || return 1
}

package() {
	cd "$_builddir"

	mkdir -p "$pkgdir"/${CHROMIUM_HOME}

	install -m755 -c "${CHROMIUM_IMAGE}/chrome" "${pkgdir}/${CHROMIUM_HOME}/chrome"
	install -m755 -c "${CHROMIUM_IMAGE}/chromedriver" "${pkgdir}/${CHROMIUM_HOME}/chromedriver"
	install -m755 -c "${CHROMIUM_IMAGE}/chrome_sandbox" "${pkgdir}/${CHROMIUM_HOME}/chrome_sandbox"
	install -m644 -c "${CHROMIUM_IMAGE}/chrome.pak" "${pkgdir}/${CHROMIUM_HOME}/chrome.pak"
	install -m644 -c "${CHROMIUM_IMAGE}/resources.pak" "${pkgdir}/${CHROMIUM_HOME}/resources.pak"

	mkdir -p "$pkgdir"/usr/share/man/man1
	install -m644 -c "${CHROMIUM_IMAGE}/chrome.1" "${pkgdir}/usr/share/man/man1/chrome.1"
	ln -sf "chrome.1" "${pkgdir}/usr/share/man/man1/chrome-browser.1"

	install -d "${pkgdir}"/usr/bin
	ln -sf "${CHROMIUM_HOME}/chrome" "${pkgdir}/usr/bin/chrome"
	ln -sf "${CHROMIUM_HOME}/chrome" "${pkgdir}/usr/bin/chrome-browser"
	ln -sf "${CHROMIUM_HOME}/chrome" "${pkgdir}/usr/bin/chromium"
	ln -sf "${CHROMIUM_HOME}/chrome" "${pkgdir}/usr/bin/chromium-browser"
}

md5sums="5660529559b1845217b679a883160873  chromium-17.0.942.0.tar.bz2
320d611dba59a881a4f178df743c4912  chromium-c99math.patch
1328245f1f21cf3abf54223ed06a70f4  chromium-futimens.patch
768d2ca4daa2db611fd4aeb561701f4e  chromium-dlfcn.patch
76cb0975e631d54fb57bd298041cec05  chromium-yasm.patch
327850010ae407477083b91a4e04af51  chromium-no-mit-screensaver.patch
441bcd9fc987e290c610e2f1bbfb75f8  chromium-uclibc-resolv.patch
f6531589ce894fcd9b6f4917e83cd3aa  chromium-breakpad.patch
6257d567f83ad591360c3de4f9073725  chromium-webrtc.patch
42f0beecf6a9e4e65c88b5acb77d8a51  chromium-malloc.patch"