1 |
robbat2 10/08/20 23:52:51 |
2 |
|
3 |
Modified: mysql.eclass |
4 |
Log: |
5 |
Add MySQL-cluster support to the eclass. Ebuild not moving from overlay quite yet however. |
6 |
|
7 |
Revision Changes Path |
8 |
1.149 eclass/mysql.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql.eclass?rev=1.149&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql.eclass?rev=1.149&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql.eclass?r1=1.148&r2=1.149 |
13 |
|
14 |
Index: mysql.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v |
17 |
retrieving revision 1.148 |
18 |
retrieving revision 1.149 |
19 |
diff -p -w -b -B -u -u -r1.148 -r1.149 |
20 |
--- mysql.eclass 9 Aug 2010 19:29:49 -0000 1.148 |
21 |
+++ mysql.eclass 20 Aug 2010 23:52:51 -0000 1.149 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 1999-2009 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.148 2010/08/09 19:29:49 robbat2 Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.149 2010/08/20 23:52:51 robbat2 Exp $ |
27 |
|
28 |
# @ECLASS: mysql.eclass |
29 |
# @MAINTAINER: |
30 |
@@ -61,6 +61,14 @@ esac |
31 |
# mysql_upgrade. |
32 |
MYSQL_PV_MAJOR="$(get_version_component_range 1-2 ${PV})" |
33 |
|
34 |
+# Cluster is a special case... |
35 |
+if [[ "${PN}" == "mysql-cluster" ]]; then |
36 |
+ case $PV in |
37 |
+ 6.1*|7.0*|7.1*) MYSQL_PV_MAJOR=5.1 ;; |
38 |
+ esac |
39 |
+fi |
40 |
+ |
41 |
+ |
42 |
# @ECLASS-VARIABLE: MYSQL_VERSION_ID |
43 |
# @DESCRIPTION: |
44 |
# MYSQL_VERSION_ID will be: |
45 |
@@ -97,7 +105,9 @@ elif [ "${PV#5.4}" != "${PV}" ] ; then |
46 |
MYSQL_COMMUNITY_FEATURES=1 |
47 |
elif [ "${PV#5.5}" != "${PV}" ] ; then |
48 |
MYSQL_COMMUNITY_FEATURES=1 |
49 |
-elif [ "${PV#6.0}" != "${PV}" ] ; then |
50 |
+elif [ "${PV#6}" != "${PV}" ] ; then |
51 |
+ MYSQL_COMMUNITY_FEATURES=1 |
52 |
+elif [ "${PV#7}" != "${PV}" ] ; then |
53 |
MYSQL_COMMUNITY_FEATURES=1 |
54 |
else |
55 |
MYSQL_COMMUNITY_FEATURES=0 |
56 |
@@ -126,7 +136,7 @@ DEPEND="ssl? ( >=dev-libs/openssl-0.9.6d |
57 |
&& DEPEND="${DEPEND} libevent? ( >=dev-libs/libevent-1.4 )" |
58 |
|
59 |
# Having different flavours at the same time is not a good idea |
60 |
-for i in "mysql" "mysql-community" "mariadb" ; do |
61 |
+for i in "mysql" "mysql-community" "mysql-cluster" "mariadb" ; do |
62 |
[[ "${i}" == ${PN} ]] || |
63 |
DEPEND="${DEPEND} !dev-db/${i}" |
64 |
done |
65 |
@@ -160,8 +170,8 @@ if [ -z "${SERVER_URI}" ]; then |
66 |
http://maria.llarian.net/download/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz |
67 |
http://launchpad.net/maria/${MYSQL_PV_MAJOR}/ongoing/+download/${MARIA_FULL_P}.tar.gz |
68 |
" |
69 |
- # The community build is on the mirrors |
70 |
- elif [ "${MYSQL_COMMUNITY_FEATURES}" == "1" ]; then |
71 |
+ # The community and cluster builds are on the mirrors |
72 |
+ elif [[ "${MYSQL_COMMUNITY_FEATURES}" == "1" || ${PN} == "mysql-cluster" ]] ; then |
73 |
if [[ "${PN}" == "mysql-cluster" ]] ; then |
74 |
URI_DIR="MySQL-Cluster" |
75 |
URI_FILE="mysql-cluster-gpl" |
76 |
@@ -206,8 +216,12 @@ IUSE="big-tables debug embedded minimal |
77 |
mysql_version_is_at_least "4.1" \ |
78 |
&& IUSE="${IUSE} latin1" |
79 |
|
80 |
-mysql_version_is_at_least "4.1.3" \ |
81 |
-&& IUSE="${IUSE} cluster extraengine" |
82 |
+if mysql_version_is_at_least "4.1.3" ; then |
83 |
+ IUSE="${IUSE} extraengine" |
84 |
+ if [[ "${PN}" != "mysql-cluster" ]] ; then |
85 |
+ IUSE="${IUSE} cluster" |
86 |
+ fi |
87 |
+fi |
88 |
|
89 |
mysql_version_is_at_least "5.0" \ |
90 |
|| IUSE="${IUSE} raid" |
91 |
@@ -438,7 +452,7 @@ configure_common() { |
92 |
else |
93 |
myconf="${myconf} --without-debug" |
94 |
mysql_version_is_at_least "4.1.3" \ |
95 |
- && use cluster \ |
96 |
+ && ( use cluster || [[ "${PN}" == "mysql-cluster" ]] ) \ |
97 |
&& myconf="${myconf} --without-ndb-debug" |
98 |
fi |
99 |
|
100 |
@@ -505,8 +519,10 @@ configure_40_41_50() { |
101 |
|
102 |
if mysql_version_is_at_least "4.1.3" ; then |
103 |
myconf="${myconf} --with-geometry" |
104 |
+ if [[ "${PN}" != "mysql-cluster" ]] ; then |
105 |
myconf="${myconf} $(use_with cluster ndbcluster)" |
106 |
fi |
107 |
+ fi |
108 |
|
109 |
if mysql_version_is_at_least "4.1.3" && use extraengine ; then |
110 |
# http://dev.mysql.com/doc/mysql/en/archive-storage-engine.html |
111 |
@@ -626,7 +642,7 @@ configure_51() { |
112 |
done |
113 |
|
114 |
# like configuration=max-no-ndb |
115 |
- if use cluster ; then |
116 |
+ if ( use cluster || [[ "${PN}" == "mysql-cluster" ]] ) ; then |
117 |
plugins_sta="${plugins_sta} ndbcluster partition" |
118 |
plugins_dis="${plugins_dis//partition}" |
119 |
myconf="${myconf} --with-ndb-binlog" |
120 |
@@ -824,9 +840,12 @@ mysql_src_prepare() { |
121 |
i="${S}"/storage/innodb_plugin/plug.in |
122 |
[ -f "${i}" ] && sed -i -e '/CFLAGS/s,-prefer-non-pic,,g' "${i}" |
123 |
|
124 |
- # Additional checks, remove bundled zlib |
125 |
+ # Additional checks, remove bundled zlib (Cluster needs this, for static |
126 |
+ # memory management in zlib, leave available for Cluster) |
127 |
+ if [[ "${PN}" != "mysql-cluster" ]] ; then |
128 |
rm -f "${S}/zlib/"*.[ch] |
129 |
sed -i -e "s/zlib\/Makefile dnl/dnl zlib\/Makefile/" "${S}/configure.in" |
130 |
+ fi |
131 |
rm -f "scripts/mysqlbug" |
132 |
|
133 |
# Make charsets install in the right place |
134 |
@@ -1282,6 +1301,7 @@ mysql_pkg_config() { |
135 |
${ROOT}/usr/sbin/mysqld --verbose --help >"${helpfile}" 2>/dev/null |
136 |
for opt in grant-tables host-cache name-resolve networking slave-start bdb \ |
137 |
federated innodb ssl log-bin relay-log slow-query-log external-locking \ |
138 |
+ ndbcluster \ |
139 |
; do |
140 |
optexp="--(skip-)?${opt}" optfull="--skip-${opt}" |
141 |
egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}" |