summaryrefslogtreecommitdiff
blob: 7449b910a9b018a040685c6fd3eefbbeb58c38bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
diff -aurN a/buildinfo.cmake b/buildinfo.cmake
--- a/buildinfo.cmake	2018-04-08 15:10:57.000000000 -0400
+++ b/buildinfo.cmake	2018-04-20 13:37:20.993266176 -0400
@@ -112,4 +112,4 @@
 endif()
 
 
-install(FILES "${PROJECT_BINARY_DIR}/BUILDINFO.txt" DESTINATION .)
+#install(FILES "${PROJECT_BINARY_DIR}/BUILDINFO.txt" DESTINATION .)
diff -aurN a/cdk/cmake/install_macros.cmake b/cdk/cmake/install_macros.cmake
--- a/cdk/cmake/install_macros.cmake	2018-04-08 15:10:57.000000000 -0400
+++ b/cdk/cmake/install_macros.cmake	2018-04-20 14:12:17.255877167 -0400
@@ -327,7 +327,7 @@
     DESTINATION ${ARG_DESTINATION}
     ${RENAME_PARAM}
     ${PERMISSIONS_${target_type}}
-    CONFIGURATIONS Release RelWithDebInfo
+    CONFIGURATIONS Release RelWithDebInfo Gentoo
     COMPONENT ${ARG_COMPONENT}
     OPTIONAL)
 
@@ -346,7 +346,7 @@
     INSTALL(FILES ${debug_pdb_target_location}
       DESTINATION ${ARG_PDB_DESTINATION}
       ${PDB_RENAME_PARAM}
-      CONFIGURATIONS Release RelWithDebInfo
+      CONFIGURATIONS Release RelWithDebInfo Gentoo
       COMPONENT ${ARG_COMPONENT}
       OPTIONAL)
   ENDIF()
diff -aurN a/cdk/cmake/libutils.cmake b/cdk/cmake/libutils.cmake
--- a/cdk/cmake/libutils.cmake     2018-04-08 15:10:57.000000000 -0400
+++ b/cdk/cmake/libutils.cmake     2018-04-20 14:27:49.021432318 -0400
@@ -275,14 +275,7 @@
   endforeach()

   if(libs)
-
-    if(${type} STREQUAL "STATIC")
-        merge_static_libraries(${TARGET} ${libs})
-        add_dependencies(${TARGET} ${libs})
-    else()
       target_link_libraries(${TARGET} PRIVATE ${libs})
-    endif()
-
   endif()

   #
diff -aurN a/cdk/cmake/protobuf.cmake b/cdk/cmake/protobuf.cmake
--- a/cdk/cmake/protobuf.cmake	2018-04-08 15:10:57.000000000 -0400
+++ b/cdk/cmake/protobuf.cmake	2018-04-20 13:43:04.950466261 -0400
@@ -36,142 +36,8 @@
 #  ADD_LIBRARY(target ... ${SRCS})
 #
 
-#
-# Configure Protobuf project in protobuf subfolder of build location.
-#
-
-message("Configuring Protobuf build using cmake generator: ${CMAKE_GENERATOR}")
-file(REMOVE ${PROJECT_BINARY_DIR}/protobuf/CMakeCache.txt)
-file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/protobuf)
-
-# If specified, use the same build type for Protobuf
-
-if(CMAKE_BUILD_TYPE)
-  set(set_build_type -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
-endif()
-
-execute_process(
-  COMMAND ${CMAKE_COMMAND}
-          -G "${CMAKE_GENERATOR}"
-          ${set_build_type}
-          -DSTATIC_MSVCRT=${STATIC_MSVCRT}
-          -DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE}
-          -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-          -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-          ${PROJECT_SOURCE_DIR}/protobuf
-  WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/protobuf
-  RESULT_VARIABLE protobuf_config
-)
-
-if(protobuf_config)
-  message(FATAL_ERROR "Could not configure Protobuf build: ${protobuf_config}")
-endif()
-
-include(${PROJECT_BINARY_DIR}/protobuf/exports.cmake)
-
-#
-# Protobuf library targets imported above (pb_protobuf
-# and pb_protobuf-lite) are local to the directory from which
-# they were imported. This is not good if cdk is used as
-# a sub-project of a parent project, because the parent project
-# must have access to these targets.
-#
-# For that reason blow we create global protobuf/protobuf-lite targets
-# and copy their loactions from the imported targets.
-#
-
-add_library(protobuf STATIC IMPORTED GLOBAL)
-add_library(protobuf-lite STATIC IMPORTED GLOBAL)
-
-foreach(lib protobuf protobuf-lite)
-  #message("processing: ${lib}")
-
-   foreach(CONF NOCONFIG DEBUG RELEASE MINSIZEREL RELWITHDEBINFO)
-    #message("- CONF: ${CONF}")
-
-    get_target_property(LOC pb_${lib} IMPORTED_LOCATION_${CONF})
-    if(LOC)
-      #message("- settig imported location to: ${LOC}")
-      set(location "${LOC}")
-      set_target_properties(${lib} PROPERTIES
-        IMPORTED_LOCATION_${CONF} "${LOC}"
-      )
-      set_property(TARGET ${lib} APPEND PROPERTY
-        IMPORTED_CONFIGURATIONS ${CONF})
-    endif()
-
-  endforeach(CONF)
-
-  # For multi-configuration builders like MSVC, set a generic
-  # location of the form <prefix>/$(Configuration)/<name> which will
-  # work with any configuration choosen at build time.
-  # It is constructed from one of per-configurartion locations
-  # determined above and saved in ${location}. The logic assumes
-  # that the per-configration location is of the form
-  # <prefix>/<config>/<name>
-
-  if(CMAKE_CONFIGURATION_TYPES)
-
-    get_filename_component(name "${location}" NAME)
-    get_filename_component(LOC "${location}" PATH)
-    get_filename_component(LOC "${LOC}" PATH)
-    set(LOC "${LOC}/$(Configuration)/${name}")
-
-    message("- setting generic location to: ${LOC}")
-    set_target_properties(${lib} PROPERTIES
-      IMPORTED_LOCATION "${LOC}"
-    )
-
-  endif()
-
-endforeach(lib)
-
-
-# protobuf depends on protobuf-lite
-
-set_target_properties(protobuf PROPERTIES
-  INTERFACE_LINK_LIBRARIES "protobuf-lite"
-)
-
-
-message("Protobuf include path: ${PROTOBUF_INCLUDE_DIR}")
-
-set(PROTOBUF_INCLUDE_DIRS ${PROTOBUF_INCLUDE_DIR}
-    CACHE INTERNAL "Protobuf include path" FORCE)
-set(PROTOBUF_PROTOC_EXECUTABLE pb_protoc
-    CACHE INTERNAL "Protobuf compiler" FORCE)
-
-#
-# Custom target build_protobuf ensures that Protobuf project is built.
-#
-# Note: this depends on Protobuf project generating the stamp file
-#
-
-if(NOT DEFINED PROTOBUF_BUILD_STAMP)
-  message(FATAL_ERROR "Protobuf build stamp file not defined")
-endif()
-
-if(CMAKE_VERSION VERSION_LESS 3.0)
-  add_custom_command(OUTPUT ${PROTOBUF_BUILD_STAMP}
-    COMMAND ${CMAKE_COMMAND} --build . --config $<CONFIGURATION>
-    WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/protobuf
-    COMMENT "Building protobuf using configuration: $<CONFIGURATION>"
-  )
-else()
-  add_custom_command(OUTPUT ${PROTOBUF_BUILD_STAMP}
-    COMMAND ${CMAKE_COMMAND} --build . --config $<CONFIG>
-    WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/protobuf
-    COMMENT "Building protobuf using configuration: $<CONFIG>"
-  )
-endif()
-
-add_custom_target(build_protobuf
-  DEPENDS ${PROTOBUF_BUILD_STAMP}
-)
-
-add_dependencies(protobuf build_protobuf)
-add_dependencies(protobuf-lite build_protobuf)
-add_dependencies(pb_protoc build_protobuf)
+#SET(Protobuf_USE_STATIC_LIBS ON)
+find_package(Protobuf REQUIRED)
 
 #
 #  Choice between full and lite version of the library.
diff -aurN a/cdk/protocol/mysqlx/crud.cc b/cdk/protocol/mysqlx/crud.cc
--- a/cdk/protocol/mysqlx/crud.cc	2018-04-08 15:10:57.000000000 -0400
+++ b/cdk/protocol/mysqlx/crud.cc	2018-04-20 11:22:22.398040489 -0400
@@ -295,7 +295,7 @@
 class Placeholder_conv_imp
     : public Args_conv
 {
-  map<string, unsigned> m_map;
+  std::map<string, unsigned> m_map;
 
 public:
 
@@ -303,7 +303,7 @@
 
   unsigned conv_placeholder(const string &name)
   {
-    map<string, unsigned>::const_iterator it = m_map.find(name);
+    std::map<string, unsigned>::const_iterator it = m_map.find(name);
     if (it == m_map.end())
       throw_error("Placeholder converter: Placeholder was not defined on args");
       //throw Generic_error((boost::format("Placeholder %s was not defined on args.")
@@ -314,7 +314,7 @@
 
   void add_placeholder(const string &name)
   {
-    map<string, unsigned>::const_iterator it = m_map.find(name);
+    std::map<string, unsigned>::const_iterator it = m_map.find(name);
     if (it != m_map.end())
       throw_error("Placeholder converter: Redefined placeholder");
       //throw Generic_error((boost::format("Redifined placeholder %s.")
diff -aurN a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt	2018-04-20 14:15:00.546645410 -0400
+++ b/CMakeLists.txt	2018-04-20 13:26:16.888470928 -0400
@@ -529,7 +529,7 @@
 
 
 install(TARGETS connector
-  CONFIGURATIONS Release RelWithDebInfo
+  CONFIGURATIONS Release RelWithDebInfo Gentoo
   ARCHIVE DESTINATION "${INSTALL_LIB_DIR_STATIC}"
   RUNTIME DESTINATION "${INSTALL_LIB_DIR}"
   LIBRARY DESTINATION "${INSTALL_LIB_DIR}"
@@ -576,6 +576,12 @@
 SET_INTERFACE_OPTIONS(try devapi)
 #  ADD_GCOV(try)
 
+IF(WITH_SSL STREQUAL "system")
+  find_package(OpenSSL REQUIRED)
+  TARGET_LINK_LIBRARIES(try ${OPENSSL_LIBRARIES})
+ENDIF()
+
+
 if(WITH_JDBC)
 
   add_executable(try_jdbc try_jdbc.cc)
--- a/jdbc.cmake	2018-04-08 15:10:57.000000000 -0400
+++ b/jdbc.cmake	2018-04-20 15:03:38.683674143 -0400
@@ -20,7 +20,7 @@
 # Configure legacy connector build environment in ${JDBC_DIR}
 #
 
-list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=ON)
+list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=OFF)
 
 if(CMAKE_BUILD_TYPE)
   list(APPEND jdbc_cmake_opts -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
--- /var/tmp/portage/dev-db/mysql-connector-c++-8.0.11/work/mysql-connector-c++-8.0.11-src/jdbc/FindMySQL.cmake	2018-02-23 05:47:56.000000000 -0500
+++ mysql-connector-c++-8.0.11-src/jdbc/FindMySQL.cmake	2018-04-20 15:13:42.204665429 -0400
@@ -832,9 +832,11 @@
 IF(NOT WIN32)
 _mysql_conf(MYSQL_COMPILER_VERSION "")
 STRING(REGEX MATCH "Compiler:[a-zA-Z0-9\\. ]+" MYSQL_COMPILER_VERSION ${MYSQL_COMPILER_VERSION})
+IF(MYSQL_COMPILER_VERSION)
 STRING(REGEX REPLACE "Compiler: " "" MYSQL_COMPILER_VERSION ${MYSQL_COMPILER_VERSION})
 STRING(REGEX MATCH "[a-zA-Z0-9]+" MYSQL_COMPILER_ID ${MYSQL_COMPILER_VERSION})
 STRING(REGEX REPLACE "[a-zA-Z0-9]+ " "" MYSQL_COMPILER_VERSION ${MYSQL_COMPILER_VERSION})
+ENDIF(MYSQL_COMPILER_VERSION)
 ENDIF(NOT WIN32)
 
 ##########################################################################