PKGBUILDs/extra/webkitgtk/PKGBUILD
2016-03-18 18:11:28 +00:00

92 lines
2.6 KiB
Bash

# $Id$
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - use --disable-jit to solve segfaults
# - use --disable-gtk-doc to solve html docs breaking the build
# - AArch64 fixes
pkgbase=webkitgtk
pkgname=(webkitgtk webkitgtk2)
pkgver=2.4.10
pkgrel=1
pkgdesc="GTK+ Web content engine library"
arch=(i686 x86_64)
url="http://webkitgtk.org/"
license=(custom)
depends=(libxt libxslt sqlite libsoup enchant libgl geoclue2 gst-plugins-base-libs
libsecret libwebp harfbuzz-icu)
makedepends=(gtk3 gtk2 gperf gobject-introspection python2 mesa ruby)
optdepends=('gst-plugins-base: free media decoding'
'gst-plugins-good: media decoding'
'gst-libav: nonfree media decoding')
options=(!emptydirs)
source=(http://webkitgtk.org/releases/$pkgbase-${pkgver}.tar.xz
webkitgtk-aarch64.patch
webkitgtk-2.4.1-ppc64_align.patch)
sha256sums=('33fda4b20d7fec2d6e9399ba03ef3f6d2a733c628bd77d397880c44e4bf7c614'
'362c66145e3a7978cd612d1a838be7b556d31bb4c51f9ffe12054b5c91b08a73'
'8b1759b819cb964e4b6f0a65c2f89dd68919f8ffe30094d22f0f598fc8cd9f60')
prepare() {
mkdir build-gtk{,2} path
ln -s /usr/bin/python2 path/python
# AArch64 fixes
cd $pkgbase-$pkgver
patch -p1 -i ../webkitgtk-aarch64.patch
if [[ $CARCH == "aarch64" ]]; then
patch -p1 -i ../webkitgtk-2.4.1-ppc64_align.patch
CFLAGS+=" -DENABLE_YARR_JIT=0"
CXXFLAGS+=" -DENABLE_YARR_JIT=0"
fi
}
_build() (
_ver="$1"; shift
cd build-${_ver}
PATH="$srcdir/path:$PATH"
../$pkgbase-$pkgver/configure --prefix=/usr \
--libexecdir=/usr/lib/webkit${_ver} \
--enable-introspection \
--disable-jit \
--disable-webkit2 \
--disable-gtk-doc \
"$@"
# https://bugzilla.gnome.org/show_bug.cgi?id=655517
sed -i 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make all stamp-po
)
build() {
_build gtk
_build gtk2 --with-gtk=2.0
}
package_webkitgtk() {
depends+=(gtk3)
optdepends+=('gtk2: Netscape plugin support')
provides=("webkitgtk3=${pkgver}" "libwebkit3=${pkgver}")
conflicts=(webkitgtk3 libwebkit3)
replaces=(webkitgtk3 libwebkit3)
make -C build-gtk -j1 DESTDIR="$pkgdir" install
install -Dm644 $pkgbase-$pkgver/Source/WebKit/LICENSE \
"$pkgdir/usr/share/licenses/webkitgtk/LICENSE"
}
package_webkitgtk2() {
pkgdesc+=" for GTK2"
depends+=(gtk2)
provides=("libwebkit=${pkgver}")
conflicts=(libwebkit)
replaces=(libwebkit)
make -C build-gtk2 -j1 DESTDIR="$pkgdir" install
install -Dm644 $pkgbase-$pkgver/Source/WebKit/LICENSE \
"$pkgdir/usr/share/licenses/webkitgtk2/LICENSE"
}