| 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.16 2012/05/06 10:42:36 heroxbd Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/mysql-v2.eclass,v 1.19 2012/09/27 16:35:41 axs 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> |
| … | |
… | |
| 51 | # |
51 | # |
| 52 | # Supported EAPI versions and export functions |
52 | # Supported EAPI versions and export functions |
| 53 | # |
53 | # |
| 54 | |
54 | |
| 55 | case "${EAPI:-0}" in |
55 | case "${EAPI:-0}" in |
| 56 | 3|4) ;; |
56 | 3|4|5) ;; |
| 57 | *) die "Unsupported EAPI: ${EAPI}" ;; |
57 | *) die "Unsupported EAPI: ${EAPI}" ;; |
| 58 | esac |
58 | esac |
| 59 | |
59 | |
| 60 | EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_config pkg_postrm |
60 | EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_config pkg_postrm |
| 61 | |
61 | |
| … | |
… | |
| 221 | |
221 | |
| 222 | DEPEND="${DEPEND} |
222 | DEPEND="${DEPEND} |
| 223 | virtual/yacc |
223 | virtual/yacc |
| 224 | " |
224 | " |
| 225 | |
225 | |
| 226 | DEPEND="${DEPEND} static? ( || ( sys-libs/ncurses[static-libs] <=sys-libs/ncurses-5.7-r3 ) )" |
226 | DEPEND="${DEPEND} static? ( sys-libs/ncurses[static-libs] )" |
| 227 | |
227 | |
| 228 | # compile-time-only |
228 | # compile-time-only |
| 229 | DEPEND="${DEPEND} >=dev-util/cmake-2.4.3" |
229 | DEPEND="${DEPEND} >=dev-util/cmake-2.4.3" |
| 230 | |
230 | |
| 231 | # compile-time-only |
231 | # compile-time-only |
| … | |
… | |
| 529 | if built_with_use ${CATEGORY}/${PN} minimal ; then |
529 | if built_with_use ${CATEGORY}/${PN} minimal ; then |
| 530 | die "Minimal builds do NOT include the MySQL server" |
530 | die "Minimal builds do NOT include the MySQL server" |
| 531 | fi |
531 | fi |
| 532 | |
532 | |
| 533 | if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then |
533 | if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then |
| 534 | local MY_DATADIR_s="$(strip_duplicate_slashes ${ROOT}/${MY_DATADIR})" |
534 | local MY_DATADIR_s="${ROOT}/${MY_DATADIR}" |
|
|
535 | MY_DATADIR_s="${MY_DATADIR_s%%/}" |
| 535 | local old_MY_DATADIR_s="$(strip_duplicate_slashes ${ROOT}/${old_MY_DATADIR})" |
536 | local old_MY_DATADIR_s="${ROOT}/old_MY_DATADIR}" |
|
|
537 | old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}" |
| 536 | |
538 | |
| 537 | if [[ -d "${old_MY_DATADIR_s}" ]]; then |
539 | if [[ -d "${old_MY_DATADIR_s}" ]]; then |
| 538 | if [[ -d "${MY_DATADIR_s}" ]]; then |
540 | if [[ -d "${MY_DATADIR_s}" ]]; then |
| 539 | ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist" |
541 | ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist" |
| 540 | ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}" |
542 | ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}" |