diff options
Diffstat (limited to 'dev-db')
-rw-r--r-- | dev-db/mysql-udf-base64/ChangeLog | 11 | ||||
-rw-r--r-- | dev-db/mysql-udf-base64/files/mysql-udf-base64-signedness.patch | 29 | ||||
-rw-r--r-- | dev-db/mysql-udf-base64/files/mysql-udf-base64.sql | 5 | ||||
-rw-r--r-- | dev-db/mysql-udf-base64/metadata.xml | 9 | ||||
-rw-r--r-- | dev-db/mysql-udf-base64/mysql-udf-base64-20010618.ebuild | 66 |
5 files changed, 120 insertions, 0 deletions
diff --git a/dev-db/mysql-udf-base64/ChangeLog b/dev-db/mysql-udf-base64/ChangeLog new file mode 100644 index 000000000000..5bc473a0bb5a --- /dev/null +++ b/dev-db/mysql-udf-base64/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for dev-db/mysql-udf-base64 +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-udf-base64/ChangeLog,v 1.1 2011/10/19 11:59:44 sbriesen Exp $ + +*mysql-udf-base64-20010618 (19 Oct 2011) + + 19 Oct 2011; Stefan Briesenick <sbriesen@gentoo.org> + +files/mysql-udf-base64-signedness.patch, +mysql-udf-base64-20010618.ebuild, + +files/mysql-udf-base64.sql, +metadata.xml: + initial commit + 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..abc550987baf --- /dev/null +++ b/dev-db/mysql-udf-base64/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>no-herd</herd> + <maintainer> + <email>sbriesen@gentoo.org</email> + <name>Stefan Briesenick</name> + </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..485c8795ef80 --- /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 +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-udf-base64/mysql-udf-base64-20010618.ebuild,v 1.1 2011/10/19 11:59:44 sbriesen Exp $ + +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 +} |