*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / sys-cluster / galera / galera-26.4.3.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python{2_7,3_6,3_7} )
7
8 inherit python-any-r1 scons-utils toolchain-funcs flag-o-matic
9
10 DESCRIPTION="Synchronous multi-master replication engine that provides the wsrep API"
11 HOMEPAGE="http://galeracluster.com"
12 SRC_URI="http://nyc2.mirrors.digitalocean.com/mariadb/mariadb-10.4.10/${P}/src/${P}.tar.gz"
13 LICENSE="GPL-2 BSD"
14
15 SLOT="0"
16
17 KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86"
18 IUSE="cpu_flags_x86_sse4_2 garbd test"
19 RESTRICT="!test? ( test )"
20
21 CDEPEND="
22         dev-libs/openssl:0=
23         >=dev-libs/boost-1.41:0=
24         "
25 BDEPEND=">=sys-devel/gcc-4.4"
26 DEPEND="${BDEPEND}
27         ${CDEPEND}
28         dev-libs/check
29         >=dev-cpp/asio-1.10.1[ssl]
30         <dev-cpp/asio-1.12.0
31         "
32 #Run time only
33 RDEPEND="${CDEPEND}"
34
35 # Respect {C,LD}FLAGS.
36 PATCHES=( "${FILESDIR}/galera-4.1-strip-extra-cflags.patch" )
37
38 src_prepare() {
39         default
40
41         # Remove bundled dev-cpp/asio
42         rm -r "${S}/asio" || die
43
44         #Remove optional garbd daemon
45         if ! use garbd ; then
46                 rm -r "${S}/garb" || die
47         fi
48 }
49
50 src_configure() {
51         tc-export CC CXX
52         # Uses hardware specific code that seems to depend on SSE4.2
53         if use cpu_flags_x86_sse4_2 ; then
54                 append-cflags -msse4.2
55         else
56                 append-cflags -DCRC32C_NO_HARDWARE
57         fi
58         # strict_build_flags=0 disables -Werror, -pedantic, -Weffc++,
59         # and -Wold-style-cast
60         MYSCONS=(
61                 tests=$(usex test 1 0)
62                 strict_build_flags=0
63                 system_asio=1
64         )
65 }
66
67 src_compile() {
68         escons --warn=no-missing-sconscript "${MYSCONS[@]}"
69 }
70
71 src_install() {
72         dodoc scripts/packages/README scripts/packages/README-MySQL
73         if use garbd ; then
74                 dobin garb/garbd
75                 newconfd "${FILESDIR}/garb.cnf" garbd
76                 newinitd "${FILESDIR}/garb.init" garbd
77                 doman man/garbd.8
78         fi
79         exeinto /usr/$(get_libdir)/${PN}
80         doexe libgalera_smm.so
81 }