summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2017-01-27 08:49:22 -0500
committerBrian Evans <grknight@gentoo.org>2017-01-27 08:49:22 -0500
commit9b3d0ae79e7ec81d1a9232ee9df06520aca333bf (patch)
tree72785ba4615bcea2146f0c717111c2b009f65af7 /dev-db/mysql-connector-c++
parentdev-python/pyquery-1.2.13-r0: stable on alpha (diff)
downloadgentoo-9b3d0ae79e7ec81d1a9232ee9df06520aca333bf.tar.gz
gentoo-9b3d0ae79e7ec81d1a9232ee9df06520aca333bf.tar.bz2
gentoo-9b3d0ae79e7ec81d1a9232ee9df06520aca333bf.zip
dev-db/mysql-connector-c++: Version bump
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'dev-db/mysql-connector-c++')
-rw-r--r--dev-db/mysql-connector-c++/Manifest1
-rw-r--r--dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.8-fix-mariadb.patch45
-rw-r--r--dev-db/mysql-connector-c++/mysql-connector-c++-1.1.8.ebuild62
3 files changed, 108 insertions, 0 deletions
diff --git a/dev-db/mysql-connector-c++/Manifest b/dev-db/mysql-connector-c++/Manifest
index c19c10b4fea8..45050af13fbf 100644
--- a/dev-db/mysql-connector-c++/Manifest
+++ b/dev-db/mysql-connector-c++/Manifest
@@ -1,2 +1,3 @@
DIST mysql-connector-c++-1.1.3.tar.gz 496226 SHA256 4b1516f183f29c011c1677d5a9b174d0f5c3b761d2e8056e79690c55c01ea690 SHA512 c03a4ae25e9d189a5114ab630bef6edaefd1aee809dbb1ec26b765f5e84b93fbe17e5f7357a4fe2a95c179cd2028b676151df4baf4e3da7515543ecc0834afd7 WHIRLPOOL 5f04231cec63de16c2a076143b2e0409544ebdf600d7423f63c8c2db45f1b63048e1da108a9f374dda6b6ff0d4c13b509190390e797f4674e14284acbaa9e2e5
DIST mysql-connector-c++-1.1.6.tar.gz 522236 SHA256 ad710b3900cae3be94656825aa70319cf7a96e1ad46bf93e07275f3606f69447 SHA512 e940b6ee090f792bad8acbbfa3dacd46310ac40c7993c4097eeebb6be4b792d3f1856574e603a71e2795773db97169f47c9ed76a127654472370c726bcb291c7 WHIRLPOOL b3027423cf2e250f1fd7340b58ff5ff55ce771c91cc435e37cddd156f681621206438b6329a49df760dce660ef983b3cf3e5060af527668de64ed06e69830d12
+DIST mysql-connector-c++-1.1.8.tar.gz 528954 SHA256 85ff10bd056128562f92b440eb27766cfcd558b474bfddc1153f7dd8feb5f963 SHA512 c3ab5c1e805598d557a449c44f77ce44cc110e5b529075e38b4f775d3726ebd16a2155f61e47a378a375a9d9362d1520334ea25376636151ddd087291aafd85d WHIRLPOOL 6cb88c3b28a8b0bf072b97c55c8b24de016e8bc5f4d66dce7597cfee2f6c2e83fc88f5d1203df60b3425af5881834635ab3f2053bea6a4c16c7eb73be1f3950c
diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.8-fix-mariadb.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.8-fix-mariadb.patch
new file mode 100644
index 000000000000..a2a33e0c76db
--- /dev/null
+++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.8-fix-mariadb.patch
@@ -0,0 +1,45 @@
+diff -aurN a/driver/mysql_connection.cpp b/driver/mysql_connection.cpp
+--- a/driver/mysql_connection.cpp 2016-12-14 04:58:54.000000000 -0500
++++ b/driver/mysql_connection.cpp 2017-01-26 16:33:58.086005627 -0500
+@@ -1023,6 +1023,7 @@
+ proxy->get_character_set_info(&cs);
+ *(static_cast<int *>(optionValue)) = cs.mbmaxlen;
+ /* mysql_get_option() was added in mysql 5.7.3 version */
++#ifndef MARIADB_BASE_VERSION
+ } else if ( proxy->get_server_version() >= 50703 ) {
+ try {
+ if (GET_CONN_OPTION(optionName, optionValue, intOptions)) {
+@@ -1036,6 +1037,7 @@
+ CPP_ERR_FMT("Unsupported option : %d:(%s) %s", proxy->errNo(), proxy->sqlstate().c_str(), proxy->error().c_str());
+ throw e;
+ }
++#endif
+ }
+ }
+ /* }}} */
+@@ -1053,11 +1055,13 @@
+ MY_CHARSET_INFO cs;
+ proxy->get_character_set_info(&cs);
+ return cs.dir ? sql::SQLString(cs.dir) : "";
++#ifndef MARIADB_BASE_VERSION
+ } else if ( proxy->get_server_version() >= 50703 ) {
+ const char* optionValue= NULL;
+ if (GET_CONN_OPTION(optionName, &optionValue, stringOptions)) {
+ return optionValue ? sql::SQLString(optionValue) : "";
+ }
++#endif
+ }
+ return "";
+ }
+diff -aurN a/driver/nativeapi/libmysql_static_proxy.cpp b/driver/nativeapi/libmysql_static_proxy.cpp
+--- a/driver/nativeapi/libmysql_static_proxy.cpp 2017-01-26 16:35:46.256038741 -0500
++++ b/driver/nativeapi/libmysql_static_proxy.cpp 2017-01-26 16:28:34.114915809 -0500
+@@ -319,7 +319,7 @@
+ int
+ LibmysqlStaticProxy::get_option(MYSQL * mysql, enum mysql_option option, const void *arg)
+ {
+-#if MYSQL_VERSION_ID >= 50703
++#if MYSQL_VERSION_ID >= 50703 && !defined( MARIADB_BASE_VERSION )
+ if (::mysql_get_option(mysql, option, arg)) {
+ throw sql::InvalidArgumentException("Unsupported option provided to mysql_get_option()");
+ } else {
diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.8.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.8.ebuild
new file mode 100644
index 000000000000..c3a6e0fc9990
--- /dev/null
+++ b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.8.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit cmake-utils flag-o-matic
+
+DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)"
+HOMEPAGE="http://dev.mysql.com/downloads/connector/cpp/"
+URI_DIR="Connector-C++"
+SRC_URI="mirror://mysql/Downloads/${URI_DIR}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86"
+IUSE="debug examples gcov static-libs"
+
+DEPEND="virtual/libmysqlclient:=
+ dev-libs/boost:=
+ dev-libs/openssl:0="
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.1.6-fix-cmake.patch"
+ "${FILESDIR}/${PN}-1.1.8-fix-mariadb.patch"
+)
+
+src_configure() {
+ # native lib/wrapper needs this!
+ append-flags "-fno-strict-aliasing"
+
+ local mycmakeargs=(
+ -DMYSQLCPPCONN_BUILD_EXAMPLES=OFF
+ -DMYSQLCPPCONN_ICU_ENABLE=OFF
+ -DUSE_MYSQLCPPCONN_TRACE_ENABLE=$(usex debug ON OFF)
+ -DUSE_MYSQLCPPCONN_GCOV_ENABLE=$(usex gcov ON OFF)
+ -DINSTALL_DOCS="/usr/share/doc/${PF}"
+ -DMYSQL_CXX_LINKAGE=0
+ -DMYSQL_INCLUDE_DIR=$(mysql_config --variable=pkgincludedir)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # static lib has wrong name so we need to rename it
+ if use static-libs; then
+ mv "${ED}"/usr/$(get_libdir)/libmysqlcppconn-static.a \
+ "${ED}"/usr/$(get_libdir)/libmysqlcppconn.a || die
+ else
+ rm -f "${ED}"/usr/$(get_libdir)/libmysqlcppconn-static.a
+ fi
+
+ # examples
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins "${S}"/examples/*
+ fi
+}