mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-22 23:07:10 -08:00
dev-db/mariadb-connector-c: add 3.3.15
- The sed for -Werror is no longer needed - Rework sed for test skipping - Skip few more tests, two are related to --skip-grant-tables, bug #905412 and bug #927643, one might be related to domain socket - Migrate to tc-ld-force-bfd - It is no longer necessary to filter LTO, the package builds fine with it, bug #855233 - The zstd patch is no longer applied, zstd.so is a client plugin, therefore it belongs to this package but it should not be installed by dev-db/mariadb. This was corrected in dev-db/mariadb-1.4.7-r1, older versions are weak blocked. Bug: https://bugs.gentoo.org/855233 Bug: https://bugs.gentoo.org/905412 Bug: https://bugs.gentoo.org/927643 Signed-off-by: Petr Vaněk <arkamar@gentoo.org>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST mariadb-connector-c-3.3.15-src.tar.gz 1404442 BLAKE2B 0df65d59a9d65ab9d10363ae380eece94ebaf84bee25815a526a26e358865f27244b3b5f0b773f1facdcdac70c4c5ccb2c79b3b2bbbfa4823a15d87d85dd36c3 SHA512 3ef6476ece33585134c52d31aaa83191f9171ff9ef0e11064aabbd8ce0bdad798fb0bcd2ca049b0b6c61c1eecf48e5e9f0ab54981e16ca419ac11480810de1e8
|
||||
DIST mariadb-connector-c-3.3.8-src.tar.gz 1393368 BLAKE2B 09a8a310f97809f0b0396770a77d4512fe1124de263e2077e5a14a2fa1fbc59d7e35a09d97b0471b687943fc9ce06925507e4b950fdacfdc7ca04ea5ee56bf9e SHA512 d2630bda8deb28696842a6b5dd308060a8b9a83a04dfb3ed908387f53af4108510c6f536aaecc4a3c9a035c7be91b98229d6c480366a3579b6be2c5a8d85ff56
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
if [[ ${PV} == 9999 ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/MariaDB/mariadb-connector-c.git"
|
||||
else
|
||||
MY_PN=${PN#mariadb-}
|
||||
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"
|
||||
fi
|
||||
|
||||
inherit cmake-multilib flag-o-matic toolchain-funcs
|
||||
|
||||
DESCRIPTION="C client library for MariaDB/MySQL"
|
||||
HOMEPAGE="https://mariadb.org/"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0/3"
|
||||
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}] )
|
||||
kerberos? (
|
||||
|| (
|
||||
app-crypt/mit-krb5[${MULTILIB_USEDEP}]
|
||||
app-crypt/heimdal[${MULTILIB_USEDEP}]
|
||||
)
|
||||
)
|
||||
ssl? (
|
||||
gnutls? ( >=net-libs/gnutls-3.3.24:=[${MULTILIB_USEDEP}] )
|
||||
!gnutls? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] )
|
||||
)
|
||||
"
|
||||
BDEPEND="test? ( dev-db/mariadb[server] )"
|
||||
RDEPEND="${DEPEND}
|
||||
!<dev-db/mariadb-11.4.7-r1
|
||||
"
|
||||
|
||||
MULTILIB_CHOST_TOOLS=( /usr/bin/mariadb_config )
|
||||
MULTILIB_WRAPPED_HEADERS+=( /usr/include/mariadb/mariadb_version.h )
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-3.1.3-fix-pkconfig-file.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
local sedargs=(
|
||||
# These tests the remote_io plugin which requires network access
|
||||
-e '/{"test_remote1/s:{://&:'
|
||||
|
||||
# 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:{://&:'
|
||||
|
||||
# [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:{://&:'
|
||||
|
||||
# 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-is-gold && tc-ld-force-bfd
|
||||
|
||||
# bug #943757
|
||||
append-cflags -std=gnu17
|
||||
|
||||
cmake-multilib_src_configure
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DWITH_EXTERNAL_ZLIB=ON
|
||||
-DWITH_SSL:STRING=$(usex ssl $(usex gnutls GNUTLS OPENSSL) OFF)
|
||||
-DWITH_CURL=$(usex curl)
|
||||
-DWITH_ICONV=ON
|
||||
-DCLIENT_PLUGIN_AUTH_GSSAPI_CLIENT:STRING=$(usex kerberos DYNAMIC OFF)
|
||||
-DMARIADB_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
|
||||
-DINSTALL_LIBDIR="$(get_libdir)"
|
||||
-DINSTALL_MANDIR=share/man
|
||||
-DINSTALL_PCDIR="$(get_libdir)/pkgconfig"
|
||||
-DINSTALL_PLUGINDIR="$(get_libdir)/mariadb/plugin"
|
||||
-DINSTALL_BINDIR=bin
|
||||
-DWITH_UNIT_TESTS=$(usex test)
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
mkdir -vp "${T}/mysql/data" || die
|
||||
|
||||
mysql_install_db --no-defaults --datadir="${T}/mysql/data" || die
|
||||
mysqld --no-defaults --datadir="${T}/mysql/data" --socket="${T}/mysql/mysql.sock" --skip-grant-tables --skip-networking &
|
||||
|
||||
local attempts=0
|
||||
while ! mysqladmin ping --socket="${T}/mysql/mysql.sock" --silent ; do
|
||||
# 5 minutes should be more than enough
|
||||
if [[ ${attempts} -gt 300 ]] ; then
|
||||
die "mysqld not found after 300 seconds, aborting"
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
attempts=$((attempts + 1))
|
||||
done
|
||||
|
||||
cd unittest/libmariadb || die
|
||||
MYSQL_TEST_SOCKET="${T}/mysql/mysql.sock" MARIADB_CC_TEST=1 ctest --verbose || die
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
if ! use static-libs ; then
|
||||
find "${ED}" -name "*.a" -delete || die
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user