# Contributor: Sergei Lukin # Contributor: Jiri Horner # Maintainer: Jiri Horner pkgname=webkit2gtk pkgver=2.18.3 pkgrel=0 pkgdesc="portable web rendering engine WebKit for GTK+" url="https://webkitgtk.org/" arch="x86 x86_64 ppc64le aarch64 armhf" license="LGPL2+ BSD" makedepends="$depends_dev bison cmake enchant-dev flex gnutls-dev gobject-introspection-dev gperf gst-plugins-base-dev gst-plugins-bad-dev gstreamer-dev gtk+3.0-dev gtk-doc hyphen-dev icu-dev libgcrypt-dev libjpeg-turbo-dev libnotify-dev libpng-dev libsecret-dev libsoup-dev libwebp-dev libxml2-dev libxslt-dev libxt-dev mesa-dev pango-dev paxmark ruby sqlite-dev " replaces="webkit" subpackages="$pkgname-dev $pkgname-doc $pkgname-lang" source="https://webkitgtk.org/releases/webkitgtk-$pkgver.tar.xz fix-fast-memory-disabled.patch fix_armv6l.patch " # secfixes: # 2.14.5-r0: # - CVE-2017-2350 # - CVE-2017-2354 # - CVE-2017-2355 # - CVE-2017-2356 # - CVE-2017-2362 # - CVE-2017-2363 # - CVE-2017-2364 # - CVE-2017-2365 # - CVE-2017-2366 # - CVE-2017-2369 # - CVE-2017-2371 # - CVE-2017-2373 builddir="${srcdir}/webkitgtk-${pkgver}" prepare() { default_prepare || return 1 rm -r Source/ThirdParty/gtest/ || return 1 } build() { local _jitopt= case "$CARCH" in armhf) _archopt="-DUSE_LD_GOLD=OFF -DENABLE_JIT=OFF -DUSE_SYSMEM_MALLOC=ON";; aarch64) _archopt="-DUSE_LD_GOLD=OFF";; ppc64le) _archopt="-DENABLE_JIT=OFF -DUSE_SYSMTE_MALLOC=ON";; s390x) _archopt="-DUSE_LD_GOLD=OFF -DENABLE_JIT=OFF -DUSE_SYSMEM_MALLOC=ON";; esac cd "$builddir" mkdir build && cd build cmake -DPORT=GTK \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_SKIP_RPATH=ON \ -DCMAKE_INSTALL_PREFIX=/usr \ -DLIB_INSTALL_DIR=/usr/lib \ -DLIBEXEC_INSTALL_DIR=/usr/lib/webkit2gtk-4.0 \ -DENABLE_GTKDOC=ON \ -DENABLE_GEOLOCATION=OFF \ -DENABLE_PLUGIN_PROCESS_GTK2=OFF \ -DENABLE_SAMPLING_PROFILER=OFF \ $_archopt \ .. || return 1 make || return 1 } package() { cd "$builddir"/build make DESTDIR="$pkgdir" install || return 1 # needed for JIT paxmark -m "$pkgdir"/usr/lib/webkit2gtk-4.0/WebKitWebProcess || return 1 } sha512sums="8ba68d7234205728ed4b92358304cf0d0b771647d9b4316085241adeacafe67dee685225b0b46752087b93416ce8d2053a5a7c2376fda1eee7bc6d9024ae787e webkitgtk-2.18.3.tar.xz 9d7de4755c21d2573103dde326bb86ba37d54032627cb1bd362138906ac1d6a1dc48d4e548f29e29dc507831bae833ac5a8d2cf7fdb3d6a9d5bd5fb06f222b00 fix-fast-memory-disabled.patch f8fad1450d87f1cb195818cddb8a2307616916612e4676a4d71a20d58864d1c153550e4465a128e04f136c437518a4b90f1fa685ef6519fa8054637760635c72 fix_armv6l.patch"