summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2020-04-30 22:42:37 +0200
committerThomas Deutschmann <whissi@gentoo.org>2020-04-30 22:44:57 +0200
commit2a0e2f90800f187b1d183c4a209e2669df171b87 (patch)
treea65f2c349c362204c37c7ad7fe2434255ada2b13 /dev-db
parentdev-db/mysql-connector-c: bump to v8.0.20 (diff)
downloadgentoo-2a0e2f90800f187b1d183c4a209e2669df171b87.tar.gz
gentoo-2a0e2f90800f187b1d183c4a209e2669df171b87.tar.bz2
gentoo-2a0e2f90800f187b1d183c4a209e2669df171b87.zip
dev-db/mysql-connector-c++: bump to v8.0.20
Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/mysql-connector-c++/Manifest1
-rw-r--r--dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.20-fix-libressl-support.patch88
-rw-r--r--dev-db/mysql-connector-c++/mysql-connector-c++-8.0.20.ebuild44
3 files changed, 133 insertions, 0 deletions
diff --git a/dev-db/mysql-connector-c++/Manifest b/dev-db/mysql-connector-c++/Manifest
index 33a459b80f0d..24ff072f74dc 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.12.tar.gz 518615 BLAKE2B 386a4753ca3f03999a49a89507da1b1172b3db89797c38403fee4eea86e7108a5e4f91f24a17de86d585c2a3d9e5742a117fa84d9b14aad649f938a597f3dae9 SHA512 d7e132dbc2efda4a77f8ae00c24006a1ade1d0a50f22d89ece453505e6d206427ee7988df29c0d6ef8b396ad6b8d326b6d263a1d4fa08ef5db0966fb4f1479f4
DIST mysql-connector-c++-8.0.19-src.tar.gz 3137484 BLAKE2B 82a2900b0daa00bcfd72d562818ada25fe15901991a896a46ecdd9304e03066c4e7a3804287540559df1c74dbd1b3983b450ab783ee8cb7f0d7ec152f3cdc6b0 SHA512 5987ae31cda3a5db18ceded201ccbe66263b8ab7665ceacf70af6bb6b99130377b40514b96644b0768fd809b36ee02580520923c11c1edecccc75da15d7bb0bd
+DIST mysql-connector-c++-8.0.20-src.tar.gz 3774428 BLAKE2B a06114432ab21c36fd0b3b91df2382198b2a48871e8e0bfd8c7a94729ed0e29f33599c078c97670fe9d744b13042db52fb89de2294c75eae670a77112d11d251 SHA512 3edb7c3d4ccf218a3f76afcf83a6d233b7accd236c05105ab3f7a6610cfd8809a78c78142c82fb60fb0931d2ae0f0f8fdc3ce9caf5f0cde7ef54067a7e20270b
diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.20-fix-libressl-support.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.20-fix-libressl-support.patch
new file mode 100644
index 000000000000..f2ae0d02ed7f
--- /dev/null
+++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.20-fix-libressl-support.patch
@@ -0,0 +1,88 @@
+--- a/cdk/cmake/DepFindSSL.cmake
++++ b/cdk/cmake/DepFindSSL.cmake
+@@ -88,7 +88,7 @@ function(main)
+
+ set(OPENSSL_LIB_DIR "${OPENSSL_LIB_DIR}" CACHE INTERNAL "")
+
+- if(NOT OPENSSL_VERSION_MAJOR EQUAL 1)
++ if(NOT OPENSSL_VERSION_MAJOR VERSION_GREATER_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}")
+@@ -184,41 +184,35 @@ function(find_openssl)
+
+
+ # Verify version number. Version information looks like:
+- # #define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1a 20 Nov 2018"
++ # #define OPENSSL_VERSION_NUMBER 0x1000103fL
++ # Encoded as MNNFFPPS: major minor fix patch status
+
+ FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
+ OPENSSL_VERSION_NUMBER
+- REGEX "#[ ]*define[\t ]+OPENSSL_VERSION_TEXT"
++ REGEX "^#[ ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
+ )
+
+- #message("== OPENSSL_VERSION_NUMBER: ${OPENSSL_VERSION_NUMBER}")
+- # define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1d-freebsd 10 Sep 2019"
+ STRING(REGEX REPLACE
+- "^.*OPENSSL_VERSION_TEXT[\t ]+\"OpenSSL[\t ]([0-9]+)\\.([0-9]+)\\.([0-9]+)([a-z]|)[\t \\-].*$"
+- "\\1;\\2;\\3;\\4"
+- version_list "${OPENSSL_VERSION_NUMBER}"
++ "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
++ OPENSSL_VERSION_MAJOR "${OPENSSL_VERSION_NUMBER}"
++ )
++ STRING(REGEX REPLACE
++ "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9]([0-9][0-9]).*$" "\\1"
++ OPENSSL_VERSION_MINOR "${OPENSSL_VERSION_NUMBER}"
++ )
++ STRING(REGEX REPLACE
++ "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9]([0-9][0-9]).*$" "\\1"
++ OPENSSL_VERSION_FIX "${OPENSSL_VERSION_NUMBER}"
+ )
+- #message("-- OPENSSL_VERSION: ${version_list}")
+-
+- list(GET version_list 0 OPENSSL_VERSION_MAJOR)
+- math(EXPR OPENSSL_VERSION_MAJOR ${OPENSSL_VERSION_MAJOR})
+-
+- list(GET version_list 1 OPENSSL_VERSION_MINOR)
+- math(EXPR OPENSSL_VERSION_MINOR ${OPENSSL_VERSION_MINOR})
+-
+- list(GET version_list 2 OPENSSL_VERSION_FIX)
+- math(EXPR OPENSSL_VERSION_FIX ${OPENSSL_VERSION_FIX})
+-
+- list(GET version_list 3 OPENSSL_VERSION_PATCH)
+-
+
+
+ set(OPENSSL_VERSION
+- "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_FIX}${OPENSSL_VERSION_PATCH}"
++ "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_FIX}"
+ PARENT_SCOPE
+ )
+ set(OPENSSL_VERSION_MAJOR ${OPENSSL_VERSION_MAJOR} PARENT_SCOPE)
+
++ CHECK_SYMBOL_EXISTS(TLS1_3_VERSION "openssl/tls1.h" HAVE_TLS1_3_VERSION)
+
+ find_library(OPENSSL_LIBRARY
+ NAMES ssl ssleay32 ssleay32MD libssl
+--- a/cdk/foundation/connection_openssl.cc
++++ b/cdk/foundation/connection_openssl.cc
+@@ -211,7 +211,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
+@@ -387,7 +387,7 @@ void TLS_helper::setup(SSL_CTX *ctx)
+
+ SSL_CTX_set_cipher_list(ctx, m_cipher_list.c_str());
+
+-#if OPENSSL_VERSION_NUMBER>=0x1010100fL
++#if HAVE_TLS1_3_VERSION
+
+ /*
+ Note: If TLSv1.3 is not enabled, there is no need to restrict
diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.20.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.20.ebuild
new file mode 100644
index 000000000000..fcacc48a0540
--- /dev/null
+++ b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.20.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+inherit cmake-utils
+
+DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)"
+HOMEPAGE="https://dev.mysql.com/downloads/connector/cpp/"
+URI_DIR="Connector-C++"
+SRC_URI="https://dev.mysql.com/get/Downloads/${URI_DIR}/${P}-src.tar.gz"
+
+LICENSE="Artistic GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="+legacy libressl"
+
+RDEPEND="
+ dev-libs/protobuf:=
+ legacy? (
+ dev-libs/boost:=
+ >=dev-db/mysql-connector-c-6.1.8:=
+ )
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )"
+DEPEND="${RDEPEND}"
+S="${WORKDIR}/${P}-src"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-8.0.19-fix-build.patch
+ "${FILESDIR}"/${PN}-8.0.20-fix-libressl-support.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DWITH_SSL=system
+ -DWITH_JDBC=$(usex legacy ON OFF)
+ $(usex legacy '-DMYSQLCLIENT_STATIC_BINDING=0' '')
+ $(usex legacy '-DMYSQLCLIENT_STATIC_LINKING=0' '')
+ )
+
+ cmake-utils_src_configure
+}