commit:     7f006aed315a98c65ccebc820de11131039b0dee
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 24 14:02:13 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Thu Aug 24 14:41:33 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f006aed

dev-db/mysql-connector-c++: Version bump and fix patch wrt bug 628788

MariaDB 10.2 no longer includes MARIADB_BASE_VERSION but uses
MARIADB_VERSION_ID instead.

Package-Manager: Portage-2.3.8, Repoman-2.3.3

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

diff --git a/dev-db/mysql-connector-c++/Manifest 
b/dev-db/mysql-connector-c++/Manifest
index 45050af13fb..b7da0dc71d9 100644
--- a/dev-db/mysql-connector-c++/Manifest
+++ b/dev-db/mysql-connector-c++/Manifest
@@ -1,3 +1,4 @@
 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
+DIST mysql-connector-c++-1.1.9.tar.gz 508255 SHA256 
3e31847a69a4e5c113b7c483731317ec4533858e3195d3a85026a0e2f509d2e4 SHA512 
ec4d6cb7f21d52e786de3bff951e65ea5ad7391ba097b599d0094d3e8356cf17f700dee618e38e79d7a9e562684a6c51cca95fb8e2e225942766d33f8d0a5646
 WHIRLPOOL 
b8dbd1f12a6efac5e337c85ff9f32b53a0185af9ae4fd281d4c2e3f68749dabf0e361f775f3bbea44699b8d686a277ea123cb22b6b11ff6222d84b5e111bb74d

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
index a2a33e0c76d..35ed218e18d 100644
--- 
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
@@ -5,7 +5,7 @@ diff -aurN a/driver/mysql_connection.cpp 
b/driver/mysql_connection.cpp
      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
++#if !defined( MARIADB_BASE_VERSION ) && !defined ( MARIADB_VERSION_ID )
    } else if ( proxy->get_server_version() >= 50703 ) {
      try {
        if (GET_CONN_OPTION(optionName, optionValue, intOptions)) {
@@ -21,7 +21,7 @@ diff -aurN a/driver/mysql_connection.cpp 
b/driver/mysql_connection.cpp
      MY_CHARSET_INFO cs;
      proxy->get_character_set_info(&cs);
      return cs.dir ? sql::SQLString(cs.dir) : "";
-+#ifndef MARIADB_BASE_VERSION
++#if !defined( MARIADB_BASE_VERSION ) && !defined ( MARIADB_VERSION_ID )
    } else if ( proxy->get_server_version() >= 50703 ) {
      const char* optionValue= NULL;
      if (GET_CONN_OPTION(optionName, &optionValue, stringOptions)) {
@@ -39,7 +39,7 @@ diff -aurN a/driver/nativeapi/libmysql_static_proxy.cpp 
b/driver/nativeapi/libmy
  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_VERSION_ID >= 50703 && !defined( MARIADB_BASE_VERSION ) && !defined 
( MARIADB_VERSION_ID )
        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.9.ebuild 
b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.9.ebuild
new file mode 100644
index 00000000000..1120d852cbe
--- /dev/null
+++ b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.9.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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="https://dev.mysql.com/get/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=
+       !<dev-db/mysql-connector-c-6.1.8"
+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 via email to