diff options
Diffstat (limited to 'extra/webkitgtk/PKGBUILD')
-rw-r--r-- | extra/webkitgtk/PKGBUILD | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/extra/webkitgtk/PKGBUILD b/extra/webkitgtk/PKGBUILD index 0502cb7f6..e95bccc34 100644 --- a/extra/webkitgtk/PKGBUILD +++ b/extra/webkitgtk/PKGBUILD @@ -5,22 +5,49 @@ pkgbase=webkitgtk pkgname=('webkitgtk3') pkgver=2.0.2 pkgrel=1 -arch=('i686' 'x86_64') +arch=('i686' 'x86_64' 'mips64el') url="http://webkitgtk.org/" license=('custom') makedepends=('libxt' 'libxslt' 'sqlite' 'libsoup' 'enchant' 'libgl' 'geoclue' 'gtk2' 'gtk3' 'gst-plugins-base-libs' 'gperf' 'gobject-introspection' 'python' 'mesa' 'ruby' 'gtk-doc' 'libsecret' 'libwebp') options=('!libtool' '!emptydirs') -source=(http://webkitgtk.org/releases/$pkgbase-$pkgver.tar.xz) -sha256sums=('c3685032545eb4c23f3f56826817783a6963ad59bd7bbf806705059b3d8caeb2') +source=(http://webkitgtk.org/releases/$pkgbase-$pkgver.tar.xz + 0001-https-bugs.webkit.org-show_bug.cgi-id-112141.patch) +sha256sums=('c3685032545eb4c23f3f56826817783a6963ad59bd7bbf806705059b3d8caeb2' + '7b4c1419342bafcca642d7a41abe92713810401591906b081fe476169cb9a3aa') prepare() { cd $pkgbase-$pkgver mkdir build-gtk3 + if [ "$CARCH" = "mips64el" ]; then + # Fix MIPS N32 support. + sed -i 's/defined(_ABIO32)/(defined(_ABIO32) || defined(_ABIN32))/' \ + Source/WTF/wtf/Platform.h + # Don't enable JIT even if configure finds that it's not supported. + sed -i 's/#define ENABLE_JIT 1/#define ENABLE_JIT 0/' \ + Source/WTF/wtf/Platform.h + fi + + # Fix build on 32-bit platforms. + patch -p1 -i "$srcdir/0001-https-bugs.webkit.org-show_bug.cgi-id-112141.patch" + + # Won't be made before files there. + mkdir -p build-gtk3/Programs/resources } build() { cd $pkgbase-$pkgver/build-gtk3 - ../configure --prefix=/usr --libexecdir=/usr/lib/webkitgtk3 --enable-introspection + + if [ "$CARCH" = "mips64el" ]; then + # Optimizations make it segfault when running; without + # -mlong-calls R_MIPS_26 relocations will be used and truncated. + # Disable unneeded arch-specific warnings. + export CPPFLAGS="${CPPFLAGS/-D_FORTIFY_SOURCE=[0-9]} -Wno-cast-align" + export CFLAGS="${CFLAGS/-O[0-9]} -mlong-calls" + export CXXFLAGS="${CXXFLAGS/-O[0-9]} -mlong-calls" + extra="--disable-fast-malloc --disable-optimizations" + fi + + ../configure --prefix=/usr --libexecdir=/usr/lib/webkitgtk3 --enable-introspection $extra make all stamp-po } |