/[gentoo-x86]/eclass/mysql-autotools.eclass
Gentoo

Diff of /eclass/mysql-autotools.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.5 Revision 1.6
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-autotools.eclass,v 1.5 2012/01/09 10:42:19 grobian Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-autotools.eclass,v 1.6 2012/04/18 02:08:34 robbat2 Exp $
4 4
5# @ECLASS: mysql-autotools.eclass 5# @ECLASS: mysql-autotools.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# MySQL Team <mysql-bugs@gentoo.org> 7# MySQL Team <mysql-bugs@gentoo.org>
8# Robin H. Johnson <robbat2@gentoo.org> 8# Robin H. Johnson <robbat2@gentoo.org>
121 121
122 if use debug ; then 122 if use debug ; then
123 myconf="${myconf} --with-debug=full" 123 myconf="${myconf} --with-debug=full"
124 else 124 else
125 myconf="${myconf} --without-debug" 125 myconf="${myconf} --without-debug"
126 if ( use cluster || [[ "${PN}" == "mysql-cluster" ]] ); then 126 if ( use cluster ); then
127 myconf="${myconf} --without-ndb-debug" 127 myconf="${myconf} --without-ndb-debug"
128 fi 128 fi
129 fi 129 fi
130 130
131 if [ -n "${MYSQL_DEFAULT_CHARSET}" -a -n "${MYSQL_DEFAULT_COLLATION}" ]; then 131 if [ -n "${MYSQL_DEFAULT_CHARSET}" -a -n "${MYSQL_DEFAULT_COLLATION}" ]; then
170 170
171 # This is an explict die here, because if we just forcibly disable it, then the 171 # This is an explict die here, because if we just forcibly disable it, then the
172 # user's data is not accessible. 172 # user's data is not accessible.
173 use max-idx-128 && die "Bug #336027: upstream has a corruption issue with max-idx-128 presently" 173 use max-idx-128 && die "Bug #336027: upstream has a corruption issue with max-idx-128 presently"
174 #use max-idx-128 && myconf="${myconf} --with-max-indexes=128" 174 #use max-idx-128 && myconf="${myconf} --with-max-indexes=128"
175 if [ "${MYSQL_COMMUNITY_FEATURES}" == "1" ]; then
176 myconf="${myconf} $(use_enable community community-features)" 175 myconf="${myconf} $(use_enable community community-features)"
177 if use community; then 176 if use community; then
178 myconf="${myconf} $(use_enable profiling)" 177 myconf="${myconf} $(use_enable profiling)"
179 else 178 else
180 myconf="${myconf} --disable-profiling" 179 myconf="${myconf} --disable-profiling"
181 fi
182 fi 180 fi
183 181
184 # Scan for all available plugins 182 # Scan for all available plugins
185 local plugins_avail="$( 183 local plugins_avail="$(
186 LANG=C \ 184 LANG=C \
217 plugins_sta="${plugins_sta} partition" 215 plugins_sta="${plugins_sta} partition"
218 216
219 if [[ "${PN}" != "mariadb" ]] ; then 217 if [[ "${PN}" != "mariadb" ]] ; then
220 elog "Before using the Federated storage engine, please be sure to read" 218 elog "Before using the Federated storage engine, please be sure to read"
221 elog "http://dev.mysql.com/doc/refman/5.1/en/federated-limitations.html" 219 elog "http://dev.mysql.com/doc/refman/5.1/en/federated-limitations.html"
222 plugins_dyn="${plugins_sta} federatedx" 220 plugins_dyn="${plugins_dyn} federated"
223 else 221 else
224 elog "MariaDB includes the FederatedX engine. Be sure to read" 222 elog "MariaDB includes the FederatedX engine. Be sure to read"
225 elog "http://askmonty.org/wiki/index.php/Manual:FederatedX_storage_engine" 223 elog "http://askmonty.org/wiki/index.php/Manual:FederatedX_storage_engine"
226 plugins_dyn="${plugins_sta} federated" 224 plugins_dyn="${plugins_dyn} federatedx"
227 fi 225 fi
228 else 226 else
229 plugins_dis="${plugins_dis} partition federated" 227 plugins_dis="${plugins_dis} partition federated"
230 fi 228 fi
231 229
238 for i in innodb_plugin ; do 236 for i in innodb_plugin ; do
239 [ -e "${S}"/storage/${i} ] && plugins_dyn="${plugins_dyn} ${i}" 237 [ -e "${S}"/storage/${i} ] && plugins_dyn="${plugins_dyn} ${i}"
240 done 238 done
241 239
242 # like configuration=max-no-ndb 240 # like configuration=max-no-ndb
243 if ( use cluster || [[ "${PN}" == "mysql-cluster" ]] ) ; then 241 if ( use cluster ) ; then
244 plugins_sta="${plugins_sta} ndbcluster partition" 242 plugins_sta="${plugins_sta} ndbcluster partition"
245 plugins_dis="${plugins_dis//partition}" 243 plugins_dis="${plugins_dis//partition}"
246 myconf="${myconf} --with-ndb-binlog" 244 myconf="${myconf} --with-ndb-binlog"
247 else 245 else
248 plugins_dis="${plugins_dis} ndbcluster" 246 plugins_dis="${plugins_dis} ndbcluster"
287 fi 285 fi
288 fi 286 fi
289 287
290 if pbxt_available && [[ "${PBXT_NEWSTYLE}" == "1" ]]; then 288 if pbxt_available && [[ "${PBXT_NEWSTYLE}" == "1" ]]; then
291 use pbxt \ 289 use pbxt \
292 && plugins_dyn="${plugins_dyn} pbxt" \ 290 && plugins_sta="${plugins_sta} pbxt" \
293 || plugins_dis="${plugins_dis} pbxt" 291 || plugins_dis="${plugins_dis} pbxt"
294 fi 292 fi
295 293
296 use static && \ 294 use static && \
297 plugins_sta="${plugins_sta} ${plugins_dyn}" && \ 295 plugins_sta="${plugins_sta} ${plugins_dyn}" && \
364 362
365 # last -fPIC fixup, per bug #305873 363 # last -fPIC fixup, per bug #305873
366 i="${S}"/storage/innodb_plugin/plug.in 364 i="${S}"/storage/innodb_plugin/plug.in
367 [ -f "${i}" ] && sed -i -e '/CFLAGS/s,-prefer-non-pic,,g' "${i}" 365 [ -f "${i}" ] && sed -i -e '/CFLAGS/s,-prefer-non-pic,,g' "${i}"
368 366
369 # Additional checks, remove bundled zlib (Cluster needs this, for static 367 # Additional checks, remove bundled zlib
370 # memory management in zlib, leave available for Cluster)
371 if [[ "${PN}" != "mysql-cluster" ]] ; then
372 rm -f "${S}/zlib/"*.[ch] 368 rm -f "${S}/zlib/"*.[ch]
373 sed -i -e "s/zlib\/Makefile dnl/dnl zlib\/Makefile/" "${S}/configure.in" 369 sed -i -e "s/zlib\/Makefile dnl/dnl zlib\/Makefile/" "${S}/configure.in"
374 fi
375 rm -f "scripts/mysqlbug" 370 rm -f "scripts/mysqlbug"
376 371
377 # Make charsets install in the right place 372 # Make charsets install in the right place
378 find . -name 'Makefile.am' \ 373 find . -name 'Makefile.am' \
379 -exec sed --in-place -e 's!$(pkgdatadir)!'${MY_SHAREDSTATEDIR}'!g' {} \; 374 -exec sed --in-place -e 's!$(pkgdatadir)!'${MY_SHAREDSTATEDIR}'!g' {} \;
400 [ -d "${i}" -a ! -d "${o}" ] && mv "${i}" "${o}" 395 [ -d "${i}" -a ! -d "${o}" ] && mv "${i}" "${o}"
401 cp -ral "${WORKDIR}/${XTRADB_P}" "${i}" 396 cp -ral "${WORKDIR}/${XTRADB_P}" "${i}"
402 popd >/dev/null 397 popd >/dev/null
403 fi 398 fi
404 399
405 if pbxt_available && [[ "${PBXT_NEWSTYLE}" == "1" ]] && use pbxt ; then 400 if pbxt_available && [[ "${PBXT_NEWSTYLE}" != "1" ]] && use pbxt ; then
406 einfo "Adding storage engine: PBXT" 401 einfo "Adding storage engine: PBXT"
407 pushd "${S}"/storage >/dev/null 402 pushd "${S}"/storage >/dev/null
408 i='pbxt' 403 i='pbxt'
409 [ -d "${i}" ] && rm -rf "${i}" 404 [ -d "${i}" ] && rm -rf "${i}"
410 cp -ral "${WORKDIR}/${PBXT_P}" "${i}" 405 cp -ral "${WORKDIR}/${PBXT_P}" "${i}"

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.20