diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2021-03-11 17:30:10 +0100 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2021-03-11 19:25:22 +0100 |
commit | d1a22fa531c41c3b0d5f8c99437ec52bc19c96ac (patch) | |
tree | 57f4623ff6f2d1dfbeb047fb846ae426314919e6 /dev-db/mysql-connector-c/mysql-connector-c-8.0.23-r1.ebuild | |
parent | net-analyzer/nmap: revert 7.91-r2 keywords (diff) | |
download | gentoo-d1a22fa531c41c3b0d5f8c99437ec52bc19c96ac.tar.gz gentoo-d1a22fa531c41c3b0d5f8c99437ec52bc19c96ac.tar.bz2 gentoo-d1a22fa531c41c3b0d5f8c99437ec52bc19c96ac.zip |
dev-db/mysql-connector-c: disable debug options
Previous version used now deprecated cmake-utils eclass
which added -DNDEBUG to CPP flags. With new cmake eclass
we have to do that on our own.
Let us do it the same way we do it for dev-db/mysql, i.e. set
CMAKE_BUILD_TYPE and corresponding CMAKE_CXX_FLAGS_RELWITHDEBINFO
option.
Closes: https://bugs.gentoo.org/775047
Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'dev-db/mysql-connector-c/mysql-connector-c-8.0.23-r1.ebuild')
-rw-r--r-- | dev-db/mysql-connector-c/mysql-connector-c-8.0.23-r1.ebuild | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.23-r1.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.23-r1.ebuild new file mode 100644 index 000000000000..ccb3b8c270bd --- /dev/null +++ b/dev-db/mysql-connector-c/mysql-connector-c-8.0.23-r1.ebuild @@ -0,0 +1,113 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +CMAKE_ECLASS=cmake +inherit cmake-multilib + +# wrap the config script +MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config ) + +DESCRIPTION="C client library for MariaDB/MySQL" +HOMEPAGE="https://dev.mysql.com/downloads/" +SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0/21" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 sparc ~x86" +IUSE="ldap libressl static-libs" + +RDEPEND=" + >=app-arch/lz4-0_p131:=[${MULTILIB_USEDEP}] + app-arch/zstd:=[${MULTILIB_USEDEP}] + sys-libs/zlib:=[${MULTILIB_USEDEP}] + ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] ) + libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] ) + !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] ) +" +DEPEND="${RDEPEND}" + +# Avoid file collisions, #692580 +RDEPEND+=" !<dev-db/mysql-5.6.45-r1" +RDEPEND+=" !=dev-db/mysql-5.7.23*" +RDEPEND+=" !=dev-db/mysql-5.7.24*" +RDEPEND+=" !=dev-db/mysql-5.7.25*" +RDEPEND+=" !=dev-db/mysql-5.7.26-r0" +RDEPEND+=" !=dev-db/mysql-5.7.27-r0" +RDEPEND+=" !<dev-db/percona-server-5.7.26.29-r1" + +DOCS=( README ) + +S="${WORKDIR}/mysql-${PV}" + +PATCHES=( + "${FILESDIR}"/${PN}-8.0.22-always-build-decompress-utilities.patch + "${FILESDIR}"/${PN}-8.0.19-do-not-install-comp_err.patch + "${FILESDIR}"/${PN}-8.0.23-libressl.patch +) + +src_prepare() { + sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "scripts/CMakeLists.txt" || die + + # All these are for the server only. + # Disable rpm call which would trigger sandbox, #692368 + sed -i \ + -e '/MYSQL_CHECK_LIBEVENT/d' \ + -e '/MYSQL_CHECK_RAPIDJSON/d' \ + -e '/MYSQL_CHECK_ICU/d' \ + -e '/MYSQL_CHECK_EDITLINE/d' \ + -e '/MYSQL_CHECK_CURL/d' \ + -e '/ADD_SUBDIRECTORY(man)/d' \ + -e '/ADD_SUBDIRECTORY(share)/d' \ + -e '/INCLUDE(cmake\/boost/d' \ + -e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \ + CMakeLists.txt || die + + # Skip building clients + echo > client/CMakeLists.txt || die + + # Forcefully disable auth plugin + if ! use ldap ; then + sed -i -e '/MYSQL_CHECK_SASL/d' CMakeLists.txt || die + echo > libmysql/authentication_ldap/CMakeLists.txt || die + fi + + cmake_src_prepare +} + +multilib_src_configure() { + CMAKE_BUILD_TYPE="RelWithDebInfo" + + local mycmakeargs=( + -DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG + -DINSTALL_LAYOUT=RPM + -DINSTALL_LIBDIR=$(get_libdir) + -DWITH_DEFAULT_COMPILER_OPTIONS=OFF + -DENABLED_LOCAL_INFILE=ON + -DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock" + -DWITH_LZ4=system + -DWITH_NUMA=OFF + -DWITH_SSL=system + -DWITH_ZLIB=system + -DWITH_ZSTD=system + -DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient + -DSHARED_LIB_PATCH_VERSION="0" + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + -DWITHOUT_SERVER=ON + ) + + cmake_src_configure +} + +multilib_src_install_all() { + doman \ + man/my_print_defaults.1 \ + man/perror.1 \ + man/zlib_decompress.1 + + if ! use static-libs ; then + find "${ED}" -name "*.a" -delete || die + fi +} |