PKGBUILD 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. # Maintainer (arch): Jan Alexander Steffens (heftig) <heftig@archlinux.org>
  2. # Contributor: 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.36.3
  14. pkgrel=1
  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. optdepends=('gst-plugins-good: media decoding'
  31. 'gst-plugins-bad: media decoding'
  32. 'gst-libav: nonfree media decoding')
  33. options=(debug)
  34. source=($url/releases/webkitgtk-$pkgver.tar.xz{,.asc})
  35. source_i686=(webkitgtk-2.36.3-no-sse2.arch32.patch)
  36. sha256sums=('732fcf8c4ec644b8ed28b46ebbd7c1ebab9d9e0afea9bdf5e5d12786afc478d1'
  37. 'SKIP')
  38. sha256sums_i686=('58a724b7f1092a9049186a3b8c61689c31558b6c2b587c827cec04219397adac')
  39. validpgpkeys=('D7FCF61CF9A2DEAB31D81BD3F3D322D0EC4582C3' # Carlos Garcia Campos <cgarcia@igalia.com>
  40. '5AA3BC334FD7E3369E7C77B291C559DBE4C9123B') # Adrián Pérez de Castro <aperez@igalia.com>
  41. prepare() {
  42. cd webkitgtk-$pkgver
  43. case "$CARCH" in
  44. i686)
  45. options+=(!debug)
  46. # disable SSE2 on 486 and 686
  47. echo "applying webkitgtk-2.36.3-no-sse2.arch32.patch"
  48. patch -Rp1 -i "$srcdir"/webkitgtk-2.36.3-no-sse2.arch32.patch
  49. ;;
  50. esac
  51. }
  52. build() {
  53. # Produce minimal debug info: 4.3 GB of debug data makes the
  54. # build too slow and is too much to package for debuginfod
  55. CFLAGS+=' -g1'
  56. CXXFLAGS+=' -g1'
  57. local parabola_options=( -DENABLE_GEOLOCATION=OFF )
  58. case "$CARCH" in
  59. i686)
  60. # linker runs out of memory on 32-bit
  61. LDFLAGS+=" -Wl,--no-keep-memory"
  62. # do not build JIT code on non-pentium4 (breaks in micro-optimizations)
  63. parabola_options+=( -DENABLE_JIT=OFF -DENABLE_C_LOOP=ON -DENABLE_SAMPLING_PROFILER=OFF )
  64. ;;
  65. esac
  66. cmake -S webkitgtk-$pkgver -B build -G Ninja \
  67. ${parabola_options[@]} \
  68. -DPORT=GTK \
  69. -DCMAKE_BUILD_TYPE=Release \
  70. -DCMAKE_INSTALL_PREFIX=/usr \
  71. -DCMAKE_INSTALL_LIBDIR=lib \
  72. -DCMAKE_INSTALL_LIBEXECDIR=lib \
  73. -DCMAKE_SKIP_RPATH=ON \
  74. -DUSE_SOUP2=ON \
  75. -DENABLE_GTKDOC=OFF \
  76. -DENABLE_MINIBROWSER=ON
  77. cmake --build build
  78. }
  79. package() {
  80. depends+=(libwpe-1.0.so libWPEBackend-fdo-1.0.so)
  81. depends+=(libicui18n.so libicuuc.so)
  82. provides+=(libjavascriptcoregtk-4.0.so libwebkit2gtk-4.0.so)
  83. DESTDIR="$pkgdir" cmake --install build
  84. rm -r "$pkgdir/usr/bin"
  85. cd webkitgtk-$pkgver
  86. find Source -name 'COPYING*' -or -name 'LICENSE*' -print0 | sort -z |
  87. while IFS= read -d $'\0' -r _f; do
  88. echo "### $_f ###"
  89. cat "$_f"
  90. echo
  91. done |
  92. install -Dm644 /dev/stdin "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  93. }