summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2009-08-05 01:07:25 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2009-08-05 01:07:25 +0000
commit4071a426b9f60b32c81a31ce85ab4241e98259f8 (patch)
treeae50e0feb4d87a1068acec178a8278d7c6bf7995 /dev-db/maatkit
parentVersion bump. Set SUPPORT_PYTHON_ABIS. (diff)
downloadhistorical-4071a426b9f60b32c81a31ce85ab4241e98259f8.tar.gz
historical-4071a426b9f60b32c81a31ce85ab4241e98259f8.tar.bz2
historical-4071a426b9f60b32c81a31ce85ab4241e98259f8.zip
Version bump, now also builds the UDFs if requested.
Package-Manager: portage-2.2_rc33/cvs/Linux x86_64
Diffstat (limited to 'dev-db/maatkit')
-rw-r--r--dev-db/maatkit/ChangeLog8
-rw-r--r--dev-db/maatkit/Manifest6
-rw-r--r--dev-db/maatkit/maatkit-4334.ebuild100
-rw-r--r--dev-db/maatkit/metadata.xml3
4 files changed, 114 insertions, 3 deletions
diff --git a/dev-db/maatkit/ChangeLog b/dev-db/maatkit/ChangeLog
index 4587e6b667ec..12897578d641 100644
--- a/dev-db/maatkit/ChangeLog
+++ b/dev-db/maatkit/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-db/maatkit
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/maatkit/ChangeLog,v 1.5 2009/04/22 09:36:00 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/maatkit/ChangeLog,v 1.6 2009/08/05 01:07:25 robbat2 Exp $
+
+*maatkit-4334 (05 Aug 2009)
+
+ 05 Aug 2009; Robin H. Johnson <robbat2@gentoo.org> +maatkit-4334.ebuild,
+ metadata.xml:
+ Version bump, now also builds the UDFs if requested.
*maatkit-3329 (22 Apr 2009)
diff --git a/dev-db/maatkit/Manifest b/dev-db/maatkit/Manifest
index 2f557b89a4e1..a88b1441750b 100644
--- a/dev-db/maatkit/Manifest
+++ b/dev-db/maatkit/Manifest
@@ -2,9 +2,11 @@ DIST maatkit-2325.tar.gz 429640 RMD160 a178a99aa08b00c80f59e69485e3d4c9c86669d7
DIST maatkit-2442.tar.gz 435491 RMD160 09a54a3fa1d34e2d504cbf4d3254a3be42270a2a SHA1 2f449612c7eb342483b6398e3a315d0c7112d3bf SHA256 8302ee0280dd74d50dcf4610aada183d48813a48af95d0f8a3099e28266c5a9c
DIST maatkit-2582.tar.gz 453531 RMD160 926c020dc8a52ef240a3ed13508090561469630f SHA1 1eaacddbb268285e51c2a0b43e0b7e1dce162ace SHA256 add8c30f1d68b913f90680e5f995bf58971865650356c5eeabd8f47f358de209
DIST maatkit-3329.tar.gz 532180 RMD160 b71ec4c6071d06ab34d09771599fe440f200fd94 SHA1 f16f18a239d760718f3396e763ecd7e6ab3cc8ef SHA256 5ecb7827b3ba7c008d7a1c7b0bd24760260c7152bd788823055b5c5377c7a8e2
+DIST maatkit-4334.tar.gz 705146 RMD160 b598f0a9fe1307156a837a2ca6d57ccd10e4ac05 SHA1 db65425a610af8da706875c281c19ce9e6b45d00 SHA256 2e1394b7e7fed2e64bc6004152424fa7ae62ffdf490a0dd3d2e0f259d500b5ee
EBUILD maatkit-2325.ebuild 480 RMD160 32f6d37813462228470523da5db04935a5aaa57e SHA1 1aca3e1ef172cb1d57ec95123d449e48572cbc78 SHA256 f4fa6eec2b5ae748d0443862d5428b408bbea913722ca1184ea0b7014a03e8d1
EBUILD maatkit-2442.ebuild 487 RMD160 87699e4c7214608b74dc4739739a49b00b7232ce SHA1 bbb514397db93c92c049a0e37b7fa59208f1479d SHA256 129ed185336bb83858c7a45c0d77161362d6a0125daebb9fecdc71029ba7eabb
EBUILD maatkit-2582.ebuild 486 RMD160 b487f4dd215a98336e1f03e3814a0a866c14680a SHA1 1bb99dfaa22568737dfd349b36150368f9076fde SHA256 9b50a5e16ba39c4fd3674471b350be60f6339541446ac29e394cd83c985265e8
EBUILD maatkit-3329.ebuild 507 RMD160 ec805752b55b5512669992429a8530226e2c26ca SHA1 f3310b74cee33325ad73868dd7ee8c6ce342ec00 SHA256 12c2ac7a92178ecdb4666ed7a83a863e844c932acd35b349b2c313cd0045efb4
-MISC ChangeLog 806 RMD160 a8eb0fcb1c2121b1a62f0a0e650547991c8f0a84 SHA1 f59863c21afe535005f53af25b59ad36639238cd SHA256 4148e148c982f7296b0cbee4ec8e47049156374bbca2a8e6010c651d97892249
-MISC metadata.xml 639 RMD160 2ebac1974f08d9ef8c86802e8596661539a10fe6 SHA1 26d5f0fe980d736152b5f132cab35357e3a15657 SHA256 e3ceb5687898e88039355416385434c3f4376b7189f3cfcb12ca2e16b38bdb8b
+EBUILD maatkit-4334.ebuild 2428 RMD160 0c4d371bdea15430651b24530a96dac92355f1d6 SHA1 6b71b119ab5124840203ec6b55c4ebc1fe93da2e SHA256 321ea6f421d69da8ac2c405d475367b86a118eb78a78501ce1cfc90ffc4dfb7c
+MISC ChangeLog 983 RMD160 0ff5aaace081ba0ace5607a16e7a86645209dd46 SHA1 2be12eead22dd85ded6a93d8472be16a138ac9fa SHA256 6cfe1ca25c134b5b78d7b6ee2755ae2ee08bfcdd855dcfefc4fac28b513c432a
+MISC metadata.xml 749 RMD160 f8ade3452970966160d4761c6eeae9a8de1f3b3a SHA1 f33c8cc4c15437ae49166e59fb259e1b7652a3dc SHA256 a0b3078abd49c59e4884e440153c6e989c26c98806256a9ff0ec9f7c2d5e1754
diff --git a/dev-db/maatkit/maatkit-4334.ebuild b/dev-db/maatkit/maatkit-4334.ebuild
new file mode 100644
index 000000000000..fb42716df203
--- /dev/null
+++ b/dev-db/maatkit/maatkit-4334.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/maatkit/maatkit-4334.ebuild,v 1.1 2009/08/05 01:07:25 robbat2 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"
+IUSE="udf"
+
+DEPEND="dev-perl/DBD-mysql
+ 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
+}
diff --git a/dev-db/maatkit/metadata.xml b/dev-db/maatkit/metadata.xml
index d5a2b2de046f..65d37298016b 100644
--- a/dev-db/maatkit/metadata.xml
+++ b/dev-db/maatkit/metadata.xml
@@ -13,4 +13,7 @@ provide missing functionality for MySQL. Some of the tools implement lacking
server functionality, such as online consistency checks for master/slave
replication; others are client-side utilities such as a query profiler.
</longdescription>
+<use>
+ <flag name='udf'>Build the MySQL UDFs shipped with maatkit, requires non-minimal MySQL</flag>
+ </use>
</pkgmetadata>