1 # Contributor: Andreas Radke <andyrtr@archlinux.org>
4 pkgname=(webkitgtk webkitgtk2)
7 pkgdesc="Legacy Web content engine"
9 url="https://webkitgtk.org/"
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')
18 install=webkitgtk.install
19 source=(https://webkitgtk.org/releases/$pkgbase-${pkgver}.tar.xz
20 webkitgtk-2.4.9-abs.patch
22 sha256sums=('588aea051bfbacced27fdfe0335a957dca839ebe36aa548df39c7bbafdb65bf7'
23 'ec294bbb5588a1802a68e3615c6718486b22f922645c5fef686d3d103014bf70'
24 'eb791b9c8dcb84996904846dedf8c3ddf1a5fde32330177f3f0071510bd8ca6d')
27 mkdir build-gtk{,2} path
28 ln -s /usr/bin/python2 path/python
31 patch -Np1 -i ../webkitgtk-2.4.9-abs.patch
32 patch -Np1 -i ../icu59.patch
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 \
51 # https://bugzilla.gnome.org/show_bug.cgi?id=655517
52 sed -i 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
59 _build gtk2 --with-gtk=2.0
63 pkgdesc+=" for GTK+ 3"
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"
78 provides=("libwebkit=${pkgver}")
82 make -C build-gtk2 -j1 DESTDIR="$pkgdir" install
83 install -Dm644 $pkgbase-$pkgver/Source/WebKit/LICENSE \
84 "$pkgdir/usr/share/licenses/webkitgtk2/LICENSE"