summaryrefslogtreecommitdiff
path: root/dev-db/mysql-udf-base64
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-db/mysql-udf-base64
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
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
Diffstat (limited to 'dev-db/mysql-udf-base64')
-rw-r--r--dev-db/mysql-udf-base64/Manifest2
-rw-r--r--dev-db/mysql-udf-base64/files/mysql-udf-base64-signedness.patch29
-rw-r--r--dev-db/mysql-udf-base64/files/mysql-udf-base64.sql5
-rw-r--r--dev-db/mysql-udf-base64/metadata.xml7
-rw-r--r--dev-db/mysql-udf-base64/mysql-udf-base64-20010618.ebuild66
5 files changed, 109 insertions, 0 deletions
diff --git a/dev-db/mysql-udf-base64/Manifest b/dev-db/mysql-udf-base64/Manifest
new file mode 100644
index 000000000000..efd5a74f76df
--- /dev/null
+++ b/dev-db/mysql-udf-base64/Manifest
@@ -0,0 +1,2 @@
+DIST mysql-udf-base64-20010618.c 7106 SHA256 6d1efdee8489ee2b5d133d0d8997dce08d417d511b8dc80019bed2ca44a56472 SHA512 23d2d1da7481626ebdb8ca3e31d01ae17903ff431415c7bca6ab20e414dc8751ab105a73e55b66a380e0e11ac0fc949b79d5f3c34f3d353abc1a52627be45f86 WHIRLPOOL 2ed00abd547ed54a38adece50682f4866bcdae8d5e72aaa9b113bfdafbfcab20ed8d321b4cd664d145bf4f8d193dca85a175bc8e40cf3163a4f04514f5c297b8
+DIST mysql-udf-base64-20010618.readme 222 SHA256 39f41fd56716021358b2f49c290871ca6618fba77ad45ce8c904250a569c09a9 SHA512 2e2a17d7d1f1435bda59c89529e38a4843be814de5cb0db57643f8feb99a59cadf1e518e2903c470cd5931a964541dc5cc5d1b7f9041e7ed49442c37f139b2aa WHIRLPOOL 3f3abbc448e23a0642e43f70bffa81771eea344b266d41859b91f0d1ced6c9ba16229e4c5109a8e29f2df2c4b6671c8f84ce95bb410aac7ec1aa2d1bef6b92ac
diff --git a/dev-db/mysql-udf-base64/files/mysql-udf-base64-signedness.patch b/dev-db/mysql-udf-base64/files/mysql-udf-base64-signedness.patch
new file mode 100644
index 000000000000..5084a9dd0128
--- /dev/null
+++ b/dev-db/mysql-udf-base64/files/mysql-udf-base64-signedness.patch
@@ -0,0 +1,29 @@
+--- mysql-udf-base64.c.orig 2011-10-16 14:17:13.000000000 +0200
++++ mysql-udf-base64.c 2011-10-16 14:18:41.000000000 +0200
+@@ -49,7 +49,7 @@
+ #include <string.h>
+ #include <mysql/mysql.h>
+
+-static char base64_table[] =
++static const char base64_table[] =
+ { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
+ 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
+ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
+@@ -101,7 +101,7 @@
+ unsigned long len;
+
+ /* *is_null=0; */
+- current = args->args[0];
++ current = (unsigned char*) args->args[0];
+ len = args->lengths[0];
+
+ if (len <= 0 || args->arg_type[0] != STRING_RESULT )
+@@ -211,7 +211,7 @@
+ }
+ }
+
+- current = args->args[0];
++ current = (unsigned char*) args->args[0];
+ len = args->lengths[0];
+
+ if (len <= 0 || args->arg_type[0] != STRING_RESULT )
diff --git a/dev-db/mysql-udf-base64/files/mysql-udf-base64.sql b/dev-db/mysql-udf-base64/files/mysql-udf-base64.sql
new file mode 100644
index 000000000000..619d4b0013d2
--- /dev/null
+++ b/dev-db/mysql-udf-base64/files/mysql-udf-base64.sql
@@ -0,0 +1,5 @@
+drop function base64encode;
+drop function base64decode;
+
+create function base64encode returns string soname 'mysql_udf_base64.so';
+create function base64decode returns string soname 'mysql_udf_base64.so';
diff --git a/dev-db/mysql-udf-base64/metadata.xml b/dev-db/mysql-udf-base64/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/dev-db/mysql-udf-base64/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-db/mysql-udf-base64/mysql-udf-base64-20010618.ebuild b/dev-db/mysql-udf-base64/mysql-udf-base64-20010618.ebuild
new file mode 100644
index 000000000000..89b942b0b31c
--- /dev/null
+++ b/dev-db/mysql-udf-base64/mysql-udf-base64-20010618.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+MY_PN="${PN//-/_}"
+
+DESCRIPTION="MySQL UDFs that provide base64 encode/decode"
+HOMEPAGE="http://mirrors.sohu.com/mysql/Contrib/Old-Versions/"
+SRC_URI="http://mirrors.sohu.com/mysql/Contrib/Old-Versions/${PN}.c -> ${P}.c
+ http://mirrors.sohu.com/mysql/Contrib/Old-Versions/${PN}.readme -> ${P}.readme"
+
+LICENSE="PHP-2.02"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=virtual/mysql-5.1"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"
+
+# compile helper
+_compile() {
+ local CC="$(tc-getCC)"
+ echo "${CC} ${@}" && "${CC}" "${@}"
+}
+
+pkg_setup() {
+ MYSQL_PLUGINDIR="$(mysql_config --plugindir)"
+ MYSQL_INCLUDE="$(mysql_config --include)"
+}
+
+src_unpack() {
+ cp -f "${DISTDIR}/${P}.c" "${S}/${PN}.c"
+ cp -f "${DISTDIR}/${P}.readme" "${S}/${PN}.readme"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-signedness.patch"
+}
+
+src_compile() {
+ _compile ${CFLAGS} -Wall -fPIC ${MYSQL_INCLUDE} \
+ -shared ${LDFLAGS} -o ${MY_PN}.so ${PN}.c
+}
+
+src_install() {
+ exeinto "${MYSQL_PLUGINDIR}"
+ doexe ${MY_PN}.so
+ newdoc ${PN}.readme README
+ newdoc "${FILESDIR}/${PN}.sql" ${MY_PN}.sql
+}
+
+pkg_postinst() {
+ elog
+ elog "Please have a look at the documentation, how to"
+ elog "enable/disable the UDF functions of ${PN}."
+ elog
+ elog "The documentation is located here:"
+ elog "/usr/share/doc/${PF}"
+ elog
+}