public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Hans de Graaff" <graaff@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c++/files/, dev-db/mysql-connector-c++/
Date: Mon, 17 Oct 2022 05:32:50 +0000 (UTC)	[thread overview]
Message-ID: <1665984753.75c4fa458ee594581dc4ecff5f1423db75ed2716.graaff@gentoo> (raw)

commit:     75c4fa458ee594581dc4ecff5f1423db75ed2716
Author:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 17 05:30:01 2022 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Mon Oct 17 05:32:33 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75c4fa45

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 <AT> gentoo.org>

 .../mysql-connector-c++-8.0.27-mysqlclient_r.patch | 24 ++++++++++++
 .../mysql-connector-c++-8.0.27-r1.ebuild           | 45 ++++++++++++++++++++++
 2 files changed, 69 insertions(+)

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
+}


             reply	other threads:[~2022-10-17  5:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-17  5:32 Hans de Graaff [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-10  0:22 [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c++/files/, dev-db/mysql-connector-c++/ Sam James
2023-10-17 15:00 Hans de Graaff
2022-03-03 21:22 David Seifert
2021-04-28 13:20 Thomas Deutschmann
2020-10-20 18:56 Thomas Deutschmann
2017-01-27 13:49 Brian Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1665984753.75c4fa458ee594581dc4ecff5f1423db75ed2716.graaff@gentoo \
    --to=graaff@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox