dev-db/mariadb-connector-c: sync live

Signed-off-by: Petr Vaněk <arkamar@gentoo.org>
This commit is contained in:
Petr Vaněk
2025-06-25 11:05:32 +02:00
parent df477769ad
commit c150dfafdb

View File

@@ -11,7 +11,7 @@ else
MY_PV=${PV/_b/-b}
SRC_URI="https://downloads.mariadb.com/Connectors/c/connector-c-${PV}/${P}-src.tar.gz"
S="${WORKDIR%/}/${PN}-${MY_PV}-src"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 x86"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~x86"
fi
inherit cmake-multilib flag-o-matic toolchain-funcs
@@ -25,6 +25,7 @@ IUSE="+curl gnutls kerberos +ssl static-libs test"
RESTRICT="!test? ( test )"
DEPEND="
app-arch/zstd:=[${MULTILIB_USEDEP}]
sys-libs/zlib:=[${MULTILIB_USEDEP}]
virtual/libiconv:=[${MULTILIB_USEDEP}]
curl? ( net-misc/curl[${MULTILIB_USEDEP}] )
@@ -47,35 +48,36 @@ MULTILIB_WRAPPED_HEADERS+=( /usr/include/mariadb/mariadb_version.h )
PATCHES=(
"${FILESDIR}"/${PN}-3.1.3-fix-pkconfig-file.patch
"${FILESDIR}"/${PN}-3.3.4-remove-zstd.patch
)
src_prepare() {
# Should be able to drop this once bug #926121 is fixed and
# https://github.com/mariadb-corporation/mariadb-connector-c/commit/395641549ac72bc31def6d8b64e09093336aef72
# is in a release.
sed -i -e '/SET(WARNING_AS_ERROR "-Werror")/d' CMakeLists.txt || die
local sedargs=(
# These tests the remote_io plugin which requires network access
-e '/{"test_remote1/s:{://&:'
# These tests the remote_io plugin which requires network access
sed -i 's/{"test_remote1", test_remote1, TEST_CONNECTION_NEW, 0, NULL, NULL},//g' "unittest/libmariadb/misc.c" || die
# These tests don't work with --skip-grant-tables
-e '/{"test_conc366/s:{://&:'
-e '/{"test_conc544/s:{://&:'
-e '/{"test_conc627/s:{://&:'
-e '/{"test_conc66/s:{://&:'
# These tests don't work with --skip-grant-tables
sed -i 's/{"test_conc366", test_conc366, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},//g' "unittest/libmariadb/connection.c" || die
sed -i 's/{"test_conc66", test_conc66, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},//g' "unittest/libmariadb/connection.c" || die
# [Warning] Aborted connection 2078 to db: 'test' user: 'root' host: '' (Got an error reading communication packets)
# Not sure about this one - might also require network access
-e '/{"test_default_auth/s:{://&:'
# [Warning] Aborted connection 2078 to db: 'test' user: 'root' host: '' (Got an error reading communication packets)
# Not sure about this one - might also require network access
sed -i 's/{"test_default_auth", test_default_auth, TEST_CONNECTION_NONE, 0, NULL, NULL},//g' "unittest/libmariadb/connection.c" || die
# Not sure about this one eighter. It should fail on connection but it
# does not. Maybe because we use domain socket?
-e '/{"test_conc26/s:{://&:'
)
sed -i "${sedargs[@]}" unittest/libmariadb/{connection,misc,ps_bugs}.c || die
cmake_src_prepare
}
src_configure() {
# mariadb cannot use ld.gold, bug #508724
tc-ld-disable-gold
# bug #855233 (MDEV-11914, MDEV-25633) at least
filter-lto
tc-ld-is-gold && tc-ld-force-bfd
# bug #943757
append-cflags -std=gnu17