upgpkg: sbcl 2.2.11-1
[arch-packages.git] / webkitgtk / trunk / PKGBUILD
bloba870e6f7e97587cea46e0861e93daa79789426f6
1 # Contributor: Andreas Radke <andyrtr@archlinux.org>
3 pkgbase=webkitgtk
4 pkgname=(webkitgtk webkitgtk2)
5 pkgver=2.4.11
6 pkgrel=6
7 pkgdesc="Legacy Web content engine"
8 arch=(x86_64)
9 url="https://webkitgtk.org/"
10 license=(custom)
11 depends=(libxt libxslt sqlite libsoup enchant libgl geoclue2 gst-plugins-base-libs
12          libsecret libwebp harfbuzz-icu)
13 makedepends=(gtk3 gtk2 gperf gobject-introspection python2 mesa ruby)
14 optdepends=('gst-plugins-base: free media decoding'
15             'gst-plugins-good: media decoding'
16             'gst-libav: nonfree media decoding')
17 options=(!emptydirs)
18 install=webkitgtk.install
19 source=(https://webkitgtk.org/releases/$pkgbase-${pkgver}.tar.xz
20         webkitgtk-2.4.9-abs.patch
21         icu59.patch)
22 sha256sums=('588aea051bfbacced27fdfe0335a957dca839ebe36aa548df39c7bbafdb65bf7'
23             'ec294bbb5588a1802a68e3615c6718486b22f922645c5fef686d3d103014bf70'
24             'eb791b9c8dcb84996904846dedf8c3ddf1a5fde32330177f3f0071510bd8ca6d')
26 prepare() {
27   mkdir build-gtk{,2} path
28   ln -s /usr/bin/python2 path/python
30   cd $pkgbase-$pkgver
31   patch -Np1 -i ../webkitgtk-2.4.9-abs.patch
32   patch -Np1 -i ../icu59.patch
35 _build() (
36   _ver="$1"; shift
37   cd build-${_ver}
39   PATH="$srcdir/path:$PATH"
41   CXXFLAGS+=" -fno-delete-null-pointer-checks"
42   CFLAGS+=" -fno-delete-null-pointer-checks"
44   ../$pkgbase-$pkgver/configure --prefix=/usr \
45     --libexecdir=/usr/lib/webkit${_ver} \
46     --enable-introspection \
47     --disable-webkit2 \
48     --disable-gtk-doc \
49     "$@"
51   # https://bugzilla.gnome.org/show_bug.cgi?id=655517
52   sed -i 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
54   make all stamp-po
57 build() {
58   _build gtk
59   _build gtk2 --with-gtk=2.0
62 package_webkitgtk() {
63   pkgdesc+=" for GTK+ 3"
64   depends+=(gtk3)
65   optdepends+=('gtk2: Netscape plugin support')
66   provides=("webkitgtk3=${pkgver}" "libwebkit3=${pkgver}")
67   conflicts=(webkitgtk3 libwebkit3)
68   replaces=(webkitgtk3 libwebkit3)
70   make -C build-gtk -j1 DESTDIR="$pkgdir" install
71   install -Dm644 $pkgbase-$pkgver/Source/WebKit/LICENSE \
72     "$pkgdir/usr/share/licenses/webkitgtk/LICENSE"
75 package_webkitgtk2() {
76   pkgdesc+=" for GTK+ 2"
77   depends+=(gtk2)
78   provides=("libwebkit=${pkgver}")
79   conflicts=(libwebkit)
80   replaces=(libwebkit)
82   make -C build-gtk2 -j1 DESTDIR="$pkgdir" install
83   install -Dm644 $pkgbase-$pkgver/Source/WebKit/LICENSE \
84     "$pkgdir/usr/share/licenses/webkitgtk2/LICENSE"