summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ruppert <idl0r@gentoo.org>2010-11-17 19:57:34 +0000
committerChristian Ruppert <idl0r@gentoo.org>2010-11-17 19:57:34 +0000
commit312df8ef6510bd52f23ffee94b6f5a6fc3282d51 (patch)
tree3e47f959a55ffc18d94aac6bd2dc58931b58dd4e /dev-db/maatkit
parentFixed typo in DESCRIPTION (diff)
downloadgentoo-2-312df8ef6510bd52f23ffee94b6f5a6fc3282d51.tar.gz
gentoo-2-312df8ef6510bd52f23ffee94b6f5a6fc3282d51.tar.bz2
gentoo-2-312df8ef6510bd52f23ffee94b6f5a6fc3282d51.zip
Version bump, bug 341539. Fix dependencies.
(Portage version: 2.2.0_alpha4/cvs/Linux x86_64)
Diffstat (limited to 'dev-db/maatkit')
-rw-r--r--dev-db/maatkit/ChangeLog7
-rw-r--r--dev-db/maatkit/maatkit-7041.ebuild111
2 files changed, 117 insertions, 1 deletions
diff --git a/dev-db/maatkit/ChangeLog b/dev-db/maatkit/ChangeLog
index 9696249abfa2..896e85943790 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.13 2010/11/17 18:03:49 idl0r Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/maatkit/ChangeLog,v 1.14 2010/11/17 19:57:34 idl0r Exp $
+
+*maatkit-7041 (17 Nov 2010)
+
+ 17 Nov 2010; Christian Ruppert <idl0r@gentoo.org> +maatkit-7041.ebuild:
+ Version bump, bug 341539. Fix dependencies.
17 Nov 2010; Christian Ruppert <idl0r@gentoo.org> maatkit-6070.ebuild:
Respect LDFLAGS whith use "udf", bug 345809.
diff --git a/dev-db/maatkit/maatkit-7041.ebuild b/dev-db/maatkit/maatkit-7041.ebuild
new file mode 100644
index 000000000000..8aac96adf055
--- /dev/null
+++ b/dev-db/maatkit/maatkit-7041.ebuild
@@ -0,0 +1,111 @@
+# 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-7041.ebuild,v 1.1 2010/11/17 19:57:34 idl0r Exp $
+
+EAPI=3
+
+inherit perl-app perl-module toolchain-funcs
+
+DESCRIPTION="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"
+
+COMMON_DEPEND="dev-perl/DBI
+ dev-perl/DBD-mysql
+ virtual/perl-Time-HiRes"
+RDEPEND="${COMMON_DEPEND}
+ virtual/perl-Getopt-Long
+ virtual/perl-Time-Local
+ virtual/perl-Digest-MD5
+ virtual/perl-IO-Compress
+ virtual/perl-File-Temp
+ virtual/perl-File-Spec
+ virtual/perl-Time-HiRes
+ dev-perl/TermReadKey"
+DEPEND="${COMMON_DEPEND}
+ udf? ( dev-db/mysql )
+ virtual/perl-ExtUtils-MakeMaker"
+
+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} -I/usr/include/mysql \
+ ${LDFLAGS} -fPIC -shared -o "${udfoutpath}" $src \
+ || die "UDF ${udfname}: Failed to compile"
+}
+
+mysql-udf_src_install() {
+ local udfdir="${T}/udf/"
+ local udfname udfext udffile udfoutpath
+ udfname="${1}"
+ udfext=".so"
+ udffile="${udfname}${udfext}"
+ udfoutpath="${udfdir}/${udffile}"
+ insinto /usr/$(get_libdir)/mysql/plugins
+ doins "${udfoutpath}" || die
+}
+
+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
+}