public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Brian Evans" <grknight@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c++/files/, dev-db/mysql-connector-c++/
Date: Fri, 27 Jan 2017 13:49:40 +0000 (UTC)	[thread overview]
Message-ID: <1485524962.9b3d0ae79e7ec81d1a9232ee9df06520aca333bf.grknight@gentoo> (raw)

commit:     9b3d0ae79e7ec81d1a9232ee9df06520aca333bf
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 27 13:49:22 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Fri Jan 27 13:49:22 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b3d0ae7

dev-db/mysql-connector-c++: Version bump

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-db/mysql-connector-c++/Manifest                |  1 +
 .../mysql-connector-c++-1.1.8-fix-mariadb.patch    | 45 ++++++++++++++++
 .../mysql-connector-c++-1.1.8.ebuild               | 62 ++++++++++++++++++++++
 3 files changed, 108 insertions(+)

diff --git a/dev-db/mysql-connector-c++/Manifest b/dev-db/mysql-connector-c++/Manifest
index c19c10b..45050af 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 00000000..a2a33e0
--- /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 00000000..c3a6e0f
--- /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
+}


             reply	other threads:[~2017-01-27 13:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-27 13:49 Brian Evans [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-10-20 18:56 [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c++/files/, dev-db/mysql-connector-c++/ Thomas Deutschmann
2021-04-28 13:20 Thomas Deutschmann
2022-03-03 21:22 David Seifert
2022-10-17  5:32 Hans de Graaff
2023-10-17 15:00 Hans de Graaff
2025-03-10  0:22 Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1485524962.9b3d0ae79e7ec81d1a9232ee9df06520aca333bf.grknight@gentoo \
    --to=grknight@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox