percona-xtrabackup-2.4.6-r1.ebuild 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit cmake-utils flag-o-matic
  5. DESCRIPTION="Hot backup utility for MySQL based servers"
  6. HOMEPAGE="https://www.percona.com/software/mysql-database/percona-xtrabackup"
  7. SRC_URI="https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-${PV}/source/tarball/${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="amd64 ~x86"
  11. IUSE=""
  12. DEPEND="
  13. app-arch/lz4:0=
  14. app-editors/vim-core
  15. >=dev-libs/boost-1.59.0:=
  16. dev-libs/libaio
  17. dev-libs/libedit
  18. dev-libs/libevent:0=
  19. dev-libs/libgcrypt:0=
  20. dev-libs/libgpg-error
  21. dev-python/sphinx
  22. net-misc/curl
  23. sys-libs/zlib"
  24. RDEPEND="${DEPEND}
  25. !dev-db/xtrabackup-bin
  26. dev-perl/DBD-mysql"
  27. PATCHES=(
  28. "${FILESDIR}"/${PN}-2.4.6-remove-boost-version-check.patch
  29. "${FILESDIR}"/${PN}-2.4.6-fix-gcc6-isystem.patch
  30. )
  31. src_prepare() {
  32. cmake-utils_src_prepare
  33. # remove bundled lz4, boost, libedit, libevent, zlib
  34. # just to be safe...
  35. rm -r extra/lz4 include/boost_1_59_0 \
  36. cmd-line-utils/libedit libevent zlib || die
  37. }
  38. src_configure() {
  39. # Needed, due to broken handling of CMAKE_BUILD_TYPE leading to
  40. #
  41. # error: 'fts_ast_node_type_get' was not declared in this scope
  42. #
  43. append-cppflags -DDBUG_OFF
  44. local mycmakeargs=(
  45. -DBUILD_CONFIG=xtrabackup_release
  46. -DWITH_EDITLINE=system
  47. -DWITH_LIBEVENT=system
  48. -DWITH_LZ4=system
  49. -DWITH_SSL=bundled # uses yassl, which isn't packaged
  50. -DWITH_ZLIB=system
  51. -DWITH_PIC=ON
  52. )
  53. cmake-utils_src_configure
  54. }
  55. src_install() {
  56. local p="${BUILD_DIR}/storage/innobase/xtrabackup"
  57. dobin "${p}"/src/{xbcloud,xbcrypt,xbstream,xtrabackup}
  58. dosym xtrabackup /usr/bin/innobackupex
  59. einstalldocs
  60. doman "${p}"/doc/source/build/man/*
  61. }