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

Diff of /eclass/mysql.eclass

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

Revision 1.111 Revision 1.112
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/mysql.eclass,v 1.111 2009/07/06 18:21:18 robbat2 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mysql.eclass,v 1.112 2009/07/06 18:58:41 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>
130&& IUSE="${IUSE} pbxt" 130&& IUSE="${IUSE} pbxt"
131 131
132[ "${MYSQL_COMMUNITY_FEATURES}" == "1" ] \ 132[ "${MYSQL_COMMUNITY_FEATURES}" == "1" ] \
133&& IUSE="${IUSE} community profiling" 133&& IUSE="${IUSE} community profiling"
134 134
135EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_preinst \ 135case "${EAPI:-0}" in
136 2)
137 EXPORT_FUNCTIONS pkg_setup \
138 src_unpack src_prepare \
139 src_configure src_compile \
140 src_install \
141 pkg_preinst pkg_postinst \
136 pkg_postinst pkg_config pkg_postrm 142 pkg_config pkg_postrm
143 ;;
144 *)
145 EXPORT_FUNCTIONS pkg_setup \
146 src_unpack \
147 src_compile \
148 src_install \
149 pkg_preinst pkg_postinst \
150 pkg_config pkg_postrm
151 ;;
152esac
137 153
138# 154#
139# HELPER FUNCTIONS: 155# HELPER FUNCTIONS:
140# 156#
141 157
409 fi 425 fi
410 426
411 myconf="${myconf} --with-plugins=${plugins}" 427 myconf="${myconf} --with-plugins=${plugins}"
412} 428}
413 429
414pbxt_src_compile() { 430pbxt_src_configure() {
415 mysql_init_vars 431 mysql_init_vars
416 432
417 pushd "${WORKDIR}/pbxt-${PBXT_VERSION}" &>/dev/null 433 pushd "${WORKDIR}/pbxt-${PBXT_VERSION}" &>/dev/null
418 434
419 einfo "Reconfiguring dir '${PWD}'" 435 einfo "Reconfiguring dir '${PWD}'"
422 local myconf="" 438 local myconf=""
423 myconf="${myconf} --with-mysql=${S} --libdir=${D}/${MY_LIBDIR}" 439 myconf="${myconf} --with-mysql=${S} --libdir=${D}/${MY_LIBDIR}"
424 use debug && myconf="${myconf} --with-debug=full" 440 use debug && myconf="${myconf} --with-debug=full"
425 # TODO: is it safe/needed to use econf here ? 441 # TODO: is it safe/needed to use econf here ?
426 ./configure ${myconf} || die "Problem configuring PBXT storage engine" 442 ./configure ${myconf} || die "Problem configuring PBXT storage engine"
443}
444
445pbxt_src_compile() {
446 # Be backwards compatible for now
447 if [[ $EAPI != 2 ]]; then
448 pbxt_src_configure
449 fi
427 # TODO: is it safe/needed to use emake here ? 450 # TODO: is it safe/needed to use emake here ?
428 make || die "Problem making PBXT storage engine (${myconf})" 451 make || die "Problem making PBXT storage engine (${myconf})"
429 452
430 popd 453 popd
431 # TODO: modify test suite for PBXT 454 # TODO: modify test suite for PBXT
486 unpack ${A} 509 unpack ${A}
487 # Grab the patches 510 # Grab the patches
488 [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git_src_unpack 511 [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git_src_unpack
489 512
490 mv -f "${WORKDIR}/${MY_SOURCEDIR}" "${S}" 513 mv -f "${WORKDIR}/${MY_SOURCEDIR}" "${S}"
514
515 # Be backwards compatible for now
516 if [[ $EAPI != 2 ]]; then
517 mysql_src_prepare
518 fi
519}
520
521mysql_src_prepare() {
491 cd "${S}" 522 cd "${S}"
492 523
493 # Apply the patches for this MySQL version 524 # Apply the patches for this MySQL version
494 EPATCH_SUFFIX="patch" 525 EPATCH_SUFFIX="patch"
495 mkdir -p "${EPATCH_SOURCE}" || die "Unable to create epatch directory" 526 mkdir -p "${EPATCH_SOURCE}" || die "Unable to create epatch directory"
556 || die "Failed bdb reconfigure" 587 || die "Failed bdb reconfigure"
557 popd &>/dev/null 588 popd &>/dev/null
558 fi 589 fi
559} 590}
560 591
561mysql_src_compile() { 592mysql_src_configure() {
562 # Make sure the vars are correctly initialized 593 # Make sure the vars are correctly initialized
563 mysql_init_vars 594 mysql_init_vars
564 595
565 # $myconf is modified by the configure_* functions 596 # $myconf is modified by the configure_* functions
566 local myconf="" 597 local myconf=""
610 641
611 # TODO: Move this before autoreconf !!! 642 # TODO: Move this before autoreconf !!!
612 find . -type f -name Makefile -print0 \ 643 find . -type f -name Makefile -print0 \
613 | xargs -0 -n100 sed -i \ 644 | xargs -0 -n100 sed -i \
614 -e 's|^pkglibdir *= *$(libdir)/mysql|pkglibdir = $(libdir)|;s|^pkgincludedir *= *$(includedir)/mysql|pkgincludedir = $(includedir)|' 645 -e 's|^pkglibdir *= *$(libdir)/mysql|pkglibdir = $(libdir)|;s|^pkgincludedir *= *$(includedir)/mysql|pkgincludedir = $(includedir)|'
646
647 if [[ $EAPI == 2 ]]; then
648 mysql_version_is_at_least "5.1.12" && use pbxt && pbxt_src_configure
649 fi
650}
651
652mysql_src_compile() {
653 # Be backwards compatible for now
654 if [[ $EAPI != 2 ]]; then
655 mysql_src_configure
656 fi
615 657
616 emake || die "emake failed" 658 emake || die "emake failed"
617 659
618 mysql_version_is_at_least "5.1.12" && use pbxt && pbxt_src_compile 660 mysql_version_is_at_least "5.1.12" && use pbxt && pbxt_src_compile
619} 661}

Legend:
Removed from v.1.111  
changed lines
  Added in v.1.112

  ViewVC Help
Powered by ViewVC 1.1.20