# Contributor: Rasmus Thomsen # Contributor: Sergei Lukin # Contributor: Jiri Horner # Maintainer: Rasmus Thomsen pkgname=webkit2gtk pkgver=2.24.3 pkgrel=0 pkgdesc="Portable web rendering engine WebKit for GTK+" url="https://webkitgtk.org/" arch="all" license="LGPL-2.0-or-later AND BSD-2-Clause" makedepends=" 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 ninja openjpeg-dev openjpeg-tools pango-dev paxmark python2 ruby sqlite-dev " replaces="webkit" options="!check" # upstream doesn't package them in release tarballs: Tools/Scripts/run-gtk-tests: Command not found subpackages="$pkgname-dev $pkgname-lang" source="https://webkitgtk.org/releases/webkitgtk-$pkgver.tar.xz fix-fast-memory-disabled.patch musl-fixes.patch fix-openjpeg.patch " builddir="$srcdir/webkitgtk-$pkgver" # secfixes: # 2.24.1-r0: # - CVE-2019-6251 # - CVE-2019-8506 # - CVE-2019-8524 # - CVE-2019-8535 # - CVE-2019-8536 # - CVE-2019-8544 # - CVE-2019-8551 # - CVE-2019-8558 # - CVE-2019-8559 # - CVE-2019-8563 # - CVE-2019-11070 # 2.22.7-r0: # - CVE-2018-4437 # - CVE-2019-6212 # - CVE-2019-6215 # - CVE-2019-6216 # - CVE-2019-6217 # - CVE-2019-6227 # - CVE-2019-6229 # 2.22.4-r0: # - CVE-2018-4372 # 2.18.4-r0: # - CVE-2017-7156 # - CVE-2017-7157 # - CVE-2017-13856 # - CVE-2017-13866 # - CVE-2017-13870 # 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 build() { local _archopt= case "$CARCH" in # disable _FORTIFY_SOURCE to work around: # cc1plus: out of memory allocating 65536 bytes after a total of 3131101184 bytes x86) CXXFLAGS="$CXXFLAGS -U_FORTIFY_SOURCE";; armhf|armv7|ppc64le|s390x) _archopt="-DENABLE_JIT=OFF";; esac # reduce memory usage on 32 bit # https://bugs.webkit.org/show_bug.cgi?id=199272 export CXXFLAGS="$CXXFLAGS -g1" mkdir build cd build cmake -GNinja \ -DPORT=GTK \ -DCMAKE_BUILD_TYPE=MinSizeRel \ -DCMAKE_SKIP_RPATH=ON \ -DCMAKE_INSTALL_PREFIX=/usr \ -DLIB_INSTALL_DIR=/usr/lib \ -DENABLE_GTKDOC=OFF \ -DENABLE_GEOLOCATION=OFF \ -DENABLE_PLUGIN_PROCESS_GTK2=OFF \ -DENABLE_SAMPLING_PROFILER=OFF \ -DENABLE_MINIBROWSER=ON \ -DUSE_WOFF2=OFF \ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ $_archopt \ .. # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=923476 ninja JavaScriptCore-4-gir ninja } check() { ninja -C "$builddir"/build check } package() { DESTDIR="$pkgdir" ninja -C "$builddir"/build install # needed for JIT paxmark -m "$pkgdir"/usr/libexec/webkit2gtk-4.0/WebKitWebProcess } sha512sums="b358bb11f7df477e5b3d6a12e2e6b41cb4e6a7274e34ce6299bf0c56044ffc7db5a834e9abf5c71d992ef41d194d30171b8be406420ffc54fe766cc811afb79f webkitgtk-2.24.3.tar.xz e1537b9937af1cb936669d405993a52204cb9968b8b3161cb12a3f3f1343c260088c9490fcd7a7deeab6dbabdb5f7ce7e6cb2f857b9f0a4205aba6db2b11fb20 fix-fast-memory-disabled.patch d0d5e37822644cab071e33d325affd1ce5948b414f6f54d695e6b4a7bffadecd25c0df6dc1cb63e70127499f5a8da43b02286a3518b2488b5da32c622df45d97 musl-fixes.patch c517c012f5630ef6be5be7d9592c5e042a070f849a141859edefa7984acb98dbd0d718fe6613cd35ba3b7d8530beebcc7408fd077cd914ed335c5e524e9e746a fix-openjpeg.patch"