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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Sun Jun 17 16:47:22 2012 UTC (2 years, 1 month ago) by armin76
Branch: MAIN
Changes since 1.4: +2 -2 lines
Add ~alpha/~ia64/~sparc wrt #412475

(Portage version: 2.1.10.53/cvs/Linux ia64)

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.ebuild,v 1.4 2012/04/22 14:45:26 maekke 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
45 # drop nasty hardcoded search path breaking Prefix
46 sed -i -e '/\/usr\/local\//d' configure.ac || die
47
48 # Regenerate autoconf files in the api directory first to avoid
49 # running elibtoolize twice, which results in a warning.
50 pushd api/libsphinxclient || die
51 eautoreconf
52 popd || die
53
54 eautoreconf
55 }
56
57 src_configure() {
58 # fix libiconv detection
59 use !elibc_glibc && export ac_cv_search_iconv=-liconv
60
61 econf \
62 --sysconfdir="${EPREFIX}/etc/${PN}" \
63 $(use_enable id64) \
64 $(use_with debug) \
65 $(use_with mysql) \
66 $(use_with odbc unixodbc) \
67 $(use_with postgres pgsql) \
68 $(use_with stemmer libstemmer)
69
70 cd api/libsphinxclient || die
71 econf STRIP=:
72 }
73
74 src_compile() {
75 emake || die "emake failed"
76
77 emake -j 1 -C api/libsphinxclient || die "emake libsphinxclient failed"
78 }
79
80 src_test() {
81 elog "Tests require access to a live MySQL database and may require configuration."
82 elog "You will find them in /usr/share/${PN}/test and they require dev-lang/php"
83 }
84
85 src_install() {
86 emake DESTDIR="${D}" install || die "install failed"
87 emake DESTDIR="${D}" -C api/libsphinxclient install || die "install libsphinxclient failed"
88
89 dodoc doc/*
90
91 dodir /var/lib/sphinx
92 dodir /var/log/sphinx
93 dodir /var/run/sphinx
94
95 newinitd "${FILESDIR}"/searchd.rc searchd
96
97 if use test; then
98 insinto /usr/share/${PN}
99 doins -r test
100 fi
101 }

  ViewVC Help
Powered by ViewVC 1.1.20