summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2019-05-01 15:36:11 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2019-05-08 18:59:31 +0200
commit67630dcc2d0c51e6202ae5bef002e7b85e31f820 (patch)
tree800154a3d34de3ffefc50bf2b1499b2bd3783d87 /dev-util
parentgames-strategy/freeorion: Drop old (diff)
downloadgentoo-67630dcc2d0c51e6202ae5bef002e7b85e31f820.tar.gz
gentoo-67630dcc2d0c51e6202ae5bef002e7b85e31f820.tar.bz2
gentoo-67630dcc2d0c51e6202ae5bef002e7b85e31f820.zip
dev-util/apitrace: Fix build with system-snappy
Closes: https://bugs.gentoo.org/684802 Package-Manager: Portage-2.3.66, Repoman-2.3.12 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/apitrace/apitrace-8.0.ebuild3
-rw-r--r--dev-util/apitrace/files/apitrace-8.0-system-snappy1.patch21
-rw-r--r--dev-util/apitrace/files/apitrace-8.0-system-snappy2.patch41
3 files changed, 65 insertions, 0 deletions
diff --git a/dev-util/apitrace/apitrace-8.0.ebuild b/dev-util/apitrace/apitrace-8.0.ebuild
index 96e336ad5adc..2e34348ebc21 100644
--- a/dev-util/apitrace/apitrace-8.0.ebuild
+++ b/dev-util/apitrace/apitrace-8.0.ebuild
@@ -39,10 +39,13 @@ DEPEND="${PYTHON_DEPS}
RDEPEND="${DEPEND}"
PATCHES=(
+ # TODO: upstream
"${FILESDIR}"/${P}-disable-multiarch.patch
"${FILESDIR}"/${P}-glxtrace-only.patch
"${FILESDIR}"/${P}-docs-install.patch
"${FILESDIR}"/${P}-brotli-unbundle.patch
+ # git master
+ "${FILESDIR}"/${P}-system-snappy{1,2}.patch
)
src_prepare() {
diff --git a/dev-util/apitrace/files/apitrace-8.0-system-snappy1.patch b/dev-util/apitrace/files/apitrace-8.0-system-snappy1.patch
new file mode 100644
index 000000000000..a774ec322dca
--- /dev/null
+++ b/dev-util/apitrace/files/apitrace-8.0-system-snappy1.patch
@@ -0,0 +1,21 @@
+From 1294f69ed84e3c35f108fb55533b6687cdfcd419 Mon Sep 17 00:00:00 2001
+From: "i.Dark_Templar" <darktemplar@dark-templar-archives.net>
+Date: Tue, 30 Apr 2019 22:19:08 +0300
+Subject: [PATCH] cmake: Fix out-of-source build without bundled snappy.
+
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2cf5ab2f5..3751f078e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -532,6 +532,7 @@ add_subdirectory (thirdparty/crc32c)
+ if (CMAKE_EXECUTABLE_FORMAT STREQUAL "ELF")
+ add_subdirectory (thirdparty/libbacktrace)
+ include_directories (${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libbacktrace)
++ include_directories (${CMAKE_CURRENT_BINARY_DIR}/thirdparty/libbacktrace)
+ set (LIBBACKTRACE_LIBRARIES ${CMAKE_DL_LIBS} backtrace)
+ add_definitions (-DHAVE_BACKTRACE=1)
+ endif ()
diff --git a/dev-util/apitrace/files/apitrace-8.0-system-snappy2.patch b/dev-util/apitrace/files/apitrace-8.0-system-snappy2.patch
new file mode 100644
index 000000000000..981a10b4e751
--- /dev/null
+++ b/dev-util/apitrace/files/apitrace-8.0-system-snappy2.patch
@@ -0,0 +1,41 @@
+From 5777f1a8aaef7a39754db9708062b7630c5644a2 Mon Sep 17 00:00:00 2001
+From: Jose Fonseca <jfonseca@vmware.com>
+Date: Wed, 1 May 2019 10:40:43 +0100
+Subject: [PATCH] snappy: Place config.h on a subdirectory.
+
+And ensure it's only included internally.
+
+This addresses the issue described in
+https://github.com/apitrace/apitrace/pull/611#issuecomment-488087078
+---
+ thirdparty/snappy/CMakeLists.txt | 6 +++++-
+ thirdparty/snappy/{ => config}/config.h | 0
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+ rename thirdparty/snappy/{ => config}/config.h (100%)
+
+diff --git a/thirdparty/snappy/CMakeLists.txt b/thirdparty/snappy/CMakeLists.txt
+index 84ecbac8a..581de38fa 100644
+--- a/thirdparty/snappy/CMakeLists.txt
++++ b/thirdparty/snappy/CMakeLists.txt
+@@ -18,12 +18,16 @@ add_convenience_library (snappy_bundled EXCLUDE_FROM_ALL
+ snappy-sinksource.cc
+ snappy-stubs-internal.cc
+ snappy.cc
+- config.h
+
+ snappy-c.h
+ snappy-sinksource.h
+ snappy.h
+ snappy-stubs-public.h
++ config/config.h
++)
++
++target_include_directories (snappy_bundled PRIVATE
++ ${CMAKE_CURRENT_SOURCE_DIR}/config
+ )
+
+ install (
+diff --git a/thirdparty/snappy/config.h b/thirdparty/snappy/config/config.h
+similarity index 100%
+rename from thirdparty/snappy/config.h
+rename to thirdparty/snappy/config/config.h