1 |
jmbsvicetto 11/03/26 23:44:43 |
2 |
|
3 |
Modified: mysql.eclass |
4 |
Log: |
5 |
Ported the mysql.eclass from the overlay. |
6 |
Ensure sys-libs/ncurses is built with static-libs if the static use flag is enabled - fixes bug 350844. |
7 |
Add support for new engines on mariadb. |
8 |
Fix building of pbxt engine on mariadb - fixes bug 351067. |
9 |
Fix the eclass to allow the use of MYSQL_ROOT_PASSWORD and update the instructions about the options for authentication on pkg_config - fixes bug 356885. |
10 |
|
11 |
Revision Changes Path |
12 |
1.157 eclass/mysql.eclass |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql.eclass?rev=1.157&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql.eclass?rev=1.157&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mysql.eclass?r1=1.156&r2=1.157 |
17 |
|
18 |
Index: mysql.eclass |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v |
21 |
retrieving revision 1.156 |
22 |
retrieving revision 1.157 |
23 |
diff -u -r1.156 -r1.157 |
24 |
--- mysql.eclass 28 Nov 2010 21:55:54 -0000 1.156 |
25 |
+++ mysql.eclass 26 Mar 2011 23:44:43 -0000 1.157 |
26 |
@@ -1,6 +1,6 @@ |
27 |
# Copyright 1999-2009 Gentoo Foundation |
28 |
# Distributed under the terms of the GNU General Public License v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.156 2010/11/28 21:55:54 robbat2 Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.157 2011/03/26 23:44:43 jmbsvicetto Exp $ |
31 |
|
32 |
# @ECLASS: mysql.eclass |
33 |
# @MAINTAINER: |
34 |
@@ -145,6 +145,10 @@ |
35 |
!minimal? ( dev-db/mysql-init-scripts ) |
36 |
selinux? ( sec-policy/selinux-mysql )" |
37 |
|
38 |
+if [ "${EAPI:-0}" = "2" ]; then |
39 |
+ DEPEND="${DEPEND} static? ( sys-libs/ncurses[static-libs] )" |
40 |
+fi |
41 |
+ |
42 |
# compile-time-only |
43 |
mysql_version_is_at_least "5.1" \ |
44 |
|| DEPEND="${DEPEND} berkdb? ( sys-apps/ed )" |
45 |
@@ -153,6 +157,12 @@ |
46 |
mysql_version_is_at_least "5.1.12" \ |
47 |
&& DEPEND="${DEPEND} >=dev-util/cmake-2.4.3" |
48 |
|
49 |
+[[ "${PN}" == "mariadb" ]] \ |
50 |
+&& mysql_version_is_at_least "5.2" \ |
51 |
+&& DEPEND="${DEPEND} oqgraph? ( >=dev-libs/boost-1.40.0 )" |
52 |
+#SphinxSE is included but is not available in 5.2.4 due to a missing plug.in file |
53 |
+# sphinx? ( app-misc/sphinx )" |
54 |
+ |
55 |
# dev-perl/DBD-mysql is needed by some scripts installed by MySQL |
56 |
PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )" |
57 |
|
58 |
@@ -241,6 +251,12 @@ |
59 |
[[ "${PN}" == "mariadb" ]] \ |
60 |
&& IUSE="${IUSE} libevent" |
61 |
|
62 |
+[[ "${PN}" == "mariadb" ]] \ |
63 |
+&& mysql_version_is_at_least "5.2" \ |
64 |
+&& IUSE="${IUSE} oqgraph" |
65 |
+#SphinxSE is included but is not available in 5.2.4 due to a missing plug.in file |
66 |
+#&& IUSE="${IUSE} oqgraph sphinx" |
67 |
+ |
68 |
# MariaDB has integrated PBXT |
69 |
# PBXT_VERSION means that we have a PBXT patch for this PV |
70 |
# PBXT was only introduced after 5.1.12 |
71 |
@@ -622,16 +638,17 @@ |
72 |
if use extraengine ; then |
73 |
# like configuration=max-no-ndb, archive and example removed in 5.1.11 |
74 |
# not added yet: ibmdb2i |
75 |
- # Not supporting as examples: example,daemon_example,ftexample |
76 |
+ # Not supporting as examples: example,daemon_example,ftexample |
77 |
plugins_sta="${plugins_sta} partition" |
78 |
- plugins_dyn="${plugins_sta} federated" |
79 |
|
80 |
if [[ "${PN}" != "mariadb" ]] ; then |
81 |
elog "Before using the Federated storage engine, please be sure to read" |
82 |
elog "http://dev.mysql.com/doc/refman/5.1/en/federated-limitations.html" |
83 |
+ plugins_dyn="${plugins_sta} federated" |
84 |
else |
85 |
elog "MariaDB includes the FederatedX engine. Be sure to read" |
86 |
elog "http://askmonty.org/wiki/index.php/Manual:FederatedX_storage_engine" |
87 |
+ plugins_dyn="${plugins_sta} federatedx" |
88 |
fi |
89 |
else |
90 |
plugins_dis="${plugins_dis} partition federated" |
91 |
@@ -659,7 +676,15 @@ |
92 |
if [[ "${PN}" == "mariadb" ]] ; then |
93 |
# In MariaDB, InnoDB is packaged in the xtradb directory, so it's not |
94 |
# caught above. |
95 |
- plugins_sta="${plugins_sta} maria" |
96 |
+ # This is not optional, without it several upstream testcases fail. |
97 |
+ # Also strongly recommended by upstream. |
98 |
+ if [[ "${PV}" < "5.2.0" ]] ; then |
99 |
+ myconf="${myconf} --with-maria-tmp-tables" |
100 |
+ plugins_sta="${plugins_sta} maria" |
101 |
+ else |
102 |
+ myconf="${myconf} --with-aria-tmp-tables" |
103 |
+ plugins_sta="${plugins_sta} aria" |
104 |
+ fi |
105 |
|
106 |
[ -e "${S}"/storage/innobase ] || [ -e "${S}"/storage/xtradb ] || |
107 |
die "The ${P} package doesn't provide innobase nor xtradb" |
108 |
@@ -669,9 +694,16 @@ |
109 |
done |
110 |
|
111 |
myconf="${myconf} $(use_with libevent)" |
112 |
- # This is not optional, without it several upstream testcases fail. |
113 |
- # Also strongly recommended by upstream. |
114 |
- myconf="${myconf} --with-maria-tmp-tables" |
115 |
+ |
116 |
+ if mysql_version_is_at_least "5.2" ; then |
117 |
+ #This should include sphinx, but the 5.2.4 archive forgot the plug.in file |
118 |
+ #for i in oqgraph sphinx ; do |
119 |
+ for i in oqgraph ; do |
120 |
+ use ${i} \ |
121 |
+ && plugins_dyn="${plugins_dyn} ${i}" \ |
122 |
+ || plugins_dis="${plugins_dis} ${i}" |
123 |
+ done |
124 |
+ fi |
125 |
fi |
126 |
|
127 |
if pbxt_available && [[ "${PBXT_NEWSTYLE}" == "1" ]]; then |
128 |
@@ -749,6 +781,15 @@ |
129 |
fi |
130 |
fi |
131 |
|
132 |
+ # bug 350844 |
133 |
+ case "${EAPI:-0}" in |
134 |
+ 0 | 1) |
135 |
+ if use static && !built_with_use sys-libs/ncurses static-libs; then |
136 |
+ die "To build MySQL statically you need to enable static-libs for sys-libs/ncurses" |
137 |
+ fi |
138 |
+ ;; |
139 |
+ esac |
140 |
+ |
141 |
# Check for USE flag problems in pkg_setup |
142 |
if use static && use ssl ; then |
143 |
M="MySQL does not support being built statically with SSL support enabled!" |
144 |
@@ -794,7 +835,7 @@ |
145 |
if mysql_version_is_at_least "5.0.83" && ! mysql_version_is_at_least 5.0.87 ; then |
146 |
GCC_VER=$(gcc-version) |
147 |
case ${GCC_VER} in |
148 |
- 2*|3*|4.0|4.1|4.2) |
149 |
+ 2*|3*|4.0|4.1|4.2) |
150 |
eerror "Some releases of MySQL required a very new GCC, and then" |
151 |
eerror "later release relaxed that requirement again. Either pick a" |
152 |
eerror "MySQL >=5.0.87, or use a newer GCC." |
153 |
@@ -899,7 +940,7 @@ |
154 |
popd >/dev/null |
155 |
fi |
156 |
|
157 |
- if pbxt_available && [[ "${PBXT_NEWSTYLE}" == "1" ]] && use pbxt ; then |
158 |
+ if pbxt_patch_available && [[ "${PBXT_NEWSTYLE}" == "1" ]] && use pbxt ; then |
159 |
einfo "Adding storage engine: PBXT" |
160 |
pushd "${S}"/storage >/dev/null |
161 |
i='pbxt' |
162 |
@@ -1274,7 +1315,6 @@ |
163 |
|
164 |
local pwd1="a" |
165 |
local pwd2="b" |
166 |
- local MYSQL_ROOT_PASSWORD='' |
167 |
local maxtry=15 |
168 |
|
169 |
if [ -z "${MYSQL_ROOT_PASSWORD}" -a -f "${ROOT}/root/.my.cnf" ]; then |
170 |
@@ -1294,8 +1334,8 @@ |
171 |
|
172 |
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then |
173 |
|
174 |
- einfo "Please provide a password for the mysql 'root' user now," |
175 |
- einfo "or in the MYSQL_ROOT_PASSWORD env var." |
176 |
+ einfo "Please provide a password for the mysql 'root' user now, in the" |
177 |
+ einfo "MYSQL_ROOT_PASSWORD env var or through the /root/.my.cnf file." |
178 |
ewarn "Avoid [\"'\\_%] characters in the password" |
179 |
read -rsp " >" pwd1 ; echo |