1 |
1 |
# Copyright 1999-2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
|
EAPI="8"
|
|
4 |
EAPI=8
|
5 |
5 |
|
6 |
6 |
CMAKE_MAKEFILE_GENERATOR="emake"
|
7 |
7 |
|
8 |
|
inherit cmake flag-o-matic
|
|
8 |
inherit cmake
|
|
9 |
|
|
10 |
# TODO: just keep it unbundled...?
|
|
11 |
MY_BOOST_VERSION="1.77.0"
|
|
12 |
MY_PV=$(ver_rs 3 '-')
|
|
13 |
MY_PV="${MY_PV//_pre*}"
|
|
14 |
MY_PN="Percona-XtraBackup"
|
|
15 |
MY_P="${PN}-${MY_PV}"
|
|
16 |
MY_MAJOR_PV=$(ver_cut 1-2)
|
9 |
17 |
|
10 |
18 |
DESCRIPTION="Hot backup utility for MySQL based servers"
|
11 |
19 |
HOMEPAGE="https://www.percona.com/software/mysql-database/percona-xtrabackup"
|
12 |
|
SRC_URI="https://www.percona.com/downloads/Percona-XtraBackup-2.4/Percona-XtraBackup-${PV}/source/tarball/${P}.tar.gz
|
13 |
|
mirror://sourceforge/boost/boost_1_59_0.tar.gz"
|
|
20 |
SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
|
|
21 |
https://boostorg.jfrog.io/artifactory/main/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2"
|
14 |
22 |
|
15 |
23 |
LICENSE="GPL-2"
|
16 |
24 |
SLOT="0"
|
... | ... | |
19 |
27 |
DEPEND="
|
20 |
28 |
app-arch/lz4:0=
|
21 |
29 |
app-editors/vim-core
|
|
30 |
dev-libs/icu:=
|
22 |
31 |
dev-libs/libaio
|
23 |
32 |
dev-libs/libedit
|
24 |
33 |
dev-libs/libev
|
25 |
34 |
dev-libs/libevent:0=
|
|
35 |
dev-libs/libfido2:=
|
26 |
36 |
dev-libs/libgcrypt:0=
|
27 |
37 |
dev-libs/libgpg-error
|
|
38 |
dev-libs/openssl:0=
|
|
39 |
dev-libs/protobuf:=
|
|
40 |
dev-libs/rapidjson
|
|
41 |
dev-libs/re2:=
|
28 |
42 |
dev-python/sphinx
|
29 |
43 |
net-misc/curl
|
30 |
44 |
sys-libs/zlib:="
|
... | ... | |
35 |
49 |
dev-perl/DBD-mysql"
|
36 |
50 |
|
37 |
51 |
PATCHES=(
|
38 |
|
"${FILESDIR}"/${PN}-2.4.6-remove-boost-version-check.patch
|
39 |
|
"${FILESDIR}"/${PN}-2.4.20-fix-gcc10.patch
|
|
52 |
"${FILESDIR}"/${PN}-8.0.26-remove-rpm.patch
|
|
53 |
"${FILESDIR}"/${PN}-8.0.30.23-gcc13.patch
|
40 |
54 |
)
|
41 |
55 |
|
|
56 |
S="${WORKDIR}/percona-xtrabackup-${MY_PV}"
|
|
57 |
|
|
58 |
src_prepare() {
|
|
59 |
cmake_src_prepare
|
|
60 |
|
|
61 |
local bundled_boost_version=$(sed -En '/^SET\(BOOST_PACKAGE_NAME /{s/[^0-9.]//gp}' cmake/boost.cmake)
|
|
62 |
if [[ ${MY_BOOST_VERSION//./} != ${bundled_boost_version} ]] ; then
|
|
63 |
eerror "Source Boost version: ${bundled_boost_version}"
|
|
64 |
eerror "Ebuild Boost version: ${MY_BOOST_VERSION}"
|
|
65 |
die "Ebuild needs to fix MY_BOOST_VERSION!"
|
|
66 |
fi
|
|
67 |
}
|
|
68 |
|
42 |
69 |
src_configure() {
|
|
70 |
CMAKE_BUILD_TYPE="RelWithDebInfo"
|
|
71 |
|
43 |
72 |
local mycmakeargs=(
|
44 |
|
-DBUILD_CONFIG=xtrabackup_release
|
|
73 |
-DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG
|
|
74 |
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG
|
45 |
75 |
-DBUILD_SHARED_LIBS=OFF
|
46 |
|
-DWITH_BOOST="${WORKDIR}/boost_1_59_0"
|
47 |
|
-DWITH_EDITLINE=system
|
48 |
|
-DWITH_LIBEVENT=system
|
49 |
|
-DWITH_LZ4=system
|
50 |
|
-DWITH_SSL=system
|
51 |
|
-DWITH_ZLIB=system
|
52 |
|
-DWITH_PIC=ON
|
|
76 |
-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
|
|
77 |
-DINSTALL_PLUGINDIR=$(get_libdir)/${PN}/plugin
|
|
78 |
-DWITH_BOOST="${WORKDIR}/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION})"
|
|
79 |
-DWITH_MAN_PAGES=ON
|
|
80 |
-DWITH_SYSTEM_LIBS=ON
|
53 |
81 |
)
|
54 |
82 |
|
55 |
|
local CMAKE_BUILD_TYPE="Release"
|
56 |
83 |
cmake_src_configure
|
57 |
84 |
}
|
58 |
85 |
|
59 |
86 |
src_install() {
|
60 |
87 |
local p="${BUILD_DIR}/storage/innobase/xtrabackup"
|
61 |
88 |
|
62 |
|
dobin "${p}"/src/{xbcloud/xbcloud,xbcrypt,xbstream,xtrabackup}
|
63 |
|
dosym xtrabackup /usr/bin/innobackupex
|
|
89 |
dobin "${p}"/xbcloud_osenv
|
|
90 |
dobin "${BUILD_DIR}"/runtime_output_directory/{xbcloud,xbcrypt,xbstream,xtrabackup}
|
|
91 |
|
|
92 |
# cannot use dolib.so because helper would append libdir to target dir
|
|
93 |
insinto /usr/$(get_libdir)/${PN}/plugin
|
|
94 |
insopts -m 0755
|
|
95 |
doins "${BUILD_DIR}"/plugin_output_directory/{keyring_file.so,keyring_vault.so}
|
64 |
96 |
|
65 |
|
einstalldocs
|
66 |
97 |
doman "${p}"/doc/source/build/man/*
|
67 |
98 |
}
|