From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QCUzF-0008F7-1Q for garchives@archives.gentoo.org; Wed, 20 Apr 2011 10:50:21 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B0A441C026; Wed, 20 Apr 2011 10:50:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 5A65F1C026 for ; Wed, 20 Apr 2011 10:50:11 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A734A1B406F for ; Wed, 20 Apr 2011 10:50:10 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id ACC4180223 for ; Wed, 20 Apr 2011 10:50:09 +0000 (UTC) From: "Jorge Manuel B. S. Vicetto" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jorge Manuel B. S. Vicetto" Message-ID: <7cd4cedb1dcade2a63018fc82a2622606c524126.jmbsvicetto@gentoo> Subject: [gentoo-commits] proj/mysql:master commit in: eclass/ X-VCS-Repository: proj/mysql X-VCS-Files: eclass/mysql-autotools.eclass eclass/mysql-cmake.eclass eclass/mysql-v2.eclass X-VCS-Directories: eclass/ X-VCS-Committer: jmbsvicetto X-VCS-Committer-Name: Jorge Manuel B. S. Vicetto X-VCS-Revision: 7cd4cedb1dcade2a63018fc82a2622606c524126 Date: Wed, 20 Apr 2011 10:50:09 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: e418dd8f72594fc602a0ed3ba51d9b2a commit: 7cd4cedb1dcade2a63018fc82a2622606c524126 Author: Jorge Manuel B. S. Vicetto (jmbsvicetto) ge= ntoo org> AuthorDate: Wed Apr 20 10:46:49 2011 +0000 Commit: Jorge Manuel B. S. Vicetto gentoo org= > CommitDate: Wed Apr 20 10:46:49 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/mysql.git;a=3D= commit;h=3D7cd4cedb Updated eclasses following review by Ulrich Mueller in the gentoo-dev ml. --- eclass/mysql-autotools.eclass | 26 +++++++--- eclass/mysql-cmake.eclass | 17 ++++-- eclass/mysql-v2.eclass | 105 +++++++++++++++++++++++------------= ----- 3 files changed, 90 insertions(+), 58 deletions(-) diff --git a/eclass/mysql-autotools.eclass b/eclass/mysql-autotools.eclas= s index aeda0f6..d6eb3e1 100644 --- a/eclass/mysql-autotools.eclass +++ b/eclass/mysql-autotools.eclass @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: $ =20 -# @ECLASS: mysql.eclass +# @ECLASS: mysql-autotools.eclass # @MAINTAINER: # Author: Francesco Riosa (Retired) # Maintainers: @@ -10,12 +10,12 @@ # - Robin H. Johnson # - Jorge Manuel B. S. Vicetto # - Luca Longinotti -# @BLURB: This eclass provides most of the functions for mysql ebuilds +# @BLURB: This eclass provides support for autotools based mysql release= s # @DESCRIPTION: -# The mysql.eclass provides almost all the code to build the mysql ebuil= ds -# including the src_unpack, src_prepare, src_configure, src_compile, -# scr_install, pkg_preinst, pkg_postinst, pkg_config and pkg_postrm -# phase hooks. +# The mysql-autotools.eclass provides the support to build the mysql +# ebuilds using the autotools build system. This eclass provides +# the src_unpack, src_prepare, src_configure, src_compile, scr_install, +# pkg_preinst, pkg_postinst, pkg_config and pkg_postrm phase hooks. =20 inherit autotools =20 @@ -23,7 +23,7 @@ inherit autotools # HELPER FUNCTIONS: # =20 -# @FUNCTION: mysql_disable_test +# @FUNCTION: mysql-autotools_disable_test # @DESCRIPTION: # Helper function to disable specific tests. mysql-autotools_disable_test() { @@ -66,6 +66,9 @@ mysql-autotools_disable_test() { fi } =20 +# @FUNCTION: mysql-autotools_configure_minimal +# @DESCRIPTION: +# Helper function to configure a minimal build mysql-autotools_configure_minimal() { =20 # These are things we exclude from a minimal build, please @@ -95,6 +98,9 @@ mysql-autotools_configure_minimal() { fi } =20 +# @FUNCTION: mysql-autotools_configure_common +# @DESCRIPTION: +# Helper function to configure the common builds mysql-autotools_configure_common() { =20 myconf=3D"${myconf} $(use_with big-tables)" @@ -146,6 +152,9 @@ mysql-autotools_configure_common() { =20 } =20 +# @FUNCTION: mysql-autotools_configure_40_41_50 +# @DESCRIPTION: +# Helper function to configure 4.0, 4.1 and 5.0 builds mysql-autotools_configure_40_41_50() { =20 myconf=3D"${myconf} $(use_with perl bench)" @@ -225,6 +234,9 @@ mysql-autotools_configure_40_41_50() { && myconf=3D"${myconf} --with-max-indexes=3D128" } =20 +# @FUNCTION: mysql-autotools_configure_51 +# @DESCRIPTION: +# Helper function to configure 5.1 and later builds mysql-autotools_configure_51() { =20 # TODO: !!!! readd --without-readline diff --git a/eclass/mysql-cmake.eclass b/eclass/mysql-cmake.eclass index 4beeee3..97a9a74 100644 --- a/eclass/mysql-cmake.eclass +++ b/eclass/mysql-cmake.eclass @@ -2,16 +2,18 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: $ =20 -# @ECLASS: mysql.cmake.eclass +# @ECLASS: mysql-cmake.eclass # @MAINTAINER: # Maintainers: # - MySQL Team # - Robin H. Johnson # - Jorge Manuel B. S. Vicetto -# @BLURB: This eclass provides the cmake supporting functions for mysql = ebuilds +# @BLURB: This eclass provides the support for cmake based mysql release= s # @DESCRIPTION: -# The mysql-cmake.eclass provides provides the cmake specific code -# for mysql ebuilds. +# The mysql-cmake.eclass provides the support to build the mysql +# ebuilds using the cmake build system. This eclass provides +# the src_unpack, src_prepare, src_configure, src_compile, scr_install, +# pkg_preinst, pkg_postinst, pkg_config and pkg_postrm phase hooks. =20 inherit cmake-utils =20 @@ -92,7 +94,7 @@ configure_cmake_locale() { =20 # @FUNCTION: configure_cmake_minimal # @DESCRIPTION: -# Helper function to configure minimal install +# Helper function to configure minimal build configure_cmake_minimal() { =20 mycmakeargs+=3D( @@ -113,7 +115,7 @@ configure_cmake_minimal() { =20 # @FUNCTION: configure_cmake_standard # @DESCRIPTION: -# Helper function to configure standard install +# Helper function to configure standard build configure_cmake_standard() { =20 mycmakeargs+=3D( @@ -145,6 +147,9 @@ configure_cmake_standard() { fi } =20 +# @FUNCTION: configure_51 +# @DESCRIPTION: +# Helper function to configure 5.1 and later builds configure_51() { =20 # This is an explict die here, because if we just forcibly disable it, = then the diff --git a/eclass/mysql-v2.eclass b/eclass/mysql-v2.eclass index 8e64608..6ddb13a 100644 --- a/eclass/mysql-v2.eclass +++ b/eclass/mysql-v2.eclass @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: $ =20 -# @ECLASS: mysql.eclass +# @ECLASS: mysql-v2.eclass # @MAINTAINER: # Maintainers: # - MySQL Team @@ -10,8 +10,11 @@ # - Jorge Manuel B. S. Vicetto # @BLURB: This eclass provides most of the functions for mysql ebuilds # @DESCRIPTION: -# The mysql.eclass provides almost all the code to build the mysql ebuil= ds -# including the src_unpack, src_prepare, src_configure, src_compile, +# The mysql-v2.eclass is the base eclass to build the mysql and +# alternative projects (mariadb) ebuilds. +# This eclass uses the mysql-autotools and mysql-cmake eclasses for the +# specific bits related to the build system. +# It provides the src_unpack, src_prepare, src_configure, src_compile, # scr_install, pkg_preinst, pkg_postinst, pkg_config and pkg_postrm # phase hooks. =20 @@ -36,6 +39,9 @@ case ${BUILD} in esac =20 MYSQL_EXTRAS=3D"" + +# @ECLASS-VARIABLE: MYSQL_EXTRAS_VER +# @DESCRIPTION: The version of the MYSQL_EXTRAS repo to use to build mys= ql [[ "${MY_EXTRAS_VER}" =3D=3D "live" ]] && MYSQL_EXTRAS=3D"git" =20 inherit eutils flag-o-matic gnuconfig ${MYSQL_EXTRAS} ${BUILD_INHERIT} m= ysql_fx versionator toolchain-funcs @@ -44,13 +50,12 @@ inherit eutils flag-o-matic gnuconfig ${MYSQL_EXTRAS}= ${BUILD_INHERIT} mysql_fx # Supported EAPI versions and export functions # =20 -MYSQL_EXPF=3D"src_unpack src_compile src_install" case "${EAPI:-0}" in - 2|3|4) MYSQL_EXPF+=3D" src_prepare src_configure" ;; + 2|3|4) ;; *) die "Unsupported EAPI: ${EAPI}" ;; esac =20 -EXPORT_FUNCTIONS ${MYSQL_EXPF} +EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_in= stall =20 # # VARIABLES: @@ -89,7 +94,6 @@ fi # depend on this variable. # In particular, the code below transforms a $PVR like "5.0.18-r3" in "5= 001803" # We also strip off upstream's trailing letter that they use to respin t= arballs - MYSQL_VERSION_ID=3D"" tpv=3D"${PV%[a-z]}" tpv=3D( ${tpv//[-._]/ } ) ; tpv[3]=3D"${PVR:${#PV}}" ; tpv[3]=3D"${tpv[3= ]##*-r}" @@ -124,14 +128,12 @@ fi # @ECLASS-VARIABLE: XTRADB_VER # @DESCRIPTION: # Version of the XTRADB storage engine -XTRADB_VER=3D"${XTRADB_VER}" - +: ${XTRADB_VER:=3D} =20 # @ECLASS-VARIABLE: PERCONA_VER # @DESCRIPTION: # Designation by PERCONA for a MySQL version to apply an XTRADB release -PERCONA_VER=3D"${PERCONA_VER}" - +: ${PERCONA_VER:=3D} =20 # Work out the default SERVER_URI correctly if [ -z "${SERVER_URI}" ]; then @@ -201,7 +203,7 @@ esac IUSE=3D"${IUSE} latin1" =20 IUSE=3D"${IUSE} extraengine" -if [[ "${PN}" !=3D "mysql-cluster" ]] ; then +if [[ ${PN} !=3D "mysql-cluster" ]] ; then IUSE=3D"${IUSE} cluster" fi =20 @@ -210,17 +212,17 @@ mysql_version_is_at_least "5.0.18" \ =20 IUSE=3D"${IUSE} berkdb" =20 -[ "${MYSQL_COMMUNITY_FEATURES}" =3D=3D "1" ] \ +[[ ${MYSQL_COMMUNITY_FEATURES} =3D=3D 1 ]] \ && IUSE=3D"${IUSE} +community profiling" =20 -[[ "${PN}" =3D=3D "mariadb" ]] \ +[[ ${PN} =3D=3D "mariadb" ]] \ && IUSE=3D"${IUSE} libevent" =20 -[[ "${PN}" =3D=3D "mariadb" ]] \ +[[ ${PN} =3D=3D "mariadb" ]] \ && mysql_version_is_at_least "5.2" \ && IUSE=3D"${IUSE} oqgraph" =20 -[[ "${PN}" =3D=3D "mariadb" ]] \ +[[ ${PN} =3D=3D "mariadb" ]] \ && mysql_version_is_at_least "5.2.5" \ && IUSE=3D"${IUSE} sphinx" =20 @@ -240,12 +242,12 @@ DEPEND=3D" >=3Dsys-libs/zlib-1.2.3 " =20 -[[ "${PN}" =3D=3D "mariadb" ]] \ +[[ ${PN} =3D=3D mariadb ]] \ && DEPEND=3D"${DEPEND} libevent? ( >=3Ddev-libs/libevent-1.4 )" =20 # Having different flavours at the same time is not a good idea for i in "mysql" "mysql-community" "mysql-cluster" "mariadb" ; do - [[ "${i}" =3D=3D ${PN} ]] || + [[ ${i} =3D=3D ${PN} ]] || DEPEND=3D"${DEPEND} !dev-db/${i}" done =20 @@ -287,14 +289,14 @@ PDEPEND=3D"${PDEPEND} =3Dvirtual/mysql-${MYSQL_PV_M= AJOR}" # PBXT_VERSION means that we have a PBXT patch for this PV # PBXT was only introduced after 5.1.12 pbxt_patch_available() { - [[ "${PN}" !=3D "mariadb" ]] \ + [[ ${PN} !=3D "mariadb" ]] \ && mysql_version_is_at_least "5.1.12" \ && [[ -n "${PBXT_VERSION}" ]] return $? } =20 pbxt_available() { - pbxt_patch_available || [[ "${PN}" =3D=3D "mariadb" ]] + pbxt_patch_available || [[ ${PN} =3D=3D "mariadb" ]] return $? } =20 @@ -303,51 +305,64 @@ pbxt_available() { # XTRADB_VERS means that we have a XTRADB patch for this PV # XTRADB was only introduced after 5.1.26 xtradb_patch_available() { - [[ "${PN}" !=3D "mariadb" ]] \ + [[ ${PN} !=3D "mariadb" ]] \ && mysql_version_is_at_least "5.1.26" \ && [[ -n "${XTRADB_VER}" && -n "${PERCONA_VER}" ]] return $? } =20 =20 -pbxt_patch_available \ -&& PBXT_P=3D"pbxt-${PBXT_VERSION}" \ -&& PBXT_SRC_URI=3D"http://www.primebase.org/download/${PBXT_P}.tar.gz mi= rror://sourceforge/pbxt/${PBXT_P}.tar.gz" \ -&& SRC_URI=3D"${SRC_URI} pbxt? ( ${PBXT_SRC_URI} )" \ - -# PBXT_NEWSTYLE means pbxt is in storage/ and gets enabled as other plug= ins -# vs. built outside the dir -pbxt_available \ -&& IUSE=3D"${IUSE} pbxt" \ -&& mysql_version_is_at_least "5.1.40" \ -&& PBXT_NEWSTYLE=3D1 - -xtradb_patch_available \ -&& XTRADB_P=3D"percona-xtradb-${XTRADB_VER}" \ -&& XTRADB_SRC_URI_COMMON=3D"${PERCONA_VER}/source/${XTRADB_P}.tar.gz" \ -&& XTRADB_SRC_B1=3D"http://www.percona.com/" \ -&& XTRADB_SRC_B2=3D"${XTRADB_SRC_B1}/percona-builds/" \ -&& XTRADB_SRC_URI1=3D"${XTRADB_SRC_B2}/Percona-Server/Percona-Server-${X= TRADB_SRC_URI_COMMON}" \ -&& XTRADB_SRC_URI2=3D"${XTRADB_SRC_B2}/xtradb/${XTRADB_SRC_URI_COMMON}" = \ -&& XTRADB_SRC_URI3=3D"${XTRADB_SRC_B1}/${PN}/xtradb/${XTRADB_SRC_URI_COM= MON}" \ -&& SRC_URI=3D"${SRC_URI} xtradb? ( ${XTRADB_SRC_URI1} ${XTRADB_SRC_URI2}= ${XTRADB_SRC_URI3} )" \ -&& IUSE=3D"${IUSE} xtradb" +if pbxt_patch_available; then + + PBXT_P=3D"pbxt-${PBXT_VERSION}" + PBXT_SRC_URI=3D"http://www.primebase.org/download/${PBXT_P}.tar.gz mirr= or://sourceforge/pbxt/${PBXT_P}.tar.gz" + SRC_URI=3D"${SRC_URI} pbxt? ( ${PBXT_SRC_URI} )" + + # PBXT_NEWSTYLE means pbxt is in storage/ and gets enabled as other plu= gins + # vs. built outside the dir + if pbxt_available; then + + IUSE=3D"${IUSE} pbxt" + if mysql_version_is_at_least "5.1.40"; then + + PBXT_NEWSTYLE=3D1 + fi + fi +fi + +if xtradb_patch_available; then + XTRADB_P=3D"percona-xtradb-${XTRADB_VER}" + XTRADB_SRC_URI_COMMON=3D"${PERCONA_VER}/source/${XTRADB_P}.tar.gz" + XTRADB_SRC_B1=3D"http://www.percona.com/" + XTRADB_SRC_B2=3D"${XTRADB_SRC_B1}/percona-builds/" + XTRADB_SRC_URI1=3D"${XTRADB_SRC_B2}/Percona-Server/Percona-Server-${XTR= ADB_SRC_URI_COMMON}" + XTRADB_SRC_URI2=3D"${XTRADB_SRC_B2}/xtradb/${XTRADB_SRC_URI_COMMON}" + XTRADB_SRC_URI3=3D"${XTRADB_SRC_B1}/${PN}/xtradb/${XTRADB_SRC_URI_COMMO= N}" + SRC_URI=3D"${SRC_URI} xtradb? ( ${XTRADB_SRC_URI1} ${XTRADB_SRC_URI2} $= {XTRADB_SRC_URI3} )" + IUSE=3D"${IUSE} xtradb" +fi =20 # # HELPER FUNCTIONS: # =20 -# @FUNCTION: mysql_disable_test +# @FUNCTION: mysql-v2_disable_test # @DESCRIPTION: # Helper function to disable specific tests. mysql_disable_test() { ${BUILD_INHERIT}_disable_test "$@" } =20 +# @FUNCTION: mysql-v2_configure_minimal +# @DESCRIPTION: +# Helper function to configure minimal build configure_minimal() { ${BUILD_INHERIT}_configure_minimal "$@" } =20 +# @FUNCTION: mysql-v2_configure_common +# @DESCRIPTION: +# Helper function to configure common builds configure_common() { ${BUILD_INHERIT}_configure_common "$@" } @@ -421,7 +436,7 @@ mysql-v2_pkg_setup() { =20 # @FUNCTION: mysql-v2_src_unpack # @DESCRIPTION: -# Unpack the source code and call mysql_src_prepare for EAPI < 2. +# Unpack the source code mysql-v2_src_unpack() { =20 # Initialize the proper variables first