1 |
commit: ff42ea3a24aeed2ce21b3afbc58536d0ecab844c |
2 |
Author: Brian Evans <grknight <AT> lavabit <DOT> com> |
3 |
AuthorDate: Mon Apr 29 23:51:20 2013 +0000 |
4 |
Commit: Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Apr 29 23:51:20 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mysql.git;a=commit;h=ff42ea3a |
7 |
|
8 |
[eclass/mysql-v2] Update eclass to support mariadb-galera. |
9 |
|
10 |
--- |
11 |
eclass/mysql-v2.eclass | 33 ++++++++++++++++++++------------- |
12 |
1 files changed, 20 insertions(+), 13 deletions(-) |
13 |
|
14 |
diff --git a/eclass/mysql-v2.eclass b/eclass/mysql-v2.eclass |
15 |
index 0f2922e..eda43a4 100644 |
16 |
--- a/eclass/mysql-v2.eclass |
17 |
+++ b/eclass/mysql-v2.eclass |
18 |
@@ -115,7 +115,7 @@ mysql_version_is_at_least "5.1.50" || die "This eclass should only be used with |
19 |
# Work out the default SERVER_URI correctly |
20 |
if [ -z "${SERVER_URI}" ]; then |
21 |
[ -z "${MY_PV}" ] && MY_PV="${PV//_/-}" |
22 |
- if [ "${PN}" == "mariadb" ]; then |
23 |
+ if [ "${PN}" == "mariadb" ] || [ "${PN}" == "mariadb-galera" ]; then |
24 |
MARIA_FULL_PV="$(replace_version_separator 3 '-' ${MY_PV})" |
25 |
MARIA_FULL_P="${PN}-${MARIA_FULL_PV}" |
26 |
SERVER_URI=" |
27 |
@@ -126,6 +126,9 @@ if [ -z "${SERVER_URI}" ]; then |
28 |
http://mirrors.fe.up.pt/pub/${PN}/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz |
29 |
http://ftp-stud.hs-esslingen.de/pub/Mirrors/${PN}/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz |
30 |
" |
31 |
+ if [ "${PN}" == "mariadb-galera" ]; then |
32 |
+ MY_SOURCEDIR="${PN%%-galera}-${GALERA_FULL_PV}" |
33 |
+ fi |
34 |
else |
35 |
URI_DIR="MySQL" |
36 |
URI_FILE="mysql" |
37 |
@@ -154,6 +157,10 @@ if [[ "${PN}" == "mariadb" ]]; then |
38 |
HOMEPAGE="http://mariadb.org/" |
39 |
DESCRIPTION="An enhanced, drop-in replacement for MySQL" |
40 |
fi |
41 |
+if [ "${PN}" == "mariadb-galera" ]; then |
42 |
+ HOMEPAGE="http://mariadb.org/" |
43 |
+ DESCRIPTION="An enhanced, drop-in replacement for MySQL with Galera Replication" |
44 |
+fi |
45 |
LICENSE="GPL-2" |
46 |
SLOT="0" |
47 |
|
48 |
@@ -178,15 +185,15 @@ IUSE="${IUSE} +community profiling" |
49 |
&& mysql_check_version_range "5.1.38 to 5.3.99" \ |
50 |
&& IUSE="${IUSE} libevent" |
51 |
|
52 |
-[[ ${PN} == "mariadb" ]] \ |
53 |
+([[ ${PN} == "mariadb" ]] || [[ "${PN}" == "mariadb-galera" ]])\ |
54 |
&& mysql_version_is_at_least "5.2" \ |
55 |
&& IUSE="${IUSE} oqgraph" |
56 |
|
57 |
-[[ ${PN} == "mariadb" ]] \ |
58 |
+([[ ${PN} == "mariadb" ]] || [[ "${PN}" == "mariadb-galera" ]])\ |
59 |
&& mysql_version_is_at_least "5.2.5" \ |
60 |
&& IUSE="${IUSE} sphinx" |
61 |
|
62 |
-[[ ${PN} == "mariadb" ]] \ |
63 |
+([[ ${PN} == "mariadb" ]] || [[ "${PN}" == "mariadb-galera" ]])\ |
64 |
&& mysql_version_is_at_least "5.2.10" \ |
65 |
&& IUSE="${IUSE} pam" |
66 |
|
67 |
@@ -215,7 +222,7 @@ DEPEND=" |
68 |
>=sys-libs/zlib-1.2.3 |
69 |
" |
70 |
|
71 |
-[[ ${PN} == mariadb ]] \ |
72 |
+([[ ${PN} == "mariadb" ]] || [[ "${PN}" == "mariadb-galera" ]])\ |
73 |
&& mysql_check_version_range "5.1.38 to 5.3.99" \ |
74 |
&& DEPEND="${DEPEND} libevent? ( >=dev-libs/libevent-1.4 )" |
75 |
|
76 |
@@ -225,20 +232,20 @@ for i in "mysql" "mariadb" "mariadb-galera" ; do |
77 |
DEPEND="${DEPEND} !dev-db/${i}" |
78 |
done |
79 |
|
80 |
-[[ "${PN}" == "mariadb" ]] \ |
81 |
+([[ ${PN} == "mariadb" ]] || [[ "${PN}" == "mariadb-galera" ]])\ |
82 |
&& mysql_version_is_at_least "5.2" \ |
83 |
&& DEPEND="${DEPEND} oqgraph? ( >=dev-libs/boost-1.40.0 )" |
84 |
|
85 |
-[[ "${PN}" == "mariadb" ]] \ |
86 |
+([[ ${PN} == "mariadb" ]] || [[ "${PN}" == "mariadb-galera" ]])\ |
87 |
&& mysql_version_is_at_least "5.2.5" \ |
88 |
&& DEPEND="${DEPEND} sphinx? ( app-misc/sphinx )" |
89 |
|
90 |
-[[ "${PN}" == "mariadb" ]] \ |
91 |
+([[ ${PN} == "mariadb" ]] || [[ "${PN}" == "mariadb-galera" ]])\ |
92 |
&& mysql_version_is_at_least "5.2.10" \ |
93 |
&& DEPEND="${DEPEND} !minimal? ( pam? ( virtual/pam ) )" |
94 |
|
95 |
# Bug 441700 MariaDB >=5.3 include custom mytop |
96 |
-[[ "${PN}" == "mariadb" ]] \ |
97 |
+([[ ${PN} == "mariadb" ]] || [[ "${PN}" == "mariadb-galera" ]])\ |
98 |
&& mysql_version_is_at_least "5.3" \ |
99 |
&& DEPEND="${DEPEND} perl? ( !dev-db/mytop )" |
100 |
|
101 |
@@ -259,7 +266,7 @@ RDEPEND="${DEPEND} |
102 |
" |
103 |
|
104 |
# Bug 455016 Add dependancies of mytop |
105 |
-[[ "${PN}" == "mariadb" ]] \ |
106 |
+([[ ${PN} == "mariadb" ]] || [[ "${PN}" == "mariadb-galera" ]])\ |
107 |
&& mysql_version_is_at_least "5.3" \ |
108 |
&& RDEPEND="${RDEPEND} perl? ( |
109 |
virtual/perl-Getopt-Long |
110 |
@@ -294,13 +301,13 @@ PDEPEND="${PDEPEND} =virtual/mysql-${MYSQL_PV_MAJOR}" |
111 |
# PBXT_VERSION means that we have a PBXT patch for this PV |
112 |
# PBXT was only introduced after 5.1.12 |
113 |
pbxt_patch_available() { |
114 |
- [[ ${PN} != "mariadb" ]] \ |
115 |
+ [[ ${PN} != "mariadb" ]] && [[ ${PN} != "mariadb-galera" ]]\ |
116 |
&& [[ -n "${PBXT_VERSION}" ]] |
117 |
return $? |
118 |
} |
119 |
|
120 |
pbxt_available() { |
121 |
- pbxt_patch_available || [[ ${PN} == "mariadb" ]] |
122 |
+ pbxt_patch_available || [[ ${PN} == "mariadb" ]] || [[ ${PN} == "mariadb-galera" ]] |
123 |
return $? |
124 |
} |
125 |
|
126 |
@@ -309,7 +316,7 @@ pbxt_available() { |
127 |
# XTRADB_VERS means that we have a XTRADB patch for this PV |
128 |
# XTRADB was only introduced after 5.1.26 |
129 |
xtradb_patch_available() { |
130 |
- [[ ${PN} != "mariadb" ]] \ |
131 |
+ [[ ${PN} != "mariadb" ]] && [[ ${PN} != "mariadb-galera" ]] \ |
132 |
&& [[ -n "${XTRADB_VER}" && -n "${PERCONA_VER}" ]] |
133 |
return $? |
134 |
} |