forked from hasufell/hasufell-repository
dev-db/mysql-connector-c++: bump to 8.0.12
This commit is contained in:
parent
7f8f3b9f69
commit
d127f94a28
@ -0,0 +1,46 @@
|
||||
From 4f94810a75ba89936c0b67ace13ff0e171f3649e Mon Sep 17 00:00:00 2001
|
||||
From: Julian Ospald <hasufell@posteo.de>
|
||||
Date: Sun, 16 Sep 2018 19:13:05 +0800
|
||||
Subject: [PATCH 1/2] Fix build with LibreSSL
|
||||
|
||||
This check is useless. If the library depends on specific
|
||||
features of SSL, it must check for those. Checking for
|
||||
version is not reliable and breaks LibreSSL compatibility.
|
||||
---
|
||||
cdk/cmake/ssl.cmake | 6 +-----
|
||||
cdk/foundation/connection_openssl.cc | 2 +-
|
||||
2 files changed, 2 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/cdk/cmake/ssl.cmake b/cdk/cmake/ssl.cmake
|
||||
index 494f0fe..1e7adca 100644
|
||||
--- a/cdk/cmake/ssl.cmake
|
||||
+++ b/cdk/cmake/ssl.cmake
|
||||
@@ -251,11 +251,7 @@ function(MYSQL_CHECK_SSL)
|
||||
return()
|
||||
endif()
|
||||
|
||||
- if(NOT OPENSSL_VERSION_MAJOR EQUAL 1)
|
||||
- message(SEND_ERROR "OpenSSL version 1.x is required but version ${OPENSSL_VERSION} was found")
|
||||
- else()
|
||||
- message(STATUS "Using OpenSSL version: ${OPENSSL_VERSION}")
|
||||
- endif()
|
||||
+ message(STATUS "Using OpenSSL version: ${OPENSSL_VERSION}")
|
||||
|
||||
#
|
||||
# We assume that FindOpenSSL finds 2 libraries in this order.
|
||||
diff --git a/cdk/foundation/connection_openssl.cc b/cdk/foundation/connection_openssl.cc
|
||||
index f7fe28c..200d710 100644
|
||||
--- a/cdk/foundation/connection_openssl.cc
|
||||
+++ b/cdk/foundation/connection_openssl.cc
|
||||
@@ -188,7 +188,7 @@ static void throw_ssl_error(SSL* tls, int err)
|
||||
case SSL_ERROR_WANT_CONNECT:
|
||||
case SSL_ERROR_WANT_ACCEPT:
|
||||
case SSL_ERROR_WANT_X509_LOOKUP:
|
||||
-# if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
+# if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
case SSL_ERROR_WANT_ASYNC:
|
||||
case SSL_ERROR_WANT_ASYNC_JOB:
|
||||
# endif
|
||||
--
|
||||
2.19.0
|
||||
|
@ -0,0 +1,25 @@
|
||||
From 3594a934f7f142efeadaea41ee5be53983795899 Mon Sep 17 00:00:00 2001
|
||||
From: Julian Ospald <hasufell@posteo.de>
|
||||
Date: Sun, 16 Sep 2018 19:47:03 +0800
|
||||
Subject: [PATCH 2/2] Don't call ar directly, use CMAKE_AR
|
||||
|
||||
---
|
||||
cdk/cmake/libutils/merge_archives.cmake.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/cdk/cmake/libutils/merge_archives.cmake.in b/cdk/cmake/libutils/merge_archives.cmake.in
|
||||
index fc58df4..e56c4b4 100644
|
||||
--- a/cdk/cmake/libutils/merge_archives.cmake.in
|
||||
+++ b/cdk/cmake/libutils/merge_archives.cmake.in
|
||||
@@ -101,7 +101,7 @@ else()
|
||||
# extract object from the library ...
|
||||
|
||||
execute_process(
|
||||
- COMMAND ar x ../lib.a ${obj}
|
||||
+ COMMAND ${CMAKE_AR} x ../lib.a ${obj}
|
||||
WORKING_DIRECTORY ${MERGELIBS_DIR}/${lib}/objs
|
||||
)
|
||||
|
||||
--
|
||||
2.19.0
|
||||
|
@ -1,11 +1,13 @@
|
||||
# Copyright 2017 Julian Ospald <hasufell@posteo.de>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
CMAKE_SOURCE=${WORK}-src
|
||||
|
||||
require cmake [ api=2 ]
|
||||
|
||||
SUMMARY="MySQL database connector for C++ (mimics JDBC 4.0 API)"
|
||||
HOMEPAGE="http://dev.mysql.com/downloads/connector/cpp/"
|
||||
DOWNLOADS="https://dev.mysql.com/get/Downloads/Connector-C++/${PNV}.tar.gz"
|
||||
DOWNLOADS="https://dev.mysql.com/get/Downloads/Connector-C++/${PNV}-src.tar.gz"
|
||||
|
||||
LICENCES="GPL-2"
|
||||
SLOT="0"
|
||||
@ -25,26 +27,27 @@ DEPENDENCIES="
|
||||
|
||||
BUGS_TO="hasufell@posteo.de"
|
||||
|
||||
DEFAULT_SRC_PREPARE_PATCHES=(
|
||||
"${FILES}"/0001-Fix-build-with-LibreSSL.patch
|
||||
"${FILES}"/0002-Don-t-call-ar-directly-use-CMAKE_AR.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
CMAKE_SRC_CONFIGURE_PARAMS=(
|
||||
-DINSTALL_DOCS="/usr/share/doc/${PNVR}"
|
||||
-DMYSQLCPPCONN_BUILD_EXAMPLES=OFF
|
||||
-DMYSQLCPPCONN_ICU_ENABLE=OFF
|
||||
-DMYSQL_CXX_LINKAGE=0
|
||||
-DMYSQL_INCLUDE_DIR="$(mysql_config --variable=pkgincludedir)"
|
||||
-DUSE_MYSQLCPPCONN_GCOV_ENABLE=OFF
|
||||
-DUSE_MYSQLCPPCONN_TRACE_ENABLE=OFF
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DINSTALL_DOC_DIR="/usr/share/doc/${PNVR}"
|
||||
-DINSTALL_LIB_DIR="lib"
|
||||
-DWITH_JDBC=ON
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
edo sed -i \
|
||||
-e '/ADD_SUBDIRECTORY(test/d' \
|
||||
-e 's#DOC_DESTINATION "."#DOC_DESTINATION ${INSTALL_DOCS}#' \
|
||||
"${CMAKE_SOURCE}"/CMakeLists.txt
|
||||
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
edo rm "${IMAGE}"/usr/$(exhost --target)/BUILDINFO.txt
|
||||
}
|
Loading…
Reference in New Issue
Block a user