summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2017-04-03 23:12:30 +0200
committerDavid Seifert <soap@gentoo.org>2017-04-03 23:15:13 +0200
commita572009f71a0a16e50f0a250d6a00b6912e44e82 (patch)
tree73c49d9733fa822509df3d9295d6f7d83b494270 /dev-db/percona-xtrabackup
parentapp-crypt/gnupg: version bump (diff)
downloadgentoo-a572009f71a0a16e50f0a250d6a00b6912e44e82.tar.gz
gentoo-a572009f71a0a16e50f0a250d6a00b6912e44e82.tar.bz2
gentoo-a572009f71a0a16e50f0a250d6a00b6912e44e82.zip
dev-db/percona-xtrabackup: [QA] Unbundle boost, fix ebuild
* Use cmake-utils.eclass instead of calling cmake explicitly * Fix building with GCC 6 * Unbundle - Boost - lz4 - libedit - libevent - zlib * Install README using einstalldocs Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'dev-db/percona-xtrabackup')
-rw-r--r--dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.6-fix-gcc6-isystem.patch112
-rw-r--r--dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.6-remove-boost-version-check.patch19
-rw-r--r--dev-db/percona-xtrabackup/percona-xtrabackup-2.4.6-r1.ebuild75
3 files changed, 206 insertions, 0 deletions
diff --git a/dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.6-fix-gcc6-isystem.patch b/dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.6-fix-gcc6-isystem.patch
new file mode 100644
index 00000000000..6418e34a8d6
--- /dev/null
+++ b/dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.6-fix-gcc6-isystem.patch
@@ -0,0 +1,112 @@
+Do not use -isystem to add headers, as they break GCC 6's header wrapping.
+See also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129
+
+--- a/client/base/CMakeLists.txt
++++ b/client/base/CMakeLists.txt
+@@ -49,7 +49,7 @@
+ mutex.cc
+ mysql_query_runner.cc
+ show_variable_query_extractor.cc
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ TARGET_LINK_LIBRARIES(client_base mysqlclient)
+--- a/client/CMakeLists.txt
++++ b/client/CMakeLists.txt
+@@ -52,7 +52,7 @@
+ upgrade/program.cc
+ )
+ ADD_COMPILE_FLAGS(
+- upgrade/program.cc COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ upgrade/program.cc COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+ TARGET_LINK_LIBRARIES(mysql_upgrade mysqlclient client_base mysqlcheck_core)
+ ADD_DEPENDENCIES(mysql_upgrade GenFixPrivs GenSysSchema)
+--- a/client/dump/CMakeLists.txt
++++ b/client/dump/CMakeLists.txt
+@@ -68,7 +68,7 @@
+ ADD_COMPILE_FLAGS(
+ ${BOOST_LIB_SOURCES}
+ ${BOOST_THREAD_SOURCES}
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ IF(HAVE_clock_gettime_IN_rt)
+@@ -163,7 +163,7 @@
+
+ ADD_COMPILE_FLAGS(
+ ${MYSQLPUMP_LIB_SOURCES}
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ # Files that use Boost sources that trigger compilation warnings
+@@ -199,7 +199,7 @@
+ )
+ MYSQL_ADD_EXECUTABLE(mysqlpump program.cc)
+ ADD_COMPILE_FLAGS(
+- program.cc COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ program.cc COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ TARGET_LINK_LIBRARIES(mysqlpump mysqlpump_lib ${LOCAL_BOOST_LIB})
+--- a/libmysqld/CMakeLists.txt
++++ b/libmysqld/CMakeLists.txt
+@@ -115,7 +115,7 @@
+ ../sql/item_geofunc_setops.cc
+ ../sql/item_json_func.cc
+ ../sql/spatial.cc
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ # Fixes "C1128: number of sections exceeded object file format limit" in MSVC /MD
+--- a/sql/CMakeLists.txt
++++ b/sql/CMakeLists.txt
+@@ -309,7 +309,7 @@
+ item_geofunc_setops.cc
+ item_json_func.cc
+ spatial.cc
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ # Fixes "C1128: number of sections exceeded object file format limit" in MSVC /MD
+--- a/storage/innobase/xtrabackup/src/CMakeLists.txt
++++ b/storage/innobase/xtrabackup/src/CMakeLists.txt
+@@ -68,7 +68,7 @@
+ ../../../../plugin/keyring/keyring_key.cc
+ ../../../../plugin/keyring/buffered_file_io.cc
+ ../../../../plugin/keyring/keys_container.cc
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ ADD_COMPILE_FLAGS(
+--- a/unittest/gunit/CMakeLists.txt
++++ b/unittest/gunit/CMakeLists.txt
+@@ -378,7 +378,7 @@
+ ENDIF()
+ ADD_COMPILE_FLAGS(
+ ${MERGE_SMALL_TESTS}
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+
+@@ -453,11 +453,11 @@
+ ENDIF()
+ ADD_COMPILE_FLAGS(
+ bounded_queue-t.cc
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+ ADD_COMPILE_FLAGS(
+ pump_object_filter-t.cc
+- COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -isystem ${BOOST_INCLUDE_DIR}
++ COMPILE_FLAGS -I${BOOST_PATCHES_DIR} -I${BOOST_INCLUDE_DIR}
+ )
+
+ FOREACH(test ${SERVER_TESTS})
diff --git a/dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.6-remove-boost-version-check.patch b/dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.6-remove-boost-version-check.patch
new file mode 100644
index 00000000000..48a7fcc783f
--- /dev/null
+++ b/dev-db/percona-xtrabackup/files/percona-xtrabackup-2.4.6-remove-boost-version-check.patch
@@ -0,0 +1,19 @@
+Remove Boost version check which makes using the
+system boost libraries close to impossible.
+
+--- a/cmake/boost.cmake
++++ b/cmake/boost.cmake
+@@ -262,13 +262,6 @@
+ COULD_NOT_FIND_BOOST()
+ ENDIF()
+
+-IF(NOT BOOST_MINOR_VERSION EQUAL 59)
+- MESSAGE(WARNING "Boost minor version found is ${BOOST_MINOR_VERSION} "
+- "we need 59"
+- )
+- COULD_NOT_FIND_BOOST()
+-ENDIF()
+-
+ MESSAGE(STATUS "BOOST_INCLUDE_DIR ${BOOST_INCLUDE_DIR}")
+
+ # We have a limited set of patches/bugfixes here:
diff --git a/dev-db/percona-xtrabackup/percona-xtrabackup-2.4.6-r1.ebuild b/dev-db/percona-xtrabackup/percona-xtrabackup-2.4.6-r1.ebuild
new file mode 100644
index 00000000000..d77219973f4
--- /dev/null
+++ b/dev-db/percona-xtrabackup/percona-xtrabackup-2.4.6-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils flag-o-matic
+
+DESCRIPTION="Hot backup utility for MySQL based servers"
+HOMEPAGE="https://www.percona.com/software/mysql-database/percona-xtrabackup"
+SRC_URI="https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-${PV}/source/tarball/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ app-arch/lz4:0=
+ app-editors/vim-core
+ >=dev-libs/boost-1.59.0:=
+ dev-libs/libaio
+ dev-libs/libedit
+ dev-libs/libevent:0=
+ dev-libs/libgcrypt:0=
+ dev-libs/libgpg-error
+ dev-libs/openssl:0=
+ dev-python/sphinx
+ net-misc/curl
+ sys-libs/zlib"
+RDEPEND="${DEPEND}
+ !dev-db/xtrabackup-bin
+ dev-perl/DBD-mysql"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.4.6-remove-boost-version-check.patch
+ "${FILESDIR}"/${PN}-2.4.6-fix-gcc6-isystem.patch
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # remove bundled lz4, boost, libedit, libevent, zlib
+ # just to be safe...
+ rm -r extra/lz4 include/boost_1_59_0 \
+ cmd-line-utils/libedit libevent zlib || die
+}
+
+src_configure() {
+ # Needed, due to broken handling of CMAKE_BUILD_TYPE leading to
+ #
+ # error: 'fts_ast_node_type_get' was not declared in this scope
+ #
+ append-cppflags -DDBUG_OFF
+
+ local mycmakeargs=(
+ -DBUILD_CONFIG=xtrabackup_release
+ -DWITH_EDITLINE=system
+ -DWITH_LIBEVENT=system
+ -DWITH_LZ4=system
+ -DWITH_SSL=bundled # uses yassl, which isn't packaged
+ -DWITH_ZLIB=system
+ -DWITH_PIC=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ local p="${BUILD_DIR}/storage/innobase/xtrabackup"
+
+ dobin "${p}"/src/{xbcloud,xbcrypt,xbstream,xtrabackup}
+ dosym xtrabackup /usr/bin/innobackupex
+
+ einstalldocs
+ doman "${p}"/doc/source/build/man/*
+}