summaryrefslogtreecommitdiff
path: root/extra/libwebkit
diff options
context:
space:
mode:
Diffstat (limited to 'extra/libwebkit')
-rw-r--r--extra/libwebkit/PKGBUILD27
-rw-r--r--extra/libwebkit/fix-mips-n32.patch25
2 files changed, 48 insertions, 4 deletions
diff --git a/extra/libwebkit/PKGBUILD b/extra/libwebkit/PKGBUILD
index 7dccf4179..aa2207e39 100644
--- a/extra/libwebkit/PKGBUILD
+++ b/extra/libwebkit/PKGBUILD
@@ -6,23 +6,33 @@ pkgname=(libwebkit libwebkit3)
pkgver=1.4.2
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')
install=libwebkit.install
source=(http://webkitgtk.org/webkit-${pkgver}.tar.gz
- replace-switch-with-given-when.patch)
-md5sums=('361f8420e93d12101d650758fec09fa0'
- '3ba708a26b7af0e1e853867966fe14f7')
+ replace-switch-with-given-when.patch
+ fix-mips-n32.patch)
build() {
cd "${srcdir}/webkit-${pkgver}"
# patch -Np1 -i "${srcdir}/replace-switch-with-given-when.patch"
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 )
}
@@ -36,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)
@@ -56,3 +72,6 @@ package_libwebkit3() {
make DESTDIR="${pkgdir}" install
install -Dm644 ../Source/WebKit/LICENSE "${pkgdir}/usr/share/licenses/libwebkit3/LICENSE"
}
+md5sums=('361f8420e93d12101d650758fec09fa0'
+ '3ba708a26b7af0e1e853867966fe14f7'
+ '1e1971b0214f6705ceb4f816c4b52af9')
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