Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion ports/spdlog/CONTROL
Original file line number Diff line number Diff line change
@@ -1,9 +1,39 @@
Source: spdlog
Version: 1.4.2-1
Version: 1.6.0
Homepage: https://github.com/gabime/spdlog
Description: Very fast, header only, C++ logging library
Build-Depends: fmt

Feature: benchmark
Description: Use google benchmark
Build-Depends: benchmark

Feature: coarse-clock
Description: [Linux only] Use the much faster (but much less accurate) CLOCK_REALTIME_COARSE instead of regular clock

Feature: disable-warnings
Description: Disable compiler warnings

Feature: no-atomic-levels
Description: Prevent spdlog from using std::atomic log levels (use only if your code never modifies log levels concurrently)

Feature: no-child-fd
Description: Prevent child processes from inheriting file descriptors

Feature: no-exceptions
Description: Compile with -fno-exceptions. Calls abort() on any spdlog exceptions

Feature: no-local-storage
Description: Prevent spdlog from using thread local storage

Feature: no-thread-id
Description: Prevent spdlog from querying the thread id on each log call if thread id is not needed

Feature: pch
Description: Build static or shared library using precompiled header to speed up compilation time

Feature: shared
Description: Build shared library

Feature: wchar
Description: [Windows only] Enable support for wide character log messages and file names
19 changes: 0 additions & 19 deletions ports/spdlog/disable-master-project-check.patch

This file was deleted.

15 changes: 0 additions & 15 deletions ports/spdlog/fix-error-4275.patch

This file was deleted.

7 changes: 2 additions & 5 deletions ports/spdlog/fix-feature-export.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
diff --git a/bench/CMakeLists.txt b/bench/CMakeLists.txt
index d087cf6..86483db 100644
index 0ea88423..9913ae64 100644
--- a/bench/CMakeLists.txt
+++ b/bench/CMakeLists.txt
@@ -26,3 +26,8 @@ add_executable(formatter-bench formatter-bench.cpp)
@@ -26 +26,6 @@ add_executable(formatter-bench formatter-bench.cpp)
target_link_libraries(formatter-bench PRIVATE benchmark::benchmark spdlog::spdlog)

file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/logs")
+
+install(TARGETS bench async_bench latency
+ RUNTIME DESTINATION tools/spdlog
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
\ No newline at end of file
12 changes: 0 additions & 12 deletions ports/spdlog/fix-include.patch

This file was deleted.

18 changes: 18 additions & 0 deletions ports/spdlog/fix-includes-external-fmt.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/include/spdlog/fmt/fmt.h b/include/spdlog/fmt/fmt.h
index b853fd5e..a6e38046 100644
--- a/include/spdlog/fmt/fmt.h
+++ b/include/spdlog/fmt/fmt.h
@@ -12,3 +12,3 @@

-#if !defined(SPDLOG_FMT_EXTERNAL)
+#if 0
#if !defined(SPDLOG_COMPILED_LIB) && !defined(FMT_HEADER_ONLY)
diff --git a/include/spdlog/fmt/ostr.h b/include/spdlog/fmt/ostr.h
index f82eb679..ac86e3c2 100644
--- a/include/spdlog/fmt/ostr.h
+++ b/include/spdlog/fmt/ostr.h
@@ -10,3 +10,3 @@

-#if !defined(SPDLOG_FMT_EXTERNAL)
+#if 0
#ifdef SPDLOG_HEADER_ONLY
26 changes: 0 additions & 26 deletions ports/spdlog/fix-uwp.patch

This file was deleted.

43 changes: 22 additions & 21 deletions ports/spdlog/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,28 +1,39 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO gabime/spdlog
REF 1549ff12f1aa61ffc4d9a8727c519034724392a0 #v1.4.2
SHA512 c159aea475baecad0a5a9eef965856203c96aa855b0480e82d751bcc050c6e08bb0aa458544da061f5d744e17dcd27bd9b6e31a62d502834f02d3591f29febec
REF 83b9149930f392d7797b54fe97a66ab3f2120671 #v1.6.0
SHA512 b41201e036891ef34399b387d9a04d36687f05aa420a5e324836131e217ffff0d6658a17472817534b45bed6ae10f8b780805a537cb93ffb058f17013af9b14d
HEAD_REF v1.x
PATCHES
disable-master-project-check.patch
fix-feature-export.patch
fix-error-4275.patch
fix-uwp.patch
fix-include.patch
fix-includes-external-fmt.patch
)

set(SPDLOG_USE_BENCHMARK OFF)
if("benchmark" IN_LIST FEATURES)
set(SPDLOG_USE_BENCHMARK ON)
endif()
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
benchmark SPDLOG_BUILD_BENCH
coarse-clock SPDLOG_CLOCK_COARSE
no-atomic-levels SPDLOG_NO_ATOMIC_LEVELS
no-child-fd SPDLOG_PREVENT_CHILD_FD
no-exceptions SPDLOG_NO_EXCEPTIONS
no-local-storage SPDLOG_NO_TLS
no-thread-id SPDLOG_NO_THREAD_ID
pch SPDLOG_ENABLE_PCH
shared SPDLOG_BUILD_SHARED
wchar SPDLOG_WCHAR_SUPPORT
wchar SPDLOG_WCHAR_FILENAMES
INVERTED_FEATURES
disable-warnings SPDLOG_BUILD_WARNINGS
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DSPDLOG_MASTER_PROJECT=OFF
-DSPDLOG_FMT_EXTERNAL=ON
-DSPDLOG_BUILD_BENCH=${SPDLOG_USE_BENCHMARK}
${FEATURE_OPTIONS}
-DSPDLOG_INSTALL=ON
)

Expand All @@ -39,16 +50,6 @@ vcpkg_copy_pdbs()
# use vcpkg-provided fmt library (see also option SPDLOG_FMT_EXTERNAL above)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/spdlog/fmt/bundled)

vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/spdlog/fmt/fmt.h
"#if !defined(SPDLOG_FMT_EXTERNAL)"
"#if 0 // !defined(SPDLOG_FMT_EXTERNAL)"
)

vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/spdlog/fmt/ostr.h
"#if !defined(SPDLOG_FMT_EXTERNAL)"
"#if 0 // !defined(SPDLOG_FMT_EXTERNAL)"
)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/spdlog
${CURRENT_PACKAGES_DIR}/debug/lib/spdlog
${CURRENT_PACKAGES_DIR}/debug/include)
Expand Down