summaryrefslogtreecommitdiff
path: root/extra/libwebkit/PKGBUILD
blob: ec0c795c61342b73447774201e2e83412884a064 (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
# $Id: PKGBUILD 126732 2011-06-06 21:34:03Z andyrtr $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>

pkgbase=libwebkit
pkgname=(libwebkit libwebkit3)
pkgver=1.4.1
pkgrel=1
pkgdesc="An opensource web content engine"
arch=('i686' 'x86_64')
url="http://webkitgtk.org/"
license=('custom')
depends=('libxt' 'libxslt' 'sqlite3' 'icu' 'gstreamer0.10-base' 'libsoup' 'enchant')
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=('c1a4f732a77d6f8197437b50678d3dbc'
         '3ba708a26b7af0e1e853867966fe14f7')

build() {
  cd "${srcdir}/webkit-${pkgver}"
  patch -Np1 -i "${srcdir}/replace-switch-with-given-when.patch"
  mkdir build-gtk{2,3}

  ( 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
}

package_libwebkit() {
  pkgdesc+=" (for GTK2)"
  depends+=(gtk2)
  provides=('webkitgtk-svn')
  conflicts=('webkitgtk-svn')
  replaces=('webkitgtk-svn')

  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"
}