PKGBUILD 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # Maintainer (arch): Jan Alexander Steffens (heftig) <heftig@archlinux.org>
  2. # Contributor (arch): Eric Bélanger <eric@archlinux.org>
  3. # Contributor: Andreas Grapentin <andreas@grapentin.org>
  4. # Contributor: Jesús E. <heckyel@parabola.nu>
  5. # Contributor: André Silva <emulatorman@hyperbola.info>
  6. # Contributor: Luke R. <g4jc@openmailbox.org>
  7. # Contributor: Freemor <freemor@fremor.ca>
  8. # Contributor: bill-auger <bill-auger@programmer.net>
  9. # parabola changes and rationale:
  10. # - remove geoclue2 support
  11. # - pinned to 'icu' sodep
  12. pkgname=webkit2gtk
  13. pkgver=2.32.0
  14. pkgrel=2
  15. pkgrel+=.nonprism1
  16. pkgdesc="Web content engine for GTK"
  17. pkgdesc+=", without geoclue2 support"
  18. url="https://webkitgtk.org"
  19. arch=(x86_64)
  20. arch+=(armv7h i686)
  21. license=(custom)
  22. depends=(cairo fontconfig freetype2 libgcrypt glib2 gtk3 harfbuzz harfbuzz-icu
  23. icu libjpeg libsoup libxml2 zlib libpng sqlite atk libwebp at-spi2-core
  24. libegl libgl libgles libwpe wpebackend-fdo libxslt libsecret libtasn1
  25. enchant libx11 libxext libice libxt wayland libnotify hyphen openjpeg2
  26. woff2 libsystemd bubblewrap libseccomp xdg-dbus-proxy gstreamer
  27. gst-plugins-base-libs libmanette)
  28. makedepends=(cmake ninja gtk-doc python ruby gobject-introspection
  29. wayland-protocols systemd gst-plugins-bad gperf)
  30. #makedepends=(${makedepends[@]/geoclue/})
  31. optdepends=('gst-plugins-good: media decoding'
  32. 'gst-plugins-bad: media decoding'
  33. 'gst-libav: nonfree media decoding')
  34. source=($url/releases/webkitgtk-$pkgver.tar.xz{,.asc}
  35. unhide-deprecated-api.patch)
  36. source_i686=(webkitgtk-2.24.2-no-sse2.patch)
  37. sha256sums=('9d7df4dae9ada2394257565acc2a68ace9308c4c61c3fcc00111dc1f11076bf0'
  38. 'SKIP'
  39. '48ee7bee0b50776c8153c20b96854bd5086e0a7d04e621fd57ea7fc6c690c3a2')
  40. sha256sums_i686=('e95391eceeb29d0ebc57d6b867afd7cd95ed92683edeb28c6a7a5048b5a9b85b')
  41. validpgpkeys=('D7FCF61CF9A2DEAB31D81BD3F3D322D0EC4582C3' # Carlos Garcia Campos <cgarcia@igalia.com>
  42. '5AA3BC334FD7E3369E7C77B291C559DBE4C9123B') # Adrián Pérez de Castro <aperez@igalia.com>
  43. prepare() {
  44. cd webkitgtk-$pkgver
  45. case "$CARCH" in
  46. i686)
  47. # disable SSE2 on 486 and 686
  48. source+=('webkitgtk-2.24.2-no-sse2.patch')
  49. sha256sums+=('e95391eceeb29d0ebc57d6b867afd7cd95ed92683edeb28c6a7a5048b5a9b85b')
  50. options+=(!debug)
  51. patch -p1 < ../webkitgtk-2.24.2-no-sse2.patch
  52. ;;
  53. esac
  54. # Use deprecated API for ubrk_safeClone until ICU 69 is officially supported
  55. patch -Np1 -i ../unhide-deprecated-api.patch
  56. }
  57. build() {
  58. # CFLAGS+=" $CPPFLAGS"
  59. # CXXFLAGS+=" $CPPFLAGS"
  60. local parabola_options=( -DENABLE_GEOLOCATION=OFF )
  61. cmake -S webkitgtk-$pkgver -B build -G Ninja \
  62. ${parabola_options[@]} \
  63. -DPORT=GTK \
  64. -DCMAKE_BUILD_TYPE=Release \
  65. -DCMAKE_INSTALL_PREFIX=/usr \
  66. -DCMAKE_INSTALL_LIBDIR=lib \
  67. -DCMAKE_INSTALL_LIBEXECDIR=lib \
  68. -DCMAKE_SKIP_RPATH=ON \
  69. -DENABLE_GTKDOC=ON \
  70. -DENABLE_MINIBROWSER=ON
  71. cmake --build build
  72. }
  73. package() {
  74. depends+=(libwpe-1.0.so libWPEBackend-fdo-1.0.so)
  75. depends+=(libicui18n.so libicuuc.so)
  76. provides+=(libjavascriptcoregtk-4.0.so libwebkit2gtk-4.0.so)
  77. DESTDIR="$pkgdir" cmake --install build
  78. cd webkitgtk-$pkgver
  79. find Source -name 'COPYING*' -or -name 'LICENSE*' -print0 | sort -z |
  80. while IFS= read -d $'\0' -r _f; do
  81. echo "### $_f ###"
  82. cat "$_f"
  83. echo
  84. done |
  85. install -Dm644 /dev/stdin "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  86. }