mysql-connector-c-6.1.5.ebuild 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit cmake-multilib eutils
  5. MULTILIB_WRAPPED_HEADERS+=(
  6. /usr/include/mysql/my_config.h
  7. )
  8. DESCRIPTION="C client library for MariaDB/MySQL"
  9. HOMEPAGE="https://dev.mysql.com/downloads/connector/c/"
  10. LICENSE="GPL-2"
  11. SRC_URI="mirror://mysql/Downloads/Connector-C/${P}-src.tar.gz"
  12. S="${WORKDIR}/${P}-src"
  13. KEYWORDS="~amd64 ~x86"
  14. SLOT="0/18"
  15. IUSE="+ssl static-libs"
  16. CDEPEND="
  17. sys-libs/zlib:=[${MULTILIB_USEDEP}]
  18. ssl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] )
  19. "
  20. RDEPEND="${CDEPEND}
  21. !dev-db/mysql[client-libs(+)]
  22. !dev-db/mysql-cluster[client-libs(+)]
  23. !dev-db/mariadb[client-libs(+)]
  24. !dev-db/mariadb-connector-c[mysqlcompat]
  25. !dev-db/mariadb-galera[client-libs(+)]
  26. !dev-db/percona-server[client-libs(+)]
  27. "
  28. DEPEND="${CDEPEND}"
  29. DOCS=( README Docs/ChangeLog )
  30. src_prepare() {
  31. epatch "${FILESDIR}/openssl-cmake-detection.patch"
  32. epatch_user
  33. }
  34. multilib_src_configure() {
  35. mycmakeargs+=(
  36. -DINSTALL_LAYOUT=RPM
  37. -DINSTALL_LIBDIR=$(get_libdir)
  38. -DWITH_DEFAULT_COMPILER_OPTIONS=OFF
  39. -DWITH_DEFAULT_FEATURE_SET=OFF
  40. -DENABLED_LOCAL_INFILE=ON
  41. -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
  42. -DWITH_ZLIB=system
  43. -DENABLE_DTRACE=OFF
  44. -DWITH_SSL=$(usex ssl system bundled)
  45. )
  46. cmake-utils_src_configure
  47. }
  48. multilib_src_install_all() {
  49. if ! use static-libs ; then
  50. find "${ED}" -name "*.a" -delete || die
  51. fi
  52. }