Package: charls / 1.1.0+dfsg-2

stl_symbols_hack.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Description: Rework the symbol file to hide stl exported symbols
 Also add missing header
Author: Mathieu Malaterre <malat@debian.org>
Forwarded: no

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,6 +39,7 @@
 endif()
 
 set (charls_HEADERS
+src/interface.h
 src/context.h         src/defaulttraits.h    src/jpegimagedatasegment.h  src/jpegsegment.h           src/lookuptable.h       src/publictypes.h
 src/colortransform.h  src/contextrunmode.h   src/encoderstrategy.h       src/jpegmarker.h            src/losslesstraits.h    src/scan.h
 src/config.h          src/decoderstrategy.h  src/header.h                src/jpegmarkersegment.h     src/jpegstreamwriter.h  src/processline.h     src/util.h)
@@ -49,6 +50,8 @@
 set_target_properties( CharLS PROPERTIES
                               VERSION ${CHARLS_LIB_MAJOR_VERSION}.${CHARLS_LIB_MINOR_VERSION}
                               SOVERSION ${CHARLS_LIB_MAJOR_VERSION})
+set_property(TARGET CharLS PROPERTY LINK_FLAGS "-Wl,--version-script=../exports.version")
+
 
 install (TARGETS CharLS RUNTIME DESTINATION bin
                         LIBRARY DESTINATION lib${LIB_SUFFIX}
--- /dev/null
+++ b/exports.version
@@ -0,0 +1,9 @@
+{
+global:
+    JpegLs*;
+    extern "C++" {
+      JpegLs*;
+    };
+local:
+    *;
+};