You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

107 lines
2.6 KiB

  1. # Copyright 1999-2021 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=7
  4. PYTHON_COMPAT=( python3_{7..9} )
  5. VALA_MIN_API_VERSION="0.40"
  6. inherit bash-completion-r1 gnome.org gnome2-utils linux-info meson python-any-r1 systemd vala xdg
  7. DESCRIPTION="A tagging metadata database, search tool and indexer"
  8. HOMEPAGE="https://wiki.gnome.org/Projects/Tracker"
  9. LICENSE="GPL-2+ LGPL-2.1+"
  10. SLOT="0/2.0"
  11. IUSE="gtk-doc +miners networkmanager stemmer"
  12. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
  13. #RESTRICT="!test? ( test )"
  14. PV_SERIES=$(ver_cut 1-2)
  15. # In 2.2.0 util-linux should only be necessary if glib is older than 2.52 at compile-time
  16. # But build still needs it - https://gitlab.gnome.org/GNOME/tracker/issues/131
  17. RDEPEND="
  18. >=dev-libs/glib-2.46:2
  19. >=sys-apps/dbus-1.3.2
  20. >=dev-libs/gobject-introspection-1.54:=
  21. >=dev-libs/icu-4.8.1.2:=
  22. >=dev-libs/json-glib-1.0
  23. >=net-libs/libsoup-2.40.1:2.4
  24. >=dev-libs/libxml2-2.7
  25. >=dev-db/sqlite-3.20.0
  26. networkmanager? ( >=net-misc/networkmanager-0.8 )
  27. stemmer? ( dev-libs/snowball-stemmer )
  28. sys-apps/util-linux
  29. "
  30. DEPEND="${RDEPEND}"
  31. BDEPEND="
  32. dev-util/glib-utils
  33. $(vala_depend)
  34. gtk-doc? ( >=dev-util/gtk-doc-1.8
  35. app-text/docbook-xml-dtd:4.1.2
  36. app-text/docbook-xml-dtd:4.5 )
  37. >=sys-devel/gettext-0.19.8
  38. virtual/pkgconfig
  39. ${PYTHON_DEPS}
  40. "
  41. PDEPEND="miners? ( >=app-misc/tracker-miners-${PV_SERIES} )"
  42. PATCHES=(
  43. "${FILESDIR}"/${PV}-sqlite-3.34-compat.patch # From upstream tracker-2.3 branch
  44. )
  45. function inotify_enabled() {
  46. if linux_config_exists; then
  47. if ! linux_chkconfig_present INOTIFY_USER; then
  48. ewarn "You should enable the INOTIFY support in your kernel."
  49. ewarn "Check the 'Inotify support for userland' under the 'File systems'"
  50. ewarn "option. It is marked as CONFIG_INOTIFY_USER in the config"
  51. die 'missing CONFIG_INOTIFY'
  52. fi
  53. else
  54. einfo "Could not check for INOTIFY support in your kernel."
  55. fi
  56. }
  57. pkg_setup() {
  58. linux-info_pkg_setup
  59. inotify_enabled
  60. python-any-r1_pkg_setup
  61. }
  62. src_prepare() {
  63. xdg_src_prepare
  64. vala_src_prepare
  65. }
  66. src_configure() {
  67. local emesonargs=(
  68. $(meson_use gtk-doc docs)
  69. -Dfts=true
  70. -Dfunctional_tests=false # many fail in 2.2; retry with 2.3
  71. #$(meson_use test functional_tests)
  72. -Dman=true
  73. $(meson_feature networkmanager network_manager)
  74. $(meson_feature stemmer)
  75. -Dunicode_support=icu
  76. -Dbash_completion="$(get_bashcompdir)"
  77. -Dsystemd_user_services="$(systemd_get_userunitdir)"
  78. )
  79. meson_src_configure
  80. }
  81. src_test() {
  82. dbus-run-session meson test -C "${BUILD_DIR}" || die 'tests failed'
  83. }
  84. pkg_postinst() {
  85. xdg_pkg_postinst
  86. gnome2_schemas_update
  87. }
  88. pkg_postrm() {
  89. xdg_pkg_postrm
  90. gnome2_schemas_update
  91. }