summaryrefslogtreecommitdiff
path: root/extra/libwebkit
diff options
context:
space:
mode:
Diffstat (limited to 'extra/libwebkit')
-rw-r--r--extra/libwebkit/PKGBUILD25
-rw-r--r--extra/libwebkit/fix-mips-n32.patch25
2 files changed, 47 insertions, 3 deletions
diff --git a/extra/libwebkit/PKGBUILD b/extra/libwebkit/PKGBUILD
index 9cbac31f9..40985ac43 100644
--- a/extra/libwebkit/PKGBUILD
+++ b/extra/libwebkit/PKGBUILD
@@ -6,20 +6,33 @@ pkgname=(libwebkit libwebkit3)
pkgver=1.6.1
pkgrel=1
pkgdesc="An opensource web content engine"
-arch=('i686' 'x86_64')
+arch=('i686' 'x86_64' 'mips64el')
url="http://webkitgtk.org/"
license=('custom')
depends=('libxt' 'libxslt' 'sqlite3' 'icu' 'gstreamer0.10-base' 'libsoup' 'enchant')
+checkdepends=('hspell')
makedepends=('gperf' 'gtk-doc' 'gobject-introspection' 'python2' 'gtk2' 'gtk3')
options=('!libtool' '!emptydirs')
install=libwebkit.install
-source=(http://webkitgtk.org/webkit-${pkgver}.tar.gz)
-md5sums=('c11743694b1b71dad287b2e7a9e73b05')
+source=(http://webkitgtk.org/webkit-${pkgver}.tar.gz
+ fix-mips-n32.patch)
+md5sums=('c11743694b1b71dad287b2e7a9e73b05'
+ '1e1971b0214f6705ceb4f816c4b52af9')
build() {
cd "${srcdir}/webkit-${pkgver}"
mkdir build-gtk{2,3}
+ # WebKit knows only O32, not aligning memory on N32, also wants to
+ # use nonavailable JIT for all MIPS.
+ patch -Np1 -i "${srcdir}/fix-mips-n32.patch"
+
+ # ld needs more virtual memory than is available on MIPS n32, these
+ # options should reduce it.
+ if [ "${CARCH}" == "mips64el" ] ; then
+ export LDFLAGS="${LDFLAGS} -Wl,--reduce-memory-overhead -Wl,--no-keep-memory"
+ fi
+
( cd build-gtk2 && _build --with-gtk=2.0 )
( cd build-gtk3 && _build --with-gtk=3.0 )
}
@@ -33,6 +46,12 @@ _build() {
make all stamp-po
}
+check() {
+ cd "${srcdir}/webkit-${pkgver}"
+ make -C build-gtk2 check
+ make -C build-gtk3 check
+}
+
package_libwebkit() {
pkgdesc+=" (for GTK2)"
depends+=(gtk2)
diff --git a/extra/libwebkit/fix-mips-n32.patch b/extra/libwebkit/fix-mips-n32.patch
new file mode 100644
index 000000000..0acc0daf6
--- /dev/null
+++ b/extra/libwebkit/fix-mips-n32.patch
@@ -0,0 +1,25 @@
+--- webkit-1.4.1.orig/Source/JavaScriptCore/wtf/Platform.h 2011-06-30 12:14:01.572119909 +0200
++++ webkit-1.4.1/Source/JavaScriptCore/wtf/Platform.h 2011-06-30 12:17:00.352382262 +0200
+@@ -139,8 +139,9 @@
+
+ /* CPU(MIPS) - MIPS 32-bit */
+ /* Note: Only O32 ABI is tested, so we enable it for O32 ABI for now. */
++/* N32 is also tested, without JIT. */
+ #if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_)) \
+- && defined(_ABIO32)
++ && (defined(_ABIO32) || defined(_ABIN32))
+ #define WTF_CPU_MIPS 1
+ #if defined(__MIPSEB__)
+ #define WTF_CPU_BIG_ENDIAN 1
+@@ -1009,9 +1010,9 @@
+ #define ENABLE_JIT 0
+ #endif
+
+-/* The JIT is enabled by default on all x86, x64-64, ARM & MIPS platforms. */
++/* The JIT is enabled by default on all x86, x64-64, ARM & MIPS O32 platforms. */
+ #if !defined(ENABLE_JIT) \
+- && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(MIPS)) \
++ && (CPU(X86) || CPU(X86_64) || CPU(ARM) || (CPU(MIPS) && defined(_ABIO32))) \
+ && (OS(DARWIN) || !COMPILER(GCC) || GCC_VERSION_AT_LEAST(4, 1, 0)) \
+ && !OS(WINCE)
+ #define ENABLE_JIT 1