PKGBUILD 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # Maintainer: Antonio Rojas <arojas@archlinux.org>
  2. pkgname=qt5-webkit-print
  3. _qtver=tp5
  4. pkgver=${_qtver/-/}
  5. pkgrel=1
  6. arch=(x86_64)
  7. url='https://github.com/annulen/webkit/wiki'
  8. license=(GPL3 LGPL3 FDL custom)
  9. pkgdesc='Classes for a WebKit2 based implementation and a new QML API (maintained fork) (patched with pdf scale and background fixes)'
  10. depends=(qt5-location qt5-sensors qt5-webchannel libwebp libxslt libxcomposite gst-plugins-base hyphen)
  11. makedepends=(cmake ruby gperf python2 qt5-doc qt5-tools)
  12. optdepends=('gst-plugins-good: Webm codec support')
  13. conflicts=(qt5-webkit)
  14. provides=(qt5-webkit)
  15. source=("https://github.com/annulen/webkit/releases/download/qtwebkit-$_qtver/qtwebkit-$_qtver.tar.xz"
  16. qt5-webkit-icu59.patch qt5-webkit-ng-gcc7.patch qt5-webkit-ng-functional.patch qt5-webkit-pdf_scaling.patch qt5-webkit-solid_background_PDF.patch)
  17. sha256sums=('553dfb47a10d256314b74105d0eafadab0efc0ebd32d77a09cffbe2fed09def8'
  18. 'e1306e696ad7125fa00083aa966be0ea6fe6de555c9e1d119957f208f258edfe'
  19. '58ecbd8708f5afe4e974fdcd6c1f32fea61ccc55dc9bb711768f2d0da6963fb8'
  20. 'c85344edcc23930c0190b2f8ec3847bf8bdbbf7f1d4fa877c502e354e5f4233e'
  21. '3118595e764bec08960518c07eb5c321d7195b23adc634ba7a50987aeec642b0'
  22. '339876e8dfdaabdc974d2b2f095d85691d339aef16abe97b472268dae462d0cf')
  23. prepare() {
  24. mkdir -p build
  25. cd qtwebkit-$_qtver
  26. # Fix build with ICU 59 (PLD linux)
  27. patch -p1 -i ../qt5-webkit-icu59.patch
  28. # Fix build with GCC 7
  29. patch -p1 -i ../qt5-webkit-ng-gcc7.patch
  30. patch -p1 -i ../qt5-webkit-ng-functional.patch
  31. # aleray fixes (https://github.com/annulen/webkit/compare/qtwebkit-stable...aleray:ospkit2)
  32. patch -p1 -i ../qt5-webkit-pdf_scaling.patch
  33. patch -p1 -i ../qt5-webkit-solid_background_PDF.patch
  34. sed -e 's|-Wundef|-Wundef -Wno-expansion-to-defined|' -i Source/cmake/WebKitHelpers.cmake
  35. }
  36. build() {
  37. cd build
  38. cmake ../qtwebkit-$_qtver \
  39. -DCMAKE_INSTALL_PREFIX=/usr \
  40. -DCMAKE_BUILD_TYPE=Release \
  41. -DPORT=Qt \
  42. -DENABLE_TOOLS=OFF
  43. # -DCMAKE_INSTALL_PREFIX:PATH=/usr/local \
  44. # -DVMIME_INSTALL_LIBDIR=/usr/local/lib \
  45. # -DENABLE_WEBKIT2=OFF \
  46. # -DENABLE_VIDEO=OFF \
  47. # -DENABLE_WEB_AUDIO=OFF \
  48. # -DENABLE_GEOLOCATION=OFF \
  49. # -DENABLE_IOS_AIRPLAY=OFF \
  50. # -DENABLE_MINIBROWSER=OFF \
  51. # -DENABLE_NOTIFICATIONS=OFF \
  52. # -DENABLE_REMOTE_INSPECTOR=OFF \
  53. # -DENABLE_SPEECH_SYNTHESIS=OFF \
  54. # -DENABLE_TOUCH_EVENTS=OFF \
  55. # -DENABLE_TOUCH_SLIDER=OFF \
  56. # -DENABLE_TOUCH_ICON_LOADING=OFF \
  57. # -DENABLE_DEVICE_ORIENTATION=OFF \
  58. # -DENABLE_GAMEPAD=OFF \
  59. # -DENABLE_MEDIA_CAPTURE=OFF \
  60. # -DENABLE_VIBRATION=OFF
  61. make -j2
  62. }
  63. package() {
  64. # mkdir -p "$pkgdir/etc/ld.so.conf.d"
  65. # install -Dm644 lib64-libriis.conf "$pkgdir/etc/ld.so.conf.d/lib64-libriis.conf"
  66. cd build
  67. make DESTDIR="$pkgdir" install
  68. # mv "$pkgdir"/usr/local/lib64 "$pkgdir"/usr/local/lib
  69. install -d "$pkgdir"/usr/share/licenses
  70. ln -s /usr/share/licenses/qt5-base "$pkgdir"/usr/share/licenses/${pkgname}
  71. }