File: dgit-changes

package info (click to toggle)
sheenbidi 3.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 20,612 kB
  • sloc: cpp: 9,390; ansic: 8,522; makefile: 150; sh: 41; python: 10
file content (112 lines) | stat: -rw-r--r-- 3,783 bytes parent folder | 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
From: 
Subject: Debian changes

The Debian packaging of sheenbidi is maintained in git, using a workflow
similar to the one described in dgit-maint-merge(7).
The Debian delta is represented by this one combined patch; there isn't a
patch queue that can be represented as a quilt series.

A detailed breakdown of the changes is available from their canonical
representation -- git commits in the packaging repository.
For example, to see the changes made by the Debian maintainer in the first
upload of upstream version 1.2.3, you could use:

    % git clone https://git.dgit.debian.org/sheenbidi
    % cd sheenbidi
    % git log --oneline 1.2.3..debian/1.2.3-1 -- . ':!debian'

(If you have dgit, use `dgit clone sheenbidi`, rather than plain `git clone`.)

We don't use debian/source/options single-debian-patch because it has bugs.
Therefore, NMUs etc. may nevertheless have made additional patches.

---

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e0d4352..d620240 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -144,6 +144,7 @@ set_target_properties(SheenBidi PROPERTIES
   VERSION ${PROJECT_VERSION}
   SOVERSION ${PROJECT_VERSION_MAJOR}
   PUBLIC_HEADER "${SHEENBIDI_HEADERS}"
+  C_VISIBILITY_PRESET "hidden"
 )
 add_library(SheenBidi::SheenBidi ALIAS SheenBidi)
 add_sanitizers(SheenBidi)
@@ -315,10 +316,24 @@ if(BUILD_TESTS)
     Tests/VisualRunIteratorTests.cpp
   )
 
+  set(COVERAGE_COMPILE_OPTIONS "")
+  set(COVERAGE_LINK_OPTIONS "")
+  if(ENABLE_COVERAGE)
+    if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+      message(WARNING "Code coverage is not supported with MSVC")
+    else()
+      set(COVERAGE_COMPILE_OPTIONS --coverage -fprofile-update=atomic)
+      set(COVERAGE_LINK_OPTIONS --coverage)
+    endif()
+  endif()
+  target_compile_options(SheenBidi PUBLIC ${COVERAGE_COMPILE_OPTIONS})
+  target_link_options(SheenBidi PUBLIC ${COVERAGE_LINK_OPTIONS})
+
   foreach(TEST_NAME IN LISTS TEST_TARGETS)
     add_executable(${TEST_NAME}
       ${${TEST_NAME}}
       ${TEST_COMMON_FILES}
+      $<TARGET_OBJECTS:SheenBidi>
     )
     target_include_directories(${TEST_NAME}
       PRIVATE
@@ -326,8 +341,10 @@ if(BUILD_TESTS)
         ${CMAKE_CURRENT_SOURCE_DIR}/Source
         ${CMAKE_CURRENT_SOURCE_DIR}/Tools
     )
-    target_compile_definitions(${TEST_NAME} PRIVATE STANDALONE_TESTING)
-    target_link_libraries(${TEST_NAME} PRIVATE Parser SheenBidi)
+    target_compile_definitions(${TEST_NAME} PRIVATE STANDALONE_TESTING ${SHEENBIDI_PRIVATE_DEFINITIONS})
+    target_compile_options(${TEST_NAME} PRIVATE ${COVERAGE_COMPILE_OPTIONS})
+    target_link_libraries(${TEST_NAME} PRIVATE Parser)
+    target_link_options(${TEST_NAME} PRIVATE ${COVERAGE_LINK_OPTIONS})
     add_sanitizers(${TEST_NAME})
 
     add_test(
@@ -339,15 +356,6 @@ if(BUILD_TESTS)
       FAIL_REGULAR_EXPRESSION "[1-9][0-9]* error"
     )
   endforeach()
-
-  if(ENABLE_COVERAGE)
-    if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
-      message(WARNING "Code coverage is not supported with MSVC")
-    else()
-      target_compile_options(SheenBidi PUBLIC --coverage -fprofile-update=atomic)
-      target_link_options(SheenBidi PUBLIC --coverage)
-    endif()
-  endif()
 endif()
 
 # ------------------------------------------------------------------------------
diff --git a/Headers/SheenBidi/SBBase.h b/Headers/SheenBidi/SBBase.h
index d2f4054..609e5f4 100644
--- a/Headers/SheenBidi/SBBase.h
+++ b/Headers/SheenBidi/SBBase.h
@@ -27,7 +27,7 @@
 #define SB_EXTERN_C_END
 #endif
 
-#ifdef _WIN32
+#if defined(_WIN32)
 
 #if defined(SB_CONFIG_DLL_EXPORT)
 #define SB_PUBLIC __declspec(dllexport)
@@ -35,6 +35,8 @@
 #define SB_PUBLIC __declspec(dllimport)
 #endif
 
+#elif defined(__GNUC__)
+#define SB_PUBLIC __attribute__((visibility("default")))
 #endif
 
 #ifndef SB_PUBLIC