1 |
commit: 9b3d0ae79e7ec81d1a9232ee9df06520aca333bf |
2 |
Author: Brian Evans <grknight <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 27 13:49:22 2017 +0000 |
4 |
Commit: Brian Evans <grknight <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 27 13:49:22 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b3d0ae7 |
7 |
|
8 |
dev-db/mysql-connector-c++: Version bump |
9 |
|
10 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
11 |
|
12 |
dev-db/mysql-connector-c++/Manifest | 1 + |
13 |
.../mysql-connector-c++-1.1.8-fix-mariadb.patch | 45 ++++++++++++++++ |
14 |
.../mysql-connector-c++-1.1.8.ebuild | 62 ++++++++++++++++++++++ |
15 |
3 files changed, 108 insertions(+) |
16 |
|
17 |
diff --git a/dev-db/mysql-connector-c++/Manifest b/dev-db/mysql-connector-c++/Manifest |
18 |
index c19c10b..45050af 100644 |
19 |
--- a/dev-db/mysql-connector-c++/Manifest |
20 |
+++ b/dev-db/mysql-connector-c++/Manifest |
21 |
@@ -1,2 +1,3 @@ |
22 |
DIST mysql-connector-c++-1.1.3.tar.gz 496226 SHA256 4b1516f183f29c011c1677d5a9b174d0f5c3b761d2e8056e79690c55c01ea690 SHA512 c03a4ae25e9d189a5114ab630bef6edaefd1aee809dbb1ec26b765f5e84b93fbe17e5f7357a4fe2a95c179cd2028b676151df4baf4e3da7515543ecc0834afd7 WHIRLPOOL 5f04231cec63de16c2a076143b2e0409544ebdf600d7423f63c8c2db45f1b63048e1da108a9f374dda6b6ff0d4c13b509190390e797f4674e14284acbaa9e2e5 |
23 |
DIST mysql-connector-c++-1.1.6.tar.gz 522236 SHA256 ad710b3900cae3be94656825aa70319cf7a96e1ad46bf93e07275f3606f69447 SHA512 e940b6ee090f792bad8acbbfa3dacd46310ac40c7993c4097eeebb6be4b792d3f1856574e603a71e2795773db97169f47c9ed76a127654472370c726bcb291c7 WHIRLPOOL b3027423cf2e250f1fd7340b58ff5ff55ce771c91cc435e37cddd156f681621206438b6329a49df760dce660ef983b3cf3e5060af527668de64ed06e69830d12 |
24 |
+DIST mysql-connector-c++-1.1.8.tar.gz 528954 SHA256 85ff10bd056128562f92b440eb27766cfcd558b474bfddc1153f7dd8feb5f963 SHA512 c3ab5c1e805598d557a449c44f77ce44cc110e5b529075e38b4f775d3726ebd16a2155f61e47a378a375a9d9362d1520334ea25376636151ddd087291aafd85d WHIRLPOOL 6cb88c3b28a8b0bf072b97c55c8b24de016e8bc5f4d66dce7597cfee2f6c2e83fc88f5d1203df60b3425af5881834635ab3f2053bea6a4c16c7eb73be1f3950c |
25 |
|
26 |
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 |
27 |
new file mode 100644 |
28 |
index 00000000..a2a33e0 |
29 |
--- /dev/null |
30 |
+++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.8-fix-mariadb.patch |
31 |
@@ -0,0 +1,45 @@ |
32 |
+diff -aurN a/driver/mysql_connection.cpp b/driver/mysql_connection.cpp |
33 |
+--- a/driver/mysql_connection.cpp 2016-12-14 04:58:54.000000000 -0500 |
34 |
++++ b/driver/mysql_connection.cpp 2017-01-26 16:33:58.086005627 -0500 |
35 |
+@@ -1023,6 +1023,7 @@ |
36 |
+ proxy->get_character_set_info(&cs); |
37 |
+ *(static_cast<int *>(optionValue)) = cs.mbmaxlen; |
38 |
+ /* mysql_get_option() was added in mysql 5.7.3 version */ |
39 |
++#ifndef MARIADB_BASE_VERSION |
40 |
+ } else if ( proxy->get_server_version() >= 50703 ) { |
41 |
+ try { |
42 |
+ if (GET_CONN_OPTION(optionName, optionValue, intOptions)) { |
43 |
+@@ -1036,6 +1037,7 @@ |
44 |
+ CPP_ERR_FMT("Unsupported option : %d:(%s) %s", proxy->errNo(), proxy->sqlstate().c_str(), proxy->error().c_str()); |
45 |
+ throw e; |
46 |
+ } |
47 |
++#endif |
48 |
+ } |
49 |
+ } |
50 |
+ /* }}} */ |
51 |
+@@ -1053,11 +1055,13 @@ |
52 |
+ MY_CHARSET_INFO cs; |
53 |
+ proxy->get_character_set_info(&cs); |
54 |
+ return cs.dir ? sql::SQLString(cs.dir) : ""; |
55 |
++#ifndef MARIADB_BASE_VERSION |
56 |
+ } else if ( proxy->get_server_version() >= 50703 ) { |
57 |
+ const char* optionValue= NULL; |
58 |
+ if (GET_CONN_OPTION(optionName, &optionValue, stringOptions)) { |
59 |
+ return optionValue ? sql::SQLString(optionValue) : ""; |
60 |
+ } |
61 |
++#endif |
62 |
+ } |
63 |
+ return ""; |
64 |
+ } |
65 |
+diff -aurN a/driver/nativeapi/libmysql_static_proxy.cpp b/driver/nativeapi/libmysql_static_proxy.cpp |
66 |
+--- a/driver/nativeapi/libmysql_static_proxy.cpp 2017-01-26 16:35:46.256038741 -0500 |
67 |
++++ b/driver/nativeapi/libmysql_static_proxy.cpp 2017-01-26 16:28:34.114915809 -0500 |
68 |
+@@ -319,7 +319,7 @@ |
69 |
+ int |
70 |
+ LibmysqlStaticProxy::get_option(MYSQL * mysql, enum mysql_option option, const void *arg) |
71 |
+ { |
72 |
+-#if MYSQL_VERSION_ID >= 50703 |
73 |
++#if MYSQL_VERSION_ID >= 50703 && !defined( MARIADB_BASE_VERSION ) |
74 |
+ if (::mysql_get_option(mysql, option, arg)) { |
75 |
+ throw sql::InvalidArgumentException("Unsupported option provided to mysql_get_option()"); |
76 |
+ } else { |
77 |
|
78 |
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 |
79 |
new file mode 100644 |
80 |
index 00000000..c3a6e0f |
81 |
--- /dev/null |
82 |
+++ b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.8.ebuild |
83 |
@@ -0,0 +1,62 @@ |
84 |
+# Copyright 1999-2017 Gentoo Foundation |
85 |
+# Distributed under the terms of the GNU General Public License v2 |
86 |
+# $Id$ |
87 |
+ |
88 |
+EAPI=6 |
89 |
+ |
90 |
+inherit cmake-utils flag-o-matic |
91 |
+ |
92 |
+DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)" |
93 |
+HOMEPAGE="http://dev.mysql.com/downloads/connector/cpp/" |
94 |
+URI_DIR="Connector-C++" |
95 |
+SRC_URI="mirror://mysql/Downloads/${URI_DIR}/${P}.tar.gz" |
96 |
+ |
97 |
+LICENSE="GPL-2" |
98 |
+SLOT="0" |
99 |
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86" |
100 |
+IUSE="debug examples gcov static-libs" |
101 |
+ |
102 |
+DEPEND="virtual/libmysqlclient:= |
103 |
+ dev-libs/boost:= |
104 |
+ dev-libs/openssl:0=" |
105 |
+RDEPEND="${DEPEND}" |
106 |
+ |
107 |
+PATCHES=( |
108 |
+ "${FILESDIR}/${PN}-1.1.6-fix-cmake.patch" |
109 |
+ "${FILESDIR}/${PN}-1.1.8-fix-mariadb.patch" |
110 |
+) |
111 |
+ |
112 |
+src_configure() { |
113 |
+ # native lib/wrapper needs this! |
114 |
+ append-flags "-fno-strict-aliasing" |
115 |
+ |
116 |
+ local mycmakeargs=( |
117 |
+ -DMYSQLCPPCONN_BUILD_EXAMPLES=OFF |
118 |
+ -DMYSQLCPPCONN_ICU_ENABLE=OFF |
119 |
+ -DUSE_MYSQLCPPCONN_TRACE_ENABLE=$(usex debug ON OFF) |
120 |
+ -DUSE_MYSQLCPPCONN_GCOV_ENABLE=$(usex gcov ON OFF) |
121 |
+ -DINSTALL_DOCS="/usr/share/doc/${PF}" |
122 |
+ -DMYSQL_CXX_LINKAGE=0 |
123 |
+ -DMYSQL_INCLUDE_DIR=$(mysql_config --variable=pkgincludedir) |
124 |
+ ) |
125 |
+ |
126 |
+ cmake-utils_src_configure |
127 |
+} |
128 |
+ |
129 |
+src_install() { |
130 |
+ cmake-utils_src_install |
131 |
+ |
132 |
+ # static lib has wrong name so we need to rename it |
133 |
+ if use static-libs; then |
134 |
+ mv "${ED}"/usr/$(get_libdir)/libmysqlcppconn-static.a \ |
135 |
+ "${ED}"/usr/$(get_libdir)/libmysqlcppconn.a || die |
136 |
+ else |
137 |
+ rm -f "${ED}"/usr/$(get_libdir)/libmysqlcppconn-static.a |
138 |
+ fi |
139 |
+ |
140 |
+ # examples |
141 |
+ if use examples; then |
142 |
+ insinto /usr/share/doc/${PF}/examples |
143 |
+ doins "${S}"/examples/* |
144 |
+ fi |
145 |
+} |