From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BB972139085 for ; Fri, 27 Jan 2017 13:49:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0431FE0DD4; Fri, 27 Jan 2017 13:49:43 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C1670E0DD4 for ; Fri, 27 Jan 2017 13:49:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9EFB334162B for ; Fri, 27 Jan 2017 13:49:41 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 45C0C31A0 for ; Fri, 27 Jan 2017 13:49:40 +0000 (UTC) From: "Brian Evans" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Evans" Message-ID: <1485524962.9b3d0ae79e7ec81d1a9232ee9df06520aca333bf.grknight@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c++/files/, dev-db/mysql-connector-c++/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-db/mysql-connector-c++/Manifest dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.8-fix-mariadb.patch dev-db/mysql-connector-c++/mysql-connector-c++-1.1.8.ebuild X-VCS-Directories: dev-db/mysql-connector-c++/ dev-db/mysql-connector-c++/files/ X-VCS-Committer: grknight X-VCS-Committer-Name: Brian Evans X-VCS-Revision: 9b3d0ae79e7ec81d1a9232ee9df06520aca333bf X-VCS-Branch: master Date: Fri, 27 Jan 2017 13:49:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: c2b90589-42ee-4479-ba51-a9382c2acb3d X-Archives-Hash: ea70d972a5d117a6ab39ef8fab5ac814 commit: 9b3d0ae79e7ec81d1a9232ee9df06520aca333bf Author: Brian Evans gentoo org> AuthorDate: Fri Jan 27 13:49:22 2017 +0000 Commit: Brian Evans gentoo 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(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 +}