/[gentoo-x86]/app-misc/sphinx/sphinx-2.0.4-r1.ebuild
Gentoo

Contents of /app-misc/sphinx/sphinx-2.0.4-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Aug 8 18:32:32 2012 UTC (2 years, 1 month ago) by graaff
Branch: MAIN
Changes since 1.1: +4 -6 lines
Avoid eautoreconf and thus the problem reported in bug 425380, thanks to grobian.

(Portage version: 2.1.10.65/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-misc/sphinx/sphinx-2.0.4-r1.ebuild,v 1.1 2012/07/21 08:00:54 graaff Exp $
4
5 EAPI=4
6 inherit eutils autotools
7
8 #MY_P=${P/_/-}
9 MY_P=${P}-release
10
11 # This has been added by Gentoo, to explicitly version libstemmer.
12 # It is the date that http://snowball.tartarus.org/dist/libstemmer_c.tgz was
13 # fetched.
14 STEMMER_PV="20091122"
15 DESCRIPTION="Full-text search engine with support for MySQL and PostgreSQL"
16 HOMEPAGE="http://www.sphinxsearch.com/"
17 SRC_URI="http://sphinxsearch.com/files/${MY_P}.tar.gz
18 stemmer? ( mirror://gentoo/libstemmer_c-${STEMMER_PV}.tgz )"
19
20 LICENSE="GPL-2"
21 SLOT="0"
22 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~sparc ~x86 ~amd64-linux ~ppc-macos ~x86-macos ~sparc-solaris ~sparc64-solaris"
23 IUSE="debug id64 mysql odbc postgres stemmer test"
24
25 RDEPEND="mysql? ( virtual/mysql )
26 postgres? ( dev-db/postgresql-base )
27 odbc? ( dev-db/unixODBC )
28 virtual/libiconv"
29 DEPEND="${RDEPEND}
30 test? ( dev-lang/php )"
31
32 S=${WORKDIR}/${MY_P}
33
34 src_unpack() {
35 unpack ${MY_P}.tar.gz
36 if use stemmer; then
37 cd "${S}"
38 unpack libstemmer_c-${STEMMER_PV}.tgz
39 fi
40 }
41
42 src_prepare() {
43 epatch "${FILESDIR}"/${PN}-2.0.1_beta-darwin8.patch \
44 "${FILESDIR}"/${P}_gcc-4.7.patch
45
46 # drop nasty hardcoded search path breaking Prefix
47 # We patch configure directly since otherwise we need to run
48 # eautoreconf twice and that causes problems, bug 425380
49 sed -i -e 's/\/usr\/local\//\/someplace\/nonexisting\//g' configure || die
50
51 pushd api/libsphinxclient || die
52 eautoreconf
53 popd || die
54 }
55
56 src_configure() {
57 # fix libiconv detection
58 use !elibc_glibc && export ac_cv_search_iconv=-liconv
59
60 econf \
61 --sysconfdir="${EPREFIX}/etc/${PN}" \
62 $(use_enable id64) \
63 $(use_with debug) \
64 $(use_with mysql) \
65 $(use_with odbc unixodbc) \
66 $(use_with postgres pgsql) \
67 $(use_with stemmer libstemmer)
68
69 cd api/libsphinxclient || die
70 econf STRIP=:
71 }
72
73 src_compile() {
74 emake || die "emake failed"
75
76 emake -j 1 -C api/libsphinxclient || die "emake libsphinxclient failed"
77 }
78
79 src_test() {
80 elog "Tests require access to a live MySQL database and may require configuration."
81 elog "You will find them in /usr/share/${PN}/test and they require dev-lang/php"
82 }
83
84 src_install() {
85 emake DESTDIR="${D}" install || die "install failed"
86 emake DESTDIR="${D}" -C api/libsphinxclient install || die "install libsphinxclient failed"
87
88 dodoc doc/*
89
90 dodir /var/lib/sphinx
91 dodir /var/log/sphinx
92 dodir /var/run/sphinx
93
94 newinitd "${FILESDIR}"/searchd.rc searchd
95
96 if use test; then
97 insinto /usr/share/${PN}
98 doins -r test
99 fi
100 }

  ViewVC Help
Powered by ViewVC 1.1.20