| 1 |
From: |
| 2 |
Subject: Debian changes |
| 3 |
|
| 4 |
The Debian packaging of sheenbidi is maintained in git, using a workflow |
| 5 |
similar to the one described in dgit-maint-merge(7). |
| 6 |
The Debian delta is represented by this one combined patch; there isn't a |
| 7 |
patch queue that can be represented as a quilt series. |
| 8 |
|
| 9 |
A detailed breakdown of the changes is available from their canonical |
| 10 |
representation -- git commits in the packaging repository. |
| 11 |
For example, to see the changes made by the Debian maintainer in the first |
| 12 |
upload of upstream version 1.2.3, you could use: |
| 13 |
|
| 14 |
% git clone https://git.dgit.debian.org/sheenbidi |
| 15 |
% cd sheenbidi |
| 16 |
% git log --oneline 1.2.3..debian/1.2.3-1 -- . ':!debian' |
| 17 |
|
| 18 |
(If you have dgit, use `dgit clone sheenbidi`, rather than plain `git clone`.) |
| 19 |
|
| 20 |
We don't use debian/source/options single-debian-patch because it has bugs. |
| 21 |
Therefore, NMUs etc. may nevertheless have made additional patches. |
| 22 |
|
| 23 |
--- |
| 24 |
|
| 25 |
diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 26 |
index e0d4352..d620240 100644 |
| 27 |
--- a/CMakeLists.txt |
| 28 |
+++ b/CMakeLists.txt |
| 29 |
@@ -144,6 +144,7 @@ set_target_properties(SheenBidi PROPERTIES |
| 30 |
VERSION ${PROJECT_VERSION} |
| 31 |
SOVERSION ${PROJECT_VERSION_MAJOR} |
| 32 |
PUBLIC_HEADER "${SHEENBIDI_HEADERS}" |
| 33 |
+ C_VISIBILITY_PRESET "hidden" |
| 34 |
) |
| 35 |
add_library(SheenBidi::SheenBidi ALIAS SheenBidi) |
| 36 |
add_sanitizers(SheenBidi) |
| 37 |
@@ -315,10 +316,24 @@ if(BUILD_TESTS) |
| 38 |
Tests/VisualRunIteratorTests.cpp |
| 39 |
) |
| 40 |
|
| 41 |
+ set(COVERAGE_COMPILE_OPTIONS "") |
| 42 |
+ set(COVERAGE_LINK_OPTIONS "") |
| 43 |
+ if(ENABLE_COVERAGE) |
| 44 |
+ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") |
| 45 |
+ message(WARNING "Code coverage is not supported with MSVC") |
| 46 |
+ else() |
| 47 |
+ set(COVERAGE_COMPILE_OPTIONS --coverage -fprofile-update=atomic) |
| 48 |
+ set(COVERAGE_LINK_OPTIONS --coverage) |
| 49 |
+ endif() |
| 50 |
+ endif() |
| 51 |
+ target_compile_options(SheenBidi PUBLIC ${COVERAGE_COMPILE_OPTIONS}) |
| 52 |
+ target_link_options(SheenBidi PUBLIC ${COVERAGE_LINK_OPTIONS}) |
| 53 |
+ |
| 54 |
foreach(TEST_NAME IN LISTS TEST_TARGETS) |
| 55 |
add_executable(${TEST_NAME} |
| 56 |
${${TEST_NAME}} |
| 57 |
${TEST_COMMON_FILES} |
| 58 |
+ $<TARGET_OBJECTS:SheenBidi> |
| 59 |
) |
| 60 |
target_include_directories(${TEST_NAME} |
| 61 |
PRIVATE |
| 62 |
@@ -326,8 +341,10 @@ if(BUILD_TESTS) |
| 63 |
${CMAKE_CURRENT_SOURCE_DIR}/Source |
| 64 |
${CMAKE_CURRENT_SOURCE_DIR}/Tools |
| 65 |
) |
| 66 |
- target_compile_definitions(${TEST_NAME} PRIVATE STANDALONE_TESTING) |
| 67 |
- target_link_libraries(${TEST_NAME} PRIVATE Parser SheenBidi) |
| 68 |
+ target_compile_definitions(${TEST_NAME} PRIVATE STANDALONE_TESTING ${SHEENBIDI_PRIVATE_DEFINITIONS}) |
| 69 |
+ target_compile_options(${TEST_NAME} PRIVATE ${COVERAGE_COMPILE_OPTIONS}) |
| 70 |
+ target_link_libraries(${TEST_NAME} PRIVATE Parser) |
| 71 |
+ target_link_options(${TEST_NAME} PRIVATE ${COVERAGE_LINK_OPTIONS}) |
| 72 |
add_sanitizers(${TEST_NAME}) |
| 73 |
|
| 74 |
add_test( |
| 75 |
@@ -339,15 +356,6 @@ if(BUILD_TESTS) |
| 76 |
FAIL_REGULAR_EXPRESSION "[1-9][0-9]* error" |
| 77 |
) |
| 78 |
endforeach() |
| 79 |
- |
| 80 |
- if(ENABLE_COVERAGE) |
| 81 |
- if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") |
| 82 |
- message(WARNING "Code coverage is not supported with MSVC") |
| 83 |
- else() |
| 84 |
- target_compile_options(SheenBidi PUBLIC --coverage -fprofile-update=atomic) |
| 85 |
- target_link_options(SheenBidi PUBLIC --coverage) |
| 86 |
- endif() |
| 87 |
- endif() |
| 88 |
endif() |
| 89 |
|
| 90 |
# ------------------------------------------------------------------------------ |
| 91 |
diff --git a/Headers/SheenBidi/SBBase.h b/Headers/SheenBidi/SBBase.h |
| 92 |
index d2f4054..609e5f4 100644 |
| 93 |
--- a/Headers/SheenBidi/SBBase.h |
| 94 |
+++ b/Headers/SheenBidi/SBBase.h |
| 95 |
@@ -27,7 +27,7 @@ |
| 96 |
#define SB_EXTERN_C_END |
| 97 |
#endif |
| 98 |
|
| 99 |
-#ifdef _WIN32 |
| 100 |
+#if defined(_WIN32) |
| 101 |
|
| 102 |
#if defined(SB_CONFIG_DLL_EXPORT) |
| 103 |
#define SB_PUBLIC __declspec(dllexport) |
| 104 |
@@ -35,6 +35,8 @@ |
| 105 |
#define SB_PUBLIC __declspec(dllimport) |
| 106 |
#endif |
| 107 |
|
| 108 |
+#elif defined(__GNUC__) |
| 109 |
+#define SB_PUBLIC __attribute__((visibility("default"))) |
| 110 |
#endif |
| 111 |
|
| 112 |
#ifndef SB_PUBLIC |