Merge updates from master

This commit is contained in:
Repository mirror & CI
2026-01-06 18:30:49 +00:00
8 changed files with 96 additions and 53 deletions

View File

@@ -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()

View File

@@ -16,4 +16,7 @@
<upstream>
<remote-id type="sourceforge">soci</remote-id>
</upstream>
<use>
<flag name="mariadb">Enable mysql plugin with <pkg>dev-db/mariadb-connector-c</pkg> as the client library</flag>
</use>
</pkgmetadata>

View File

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

View File

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

View File

@@ -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:=

View File

@@ -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:=

View File

@@ -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:=

View File

@@ -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:=