Description: Use system libsnappy for retracers
 The tracers run LD_PRELOADed into arbitrary, often closed-source binaries,
 so statically-link libsnappy to minimise the possibility of symbol conflicts,
 but the retracers don't have that constraint and are used to process untrusted
 data.
Forwarded: not-needed
Author: Christopher James Halse Rogers <raof@ubuntu.com>

Index: apitrace/CMakeLists.txt
===================================================================
--- apitrace.orig/CMakeLists.txt	2016-05-31 17:27:56.392706958 +1000
+++ apitrace/CMakeLists.txt	2016-05-31 17:28:20.812382053 +1000
@@ -441,10 +441,10 @@
     find_package (SNAPPY)
 endif ()
 if (ENABLE_STATIC_SNAPPY OR NOT SNAPPY_FOUND)
-    message (STATUS "Using bundled SNAPPY")
-    set (SNAPPY_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/snappy)
-    set (SNAPPY_LIBRARIES snappy_bundled)
-    add_subdirectory (thirdparty/snappy)
+    message (STATUS "Using static SNAPPY")
+    find_package(SNAPPY REQUIRED)
+    # Our libsnappy package builds a PIC libsnappy-shared.a archive.
+    find_library(SNAPPY_STATIC_LIBRARIES libsnappy-shared.a)
 endif ()
 include_directories (${SNAPPY_INCLUDE_DIRS})
 
Index: apitrace/wrappers/CMakeLists.txt
===================================================================
--- apitrace.orig/wrappers/CMakeLists.txt	2016-05-31 17:27:56.392706958 +1000
+++ apitrace/wrappers/CMakeLists.txt	2016-05-31 17:27:56.392706958 +1000
@@ -84,7 +84,7 @@
     common
     guids
     crc32c
-    ${SNAPPY_LIBRARIES}
+    ${SNAPPY_STATIC_LIBRARIES}
 )
 
 # Code shared across all OpenGL variants
