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