1 |
commit: 839e1efe35b0e6f15174461ccda96541def716de |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Feb 16 22:48:24 2019 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 16 22:48:37 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=839e1efe |
7 |
|
8 |
dev-db/mysql-connector-c++: bump to v8.0.15 |
9 |
|
10 |
Package-Manager: Portage-2.3.60, Repoman-2.3.12 |
11 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
12 |
|
13 |
dev-db/mysql-connector-c++/Manifest | 1 + |
14 |
.../mysql-connector-c++-8.0.15-fix-build.patch | 307 +++++++++++++++++++++ |
15 |
.../mysql-connector-c++-8.0.15.ebuild | 40 +++ |
16 |
3 files changed, 348 insertions(+) |
17 |
|
18 |
diff --git a/dev-db/mysql-connector-c++/Manifest b/dev-db/mysql-connector-c++/Manifest |
19 |
index 0dea64790f6..07fc03d7d4a 100644 |
20 |
--- a/dev-db/mysql-connector-c++/Manifest |
21 |
+++ b/dev-db/mysql-connector-c++/Manifest |
22 |
@@ -3,3 +3,4 @@ DIST mysql-connector-c++-1.1.12.tar.gz 518615 BLAKE2B 386a4753ca3f03999a49a89507 |
23 |
DIST mysql-connector-c++-1.1.9.tar.gz 508255 BLAKE2B e2cd300946a873a94beab13d9d1cb64ecb5bd9a9a56ef2217b1f7aff1643adc9afc0aa22c2ff1e0f6b8318cd34d12a7fe95f0584c96c212307fa9bd0cb54a2a1 SHA512 ec4d6cb7f21d52e786de3bff951e65ea5ad7391ba097b599d0094d3e8356cf17f700dee618e38e79d7a9e562684a6c51cca95fb8e2e225942766d33f8d0a5646 |
24 |
DIST mysql-connector-c++-8.0.11-src.tar.gz 2322951 BLAKE2B a1ea47c0440beae1892144186ad6b99a4519369845e1f37f5ce42088df6c29a458bd41840a1f9401dbd29827bc3a7c96ba34563a3a4cf3176e29e377cc254b9f SHA512 5113efb473b7cc63f680c04dacf5bee78d0a58ee20b41c8203edb92f8720c31c52c24de838996f25476eaa3d734c845531440317e82cb5e5f635bc03b057a148 |
25 |
DIST mysql-connector-c++-8.0.13-src.tar.gz 2174609 BLAKE2B 5293ccfb7ad3bd6d50e0518db402d93f707535498ff1f608acc5c642cdc2c671601cbb7c14c7e6ec66fea8bdcb22effbb90e0ee2c207e8e82be7a2b446512f24 SHA512 0c260eff0002f5abc177049b9d050daf3b7860634355c10c02cb0ece18a3d1505454d67d8742d7e879c0cc6b44f8045f75e64d79bdd0bbfc211de9903abec902 |
26 |
+DIST mysql-connector-c++-8.0.15-src.tar.gz 2210243 BLAKE2B 45e0ffa2134c9df5a7e311963c7f2c58b5d7cfc0eefd80a5dc323bbe34ba60d40c79154f932e19c5f8e18ae45d0b61d304b7b7daba4955f92f830cf20c718931 SHA512 9a217b8f61babe5dac405be19b12d34b22673e779433d880a3aa31ea2e128f93434599a3fe0c1150b3f7b8c4d03f595d545d8cc33342a60561a2f60bff71ef14 |
27 |
|
28 |
diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.15-fix-build.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.15-fix-build.patch |
29 |
new file mode 100644 |
30 |
index 00000000000..4e399691410 |
31 |
--- /dev/null |
32 |
+++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.15-fix-build.patch |
33 |
@@ -0,0 +1,307 @@ |
34 |
+--- a/CMakeLists.txt |
35 |
++++ b/CMakeLists.txt |
36 |
+@@ -666,7 +666,7 @@ set_target_properties(connector PROPERTIES |
37 |
+ |
38 |
+ |
39 |
+ install(TARGETS connector |
40 |
+- CONFIGURATIONS Release RelWithDebInfo |
41 |
++ CONFIGURATIONS Release RelWithDebInfo Gentoo |
42 |
+ ARCHIVE DESTINATION "${INSTALL_LIB_DIR_STATIC}" COMPONENT XDevAPIDev |
43 |
+ RUNTIME DESTINATION "${INSTALL_LIB_DIR}" COMPONENT XDevAPIDll |
44 |
+ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT XDevAPIDll |
45 |
+@@ -737,6 +737,12 @@ TARGET_LINK_LIBRARIES(try connector) |
46 |
+ SET_INTERFACE_OPTIONS(try devapi) |
47 |
+ # ADD_GCOV(try) |
48 |
+ |
49 |
++IF(WITH_SSL STREQUAL "system") |
50 |
++ find_package(OpenSSL REQUIRED) |
51 |
++ TARGET_LINK_LIBRARIES(try ${OPENSSL_LIBRARIES}) |
52 |
++ENDIF() |
53 |
++ |
54 |
++ |
55 |
+ if(WITH_JDBC) |
56 |
+ |
57 |
+ add_executable(try_jdbc EXCLUDE_FROM_ALL try_jdbc.cc) |
58 |
+--- a/cdk/cmake/install_macros.cmake |
59 |
++++ b/cdk/cmake/install_macros.cmake |
60 |
+@@ -327,7 +327,7 @@ FUNCTION(INSTALL_DEBUG_TARGET target) |
61 |
+ DESTINATION ${ARG_DESTINATION} |
62 |
+ ${RENAME_PARAM} |
63 |
+ ${PERMISSIONS_${target_type}} |
64 |
+- CONFIGURATIONS Release RelWithDebInfo |
65 |
++ CONFIGURATIONS Release RelWithDebInfo Gentoo |
66 |
+ COMPONENT ${ARG_COMPONENT} |
67 |
+ OPTIONAL) |
68 |
+ |
69 |
+@@ -346,7 +346,7 @@ FUNCTION(INSTALL_DEBUG_TARGET target) |
70 |
+ INSTALL(FILES ${debug_pdb_target_location} |
71 |
+ DESTINATION ${ARG_PDB_DESTINATION} |
72 |
+ ${PDB_RENAME_PARAM} |
73 |
+- CONFIGURATIONS Release RelWithDebInfo |
74 |
++ CONFIGURATIONS Release RelWithDebInfo Gentoo |
75 |
+ COMPONENT ${ARG_COMPONENT} |
76 |
+ OPTIONAL) |
77 |
+ ENDIF() |
78 |
+--- a/cdk/cmake/libutils.cmake |
79 |
++++ b/cdk/cmake/libutils.cmake |
80 |
+@@ -282,14 +282,7 @@ function(add_library_ex TARGET) |
81 |
+ endforeach() |
82 |
+ |
83 |
+ if(libs) |
84 |
+- |
85 |
+- if(${type} STREQUAL "STATIC") |
86 |
+- merge_static_libraries(${TARGET} ${libs}) |
87 |
+- add_dependencies(${TARGET} ${libs}) |
88 |
+- else() |
89 |
+ target_link_libraries(${TARGET} PRIVATE ${libs}) |
90 |
+- endif() |
91 |
+- |
92 |
+ endif() |
93 |
+ |
94 |
+ # |
95 |
+--- a/cdk/cmake/protobuf.cmake |
96 |
++++ b/cdk/cmake/protobuf.cmake |
97 |
+@@ -26,201 +26,8 @@ |
98 |
+ # along with this program; if not, write to the Free Software Foundation, Inc., |
99 |
+ # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
100 |
+ |
101 |
+-# |
102 |
+-# Usage: |
103 |
+-# |
104 |
+-# INCLUDE(protobuf) |
105 |
+-# [USE_FULL_PROTOBUF()] |
106 |
+-# |
107 |
+-# MYSQLX_PROTOBUF_GENERATE_CPP(SRCS HDRS <protobuf definitions>) |
108 |
+-# ADD_LIBRARY(target ... ${SRCS}) |
109 |
+-# |
110 |
+- |
111 |
+-if(DEFINED WITH_PROTOBUF) |
112 |
+- |
113 |
+- # |
114 |
+- # If WITH_PROTOBUF is defined, it should point at external location where |
115 |
+- # protobuf libraries were built using our CMakeLists.txt (so that |
116 |
+- # exports.cmake was produced). |
117 |
+- # |
118 |
+- |
119 |
+- if (NOT EXISTS "${WITH_PROTOBUF}/exports.cmake") |
120 |
+- message(FATAL_ERROR |
121 |
+- "Valid protobuf build not found at the given location" |
122 |
+- " (could not find exports.cmake): ${WITH_PROTOBUF}" |
123 |
+- ) |
124 |
+- endif() |
125 |
+- |
126 |
+- message("Using protobuf build at: ${WITH_PROTOBUF}") |
127 |
+- |
128 |
+-else(DEFINED WITH_PROTOBUF) |
129 |
+- |
130 |
+- # |
131 |
+- # If external WITH_PROTOBUF location is not given, then we arrange for |
132 |
+- # building of protbuf from bundled sources in ${PROJECT_BINARY_DIR}/protobuf. |
133 |
+- # |
134 |
+- |
135 |
+- message("Configuring Protobuf build using cmake generator: ${CMAKE_GENERATOR}") |
136 |
+- file(REMOVE "${PROJECT_BINARY_DIR}/protobuf/CMakeCache.txt") |
137 |
+- file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/protobuf") |
138 |
+- |
139 |
+- # |
140 |
+- # Pick build configuration for the protobuf build. Normally we build using the |
141 |
+- # same build configuration that is used for building CDK (Release/Debug/etc.). |
142 |
+- # But we also support building CDK under non-standard build configuration |
143 |
+- # named 'Static' (this is a dirty trick we use to simplify building our MSIs). |
144 |
+- # Since protobuf does not know 'Static' build configuration, we build protobuf |
145 |
+- # under 'Release' configuration in that case. |
146 |
+- # |
147 |
+- # We need to handle two cases. For some build systems, like Makefiles, |
148 |
+- # the build configuration is specified at cmake time using CMAKE_BUILD_TYPE |
149 |
+- # variable. In that case we also set it during protobuf build configuration. |
150 |
+- # Another case is a multi-configuration build system like MSVC. In this case |
151 |
+- # we use generator expression to pick correct configuration when the build |
152 |
+- # command is invoked below. |
153 |
+- # |
154 |
+- |
155 |
+- if(CMAKE_BUILD_TYPE) |
156 |
+- if(CMAKE_BUILD_TYPE MATCHES "[Ss][Tt][Aa][Tt][Ii][Cc]") |
157 |
+- set(set_build_type -DCMAKE_BUILD_TYPE=Release) |
158 |
+- else() |
159 |
+- set(set_build_type -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}) |
160 |
+- endif() |
161 |
+- endif() |
162 |
+- |
163 |
+- set(CONFIG_EXPR |
164 |
+- $<$<CONFIG:Static>:Release>$<$<NOT:$<CONFIG:Static>>:$<CONFIG>> |
165 |
+- ) |
166 |
+- |
167 |
+- execute_process( |
168 |
+- COMMAND ${CMAKE_COMMAND} |
169 |
+- -G "${CMAKE_GENERATOR}" |
170 |
+- ${set_build_type} |
171 |
+- -DSTATIC_MSVCRT=${STATIC_MSVCRT} |
172 |
+- -DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE} |
173 |
+- -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} |
174 |
+- -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} |
175 |
+- -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} |
176 |
+- -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} |
177 |
+- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO} |
178 |
+- -DCMAKE_CXX_FLAGS_MINSIZEREL=${CMAKE_CXX_FLAGS_MINSIZEREL} |
179 |
+- -DCMAKE_STATIC_LINKER_FLAGS=${CMAKE_STATIC_LINKER_FLAGS} |
180 |
+- ${PROJECT_SOURCE_DIR}/protobuf |
181 |
+- WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/protobuf |
182 |
+- RESULT_VARIABLE protobuf_config |
183 |
+- ) |
184 |
+- |
185 |
+- if(protobuf_config) |
186 |
+- message(FATAL_ERROR "Could not configure Protobuf build: ${protobuf_config}") |
187 |
+- endif() |
188 |
+- |
189 |
+- set(WITH_PROTOBUF "${PROJECT_BINARY_DIR}/protobuf") |
190 |
+- |
191 |
+-endif(DEFINED WITH_PROTOBUF) |
192 |
+- |
193 |
+-# Import targets exported by protobuf |
194 |
+- |
195 |
+-include(${WITH_PROTOBUF}/exports.cmake) |
196 |
+- |
197 |
+-# |
198 |
+-# Protobuf library targets imported above (pb_protobuf |
199 |
+-# and pb_protobuf-lite) are local to the directory from which |
200 |
+-# they were imported. This is not good if cdk is used as |
201 |
+-# a sub-project of a parent project, because the parent project |
202 |
+-# must have access to these targets. |
203 |
+-# |
204 |
+-# For that reason below we create global protobuf/protobuf-lite targets |
205 |
+-# and copy their locations from the imported targets. |
206 |
+-# |
207 |
+-# Note: we can't use ALIAS library because it does not work with imported |
208 |
+-# targets |
209 |
+-# |
210 |
+- |
211 |
+-add_library(protobuf STATIC IMPORTED GLOBAL) |
212 |
+-add_library(protobuf-lite STATIC IMPORTED GLOBAL) |
213 |
+- |
214 |
+-foreach(lib protobuf protobuf-lite) |
215 |
+- #message("processing: ${lib}") |
216 |
+- |
217 |
+- foreach(CONF NOCONFIG DEBUG RELEASE MINSIZEREL RELWITHDEBINFO) |
218 |
+- #message("- CONF: ${CONF}") |
219 |
+- |
220 |
+- get_target_property(LOC pb_${lib} IMPORTED_LOCATION_${CONF}) |
221 |
+- if(LOC) |
222 |
+- #message("- setting imported location to: ${LOC}") |
223 |
+- set_target_properties(${lib} PROPERTIES |
224 |
+- IMPORTED_LOCATION_${CONF} "${LOC}" |
225 |
+- ) |
226 |
+- set_property(TARGET ${lib} APPEND PROPERTY |
227 |
+- IMPORTED_CONFIGURATIONS ${CONF} |
228 |
+- ) |
229 |
+- endif() |
230 |
+- |
231 |
+- endforeach(CONF) |
232 |
+- |
233 |
+-endforeach(lib) |
234 |
+- |
235 |
+-# |
236 |
+-# To support 'Static' build configuration the targets imported from the |
237 |
+-# Protobuf project need to have IMPORTED_LOCATION_STATIC defined. We use |
238 |
+-# 'Release' locations as Protobuf is built using 'Release' configuration in |
239 |
+-# that case. |
240 |
+-# |
241 |
+- |
242 |
+-foreach(tgt protobuf protobuf-lite pb_protoc) |
243 |
+- |
244 |
+- get_target_property(LOC ${tgt} IMPORTED_LOCATION_RELEASE) |
245 |
+- set_property(TARGET ${tgt} PROPERTY IMPORTED_LOCATION_STATIC ${LOC}) |
246 |
+- |
247 |
+-endforeach(tgt) |
248 |
+- |
249 |
+- |
250 |
+-# protobuf depends on protobuf-lite |
251 |
+- |
252 |
+-set_target_properties(protobuf PROPERTIES |
253 |
+- INTERFACE_LINK_LIBRARIES "protobuf-lite" |
254 |
+-) |
255 |
+- |
256 |
+- |
257 |
+-message("Protobuf include path: ${PROTOBUF_INCLUDE_DIR}") |
258 |
+- |
259 |
+-set(PROTOBUF_INCLUDE_DIRS ${PROTOBUF_INCLUDE_DIR} |
260 |
+- CACHE INTERNAL "Protobuf include path" FORCE) |
261 |
+-set(PROTOBUF_PROTOC_EXECUTABLE pb_protoc |
262 |
+- CACHE INTERNAL "Protobuf compiler" FORCE) |
263 |
+- |
264 |
+-# |
265 |
+-# Custom target build_protobuf ensures that Protobuf project is built. |
266 |
+-# |
267 |
+-# Note: this depends on Protobuf project generating the stamp file |
268 |
+-# |
269 |
+- |
270 |
+-if(NOT DEFINED PROTOBUF_BUILD_STAMP) |
271 |
+- message(FATAL_ERROR "Protobuf build stamp file not defined") |
272 |
+-endif() |
273 |
+- |
274 |
+- |
275 |
+-if(CMAKE_VERSION VERSION_LESS 3.0) |
276 |
+- add_custom_command(OUTPUT ${PROTOBUF_BUILD_STAMP} |
277 |
+- COMMAND ${CMAKE_COMMAND} --build . --config $<CONFIGURATION> |
278 |
+- WORKING_DIRECTORY ${WITH_PROTOBUF} |
279 |
+- COMMENT "Building protobuf using configuration: $(Configuration)" |
280 |
+- ) |
281 |
+-else() |
282 |
+- add_custom_command(OUTPUT ${PROTOBUF_BUILD_STAMP} |
283 |
+- COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG_EXPR} |
284 |
+- WORKING_DIRECTORY ${WITH_PROTOBUF} |
285 |
+- COMMENT "Building protobuf using configuration: $(Configuration)" |
286 |
+- ) |
287 |
+-endif() |
288 |
+- |
289 |
+-add_custom_target(build_protobuf |
290 |
+- DEPENDS ${PROTOBUF_BUILD_STAMP} |
291 |
+-) |
292 |
+- |
293 |
+-add_dependencies(protobuf build_protobuf) |
294 |
+-add_dependencies(protobuf-lite build_protobuf) |
295 |
+-add_dependencies(pb_protoc build_protobuf) |
296 |
++#SET(Protobuf_USE_STATIC_LIBS ON) |
297 |
++find_package(Protobuf REQUIRED) |
298 |
+ |
299 |
+ # |
300 |
+ # Choice between full and lite version of the library. |
301 |
+--- a/cdk/protocol/mysqlx/crud.cc |
302 |
++++ b/cdk/protocol/mysqlx/crud.cc |
303 |
+@@ -295,7 +295,7 @@ public: |
304 |
+ class Placeholder_conv_imp |
305 |
+ : public Args_conv |
306 |
+ { |
307 |
+- map<string, unsigned> m_map; |
308 |
++ std::map<string, unsigned> m_map; |
309 |
+ |
310 |
+ public: |
311 |
+ |
312 |
+@@ -303,7 +303,7 @@ public: |
313 |
+ |
314 |
+ unsigned conv_placeholder(const string &name) |
315 |
+ { |
316 |
+- map<string, unsigned>::const_iterator it = m_map.find(name); |
317 |
++ std::map<string, unsigned>::const_iterator it = m_map.find(name); |
318 |
+ if (it == m_map.end()) |
319 |
+ throw_error("Placeholder converter: Placeholder was not defined on args"); |
320 |
+ //throw Generic_error((boost::format("Placeholder %s was not defined on args.") |
321 |
+@@ -314,7 +314,7 @@ public: |
322 |
+ |
323 |
+ void add_placeholder(const string &name) |
324 |
+ { |
325 |
+- map<string, unsigned>::const_iterator it = m_map.find(name); |
326 |
++ std::map<string, unsigned>::const_iterator it = m_map.find(name); |
327 |
+ if (it != m_map.end()) |
328 |
+ throw_error("Placeholder converter: Redefined placeholder"); |
329 |
+ //throw Generic_error((boost::format("Redifined placeholder %s.") |
330 |
+--- a/jdbc.cmake |
331 |
++++ b/jdbc.cmake |
332 |
+@@ -66,7 +66,7 @@ if(MYSQL_CONFIG_EXECUTABLE) |
333 |
+ list(APPEND jdbc_cmake_opts -DMYSQL_CONFIG_EXECUTABLE=${MYSQL_CONFIG_EXECUTABLE}) |
334 |
+ endif() |
335 |
+ |
336 |
+-list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=ON) |
337 |
++list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=OFF) |
338 |
+ |
339 |
+ if(CMAKE_BUILD_TYPE) |
340 |
+ if(CMAKE_BUILD_TYPE MATCHES "[Ss][Tt][Aa][Tt][Ii][Cc]") |
341 |
|
342 |
diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.15.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.15.ebuild |
343 |
new file mode 100644 |
344 |
index 00000000000..0f81eed7d57 |
345 |
--- /dev/null |
346 |
+++ b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.15.ebuild |
347 |
@@ -0,0 +1,40 @@ |
348 |
+# Copyright 1999-2019 Gentoo Authors |
349 |
+# Distributed under the terms of the GNU General Public License v2 |
350 |
+ |
351 |
+EAPI="7" |
352 |
+ |
353 |
+CMAKE_MAKEFILE_GENERATOR=emake |
354 |
+inherit cmake-utils |
355 |
+ |
356 |
+DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)" |
357 |
+HOMEPAGE="https://dev.mysql.com/downloads/connector/cpp/" |
358 |
+URI_DIR="Connector-C++" |
359 |
+SRC_URI="https://dev.mysql.com/get/Downloads/${URI_DIR}/${P}-src.tar.gz" |
360 |
+ |
361 |
+LICENSE="Artistic GPL-2" |
362 |
+SLOT="0" |
363 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86" |
364 |
+IUSE="+legacy" |
365 |
+ |
366 |
+RDEPEND=" |
367 |
+ dev-libs/openssl:0= |
368 |
+ dev-libs/protobuf:= |
369 |
+ legacy? ( |
370 |
+ dev-libs/boost:= |
371 |
+ >=dev-db/mysql-connector-c-6.1.8:= |
372 |
+ )" |
373 |
+DEPEND="${RDEPEND}" |
374 |
+S="${WORKDIR}/${P}-src" |
375 |
+ |
376 |
+PATCHES=( |
377 |
+ "${FILESDIR}/${PN}-8.0.15-fix-build.patch" |
378 |
+) |
379 |
+ |
380 |
+src_configure() { |
381 |
+ local mycmakeargs=( |
382 |
+ -DWITH_SSL=system |
383 |
+ -DWITH_JDBC=$(usex legacy ON OFF) |
384 |
+ ) |
385 |
+ |
386 |
+ cmake-utils_src_configure |
387 |
+} |