summaryrefslogtreecommitdiff
path: root/extra/webkitgtk/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'extra/webkitgtk/PKGBUILD')
-rw-r--r--extra/webkitgtk/PKGBUILD32
1 files changed, 30 insertions, 2 deletions
diff --git a/extra/webkitgtk/PKGBUILD b/extra/webkitgtk/PKGBUILD
index 64290b1fd..88fa24493 100644
--- a/extra/webkitgtk/PKGBUILD
+++ b/extra/webkitgtk/PKGBUILD
@@ -5,7 +5,7 @@ pkgname=webkitgtk
pkgver=2.2.5
pkgrel=1
pkgdesc="GTK+ Web content engine library"
-arch=(i686 x86_64)
+arch=(i686 x86_64 mips64el)
url="http://webkitgtk.org/"
license=(custom)
depends=(libxt libxslt sqlite libsoup enchant libgl geoclue gtk3 gst-plugins-base-libs
@@ -19,11 +19,39 @@ options=(!emptydirs)
source=(http://webkitgtk.org/releases/$pkgname-${pkgver}.tar.xz)
sha256sums=('c710994a1ed0ec78f746a05ae7dc65369ed56d7475f0de576ca7a73ad9c6e670')
+prepare() {
+ cd $pkgbase-$pkgver
+
+ 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
+
+ # Won't be made before files there.
+ mkdir -p Programs/resources
+}
+
build() {
cd $pkgname-$pkgver
+
+ 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/$pkgname \
- --enable-introspection
+ --enable-introspection \
+ ${extra}
# https://bugzilla.gnome.org/show_bug.cgi?id=655517
sed -i 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool