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

Diff of /eclass/mysql.eclass

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

Revision 1.40 Revision 1.41
1# Copyright 1999-2006 Gentoo Foundation 1# Copyright 1999-2006 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.eclass,v 1.40 2006/10/20 15:22:24 chtekk Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.41 2006/10/20 18:53:45 chtekk Exp $
4 4
5# Author: Francesco Riosa <vivo@gentoo.org> 5# Author: Francesco Riosa <vivo@gentoo.org>
6# Maintainer: Luca Longinotti <chtekk@gentoo.org> 6# Maintainer: Luca Longinotti <chtekk@gentoo.org>
7 7
8# Both MYSQL_VERSION_ID and MYSQL_PATCHSET_REV must be set in the ebuild too 8# Both MYSQL_VERSION_ID and MYSQL_PATCHSET_REV must be set in the ebuild too
23 done 23 done
24 # strip leading "0" (otherwise it's considered an octal number by BASH) 24 # strip leading "0" (otherwise it's considered an octal number by BASH)
25 MYSQL_VERSION_ID=${MYSQL_VERSION_ID##"0"} 25 MYSQL_VERSION_ID=${MYSQL_VERSION_ID##"0"}
26fi 26fi
27 27
28DEPEND="${DEPEND} 28inherit eutils flag-o-matic gnuconfig autotools mysql_fx
29
30# Be warned, *DEPEND are version-dependant
31DEPEND="ssl? ( >=dev-libs/openssl-0.9.6d )
32 userland_GNU? ( sys-process/procps )
33 >=sys-apps/sed-4
34 >=sys-apps/texinfo-4.7-r1
29 >=sys-libs/readline-4.1 35 >=sys-libs/readline-4.1
30 berkdb? ( sys-apps/ed )
31 ssl? ( >=dev-libs/openssl-0.9.6d )
32 userland_GNU? ( sys-process/procps )
33 >=sys-libs/zlib-1.2.3 36 >=sys-libs/zlib-1.2.3"
34 >=sys-apps/texinfo-4.7-r1 37
35 >=sys-apps/sed-4" 38mysql_version_is_at_least "5.01.00.00" \
39|| DEPEND="${DEPEND} berkdb? ( sys-apps/ed )"
36 40
37RDEPEND="${DEPEND} selinux? ( sec-policy/selinux-mysql )" 41RDEPEND="${DEPEND} selinux? ( sec-policy/selinux-mysql )"
38 42
39# dev-perl/DBD-mysql is needed by some scripts installed by MySQL 43# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
40PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )" 44PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
41
42inherit eutils flag-o-matic gnuconfig autotools mysql_fx
43 45
44# Shorten the path because the socket path length must be shorter than 107 chars 46# Shorten the path because the socket path length must be shorter than 107 chars
45# and we will run a mysql server during test phase 47# and we will run a mysql server during test phase
46S="${WORKDIR}/${PN}" 48S="${WORKDIR}/${PN}"
47 49
286 # 5.1 introduces a new way to manage storage engines (plugins) 288 # 5.1 introduces a new way to manage storage engines (plugins)
287 # like configuration=none 289 # like configuration=none
288 local plugins="csv,myisam,myisammrg,heap" 290 local plugins="csv,myisam,myisammrg,heap"
289 if useq "extraengine" ; then 291 if useq "extraengine" ; then
290 # like configuration=max-no-ndb, archive and example removed in 5.1.11 292 # like configuration=max-no-ndb, archive and example removed in 5.1.11
291 plugins="${plugins},blackhole,federated,ftexample,partition" 293 plugins="${plugins},archive,blackhole,example,federated,ftexample,partition"
292 294
293 elog "Before using the Federated storage engine, please be sure to read" 295 elog "Before using the Federated storage engine, please be sure to read"
294 elog "http://dev.mysql.com/doc/refman/5.1/en/federated-limitations.html" 296 elog "http://dev.mysql.com/doc/refman/5.1/en/federated-limitations.html"
295 fi 297 fi
296 298
339 && useq "minimal" ; then 341 && useq "minimal" ; then
340 eerror "USE flags 'cluster' and 'extraengine' conflict with 'minimal' USE flag!" 342 eerror "USE flags 'cluster' and 'extraengine' conflict with 'minimal' USE flag!"
341 die "USE flags 'cluster' and 'extraengine' conflict with 'minimal' USE flag!" 343 die "USE flags 'cluster' and 'extraengine' conflict with 'minimal' USE flag!"
342 fi 344 fi
343 345
346 mysql_check_version_range "4.00.00.00 to 5.00.99.99" \
347 && useq "berkdb" \
344 useq "berkdb" && elog "Berkeley DB support is deprecated and will be removed in future versions!" 348 && elog "Berkeley DB support is deprecated and will be removed in future versions!"
345} 349}
346 350
347mysql_src_unpack() { 351mysql_src_unpack() {
348 # Initialize the proper variables first 352 # Initialize the proper variables first
349 mysql_init_vars 353 mysql_init_vars
398 pushd "${d}" &>/dev/null 402 pushd "${d}" &>/dev/null
399 AT_GNUCONF_UPDATE="yes" eautoreconf 403 AT_GNUCONF_UPDATE="yes" eautoreconf
400 popd &>/dev/null 404 popd &>/dev/null
401 done 405 done
402 406
403 # Berkeley DB has been removed in MySQL 5.1
404 if useq "berkdb" \
405 && mysql_check_version_range "4.01.00.00 to 5.00.99.99" ; then 407 if mysql_check_version_range "4.01.00.00 to 5.00.99.99" \
408 && useq "berkdb" ; then
406 [[ -w "${bdbdir}/ltmain.sh" ]] && cp -f "ltmain.sh" "${bdbdir}/ltmain.sh" 409 [[ -w "${bdbdir}/ltmain.sh" ]] && cp -f "ltmain.sh" "${bdbdir}/ltmain.sh"
407 pushd "${bdbdir}" \ 410 pushd "${bdbdir}" \
408 && sh s_all \ 411 && sh s_all \
409 || die "Failed bdb reconfigure" \ 412 || die "Failed bdb reconfigure" \
410 &>/dev/null 413 &>/dev/null
749 elog "if this is a new install." 752 elog "if this is a new install."
750 einfo 753 einfo
751 mysql_version_is_at_least "5.01.00.00" \ 754 mysql_version_is_at_least "5.01.00.00" \
752 || elog "InnoDB is *not* optional as of MySQL-4.0.24, at the request of upstream." 755 || elog "InnoDB is *not* optional as of MySQL-4.0.24, at the request of upstream."
753 fi 756 fi
757 mysql_check_version_range "4.00.00.00 to 5.00.99.99" \
758 && useq "berkdb" \
754 useq "berkdb" && elog "Berkeley DB support is deprecated and will be removed in future versions!" 759 && elog "Berkeley DB support is deprecated and will be removed in future versions!"
755} 760}
756 761
757mysql_pkg_config() { 762mysql_pkg_config() {
758 # Make sure the vars are correctly initialized 763 # Make sure the vars are correctly initialized
759 mysql_init_vars 764 mysql_init_vars

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41

  ViewVC Help
Powered by ViewVC 1.1.20