diff options
author | Patrick Lauer <patrick@gentoo.org> | 2010-05-03 19:16:58 +0000 |
---|---|---|
committer | Patrick Lauer <patrick@gentoo.org> | 2010-05-03 19:16:58 +0000 |
commit | f973c41d351a52872089843df84df46e91fe7952 (patch) | |
tree | 7144c6f2370bd98aa91a52e9687756c4de03a6ea /dev-db/maatkit | |
parent | Version bump. (diff) | |
download | gentoo-2-f973c41d351a52872089843df84df46e91fe7952.tar.gz gentoo-2-f973c41d351a52872089843df84df46e91fe7952.tar.bz2 gentoo-2-f973c41d351a52872089843df84df46e91fe7952.zip |
Bump for #316865
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'dev-db/maatkit')
-rw-r--r-- | dev-db/maatkit/ChangeLog | 7 | ||||
-rw-r--r-- | dev-db/maatkit/maatkit-6070.ebuild | 101 |
2 files changed, 107 insertions, 1 deletions
diff --git a/dev-db/maatkit/ChangeLog b/dev-db/maatkit/ChangeLog index e5424b5f4f46..32eb0bf81f5a 100644 --- a/dev-db/maatkit/ChangeLog +++ b/dev-db/maatkit/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-db/maatkit # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/maatkit/ChangeLog,v 1.11 2010/04/13 21:30:06 hwoarang Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/maatkit/ChangeLog,v 1.12 2010/05/03 19:16:58 patrick Exp $ + +*maatkit-6070 (03 May 2010) + + 03 May 2010; Patrick Lauer <patrick@gentoo.org> +maatkit-6070.ebuild: + Bump for #316865 13 Apr 2010; Markos Chandras <hwoarang@gentoo.org> maatkit-5240.ebuild: Stable on amd64 wrt bug #304031 diff --git a/dev-db/maatkit/maatkit-6070.ebuild b/dev-db/maatkit/maatkit-6070.ebuild new file mode 100644 index 000000000000..2b53e08c8be8 --- /dev/null +++ b/dev-db/maatkit/maatkit-6070.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/maatkit/maatkit-6070.ebuild,v 1.1 2010/05/03 19:16:58 patrick Exp $ + +EAPI=2 +inherit perl-app toolchain-funcs + +DESCRIPTION="maatkit: essential command-line utilities for MySQL" +HOMEPAGE="http://www.maatkit.org/" +SRC_URI="http://maatkit.googlecode.com/files/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="udf" + +DEPEND="dev-perl/DBD-mysql + dev-perl/TermReadKey + udf? ( dev-db/mysql[-minimal] )" +RDEPEND="${DEPEND}" + +mysql-udf_src_compile() { + local udfdir="${T}/udf/" + mkdir -p "${udfdir}" + + local udfname udffile udfext udfoutpath + udfname="${1}" + udfext=".so" + udffile="${udfname}${udfext}" + udfoutpath="${udfdir}/${udffile}" + shift + CXX="$(tc-getCXX)" + local src="$@" + if [ -z "$@" ]; then + src="${udfname}.cc" + fi + for f in ${src} ; do + [ -f "${f}" ] || \ + die "UDF ${udfname}: Cannot find source file ${f} to compile" + done + einfo "UDF ${udfname}: compiling from ${src}" + ${CXX} \ + ${CXXFLAGS} -fPIC \ + -I/usr/include/mysql \ + -shared -o "${udfoutpath}" \ + $src \ + || die "UDF ${udfname}: Failed to compile" +} + +mysql-udf_src_install() { + local udfdir="${T}/udf/" + local udfname udffile udfext udffile udfoutpath + udfname="${1}" + udfext=".so" + udffile="${udfname}${udfext}" + udfoutpath="${udfdir}/${udffile}" + insinto /usr/$(get_libdir)/mysql/plugins + doins "${udfoutpath}" +} + +udf_done_intro=0 +mysql-udf_pkg_postinst() { + local udfname udffile udfext udffunc udfreturn + udfname="${1}" + udfext=".so" + udffile="${udfname}${udfext}" + udffunc="${2}" + udfreturn="${3}" + if [ ${udf_done_intro} -eq 0 ]; then + elog "To use the UDFs that were built:" + elog "Update your configuration to include 'plugin_dir=/usr/$(get_libdir)/mysql/plugins'" + elog "Issue the following commands as a user with FUNCTION privileges:" + udf_done_intro=1 + fi + elog "CREATE FUNCTION ${udffunc} RETURNS ${udfreturn} SONAME '${udffile}'" +} + +src_compile() { + perl-app_src_compile + if use udf; then + cd "${S}"/udf + mysql-udf_src_compile murmur_udf + mysql-udf_src_compile fnv_udf + fi +} + +src_install() { + perl-module_src_install + if use udf; then + mysql-udf_src_install murmur_udf + mysql-udf_src_install fnv_udf + fi +} + +pkg_postinst() { + perl-module_pkg_postinst + if use udf; then + mysql-udf_pkg_postinst murmur_udf murmur_hash INTEGER + mysql-udf_pkg_postinst fnv_udf fnv_64 INTEGER + fi +} |