diff options
author | Sam James <sam@gentoo.org> | 2024-03-04 04:54:49 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-03-04 04:54:49 +0000 |
commit | 5f6bcf1d1e0af240e48c672ef388110114d90fd4 (patch) | |
tree | 5619476afb984a11943a2cc99d5e6da1e3dea48c /dev-db | |
parent | dev-db/mariadb-connector-c: filter LTO (diff) | |
download | gentoo-5f6bcf1d1e0af240e48c672ef388110114d90fd4.tar.gz gentoo-5f6bcf1d1e0af240e48c672ef388110114d90fd4.tar.bz2 gentoo-5f6bcf1d1e0af240e48c672ef388110114d90fd4.zip |
dev-db/mariadb-connector-c: add 3.3.8
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-db')
-rw-r--r-- | dev-db/mariadb-connector-c/Manifest | 1 | ||||
-rw-r--r-- | dev-db/mariadb-connector-c/mariadb-connector-c-3.3.8.ebuild | 120 | ||||
-rw-r--r-- | dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild | 6 |
3 files changed, 127 insertions, 0 deletions
diff --git a/dev-db/mariadb-connector-c/Manifest b/dev-db/mariadb-connector-c/Manifest index 9439c470d5f0..6333e56ae7a2 100644 --- a/dev-db/mariadb-connector-c/Manifest +++ b/dev-db/mariadb-connector-c/Manifest @@ -1,2 +1,3 @@ DIST mariadb-connector-c-3.2.7-src.tar.gz 1212691 BLAKE2B ae2d1317fdc087c6d64b7cf11f4343bf35662d04da5c693f6f3b45ec405ff0f3d5d03157eb56a9c05cf4e16b9980baffec8800b886ae3d962d22a828a6938671 SHA512 3f0c67c5fd12e889a3704e0a638b64a784f05d12c7c424f7ce64e78a3eb17e2ad588e0e23f0ce037cd49efb695294ab69277da78f02940c2a7ea0676886b9c36 DIST mariadb-connector-c-3.3.4-src.tar.gz 1389030 BLAKE2B 4bee45ee4f76979d36072ab2119042b4de1127a42e99510bd0c1bc5e163fdb4e9b7ca4cce9381ed89e0c733158293d0641c7b7cbd14feaf3257a442c62083e23 SHA512 3a3f20efe58f8458a426501248b154107b76bd2001a43e41923e31568c8419cd88f2379e3636a54118ee64ac160a1c6f68dd79c0ac053fa273d9b6b127410ef6 +DIST mariadb-connector-c-3.3.8-src.tar.gz 1393368 BLAKE2B 09a8a310f97809f0b0396770a77d4512fe1124de263e2077e5a14a2fa1fbc59d7e35a09d97b0471b687943fc9ce06925507e4b950fdacfdc7ca04ea5ee56bf9e SHA512 d2630bda8deb28696842a6b5dd308060a8b9a83a04dfb3ed908387f53af4108510c6f536aaecc4a3c9a035c7be91b98229d6c480366a3579b6be2c5a8d85ff56 diff --git a/dev-db/mariadb-connector-c/mariadb-connector-c-3.3.8.ebuild b/dev-db/mariadb-connector-c/mariadb-connector-c-3.3.8.ebuild new file mode 100644 index 000000000000..c7280c550ded --- /dev/null +++ b/dev-db/mariadb-connector-c/mariadb-connector-c-3.3.8.ebuild @@ -0,0 +1,120 @@ +# Copyright 1999-2024 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 ~ia64 ~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=" + 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}" + +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 + "${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 + + # 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 + 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 + sed -i 's/{"test_default_auth", test_default_auth, TEST_CONNECTION_NONE, 0, NULL, NULL},//g' "unittest/libmariadb/connection.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 + + 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 & + + while ! mysqladmin ping --socket="${T}/mysql/mysql.sock" --silent ; do + sleep 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 +} diff --git a/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild b/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild index 416f40ada533..c7280c550ded 100644 --- a/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild +++ b/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild @@ -47,9 +47,15 @@ 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 + # 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 |