gentoo/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.27-r1.ebuild
Hans de Graaff 75c4fa458e
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>
2022-10-17 07:32:33 +02:00

46 lines
1.0 KiB
Bash

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