PKGBUILD 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. # Maintainer (arch): Fabian Bornschein <fabiscafe-at-mailbox-dot-org>
  2. # Maintainer (arch): Jan Alexander Steffens (heftig) <heftig@archlinux.org>
  3. # Contributor: Jan de Groot <jgc@archlinux.org>
  4. # Contributor: Andreas Grapentin <andreas@grapentin.org>
  5. # Contributor: Márcio Silva <coadde@hyperbola.info>
  6. # Contributor: Isaac David <isacdaavid@at@isacdaavid@dot@info>
  7. # Contributor: Freemor <freemor@freemor.ca>
  8. # Contributor: bill-auger <bill-auger@programmer.net>
  9. # Maintainer: Parabola Hackers <dev@lists.parabola.nu>
  10. # parabola changes and rationale:
  11. # privacy:
  12. # - removed libgweather->geocode-glib-2 support
  13. # - removed libgdata support
  14. # - removed google support
  15. # technical:
  16. # - pinned to 'icu' sodep
  17. # - build from versioned source-ball, rather than VCS sources
  18. # - build in build(), rather than in package()
  19. pkgbase=evolution-data-server
  20. pkgname=(
  21. evolution-data-server
  22. libedataserverui4
  23. evolution-data-server-docs
  24. )
  25. pkgver=3.50.1
  26. pkgrel=2
  27. [[ "${CARCH}" == i686 ]] && pkgver=3.46.2 pkgrel=3.0
  28. pkgrel+=.nonprism2
  29. pkgdesc="Unified contacts, tasks and calendar backend"
  30. pkgdesc+=", without google, libgweather, and libgdata support"
  31. url="https://wiki.gnome.org/Apps/Evolution"
  32. arch=(x86_64)
  33. arch+=(armv7h i686)
  34. depends=(
  35. gtk3
  36. krb5
  37. libcanberra
  38. libgoa
  39. libgweather-4
  40. libical
  41. libphonenumber
  42. libsecret
  43. nss
  44. sqlite
  45. webkit2gtk-4.1
  46. )
  47. depends=(${depends[*]/libgweather-4/})
  48. makedepends=(
  49. boost
  50. cmake
  51. git
  52. gobject-introspection
  53. gperf
  54. gtk-doc
  55. ninja
  56. vala
  57. webkitgtk-6.0
  58. )
  59. makedepends=( ${makedepends[*]/git/} )
  60. checkdepends=(db)
  61. license=(GPL)
  62. source=(https://gitlab.gnome.org/GNOME/${pkgname}/-/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz)
  63. sha256sums=('8859b3f25dffbef13fb0117b0c6812ad54805bd168933a6ce5c4aedb5e740cfc')
  64. [[ "${CARCH}" == i686 ]] && sha256sums=('34de49ab682b9c9d176b842476a6682bf0ca1bd23e992239bfd2d14cc3cf86e2')
  65. ## dependency tweaks ##
  66. case "${CARCH}" in
  67. i686)
  68. #depends+=( glib2=2.74.0 ) # Package dependency requirement 'glib-2.0 >= 2.74.0' could not be satisfied. If you want to disable GObject introspection, please use -DENABLE_INTROSPECTION=OFF
  69. makedepends=( ${makedepends[*]/webkitgtk-6.0/webkit2gtk-4.1} webkit2gtk-5.0 ) # arch32 does not have 'webkitgtk-6.0'
  70. # i686 FTBS (python is inconsistent): ModuleNotFoundError: No module named 'giscanner._giscanner'
  71. ;;
  72. esac
  73. prepare() {
  74. cd ${pkgname}-${pkgver}
  75. }
  76. build() {
  77. local cmake_options=(
  78. -DCMAKE_INSTALL_PREFIX=/usr
  79. -DLIBEXEC_INSTALL_DIR=/usr/lib
  80. -DSYSCONF_INSTALL_DIR=/etc
  81. -DENABLE_GTK_DOC=ON
  82. -DENABLE_INTROSPECTION=ON
  83. -DENABLE_VALA_BINDINGS=ON
  84. -DWITH_GWEATHER4=ON
  85. -DWITH_LIBDB=OFF
  86. -DWITH_PHONENUMBER=ON
  87. )
  88. cmake_options+=(-Wno-dev) # suppress noise
  89. local privacy_options=( -DENABLE_GOOGLE=OFF \
  90. -DENABLE_GOOGLE_AUTH=OFF \
  91. -DENABLE_UOA=OFF \
  92. -DHAVE_LIBGDATA=OFF \
  93. -DWITH_GWEATHER4=OFF \
  94. -DENABLE_WEATHER=OFF \
  95. -DWITH_GOOGLE_CLIENT_ID='NONE' \
  96. -DWITH_GOOGLE_CLIENT_SECRET='NONE' \
  97. -DWITH_OUTLOOK_CLIENT_ID='NONE' \
  98. -DWITH_OUTLOOK_CLIENT_SECRET='NONE' \
  99. -DWITH_YAHOO_CLIENT_ID='NONE' \
  100. -DWITH_YAHOO_CLIENT_SECRET='NONE' )
  101. [[ "${CARCH}" == i686 ]] && privacy_options+=( -DWITH_PHONENUMBER=OFF ) # libphonenumber cannot be used. Use -DWITH_PHONENUMBER=PATH to specify the library prefix, or -DWITH_PHONENUMBER=OFF to disable it.
  102. cmake -S ${pkgname}-${pkgver} -B build -G Ninja "${cmake_options[@]}" ${privacy_options[*]}
  103. cd build
  104. ninja # arch recipe builds in package()
  105. }
  106. check() {
  107. local exclude_tests=()
  108. # tests likely to fail
  109. [[ "${CARCH}" != armv7h ]] ||
  110. exclude_tests=( test-book-client-e164-param \
  111. test-book-client-view-operations )
  112. cd build
  113. ctest --output-on-failure --repeat until-pass:42 ${exclude_tests[*]/#/-E }
  114. }
  115. _pick() {
  116. local p="$1" f d; shift
  117. for f; do
  118. d="$srcdir/$p/${f#$pkgdir/}"
  119. mkdir -p "$(dirname "$d")"
  120. mv "$f" "$d"
  121. rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
  122. done
  123. }
  124. package_evolution-data-server() {
  125. provides=(
  126. libcamel-1.2.so
  127. libebackend-1.2.so
  128. libebook-1.2.so
  129. libebook-contacts-1.2.so
  130. libecal-2.0.so
  131. libedata-book-1.2.so
  132. libedata-cal-2.0.so
  133. libedataserver-1.2.so
  134. libedataserverui-1.2.so
  135. )
  136. depends+=(libicui18n.so libicuuc.so)
  137. DESTDIR="$pkgdir" cmake --install build
  138. cd $pkgdir
  139. _pick ui4 usr/include/evolution-data-server/libedataserverui4
  140. _pick ui4 usr/lib/libedataserverui4-1.0.so*
  141. _pick ui4 usr/lib/pkgconfig/libedataserverui4-1.0.pc
  142. _pick ui4 usr/lib/girepository-1.0/EDataServerUI4-1.0.typelib
  143. _pick ui4 usr/share/gir-1.0/EDataServerUI4-1.0.gir
  144. _pick ui4 usr/share/vala/vapi/libedataserverui4-1.0.*
  145. _pick docs usr/share/gtk-doc
  146. }
  147. package_libedataserverui4() {
  148. pkgdesc+=" - GTK 4 UI library"
  149. depends=(
  150. "evolution-data-server=$pkgver-$pkgrel"
  151. libgtk-4.so
  152. libwebkitgtk-6.0.so
  153. )
  154. provides=(libedataserverui4-1.0.so)
  155. mv ui4/* "$pkgdir"
  156. }
  157. package_evolution-data-server-docs() {
  158. pkgdesc+=" - documentation"
  159. depends=()
  160. mv docs/* "$pkgdir"
  161. }