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

Diff of /eclass/mysql-v2.eclass

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

Revision 1.22 Revision 1.23
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-v2.eclass,v 1.22 2013/01/20 02:23:10 robbat2 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mysql-v2.eclass,v 1.23 2013/01/28 02:13:05 robbat2 Exp $
4 4
5# @ECLASS: mysql-v2.eclass 5# @ECLASS: mysql-v2.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Maintainers: 7# Maintainers:
8# - MySQL Team <mysql-bugs@gentoo.org> 8# - MySQL Team <mysql-bugs@gentoo.org>
150 150
151DESCRIPTION="A fast, multi-threaded, multi-user SQL database server." 151DESCRIPTION="A fast, multi-threaded, multi-user SQL database server."
152HOMEPAGE="http://www.mysql.com/" 152HOMEPAGE="http://www.mysql.com/"
153if [[ "${PN}" == "mariadb" ]]; then 153if [[ "${PN}" == "mariadb" ]]; then
154 HOMEPAGE="http://mariadb.org/" 154 HOMEPAGE="http://mariadb.org/"
155 DESCRIPTION="MariaDB is a MySQL fork with 3rd-party patches and additional storage engines merged." 155 DESCRIPTION="An enhanced, drop-in replacement for MySQL"
156fi 156fi
157LICENSE="GPL-2" 157LICENSE="GPL-2"
158SLOT="0" 158SLOT="0"
159 159
160case "${BUILD}" in 160case "${BUILD}" in
189 189
190if mysql_version_is_at_least "5.5"; then 190if mysql_version_is_at_least "5.5"; then
191 REQUIRED_USE="tcmalloc? ( !jemalloc ) jemalloc? ( !tcmalloc )" 191 REQUIRED_USE="tcmalloc? ( !jemalloc ) jemalloc? ( !tcmalloc )"
192 IUSE="${IUSE} jemalloc tcmalloc" 192 IUSE="${IUSE} jemalloc tcmalloc"
193fi 193fi
194
195REQUIRED_USE="${REQUIRED_USE} minimal? ( !cluster !extraengine !embedded ) static? ( !ssl )"
194 196
195mysql_version_is_at_least "5.5.7" \ 197mysql_version_is_at_least "5.5.7" \
196&& IUSE="${IUSE} systemtap" 198&& IUSE="${IUSE} systemtap"
197 199
198# 200#
226 228
227[[ "${PN}" == "mariadb" ]] \ 229[[ "${PN}" == "mariadb" ]] \
228&& mysql_version_is_at_least "5.2.5" \ 230&& mysql_version_is_at_least "5.2.5" \
229&& DEPEND="${DEPEND} sphinx? ( app-misc/sphinx )" 231&& DEPEND="${DEPEND} sphinx? ( app-misc/sphinx )"
230 232
233# Bug 441700 MariaDB >=5.3 include custom mytop
234[[ "${PN}" == "mariadb" ]] \
235&& mysql_version_is_at_least "5.3" \
236&& DEPEND="${DEPEND} !dev-db/mytop"
237
231mysql_version_is_at_least "5.5.7" \ 238mysql_version_is_at_least "5.5.7" \
232&& DEPEND="${DEPEND} systemtap? ( >=dev-util/systemtap-1.3 )" \ 239&& DEPEND="${DEPEND} systemtap? ( >=dev-util/systemtap-1.3 )" \
233&& DEPEND="${DEPEND} kernel_linux? ( dev-libs/libaio )" 240&& DEPEND="${DEPEND} kernel_linux? ( dev-libs/libaio )"
234 241
235mysql_version_is_at_least "5.5" \ 242mysql_version_is_at_least "5.5" \
304# vs. built outside the dir 311# vs. built outside the dir
305if pbxt_available; then 312if pbxt_available; then
306 313
307 IUSE="${IUSE} pbxt" 314 IUSE="${IUSE} pbxt"
308 PBXT_NEWSTYLE=1 315 PBXT_NEWSTYLE=1
316 REQUIRED_USE="${REQUIRED_USE} pbxt? ( !embedded ) "
309fi 317fi
310 318
311if xtradb_patch_available; then 319if xtradb_patch_available; then
312 XTRADB_P="percona-xtradb-${XTRADB_VER}" 320 XTRADB_P="percona-xtradb-${XTRADB_VER}"
313 XTRADB_SRC_URI_COMMON="${PERCONA_VER}/source/${XTRADB_P}.tar.gz" 321 XTRADB_SRC_URI_COMMON="${PERCONA_VER}/source/${XTRADB_P}.tar.gz"
316 XTRADB_SRC_URI1="${XTRADB_SRC_B2}/Percona-Server/Percona-Server-${XTRADB_SRC_URI_COMMON}" 324 XTRADB_SRC_URI1="${XTRADB_SRC_B2}/Percona-Server/Percona-Server-${XTRADB_SRC_URI_COMMON}"
317 XTRADB_SRC_URI2="${XTRADB_SRC_B2}/xtradb/${XTRADB_SRC_URI_COMMON}" 325 XTRADB_SRC_URI2="${XTRADB_SRC_B2}/xtradb/${XTRADB_SRC_URI_COMMON}"
318 XTRADB_SRC_URI3="${XTRADB_SRC_B1}/${PN}/xtradb/${XTRADB_SRC_URI_COMMON}" 326 XTRADB_SRC_URI3="${XTRADB_SRC_B1}/${PN}/xtradb/${XTRADB_SRC_URI_COMMON}"
319 SRC_URI="${SRC_URI} xtradb? ( ${XTRADB_SRC_URI1} ${XTRADB_SRC_URI2} ${XTRADB_SRC_URI3} )" 327 SRC_URI="${SRC_URI} xtradb? ( ${XTRADB_SRC_URI1} ${XTRADB_SRC_URI2} ${XTRADB_SRC_URI3} )"
320 IUSE="${IUSE} xtradb" 328 IUSE="${IUSE} xtradb"
329 REQUIRED_USE="${REQUIRED_USE} xtradb? ( !embedded ) "
321fi 330fi
322 331
323# 332#
324# HELPER FUNCTIONS: 333# HELPER FUNCTIONS:
325# 334#
365 fi 374 fi
366 fi 375 fi
367 fi 376 fi
368 377
369 # Check for USE flag problems in pkg_setup 378 # Check for USE flag problems in pkg_setup
370 if use static && use ssl ; then
371 M="MySQL does not support being built statically with SSL support enabled!"
372 eerror "${M}"
373 die "${M}"
374 fi
375
376 if ! mysql_version_is_at_least "5.2" \ 379 if ! mysql_version_is_at_least "5.2" \
377 && use debug ; then 380 && use debug ; then
378 # Also in package.use.mask 381 # Also in package.use.mask
379 die "Bug #344885: Upstream has broken USE=debug for 5.1 series >=5.1.51" 382 die "Bug #344885: Upstream has broken USE=debug for 5.1 series >=5.1.51"
380 fi
381
382 if ( use cluster || use extraengine || use embedded ) \
383 && use minimal ; then
384 M="USE flags 'cluster', 'extraengine', 'embedded' conflict with 'minimal' USE flag!"
385 eerror "${M}"
386 die "${M}"
387 fi
388
389 if xtradb_patch_available \
390 && use xtradb \
391 && use embedded ; then
392 M="USE flags 'xtradb' and 'embedded' conflict and cause build failures"
393 eerror "${M}"
394 die "${M}"
395 fi 383 fi
396 384
397 # This should come after all of the die statements 385 # This should come after all of the die statements
398 enewgroup mysql 60 || die "problem adding 'mysql' group" 386 enewgroup mysql 60 || die "problem adding 'mysql' group"
399 enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user" 387 enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

  ViewVC Help
Powered by ViewVC 1.1.20