dev-python/pytest: arm64 stable (bug #723996)
[gentoo.git] / app-misc / recoll / recoll-1.25.19.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python3_{6,7} )
7
8 inherit eutils linux-info python-single-r1 qmake-utils
9
10 DESCRIPTION="A personal full text search package"
11 HOMEPAGE="https://www.lesbonscomptes.com/recoll/"
12 SRC_URI="https://www.lesbonscomptes.com/recoll/${P}.tar.gz"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="amd64 x86"
17
18 IUSE="camelcase chm doc +inotify qt5 session +spell webengine"
19 REQUIRED_USE="
20         session? ( inotify )
21         webengine? ( qt5 )
22         ${PYTHON_REQUIRED_USE}
23 "
24
25 DEPEND="
26         dev-libs/xapian:=
27         sys-libs/zlib:=
28         virtual/libiconv
29         chm? (
30                 dev-libs/chmlib
31                 dev-python/pychm
32         )
33         qt5? (
34                 dev-qt/qtcore:5
35                 dev-qt/qtgui:5
36                 dev-qt/qtprintsupport:5
37                 webengine? ( dev-qt/qtwebengine:5[widgets] )
38         )
39         session? (
40                 inotify? (
41                         x11-libs/libSM
42                         x11-libs/libICE
43                         x11-libs/libX11
44                 )
45         )
46         spell? ( app-text/aspell )
47         ${PYTHON_DEPS}
48 "
49
50 BDEPEND="
51         qt5? ( dev-qt/linguist-tools:5 )
52 "
53
54 RDEPEND="
55         ${DEPEND}
56         app-arch/unzip
57 "
58
59 pkg_pretend() {
60         if has_version "<app-misc/recoll-1.20"; then
61                 elog "Installing ${PV} over an 1.19 index is possible,"
62                 elog "but there have been small changes in the way"
63                 elog "compound words are indexed. So it is best to reset"
64                 elog "the index. The best method to reset the index is to"
65                 elog "quit all recoll programs and delete the index directory"
66                 elog "rm -rf ~/.recoll/xapiandb, then start recoll or recollindex."
67         fi
68 }
69
70 pkg_setup() {
71         if use inotify; then
72                 local CONFIG_CHECK="~INOTIFY_USER"
73                 check_extra_config
74         fi
75         python-single-r1_pkg_setup
76 }
77
78 src_prepare() {
79         default
80         python_fix_shebang filters
81 }
82
83 src_configure() {
84         use qt5 && export QMAKE="$(qt5_get_bindir)/qmake"
85
86         local myeconfargs=(
87                 $(use_enable camelcase)
88                 $(use_enable chm python-chm)
89                 $(use_enable session x11mon)
90                 $(use_enable qt5 qtgui)
91                 $(use_enable webengine)
92                 $(use_with inotify)
93                 $(use_with spell aspell)
94                 --disable-webkit
95                 --without-fam
96                 --enable-recollq
97         )
98
99         econf "${myeconfargs[@]}"
100 }
101
102 src_install() {
103         emake STRIP="$(type -P true)" DESTDIR="${D}" install
104
105         # html docs should be placed in /usr/share/doc/${PN}/html
106         use doc && dodoc -r "${ED}"/usr/share/recoll/doc/.
107         rm -r "${ED}/usr/share/recoll/doc" || die
108         find "${D}" -name '*.la' -delete || die
109 }
110
111 pkg_postinst() {
112         elog "In order to extract the full functionality of "
113         elog "recoll, the following packages should be installed "
114         elog "to get the corresponding document support."
115
116         optfeature "XML based documents support"    "dev-libs/libxslt[python] dev-libs/libxml2[python]"
117         optfeature "PDF files support"              app-text/poppler
118         optfeature "PDF files with OCR support"     app-text/tesseract
119         optfeature "MS Word files support"          app-text/antiword
120         optfeature "Wordperfect files support"      "app-text/libwpd[tools]"
121         optfeature "Lyx files support"              app-office/lyx
122         optfeature "GNU Info files support"         sys-apps/texinfo
123         optfeature "RAR archives support"           dev-python/rarfile
124         optfeature "7zip archives support"          dev-python/pylzma
125         optfeature "iCalendar files support"        dev-python/icalendar
126         optfeature "Postscript files support"       app-text/pstotext
127         optfeature "RTF files support"              app-text/unrtf
128         optfeature "TeX files support"              dev-text/detex
129         optfeature "DVI files support"              virtual/tex-base
130         optfeature "DJVU files support"             app-text/djvu
131         optfeature "tags in audio files support"    media-libs/mutagen
132         optfeature "tags in image files support"    media-libs/exiftool
133         optfeature "Midi karaoke files support"     dev-python/chardet
134 }