1 |
commit: e21b6a36897dc310f72efd68c21bc5ed6688cc86 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jun 25 08:22:53 2016 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jun 25 08:26:33 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e21b6a36 |
7 |
|
8 |
app-misc/recoll: Convert to python-single-r1 |
9 |
|
10 |
app-misc/recoll/recoll-1.19.5-r1.ebuild | 180 ++++++++++++++++++++++++++++++++ |
11 |
1 file changed, 180 insertions(+) |
12 |
|
13 |
diff --git a/app-misc/recoll/recoll-1.19.5-r1.ebuild b/app-misc/recoll/recoll-1.19.5-r1.ebuild |
14 |
new file mode 100644 |
15 |
index 0000000..c234bb6 |
16 |
--- /dev/null |
17 |
+++ b/app-misc/recoll/recoll-1.19.5-r1.ebuild |
18 |
@@ -0,0 +1,180 @@ |
19 |
+# Copyright 1999-2016 Gentoo Foundation |
20 |
+# Distributed under the terms of the GNU General Public License v2 |
21 |
+# $Id$ |
22 |
+ |
23 |
+EAPI=5 |
24 |
+ |
25 |
+PYTHON_COMPAT=( python2_7 ) |
26 |
+inherit toolchain-funcs qmake-utils qt4-r2 linux-info python-single-r1 readme.gentoo |
27 |
+ |
28 |
+DESCRIPTION="A personal full text search package" |
29 |
+HOMEPAGE="http://www.lesbonscomptes.com/recoll/" |
30 |
+SRC_URI="http://www.lesbonscomptes.com/recoll/${P}.tar.gz" |
31 |
+LICENSE="GPL-2" |
32 |
+SLOT="0" |
33 |
+KEYWORDS="~amd64 ~x86" |
34 |
+ |
35 |
+INDEX_HELPERS="chm djvu dvi exif postscript ics info lyx msdoc msppt msxls pdf rtf sound tex wordperfect xml" |
36 |
+IUSE="+spell inotify +qt4 +session camelcase xattr webkit fam ${INDEX_HELPERS}" |
37 |
+ |
38 |
+DEPEND=" |
39 |
+ virtual/libiconv |
40 |
+ >=dev-libs/xapian-1.0.12 |
41 |
+ sys-libs/zlib |
42 |
+ spell? ( app-text/aspell ) |
43 |
+ !inotify? ( fam? ( virtual/fam ) ) |
44 |
+ qt4? ( dev-qt/qtcore:4[qt3support] ) |
45 |
+ webkit? ( dev-qt/qtwebkit:4 ) |
46 |
+ session? ( |
47 |
+ inotify? ( x11-libs/libX11 x11-libs/libSM x11-libs/libICE ) |
48 |
+ !inotify? ( fam? ( x11-libs/libX11 x11-libs/libSM x11-libs/libICE ) ) |
49 |
+ ) |
50 |
+ ${PYTHON_DEPS} |
51 |
+" |
52 |
+ |
53 |
+RDEPEND=" |
54 |
+ ${DEPEND} |
55 |
+ app-arch/unzip |
56 |
+ sys-apps/sed |
57 |
+ virtual/awk |
58 |
+ pdf? ( app-text/poppler ) |
59 |
+ postscript? ( app-text/pstotext ) |
60 |
+ msdoc? ( app-text/antiword ) |
61 |
+ msxls? ( app-text/catdoc ) |
62 |
+ msppt? ( app-text/catdoc ) |
63 |
+ wordperfect? ( app-text/libwpd:0.9 ) |
64 |
+ rtf? ( app-text/unrtf ) |
65 |
+ tex? ( dev-tex/detex ) |
66 |
+ dvi? ( virtual/tex-base ) |
67 |
+ djvu? ( >=app-text/djvu-3.5.15 ) |
68 |
+ exif? ( media-libs/exiftool ) |
69 |
+ chm? ( dev-python/pychm[${PYTHON_USEDEP}] ) |
70 |
+ ics? ( dev-python/icalendar[${PYTHON_USEDEP}] ) |
71 |
+ lyx? ( app-office/lyx ) |
72 |
+ sound? ( media-libs/mutagen ) |
73 |
+ xml? ( dev-libs/libxslt ) |
74 |
+ info? ( sys-apps/texinfo ) |
75 |
+ " |
76 |
+ |
77 |
+REQUIRED_USE="session? ( || ( fam inotify ) ) |
78 |
+ ${PYTHON_REQUIRED_USE}" |
79 |
+ |
80 |
+pkg_pretend() { |
81 |
+ if use inotify; then |
82 |
+ CONFIG_CHECK="~INOTIFY_USER" |
83 |
+ check_extra_config |
84 |
+ fi |
85 |
+} |
86 |
+ |
87 |
+pkg_setup() { |
88 |
+ python-single-r1_pkg_setup |
89 |
+ |
90 |
+ local i at_least_one_helper |
91 |
+ |
92 |
+ at_least_one_helper=0 |
93 |
+ for i in $INDEX_HELPERS; do |
94 |
+ if use $i; then |
95 |
+ at_least_one_helper=1 |
96 |
+ break |
97 |
+ fi |
98 |
+ done |
99 |
+ if [[ $at_least_one_helper -eq 0 ]]; then |
100 |
+ ewarn |
101 |
+ ewarn "You did not enable any of the optional file format flags." |
102 |
+ ewarn "Recoll can read some file formats natively, but many of them" |
103 |
+ ewarn "are optional since they require external helpers." |
104 |
+ ewarn |
105 |
+ fi |
106 |
+} |
107 |
+ |
108 |
+src_prepare() { |
109 |
+ use xattr && has_version "${CATEGORY}/${PN}:${SLOT}[-xattr]" && FORCE_PRINT_ELOG="yes" |
110 |
+ ! use xattr && has_version "${CATEGORY}/${PN}:${SLOT}[xattr]" && FORCE_PRINT_ELOG="yes" |
111 |
+ |
112 |
+ DOC_CONTENTS="Default configuration files located at |
113 |
+ /usr/share/${PN}/examples. Either edit these files to match |
114 |
+ your needs or copy them to ~/.recoll/ and edit these files |
115 |
+ instead." |
116 |
+ |
117 |
+ use xattr && DOC_CONTENTS+=" |
118 |
+ Use flag \"xattr\" enables support for fetching field values |
119 |
+ from extended file attributes. You will also need to set up a |
120 |
+ map from the attributes names to the Recoll field names |
121 |
+ (see comment at the end of the fields configuration file." |
122 |
+ |
123 |
+ # remember configure.ac is b0rked. Fix it before using eautoreconf in the |
124 |
+ # future |
125 |
+ # eautoreconf |
126 |
+ |
127 |
+ # do not strip binaries |
128 |
+ sed -i -e "/STRIP/d" "${S}"/${PN}install.in \ |
129 |
+ || die "Failed to fix the installation script" |
130 |
+ # Drop all the QMAKE lines. We will do it ourselves |
131 |
+ sed -i -e "/QMAKE/d" Makefile.in || die |
132 |
+} |
133 |
+ |
134 |
+src_configure() { |
135 |
+ local qtconf |
136 |
+ |
137 |
+ if use qt4 || use webkit; then |
138 |
+ qtconf="QMAKEPATH=$(qt4_get_bindir)/qmake" |
139 |
+ fi |
140 |
+ |
141 |
+ econf \ |
142 |
+ $(use_with spell aspell) \ |
143 |
+ $(use_enable xattr) \ |
144 |
+ $(use_with inotify) \ |
145 |
+ $(use_enable qt4 qtgui) \ |
146 |
+ $(use_enable camelcase) \ |
147 |
+ $(use_with fam) \ |
148 |
+ $(use_with inotify) \ |
149 |
+ $(use_enable session x11mon) \ |
150 |
+ ${qtconf} |
151 |
+ if use qt4; then |
152 |
+ cd qtgui && eqmake4 ${PN}.pro && cd .. |
153 |
+ fi |
154 |
+} |
155 |
+ |
156 |
+src_compile() { |
157 |
+ # Do not let upstream people decide on our behalf |
158 |
+ sed -i "s:ar ru:$(tc-getAR) ru:" lib/Makefile || die |
159 |
+ |
160 |
+ emake \ |
161 |
+ CC=$(tc-getCC) \ |
162 |
+ CXX=$(tc-getCXX) \ |
163 |
+ CFLAGS="${CFLAGS} ${LDFLAGS}" \ |
164 |
+ CXXFLAGS="${CXXFLAGS} ${LDFLAGS}" |
165 |
+} |
166 |
+ |
167 |
+src_install() { |
168 |
+ # You probably wonder why I did not fix recollinstall in src_prepare. |
169 |
+ # --prefix requires an absolute path but recollinstall requires prefix |
170 |
+ # to be actually 'usr' because double // makes portage sad. And no, I am not |
171 |
+ # gonna ask upstream to fix the build system |
172 |
+ sed -i -e "/PREFIX/s:/usr:usr:" "${S}"/${PN}install || die |
173 |
+ sed -i -e "/prefix/s:/usr:usr:" "${S}"/Makefile || die |
174 |
+ |
175 |
+ emake DESTDIR="${D%/}" install |
176 |
+ python_optimize |
177 |
+ dodoc ChangeLog README |
178 |
+ mv "${D}/usr/share/${PN}/doc" "${D}/usr/share/doc/${PF}/html" |
179 |
+ dosym /usr/share/doc/${PF}/html /usr/share/${PN}/doc |
180 |
+ |
181 |
+ readme.gentoo_create_doc |
182 |
+} |
183 |
+ |
184 |
+pkg_postinst() { |
185 |
+ readme.gentoo_print_elog |
186 |
+ |
187 |
+ if [[ -n ${REPLACING_VERSIONS} ]]; then |
188 |
+ elog |
189 |
+ elog "1.18 introduces significant index formats" |
190 |
+ elog "changes to support optional character case and diacritics" |
191 |
+ elog "sensitivity, and it will be advisable to reset the index in" |
192 |
+ elog "most cases. This will be best done by destroying the index" |
193 |
+ elog "directory (rm -rf ~/.recoll/xapiandb). If 1.18 is not configured" |
194 |
+ elog "for case and diacritics sensitivity, it is mostly compatible" |
195 |
+ elog "with 1.17 indexes." |
196 |
+ elog |
197 |
+ fi |
198 |
+} |