summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <andreas.sturmlechner@gmail.com>2015-12-31 12:04:29 +0100
committerMichael Palimaka <kensington@gentoo.org>2016-01-14 01:46:30 +1100
commit36045f8ebb08d9578f62520bf6d37f26d39bad1d (patch)
treee6a07eec1f42735750bd952b4ac1b2b1bc792afb /media-gfx/exiv2/files/exiv2-0.25-fvisibility-hidden.patch
parentsys-auth/consolekit: Add at_console compat hook only on linux (diff)
downloadgentoo-36045f8ebb08d9578f62520bf6d37f26d39bad1d.tar.gz
gentoo-36045f8ebb08d9578f62520bf6d37f26d39bad1d.tar.bz2
gentoo-36045f8ebb08d9578f62520bf6d37f26d39bad1d.zip
media-gfx/exiv2: Add upstream cmake patches to fix visibility
Prevent random segfaults in applications due to exiv2 leaking symbols. Package-Manager: portage-2.2.24
Diffstat (limited to 'media-gfx/exiv2/files/exiv2-0.25-fvisibility-hidden.patch')
-rw-r--r--media-gfx/exiv2/files/exiv2-0.25-fvisibility-hidden.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/media-gfx/exiv2/files/exiv2-0.25-fvisibility-hidden.patch b/media-gfx/exiv2/files/exiv2-0.25-fvisibility-hidden.patch
new file mode 100644
index 000000000000..26c5c1d39d74
--- /dev/null
+++ b/media-gfx/exiv2/files/exiv2-0.25-fvisibility-hidden.patch
@@ -0,0 +1,19 @@
+Index: CMakeLists.txt
+===================================================================
+--- a/xmpsdk/CMakeLists.txt (revision 3974)
++++ b/xmpsdk/CMakeLists.txt (revision 3975)
+@@ -20,6 +20,14 @@
+ ENDIF(NOT MSVC AND NOT CYGWIN AND NOT MSYS)
+ ENDFOREACH()
+
++if(NOT MSVC)
++ # http://stackoverflow.com/questions/10046114/in-cmake-how-can-i-test-if-the-compiler-is-clang
++ if ( NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang")
++ # 1123 - hide xmpsdk symbols
++ add_definitions( -fvisibility=hidden -fvisibility-inlines-hidden )
++ endif()
++endif()
++
+ IF( EXIV2_ENABLE_XMP AND EXIV2_ENABLE_LIBXMP )
+ ADD_LIBRARY( xmp STATIC ${XMPSRC} )
+ GET_TARGET_PROPERTY( XMPLIB xmp LOCATION )