/[gentoo-x86]/app-misc/recoll/recoll-1.19.5.ebuild
Gentoo

Contents of /app-misc/recoll/recoll-1.19.5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat May 17 07:32:01 2014 UTC (6 years, 1 month ago) by ulm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +4 -4 lines
QA: Rename "audio" USE flag to "sound", bug 357661. Delete duplicate "wordperfect" flag in metadata.

(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 9433907D693FB5B8!)

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

  ViewVC Help
Powered by ViewVC 1.1.20