diff options
author | Hans de Graaff <graaff@gentoo.org> | 2022-10-17 07:30:01 +0200 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2022-10-17 07:32:33 +0200 |
commit | 75c4fa458ee594581dc4ecff5f1423db75ed2716 (patch) | |
tree | 714eed46d53f2482f120b8c21afaf0d0f1e251b0 /dev-db | |
parent | dev-python/vine: Enable py3.11 (diff) | |
download | gentoo-75c4fa458ee594581dc4ecff5f1423db75ed2716.tar.gz gentoo-75c4fa458ee594581dc4ecff5f1423db75ed2716.tar.bz2 gentoo-75c4fa458ee594581dc4ecff5f1423db75ed2716.zip |
dev-db/mysql-connector-c++: fix loading libmysqlclient.so
mysql-workbench would fail with mysql-connector-c++ 8.x because it
would try to load the obsolete libmysqlclient_r library. This version
no longer exists in newer versions of mysql-connector-c. It turns out
that mysql-connector-c++ has hard-coded references to this library
but since we don't install compatibility symlinks this hardcoded
reference will fail.
Closes: https://bugs.gentoo.org/831664
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-db')
-rw-r--r-- | dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.27-mysqlclient_r.patch | 24 | ||||
-rw-r--r-- | dev-db/mysql-connector-c++/mysql-connector-c++-8.0.27-r1.ebuild | 45 |
2 files changed, 69 insertions, 0 deletions
diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.27-mysqlclient_r.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.27-mysqlclient_r.patch new file mode 100644 index 000000000000..d929601f037f --- /dev/null +++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.27-mysqlclient_r.patch @@ -0,0 +1,24 @@ +--- a/jdbc/FindMySQL.cmake 2021-09-10 18:31:29.000000000 +0200 ++++ b/jdbc/FindMySQL.cmake 2022-01-21 07:40:03.224705056 +0100 +@@ -282,8 +282,8 @@ + # there, pick "libmysqlclient" that in 5.5 and up is multithreaded + # anyway (soft link "libmysqlclient_r" is not installed MySQL Server + # 5.6 and Debian/Ubuntu and might go in 5.7 for all installs) +- set(_dynamic_libs "mysqlclient_r" "mysqlclient") +- set(_static_libs "libmysqlclient_r.a" "libmysqlclient.a") ++ set(_dynamic_libs "mysqlclient") ++ set(_static_libs "libmysqlclient.a") + set(_static_lib_ext ".a") + endif() + +--- a/jdbc/driver/nativeapi/libmysql_dynamic_proxy.cpp 2022-01-21 07:52:41.224586087 +0100 ++++ b/jdbc/driver/nativeapi/libmysql_dynamic_proxy.cpp 2022-01-21 07:52:50.168631719 +0100 +@@ -49,7 +49,7 @@ + #elif defined(__hpux) && defined(__hppa) + static const char * const baseName = "libmysqlclient_r.sl"; + #else +-static const char * const baseName = "libmysqlclient_r.so"; ++static const char * const baseName = "libmysqlclient.so"; + #endif + + template<typename FunctionType> diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.27-r1.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.27-r1.ebuild new file mode 100644 index 000000000000..9ca9944b1c86 --- /dev/null +++ b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.27-r1.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +CMAKE_MAKEFILE_GENERATOR=emake +inherit cmake + +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" +# -ppc, -sparc for bug #711940 +KEYWORDS="~amd64 ~arm ~arm64 -ppc ~ppc64 -sparc ~x86" +IUSE="+legacy" + +RDEPEND=" + dev-libs/protobuf:= + legacy? ( + dev-libs/boost:= + >=dev-db/mysql-connector-c-8.0.27:= + ) + dev-libs/openssl:0= + " +DEPEND="${RDEPEND}" +S="${WORKDIR}/${P}-src" + +PATCHES=( + "${FILESDIR}"/${PN}-8.0.27-fix-build.patch + "${FILESDIR}"/${PN}-8.0.27-mysqlclient_r.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_src_configure +} |