summaryrefslogtreecommitdiff
path: root/extra/libwebkit/PKGBUILD
blob: 40985ac438a67c4d3722a34dc6af2f87dfca8aae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# $Id: PKGBUILD 139389 2011-10-01 19:00:15Z ibiru $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>

pkgbase=libwebkit
pkgname=(libwebkit libwebkit3)
pkgver=1.6.1
pkgrel=1
pkgdesc="An opensource web content engine"
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
        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 )
}

_build() {
  PYTHON=/usr/bin/python2 ../configure --prefix=/usr \
    --enable-introspection \
    --with-font-backend=freetype --enable-gtk-doc \
    --with-unicode-backend=icu \
    --enable-spellcheck "$@"
  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)

  cd "$srcdir/webkit-$pkgver/build-gtk2"
  make DESTDIR="${pkgdir}" install
  install -Dm644 ../Source/WebKit/LICENSE "${pkgdir}/usr/share/licenses/libwebkit/LICENSE"
}

package_libwebkit3() {
  pkgdesc+=" (for GTK3)"
  depends+=(gtk3)

  cd "${srcdir}/webkit-${pkgver}/build-gtk3"
  make DESTDIR="${pkgdir}" install
  install -Dm644 ../Source/WebKit/LICENSE "${pkgdir}/usr/share/licenses/libwebkit3/LICENSE"
}