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_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