From f54a845b495a1b1eaf1e8e8694e60e809231dfa4 Mon Sep 17 00:00:00 2001 From: Jan-Espen Oversand Date: Mon, 5 Jan 2026 17:21:45 +0100 Subject: [PATCH 1/3] dev-db/soci: fix relying on backend auto magic Parameters SOCI_* disables/enables backends. This is straight forward for most of the backends. The mysql backend can either use mysql-connector-c or mariadb-connector-c. Which one of them is decided by the find_package mysql script provided by upstream. That does not work since we need to respect the use flags by the user and declare a dependency to the correct connector. Most of the complexity of this is due to mysql/mariadb and that is solved by providing a FindMySQL.cmake that takes parameters for mysql libs and headers. The cmake scripts do not call find_package for disabled backends, passing CMAKE_DISABLE_FIND_PACKAGE_*=TRUE in addition to SOCI_*=off will therefore produce cmake warnings. Signed-off-by: Jan-Espen Oversand Closes: https://bugs.gentoo.org/968287 Part-of: https://github.com/gentoo/gentoo/pull/45248 Closes: https://github.com/gentoo/gentoo/pull/45248 Signed-off-by: Kenton Groombridge --- dev-db/soci/files/FindMySQL.cmake | 8 ++++ dev-db/soci/metadata.xml | 3 ++ dev-db/soci/soci-4.1.2-r1.ebuild | 47 ------------------ dev-db/soci/soci-4.1.2-r2.ebuild | 79 +++++++++++++++++++++++++++++++ 4 files changed, 90 insertions(+), 47 deletions(-) create mode 100644 dev-db/soci/files/FindMySQL.cmake delete mode 100644 dev-db/soci/soci-4.1.2-r1.ebuild create mode 100644 dev-db/soci/soci-4.1.2-r2.ebuild diff --git a/dev-db/soci/files/FindMySQL.cmake b/dev-db/soci/files/FindMySQL.cmake new file mode 100644 index 0000000000000..7860c9f8b1258 --- /dev/null +++ b/dev-db/soci/files/FindMySQL.cmake @@ -0,0 +1,8 @@ +if (NOT TARGET MySQL::MySQL) + set(MySQL_FOUND TRUE) + add_library(MySQL INTERFACE) + target_link_libraries(MySQL INTERFACE ${MySQL_LIBRARIES}) + target_include_directories(MySQL SYSTEM INTERFACE ${MySQL_INCLUDE_DIRS}) + add_library(MySQL::MySQL ALIAS MySQL) +endif() + diff --git a/dev-db/soci/metadata.xml b/dev-db/soci/metadata.xml index 952ddbea1f666..a350429393134 100644 --- a/dev-db/soci/metadata.xml +++ b/dev-db/soci/metadata.xml @@ -16,4 +16,7 @@ soci + + Enable mysql plugin with dev-db/mariadb-connector-c as the client library + diff --git a/dev-db/soci/soci-4.1.2-r1.ebuild b/dev-db/soci/soci-4.1.2-r1.ebuild deleted file mode 100644 index 59941ec9120a1..0000000000000 --- a/dev-db/soci/soci-4.1.2-r1.ebuild +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 2024-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit cmake - -DESCRIPTION="SOCI - The C++ Database Access Library" -HOMEPAGE="https://sourceforge.net/projects/soci/" -SRC_URI="https://sourceforge.net/projects/soci/files/soci/${P}/${P}.tar.gz/download -> ${P}.tar.gz" - -LICENSE="Boost-1.0" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" -IUSE="mysql odbc oracle postgres sqlite static-libs test" -RESTRICT="!test? ( test )" - -CMAKE_SKIP_TESTS=( - soci_odbc_test_mssql - soci_odbc_test_mssql_static - soci_odbc_test_mysql - soci_odbc_test_mysql_static - soci_odbc_test_postgresql - soci_odbc_test_postgresql_static - soci_postgresql_test - soci_postgresql_test_static - soci_mysql_test - soci_mysql_test_static -) - -RDEPEND=" - >=dev-libs/boost-1.85.0-r1 - mysql? ( dev-db/mysql:* ) - odbc? ( dev-db/unixODBC ) - oracle? ( dev-db/oracle-instantclient:=[sdk] ) - postgres? ( dev-db/postgresql:= ) - sqlite? ( dev-db/sqlite ) -" -DEPEND="${RDEPEND}" - -src_configure() { - local mycmakeargs=( - -DSOCI_STATIC="$(usex static-libs)" - -DSOCI_TESTS="$(usex test)" - ) - cmake_src_configure -} diff --git a/dev-db/soci/soci-4.1.2-r2.ebuild b/dev-db/soci/soci-4.1.2-r2.ebuild new file mode 100644 index 0000000000000..43c6c2bb66f5a --- /dev/null +++ b/dev-db/soci/soci-4.1.2-r2.ebuild @@ -0,0 +1,79 @@ +# Copyright 2024-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake toolchain-funcs + +DESCRIPTION="SOCI - The C++ Database Access Library" +HOMEPAGE="https://sourceforge.net/projects/soci/" +SRC_URI="https://sourceforge.net/projects/soci/files/soci/${P}/${P}.tar.gz/download -> ${P}.tar.gz" + +LICENSE="Boost-1.0" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" +IUSE="mariadb mysql odbc oracle postgres sqlite test" +REQUIRED_USE="?? ( mysql mariadb )" +RESTRICT="!test? ( test )" + +CMAKE_SKIP_TESTS=( + soci_odbc_test_mssql + soci_odbc_test_mssql_static + soci_odbc_test_mysql + soci_odbc_test_mysql_static + soci_odbc_test_postgresql + soci_odbc_test_postgresql_static + soci_postgresql_test + soci_postgresql_test_static + soci_mysql_test + soci_mysql_test_static +) + +RDEPEND=" + >=dev-libs/boost-1.85.0-r1:= + mysql? ( dev-db/mysql-connector-c:0= ) + mariadb? ( dev-db/mariadb-connector-c:0= ) + odbc? ( dev-db/unixODBC ) + oracle? ( dev-db/oracle-instantclient:=[sdk] ) + postgres? ( dev-db/postgresql:= ) + sqlite? ( dev-db/sqlite ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + virtual/pkgconfig +" + +src_prepare() { + cmake_src_prepare + cp "${FILESDIR}/FindMySQL.cmake" "cmake/find_modules" || die +} + +src_configure() { + local mysql_backend_driver="$(usex mysql 'mysqlclient' "$(usev mariadb 'libmariadb')")" + local mysql_backend_cmake_args=( + ) + if [[ -n "$mysql_backend_driver" ]]; then + local mysql_backend_include="$($(tc-getPKG_CONFIG) --cflags-only-I $mysql_backend_driver)" + local mysql_backend_libs="$($(tc-getPKG_CONFIG) --libs $mysql_backend_driver)" + if [[ -z "$mysql_backend_include" ]] || [[ -z "$mysql_backend_libs" ]]; then + die + fi + mysql_backend_cmake_args=( + -DMySQL_INCLUDE_DIRS="$(echo "$mysql_backend_include" | sed -e 's/-I//')" + -DMySQL_LIBRARIES="$mysql_backend_libs" + ) + fi + local mycmakeargs=( + -DSOCI_STATIC=OFF + -DSOCI_TESTS="$(usex test)" + -DSOCI_DB2=OFF + -DSOCI_FIREBIRD=OFF + -DSOCI_MYSQL="$(usex mysql 'yes' $(usex mariadb))" + -DSOCI_ODBC="$(usex odbc)" + -DSOCI_ORACLE="$(usex oracle)" + -DSOCI_POSTGRESQL="$(usex postgres)" + -DSOCI_SQLITE3="$(usex sqlite)" + "${mysql_backend_cmake_args[@]}" + ) + cmake_src_configure +} From 557080dcd215b59c6b2249f0792957b63539bd43 Mon Sep 17 00:00:00 2001 From: Kenton Groombridge Date: Tue, 6 Jan 2026 13:12:00 -0500 Subject: [PATCH 2/3] net-voip/murmur: depend on soci>=4.1.2-r2 Avoid possible configure errors by depending on -r2. Previously soci would rely on automagic dependencies for its backends, but many of these were mistakenly enabled by default. If then murmur/mumble is built against soci, it would try bringing in these backends regardless of whether we want them or not. Closes: https://bugs.gentoo.org/966224 Signed-off-by: Kenton Groombridge --- ...pre20250920-r2.ebuild => murmur-1.6.0_pre20250920-r3.ebuild} | 2 +- net-voip/murmur/murmur-9999.ebuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename net-voip/murmur/{murmur-1.6.0_pre20250920-r2.ebuild => murmur-1.6.0_pre20250920-r3.ebuild} (99%) diff --git a/net-voip/murmur/murmur-1.6.0_pre20250920-r2.ebuild b/net-voip/murmur/murmur-1.6.0_pre20250920-r3.ebuild similarity index 99% rename from net-voip/murmur/murmur-1.6.0_pre20250920-r2.ebuild rename to net-voip/murmur/murmur-1.6.0_pre20250920-r3.ebuild index d7b202d14c942..0628581b280ad 100644 --- a/net-voip/murmur/murmur-1.6.0_pre20250920-r2.ebuild +++ b/net-voip/murmur/murmur-1.6.0_pre20250920-r3.ebuild @@ -49,7 +49,7 @@ RDEPEND=" acct-user/murmur dev-cpp/cli11 dev-cpp/nlohmann_json - >=dev-db/soci-4.1.0[mysql?,postgres?,sqlite?] + >=dev-db/soci-4.1.2-r2[mysql?,postgres?,sqlite?] >=dev-libs/openssl-1.0.0b:0= >=dev-libs/protobuf-2.2.0:= dev-libs/spdlog:= diff --git a/net-voip/murmur/murmur-9999.ebuild b/net-voip/murmur/murmur-9999.ebuild index d7b202d14c942..0628581b280ad 100644 --- a/net-voip/murmur/murmur-9999.ebuild +++ b/net-voip/murmur/murmur-9999.ebuild @@ -49,7 +49,7 @@ RDEPEND=" acct-user/murmur dev-cpp/cli11 dev-cpp/nlohmann_json - >=dev-db/soci-4.1.0[mysql?,postgres?,sqlite?] + >=dev-db/soci-4.1.2-r2[mysql?,postgres?,sqlite?] >=dev-libs/openssl-1.0.0b:0= >=dev-libs/protobuf-2.2.0:= dev-libs/spdlog:= From 4e39784c04617eb713dded8187f3bdc778a4be53 Mon Sep 17 00:00:00 2001 From: Kenton Groombridge Date: Tue, 6 Jan 2026 13:15:45 -0500 Subject: [PATCH 3/3] net-voip/mumble: depend on soci>=4.1.2-r2 Avoid possible configure errors by depending on -r2. Previously soci would rely on automagic dependencies for its backends, but many of these were mistakenly enabled by default. If then murmur/mumble is built against soci, it would try bringing in these backends regardless of whether we want them or not. Closes: https://bugs.gentoo.org/967184 Signed-off-by: Kenton Groombridge --- ...e20250920-r1.ebuild => mumble-1.6.0_pre20250920-r2.ebuild} | 4 ++-- net-voip/mumble/mumble-9999.ebuild | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename net-voip/mumble/{mumble-1.6.0_pre20250920-r1.ebuild => mumble-1.6.0_pre20250920-r2.ebuild} (98%) diff --git a/net-voip/mumble/mumble-1.6.0_pre20250920-r1.ebuild b/net-voip/mumble/mumble-1.6.0_pre20250920-r2.ebuild similarity index 98% rename from net-voip/mumble/mumble-1.6.0_pre20250920-r1.ebuild rename to net-voip/mumble/mumble-1.6.0_pre20250920-r2.ebuild index d46c83867cf43..a4559593b9144 100644 --- a/net-voip/mumble/mumble-1.6.0_pre20250920-r1.ebuild +++ b/net-voip/mumble/mumble-1.6.0_pre20250920-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -44,7 +44,7 @@ RESTRICT="!test? ( test )" RDEPEND=" dev-cpp/cli11 - >=dev-db/soci-4.1.0[sqlite] + >=dev-db/soci-4.1.2-r2[sqlite] >=dev-libs/openssl-1.0.0b:0= dev-libs/poco:=[util,xml,zip] >=dev-libs/protobuf-2.2.0:= diff --git a/net-voip/mumble/mumble-9999.ebuild b/net-voip/mumble/mumble-9999.ebuild index d46c83867cf43..a4559593b9144 100644 --- a/net-voip/mumble/mumble-9999.ebuild +++ b/net-voip/mumble/mumble-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -44,7 +44,7 @@ RESTRICT="!test? ( test )" RDEPEND=" dev-cpp/cli11 - >=dev-db/soci-4.1.0[sqlite] + >=dev-db/soci-4.1.2-r2[sqlite] >=dev-libs/openssl-1.0.0b:0= dev-libs/poco:=[util,xml,zip] >=dev-libs/protobuf-2.2.0:=