diff options
| author | myd7349 <myd7349@gmail.com> | 2019-06-23 08:16:07 +0800 |
|---|---|---|
| committer | myd7349 <myd7349@gmail.com> | 2019-06-23 08:16:07 +0800 |
| commit | 644851da5fbe46aadd0a8fa54e1d7d213f469fb0 (patch) | |
| tree | 3f5d20aca85fcf02375cf553e893c105758a5d39 /ports/log4cplus | |
| parent | f1870ae02bedbaa5a501ddf3a7ba5d0a743a1053 (diff) | |
| parent | f3db66b403840b24ea2612d09cca30a5285f5ea3 (diff) | |
| download | vcpkg-644851da5fbe46aadd0a8fa54e1d7d213f469fb0.tar.gz vcpkg-644851da5fbe46aadd0a8fa54e1d7d213f469fb0.zip | |
Merge branch 'master' into sx-init
Diffstat (limited to 'ports/log4cplus')
| -rw-r--r-- | ports/log4cplus/CONTROL | 3 | ||||
| -rw-r--r-- | ports/log4cplus/fix-usage-error.patch | 105 | ||||
| -rw-r--r-- | ports/log4cplus/portfile.cmake | 5 |
3 files changed, 110 insertions, 3 deletions
diff --git a/ports/log4cplus/CONTROL b/ports/log4cplus/CONTROL index dcdae01a5..99771644a 100644 --- a/ports/log4cplus/CONTROL +++ b/ports/log4cplus/CONTROL @@ -1,4 +1,5 @@ Source: log4cplus -Version: REL_2_0_3 +Version: 2.0.4-1 +Homepage: https://github.com/log4cplus/log4cplus Description: A simple to use C++ logging API providing thread--safe, flexible, and arbitrarily granular control over log management and configuration Build-Depends: catch diff --git a/ports/log4cplus/fix-usage-error.patch b/ports/log4cplus/fix-usage-error.patch new file mode 100644 index 000000000..4a2753ffc --- /dev/null +++ b/ports/log4cplus/fix-usage-error.patch @@ -0,0 +1,105 @@ +diff --git a/qt4debugappender/CMakeLists.txt b/qt4debugappender/CMakeLists.txt +index 2f28be5..0a98704 100644 +--- a/qt4debugappender/CMakeLists.txt ++++ b/qt4debugappender/CMakeLists.txt +@@ -4,15 +4,17 @@ set (qt4debugappender_sources + if (${BUILD_SHARED_LIBS}) + add_definitions (-D${log4cplus}_EXPORTS) + endif () +-if (UNICODE) +- add_definitions (-DUNICODE -D_UNICODE -UMBCS -U_MBCS) +-endif (UNICODE) + + find_package (Qt4 REQUIRED) + include (${QT_USE_FILE}) + + set (qt4debugappender log4cplusqt4debugappender${log4cplus_postfix}) + add_library (${qt4debugappender} ${qt4debugappender_sources}) ++if (UNICODE) ++ target_compile_definitions (${qt4debugappender} PUBLIC UNICODE) ++ target_compile_definitions (${qt4debugappender} PUBLIC _UNICODE) ++ add_definitions (-UMBCS -U_MBCS) ++endif (UNICODE) + target_link_libraries (${qt4debugappender} + ${log4cplus} + ${QT_LIBRARIES} +diff --git a/qt5debugappender/CMakeLists.txt b/qt5debugappender/CMakeLists.txt +index 9570e76..de6fecf 100644 +--- a/qt5debugappender/CMakeLists.txt ++++ b/qt5debugappender/CMakeLists.txt +@@ -4,15 +4,17 @@ set (qt5debugappender_sources + if (${BUILD_SHARED_LIBS}) + add_definitions (-D${log4cplus}_EXPORTS) + endif () +-if (UNICODE) +- add_definitions (-DUNICODE -D_UNICODE -UMBCS -U_MBCS) +-endif (UNICODE) + + find_package (Qt5Core REQUIRED) + #include (${QT_USE_FILE}) + + set (qt5debugappender log4cplusqt5debugappender${log4cplus_postfix}) + add_library (${qt5debugappender} ${qt5debugappender_sources}) ++if (UNICODE) ++ target_compile_definitions (${qt5debugappender} PUBLIC UNICODE) ++ target_compile_definitions (${qt5debugappender} PUBLIC _UNICODE) ++ add_definitions (-UMBCS -U_MBCS) ++endif (UNICODE) + target_link_libraries (${qt5debugappender} + ${log4cplus} + ${Qt5Widgets_LIBRARIES} +diff --git a/simpleserver/CMakeLists.txt b/simpleserver/CMakeLists.txt +index e535120..5202f42 100644 +--- a/simpleserver/CMakeLists.txt ++++ b/simpleserver/CMakeLists.txt +@@ -1,14 +1,15 @@ +-if (UNICODE) +- add_definitions (-DUNICODE -D_UNICODE -UMBCS -U_MBCS) +-endif (UNICODE) +- + message (STATUS "Threads: ${CMAKE_THREAD_LIBS_INIT}") +- + set (loggingserver_sources loggingserver.cxx) + + message (STATUS "Sources: ${loggingserver_sources}") + +-add_executable (loggingserver ${loggingserver_sources}) +-target_link_libraries (loggingserver ${log4cplus}) ++set (loggingserver loggingserver${log4cplus_postfix}) ++add_executable (${loggingserver} ${loggingserver_sources}) ++if (UNICODE) ++ target_compile_definitions (${loggingserver} PUBLIC UNICODE) ++ target_compile_definitions (${loggingserver} PUBLIC _UNICODE) ++ add_definitions (-UMBCS -U_MBCS) ++endif (UNICODE) ++target_link_libraries (${loggingserver} ${log4cplus}) + +-install(TARGETS loggingserver DESTINATION ${CMAKE_INSTALL_BINDIR}) ++install(TARGETS ${loggingserver} DESTINATION ${CMAKE_INSTALL_BINDIR}) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index b7b7ad8..91e0c63 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -67,9 +67,6 @@ endif () + + # Define _GNU_SOURCE so that functions like `pipe2()` are visible. + add_definitions (-D_GNU_SOURCE=1) +-if (UNICODE) +- add_definitions (-DUNICODE -D_UNICODE -UMBCS -U_MBCS) +-endif (UNICODE) + if (WIN32) + add_definitions (-DMINGW_HAS_SECURE_API=1) + add_definitions (-D_WIN32_WINNT=${_WIN32_WINNT}) +@@ -85,6 +82,12 @@ endif (WIN32) + + add_library (${log4cplus} ${log4cplus_sources}) + ++if (UNICODE) ++ target_compile_definitions (${log4cplus} PUBLIC UNICODE) ++ target_compile_definitions (${log4cplus} PUBLIC _UNICODE) ++ add_definitions (-UMBCS -U_MBCS) ++endif (UNICODE) ++ + set (log4cplus_LIBS ${CMAKE_THREAD_LIBS_INIT}) + if (LIBRT) + list (APPEND log4cplus_LIBS ${LIBRT}) diff --git a/ports/log4cplus/portfile.cmake b/ports/log4cplus/portfile.cmake index 672d855de..b2c1035da 100644 --- a/ports/log4cplus/portfile.cmake +++ b/ports/log4cplus/portfile.cmake @@ -2,9 +2,10 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO log4cplus/log4cplus - REF REL_2_0_3 - SHA512 c4c8887137214a9c66545ffa7f13cbede3db1536916681081f53c0a272cfb17d5e42cdc54c2c1bdd6eb5f86c3c3ce0840cbf827f792848ecb8f97636f1fcddf2 + REF REL_2_0_4 + SHA512 194e37b8de7be377dabe911d1cec831de41f5ce14dd617b5333739a7ab8dbc3061aa24351abe811588db507aa1563a637023b26684fb21bbfc88d24b4e4ce062 HEAD_REF master + PATCHES fix-usage-error.patch ) set(THREADPOOL_REF cc0b6371d3963f7028c2da5fc007733f9f3bf205) |
