summaryrefslogtreecommitdiff
path: root/extra/webkitgtk2/PKGBUILD
blob: e2e8aa1b602e9f2303a8f2a45e7805c0f7567459 (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
# $Id: PKGBUILD 198483 2013-10-30 15:08:20Z allan $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>

pkgname=webkitgtk2
pkgver=1.10.2
pkgrel=8
pkgdesc="GTK+ Web content engine library for GTK+ 2.0"
arch=(i686 x86_64 mips64el)
url="http://webkitgtk.org/"
license=(custom)
depends=(libxt libxslt sqlite libsoup enchant libgl geoclue gtk2 gstreamer0.10-base
         icu)
makedepends=(gperf gobject-introspection python2 mesa ruby gtk-doc)
optdepends=()
provides=("libwebkit=${pkgver}")
conflicts=(libwebkit)
replaces=(libwebkit)
options=(!emptydirs)
source=(http://webkitgtk.org/releases/webkitgtk-${pkgver}.tar.xz
        bison3.patch)
sha256sums=('19234f8e4edfaefe91ed06471a2aa8c71d26dd55d33787eede1dcfc9a3a96d9c'
            '0996b25d17be61470678c18db9bfad1bf807aac410690fb8935370dbc8b3ce34')

prepare() {
  cd webkitgtk-$pkgver
  patch -Np1 -i ../bison3.patch
}

build() {
  cd webkitgtk-$pkgver

  # Suppress a *lot* of gcc 4.8 warnings
  CPPFLAGS+=" -Wno-unused-local-typedefs"

  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

# --disable-optimizations will add -O0
      export CFLAGS="${CFLAGS/-O[0-9]}"

      extra="--disable-fast-malloc --disable-optimizations"
  fi

  PYTHON=/usr/bin/python2 ./configure --prefix=/usr \
    --libexecdir=/usr/lib/$pkgname \
    --enable-introspection \
    --disable-webkit2 \
    --with-gstreamer=0.10 \
    --with-gtk=2.0 \
    $extra

  # https://bugzilla.gnome.org/show_bug.cgi?id=655517
  sed -i 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

  make all stamp-po
}

package() {
  cd webkitgtk-$pkgver
  make -j1 DESTDIR="$pkgdir" install
  install -Dm644 Source/WebKit/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  rm -r "$pkgdir/usr/share/gtk-doc/html/webkitgtk"
}