Gentoo Archives: gentoo-commits

From: Hans de Graaff <graaff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/sphinx/
Date: Mon, 21 Jan 2019 19:21:06
Message-Id: 1548098408.59d71e2c5d1c835eda84c1647a52687dec3f38b6.graaff@gentoo
1 commit: 59d71e2c5d1c835eda84c1647a52687dec3f38b6
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 21 19:20:08 2019 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 21 19:20:08 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59d71e2c
7
8 app-misc/sphinx: link against libre2 shared library
9
10 Explicitly provide the shared object to link against, since the build
11 system defaults to a static library and can't use normal linker
12 commands.
13
14 Fixes: https://bugs.gentoo.org/674308
15 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
16 Package-Manager: Portage-2.3.51, Repoman-2.3.11
17
18 app-misc/sphinx/sphinx-2.2.11-r2.ebuild | 112 ++++++++++++++++++++++++++++++++
19 1 file changed, 112 insertions(+)
20
21 diff --git a/app-misc/sphinx/sphinx-2.2.11-r2.ebuild b/app-misc/sphinx/sphinx-2.2.11-r2.ebuild
22 new file mode 100644
23 index 00000000000..ed278ee1e82
24 --- /dev/null
25 +++ b/app-misc/sphinx/sphinx-2.2.11-r2.ebuild
26 @@ -0,0 +1,112 @@
27 +# Copyright 1999-2019 Gentoo Authors
28 +# Distributed under the terms of the GNU General Public License v2
29 +
30 +EAPI=6
31 +
32 +WANT_AUTOMAKE=1.15
33 +
34 +inherit eutils autotools toolchain-funcs
35 +
36 +#MY_P=${P/_/-}
37 +MY_P=${P}-release
38 +
39 +DESCRIPTION="Full-text search engine with support for MySQL and PostgreSQL"
40 +HOMEPAGE="http://www.sphinxsearch.com/"
41 +SRC_URI="http://sphinxsearch.com/files/${MY_P}.tar.gz"
42 +
43 +LICENSE="GPL-2"
44 +SLOT="0"
45 +KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris"
46 +IUSE="debug +id64 mariadb mysql odbc postgres re2 stemmer syslog xml"
47 +
48 +REQUIRED_USE="mysql? ( !mariadb ) mariadb? ( !mysql )"
49 +
50 +RDEPEND="
51 + mysql? ( dev-db/mysql-connector-c )
52 + mariadb? ( dev-db/mariadb-connector-c )
53 + postgres? ( dev-db/postgresql:* )
54 + odbc? ( dev-db/unixODBC )
55 + re2? ( dev-libs/re2 )
56 + stemmer? ( dev-libs/snowball-stemmer )
57 + xml? ( dev-libs/expat )
58 + virtual/libiconv"
59 +
60 +S=${WORKDIR}/${MY_P}
61 +
62 +src_prepare() {
63 + epatch "${FILESDIR}"/${PN}-2.0.1_beta-darwin8.patch
64 +
65 + # drop nasty hardcoded search path breaking Prefix
66 + # We patch configure directly since otherwise we need to run
67 + # eautoreconf twice and that causes problems, bug 425380
68 + sed -i -e 's/\/usr\/local\//\/someplace\/nonexisting\//g' configure || die
69 +
70 + if use mariadb ; then
71 + sed -i -e 's/mysql_config/mariadb_config/g' configure || die
72 + fi
73 +
74 + # Fix QA compilation warnings.
75 + sed -i -e '19i#include <string.h>' api/libsphinxclient/test.c || die
76 +
77 + eapply_user
78 +
79 + pushd api/libsphinxclient || die
80 + eautoreconf
81 + popd || die
82 +
83 + # Drop bundled code to ensure building against system versions. We
84 + # cannot remove libstemmer_c since configure updates its Makefile.
85 + rm -rf libexpat libre2 || die
86 +}
87 +
88 +src_configure() {
89 + # fix libiconv detection
90 + use !elibc_glibc && export ac_cv_search_iconv=-liconv
91 +
92 + local mysql_with
93 + if use mysql || use mariadb ; then
94 + mysql_with="--with-mysql"
95 + else
96 + mysql_with="--without-mysql"
97 + fi
98 +
99 + econf \
100 + --sysconfdir="${EPREFIX}/etc/${PN}" \
101 + $(use_enable id64) \
102 + $(use_with debug) \
103 + ${mysql_with} \
104 + $(use_with odbc unixodbc) \
105 + $(use_with postgres pgsql) \
106 + $(use_with re2) \
107 + --with-re2-libs="${EPREFIX}/usr/$(get_libdir)/libre2.so" \
108 + $(use_with stemmer libstemmer) \
109 + $(use_with syslog syslog) \
110 + $(use_with xml libexpat )
111 +
112 + cd api/libsphinxclient || die
113 + econf STRIP=:
114 +}
115 +
116 +src_compile() {
117 + emake AR="$(tc-getAR)" || die "emake failed"
118 +
119 + emake -j 1 -C api/libsphinxclient || die "emake libsphinxclient failed"
120 +}
121 +
122 +src_test() {
123 + # Tests require a live database and only work from the source
124 + # directory.
125 + :
126 +}
127 +
128 +src_install() {
129 + emake DESTDIR="${D}" install || die "install failed"
130 + emake DESTDIR="${D}" -C api/libsphinxclient install || die "install libsphinxclient failed"
131 +
132 + dodoc doc/*
133 +
134 + dodir /var/lib/sphinx
135 + dodir /var/log/sphinx
136 +
137 + newinitd "${FILESDIR}"/searchd.rc searchd
138 +}