summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild')
-rw-r--r--dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild56
1 files changed, 31 insertions, 25 deletions
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 9799342c7442..0660724cbec1 100644
--- a/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild
+++ b/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-if [[ "${PV}" == 9999 ]] ; then
+if [[ ${PV} == 9999 ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/MariaDB/mariadb-connector-c.git"
else
@@ -11,42 +11,41 @@ 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 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
inherit cmake-multilib toolchain-funcs
-MULTILIB_CHOST_TOOLS=( /usr/bin/mariadb_config )
-
-MULTILIB_WRAPPED_HEADERS+=(
- /usr/include/mariadb/mariadb_version.h
-)
-
DESCRIPTION="C client library for MariaDB/MySQL"
HOMEPAGE="https://mariadb.org/"
-LICENSE="LGPL-2.1"
+LICENSE="LGPL-2.1"
SLOT="0/3"
IUSE="+curl gnutls kerberos +ssl static-libs test"
-
RESTRICT="!test? ( test )"
-DEPEND="sys-libs/zlib:=[${MULTILIB_USEDEP}]
+DEPEND="
+ sys-libs/zlib:=[${MULTILIB_USEDEP}]
virtual/libiconv:=[${MULTILIB_USEDEP}]
- curl? ( net-misc/curl:0=[${MULTILIB_USEDEP}] )
- kerberos? ( || ( app-crypt/mit-krb5[${MULTILIB_USEDEP}]
- app-crypt/heimdal[${MULTILIB_USEDEP}] ) )
- ssl? (
- gnutls? ( >=net-libs/gnutls-3.3.24:0=[${MULTILIB_USEDEP}] )
- !gnutls? (
- dev-libs/openssl:0=[${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}"/gentoo-layout-3.0.patch
"${FILESDIR}"/${PN}-3.1.3-fix-pkconfig-file.patch
)
@@ -66,13 +65,13 @@ src_prepare() {
}
multilib_src_configure() {
- # bug 508724 mariadb cannot use ld.gold
+ # mariadb cannot use ld.gold, bug #508724
tc-ld-disable-gold
local mycmakeargs=(
-DWITH_EXTERNAL_ZLIB=ON
-DWITH_SSL:STRING=$(usex ssl $(usex gnutls GNUTLS OPENSSL) OFF)
- -DWITH_CURL=$(usex curl ON 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"
@@ -81,17 +80,24 @@ multilib_src_configure() {
-DINSTALL_PCDIR="$(get_libdir)/pkgconfig"
-DINSTALL_PLUGINDIR="$(get_libdir)/mariadb/plugin"
-DINSTALL_BINDIR=bin
- -DWITH_UNIT_TESTS=$(usex test ON OFF)
+ -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 && MYSQL_TEST_SOCKET="${T}/mysql/mysql.sock" MARIADB_CC_TEST=1 ctest --verbose || die
+
+ 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() {