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

Diff of /eclass/mysql.eclass

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

Revision 1.109 Revision 1.110
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 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/Attic/mysql.eclass,v 1.109 2009/02/28 10:51:57 robbat2 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/mysql.eclass,v 1.110 2009/07/06 18:18:00 robbat2 Exp $
4 4
5# Author: Francesco Riosa (Retired) <vivo@gentoo.org> 5# Author: Francesco Riosa (Retired) <vivo@gentoo.org>
6# Maintainer: MySQL Team <mysql-bugs@gentoo.org> 6# Maintainer: MySQL Team <mysql-bugs@gentoo.org>
7# - Luca Longinotti <chtekk@gentoo.org> 7# - Luca Longinotti <chtekk@gentoo.org>
8# - Robin H. Johnson <robbat2@gentoo.org> 8# - Robin H. Johnson <robbat2@gentoo.org>
39 MYSQL_VERSION_ID="${MYSQL_VERSION_ID}${tpv[${vatom}]:0-2}" 39 MYSQL_VERSION_ID="${MYSQL_VERSION_ID}${tpv[${vatom}]:0-2}"
40done 40done
41# strip leading "0" (otherwise it's considered an octal number by BASH) 41# strip leading "0" (otherwise it's considered an octal number by BASH)
42MYSQL_VERSION_ID=${MYSQL_VERSION_ID##"0"} 42MYSQL_VERSION_ID=${MYSQL_VERSION_ID##"0"}
43 43
44# Community features are available in mysql-community
45# AND in the re-merged mysql-5.0.82 and newer
46if [ "${PN}" == "mysql-community" ]; then
47 MYSQL_COMMUNITY_FEATURES=1
48elif [ "${PV#5.0}" != "${PV}" ] && mysql_version_is_at_least "5.0.82"; then
49 MYSQL_COMMUNITY_FEATURES=1
50else
51 MYSQL_COMMUNITY_FEATURES=0
52fi
53
44# Be warned, *DEPEND are version-dependant 54# Be warned, *DEPEND are version-dependant
45# These are used for both runtime and compiletime 55# These are used for both runtime and compiletime
46DEPEND="ssl? ( >=dev-libs/openssl-0.9.6d ) 56DEPEND="ssl? ( >=dev-libs/openssl-0.9.6d )
47 userland_GNU? ( sys-process/procps ) 57 userland_GNU? ( sys-process/procps )
48 >=sys-apps/sed-4 58 >=sys-apps/sed-4
75PDEPEND="${PDEPEND} =virtual/mysql-$(get_version_component_range 1-2 ${PV})" 85PDEPEND="${PDEPEND} =virtual/mysql-$(get_version_component_range 1-2 ${PV})"
76 86
77# Work out the default SERVER_URI correctly 87# Work out the default SERVER_URI correctly
78if [ -z "${SERVER_URI}" ]; then 88if [ -z "${SERVER_URI}" ]; then
79 # The community build is on the mirrors 89 # The community build is on the mirrors
80 if [ "${PN}" == "mysql-community" ]; then 90 if [ "${MYSQL_COMMUNITY_FEATURES}" == "1" ]; then
81 SERVER_URI="mirror://mysql/Downloads/MySQL-${PV%.*}/mysql-${PV//_/-}.tar.gz" 91 SERVER_URI="mirror://mysql/Downloads/MySQL-${PV%.*}/mysql-${PV//_/-}.tar.gz"
82 # The enterprise source is on the primary site only 92 # The (old) enterprise source is on the primary site only
83 elif [ "${PN}" == "mysql" ]; then 93 elif [ "${PN}" == "mysql" ]; then
84 SERVER_URI="ftp://ftp.mysql.com/pub/mysql/src/mysql-${PV//_/-}.tar.gz" 94 SERVER_URI="ftp://ftp.mysql.com/pub/mysql/src/mysql-${PV//_/-}.tar.gz"
85 fi 95 fi
86fi 96fi
87 97
116mysql_version_is_at_least "5.1" \ 126mysql_version_is_at_least "5.1" \
117|| IUSE="${IUSE} berkdb" 127|| IUSE="${IUSE} berkdb"
118 128
119mysql_version_is_at_least "5.1.12" \ 129mysql_version_is_at_least "5.1.12" \
120&& IUSE="${IUSE} pbxt" 130&& IUSE="${IUSE} pbxt"
131
132[ "${MYSQL_COMMUNITY_FEATURES}" == "1" ] \
133&& IUSE="${IUSE} community profiling"
121 134
122EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_preinst \ 135EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_preinst \
123 pkg_postinst pkg_config pkg_postrm 136 pkg_postinst pkg_config pkg_postrm
124 137
125# 138#
328 elog "http://dev.mysql.com/doc/mysql/en/federated-limitations.html" 341 elog "http://dev.mysql.com/doc/mysql/en/federated-limitations.html"
329 myconf="${myconf} --with-federated-storage-engine" 342 myconf="${myconf} --with-federated-storage-engine"
330 fi 343 fi
331 fi 344 fi
332 345
333 if [ "${PN}" == "mysql-community" ]; then 346 if [ "${MYSQL_COMMUNITY_FEATURES}" == "1" ]; then
334 myconf="${myconf} --enable-community-features" 347 myconf="${myconf} `use_enable community community-features`"
348 if use community; then
349 myconf="${myconf} `use_enable profiling`"
350 else
351 myconf="${myconf} --disable-profiling"
352 fi
335 fi 353 fi
336 354
337 mysql_version_is_at_least "5.0.18" \ 355 mysql_version_is_at_least "5.0.18" \
338 && use max-idx-128 \ 356 && use max-idx-128 \
339 && myconf="${myconf} --with-max-indexes=128" 357 && myconf="${myconf} --with-max-indexes=128"

Legend:
Removed from v.1.109  
changed lines
  Added in v.1.110

  ViewVC Help
Powered by ViewVC 1.1.20