diff options
author | Brian Evans <grknight@gentoo.org> | 2017-02-03 11:03:55 -0500 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2017-02-03 11:03:55 -0500 |
commit | 035441b4c80a3d9b8e79f28a98523488d69f75bb (patch) | |
tree | f55c0d274b9051f591eb391eb044d0db1cc0e783 /dev-db | |
parent | dev-libs/libevent: Old. (diff) | |
download | gentoo-035441b4c80a3d9b8e79f28a98523488d69f75bb.tar.gz gentoo-035441b4c80a3d9b8e79f28a98523488d69f75bb.tar.bz2 gentoo-035441b4c80a3d9b8e79f28a98523488d69f75bb.zip |
dev-db/mysql-connector-c: Fix errors in 6.1.9 building improperly
Missing library references from 'mysql-config --libs'
Set a patch version so the library isn't installed as 'libmysqlclient.so.18.4.'
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'dev-db')
-rw-r--r-- | dev-db/mysql-connector-c/mysql-connector-c-6.1.9-r1.ebuild | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/dev-db/mysql-connector-c/mysql-connector-c-6.1.9-r1.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-6.1.9-r1.ebuild new file mode 100644 index 000000000000..ec9001bc8cf1 --- /dev/null +++ b/dev-db/mysql-connector-c/mysql-connector-c-6.1.9-r1.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit cmake-multilib + +MULTILIB_WRAPPED_HEADERS+=( + /usr/include/mysql/my_config.h +) + +# wrap the config script +MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config ) + +DESCRIPTION="C client library for MariaDB/MySQL" +HOMEPAGE="https://dev.mysql.com/downloads/connector/c/" +LICENSE="GPL-2" + +SRC_URI="mirror://mysql/Downloads/Connector-C/${P}-src.tar.gz" +S="${WORKDIR}/${P}-src" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc64 ~x86" + +SUBSLOT="18" +SLOT="0/${SUBSLOT}" +IUSE="+ssl static-libs" + +CDEPEND=" + sys-libs/zlib:=[${MULTILIB_USEDEP}] + ssl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] ) + " +RDEPEND="${CDEPEND} + !dev-db/mysql[client-libs(+)] + !dev-db/mysql-cluster[client-libs(+)] + !dev-db/mariadb[client-libs(+)] + !dev-db/mariadb-connector-c[mysqlcompat] + !dev-db/mariadb-galera[client-libs(+)] + !dev-db/percona-server[client-libs(+)] + " +DEPEND="${CDEPEND}" + +DOCS=( README Docs/ChangeLog ) +PATCHES=( + "${FILESDIR}/mysql_com.patch" ) + +src_prepare() { + sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "${S}/scripts/CMakeLists.txt" || die + default +} + +multilib_src_configure() { + mycmakeargs+=( + -DINSTALL_LAYOUT=RPM + -DINSTALL_LIBDIR=$(get_libdir) + -DWITH_DEFAULT_COMPILER_OPTIONS=OFF + -DWITH_DEFAULT_FEATURE_SET=OFF + -DENABLED_LOCAL_INFILE=ON + -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock" + -DWITH_ZLIB=system + -DENABLE_DTRACE=OFF + -DWITH_SSL=$(usex ssl system bundled) + -DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient + -DSHARED_LIB_PATCH_VERSION="0" + ) + cmake-utils_src_configure +} + +multilib_src_install_all() { + if ! use static-libs ; then + find "${ED}" -name "*.a" -delete || die + fi +} + +pkg_preinst() { + if [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then + elog "Due to ABI changes when switching between different client libraries," + elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient." + elog "Please run: revdep-rebuild --library libmysqlclient.so.${SUBSLOT}" + ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries" + fi +} |