From 56bd759df1d0c750a065b8c845e93d5dfa6b549d Mon Sep 17 00:00:00 2001
From: "Robin H. Johnson" <robbat2@gentoo.org>
Date: Sat, 8 Aug 2015 13:49:04 -0700
Subject: proj/gentoo: Initial commit
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.

This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.

Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
---
 dev-db/maatkit/Manifest               |   1 +
 dev-db/maatkit/maatkit-7540-r1.ebuild | 111 ++++++++++++++++++++++++++++++++++
 dev-db/maatkit/metadata.xml           |  18 ++++++
 3 files changed, 130 insertions(+)
 create mode 100644 dev-db/maatkit/Manifest
 create mode 100644 dev-db/maatkit/maatkit-7540-r1.ebuild
 create mode 100644 dev-db/maatkit/metadata.xml

(limited to 'dev-db/maatkit')

diff --git a/dev-db/maatkit/Manifest b/dev-db/maatkit/Manifest
new file mode 100644
index 000000000000..0bfd7cce09fd
--- /dev/null
+++ b/dev-db/maatkit/Manifest
@@ -0,0 +1 @@
+DIST maatkit-7540.tar.gz 1312812 SHA256 618b8ba8f8df1c8ac04d127986a7bb6a834643523000c9c5ea4ee7d95aeef9a8 SHA512 98cb44a5ebce09322b4d9a8cfa9e14e2ccb54ef9e0e8a95ee92b0fee5277f06157415152566497893488967735049d95c6efadc0d57c8a70060c7bc714afef9a WHIRLPOOL 73685d156a750263ec8d8ba6d22c6e96aa98ed2247523b74a336572ef8e6ae8239f84dd2e7839752c921baca55d911195c0bb1e83d42a87b3a721fa7d0e8439d
diff --git a/dev-db/maatkit/maatkit-7540-r1.ebuild b/dev-db/maatkit/maatkit-7540-r1.ebuild
new file mode 100644
index 000000000000..a17ea575e367
--- /dev/null
+++ b/dev-db/maatkit/maatkit-7540-r1.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+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 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
+	virtual/perl-Scalar-List-Utils
+	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}"
+}
+
+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() {
+	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
new file mode 100644
index 000000000000..d9b6d84de617
--- /dev/null
+++ b/dev-db/maatkit/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer>
+		<email>idl0r@gentoo.org</email>
+		<name>Christian Ruppert</name>
+	</maintainer>
+	<longdescription>maatkit, formerly MySQL Toolkit, is a collection of command-line utilities that
+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>
+	<upstream>
+		<remote-id type="google-code">maatkit</remote-id>
+	</upstream>
+</pkgmetadata>
-- 
cgit v1.2.3-65-gdbad