mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 14:37:55 +08:00
[cryptopp] update to 7.0 (#4346)
* [cryptopp] update to 7.0 * [cryptopp] Fix Linux builds
This commit is contained in:
parent
82eb85df41
commit
0fe909718c
@ -1,3 +1,3 @@
|
||||
Source: cryptopp
|
||||
Version: 6.1.0-2
|
||||
Version: 7.0.0
|
||||
Description: Crypto++ is a free C++ class library of cryptographic schemes.
|
||||
|
@ -1,15 +1,19 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 5b6e1e6..a0adcf6 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -329,6 +329,10 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FI\"winapifamily.h\"" )
|
||||
endif ()
|
||||
|
||||
+if(WINDOWS_STORE)
|
||||
+ add_definitions(-DCRYPTOPP_DISABLE_NACL=1)
|
||||
+endif()
|
||||
+
|
||||
# Enable PIC for all target machines except 32-bit i386 due to register pressures.
|
||||
if (NOT CRYPTOPP_I386)
|
||||
SET(CMAKE_POSITION_INDEPENDENT_CODE 1)
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 8cf9fa2..86a756b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -336,9 +336,13 @@ if (MSVC)
|
||||
if (CMAKE_SYSTEM_VERSION MATCHES "10\\.0.*")
|
||||
list(APPEND CRYPTOPP_COMPILE_DEFINITIONS "_WIN32_WINNT=0x0A00")
|
||||
endif ()
|
||||
- list(APPEND CRYPTOPP_COMPILE_OPTIONS "/FI\"winapifamily.h\"")
|
||||
+ list(APPEND CRYPTOPP_COMPILE_OPTIONS "/FIwinapifamily.h")
|
||||
endif ()
|
||||
|
||||
+if(WINDOWS_STORE)
|
||||
+ add_definitions(-DCRYPTOPP_DISABLE_NACL=1)
|
||||
+endif()
|
||||
+
|
||||
# Enable PIC for all target machines except 32-bit i386 due to register pressures.
|
||||
if (NOT CRYPTOPP_I386)
|
||||
SET(CMAKE_POSITION_INDEPENDENT_CODE 1)
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git a/config.h b/config.h
|
||||
index b96b7aa..3f004ac 100644
|
||||
--- a/config.h
|
||||
+++ b/config.h
|
||||
@@ -795,6 +795,7 @@ NAMESPACE_END
|
||||
diff --git a/config.h b/config.h
|
||||
index f06992a2..be6eda31 100644
|
||||
--- a/config.h
|
||||
+++ b/config.h
|
||||
@@ -814,6 +814,7 @@ NAMESPACE_END
|
||||
#endif
|
||||
|
||||
#ifdef CRYPTOPP_WIN32_AVAILABLE
|
||||
|
@ -1,35 +1,30 @@
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
message(STATUS "Warning: Dynamic building not supported. Building static.") # See note below
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
endif()
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH CMAKE_SOURCE_PATH
|
||||
REPO noloader/cryptopp-cmake
|
||||
REF aab149932675e4bb777a9d3d6b3f8b8182583fd7
|
||||
SHA512 748c77e936888d042bf4a72cc7ee3b7b2ecf16c003cb23296c1af413c9a0cba00cc942ecace26274fc8ac8bd4d848946beb9d7bf2253c5eab3315a4419ef5f1f
|
||||
REF 2729870f277bd568a8e8183b5ba7799e0c2dbf96
|
||||
SHA512 fff9468774f66a895ab44ce76d37b320aeaa9398514b66d5116ffe84705ef7a202586622d598ea03f7c1636587893d46c6eee5e0da965c58fb74131c4b76223c
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
cmake.patch
|
||||
simon-speck.patch
|
||||
)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO weidai11/cryptopp
|
||||
REF CRYPTOPP_6_1_0
|
||||
SHA512 4bc02fef33f1859a07434a4752c2575afd781056e9a91eed99a13cebe2c91d66cbc7173e34d362da63dad6d38f9594ff291accd27e111232996ccd536bba0f39
|
||||
REF CRYPTOPP_7_0_0
|
||||
SHA512 bc83f6adf0ae627c57ff9172d8cee69e7000d9b414ec903a50f11f9a68da08d1dd4985ddaffada86bf58e8168a2df065185efd932201d2df9db3f73025825e54
|
||||
HEAD_REF master
|
||||
PATCHES patch.patch
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_SOURCE_PATH}/cryptopp-config.cmake DESTINATION ${SOURCE_PATH})
|
||||
file(COPY ${CMAKE_SOURCE_PATH}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
PATCHES
|
||||
"${CMAKE_CURRENT_LIST_DIR}/patch.patch"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/cmake.patch"
|
||||
)
|
||||
|
||||
# Dynamic linking should be avoided for Crypto++ to reduce the attack surface,
|
||||
# so generate a static lib for both dynamic and static vcpkg targets.
|
||||
# See also:
|
||||
|
13
ports/cryptopp/simon-speck.patch
Normal file
13
ports/cryptopp/simon-speck.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 7d64977..4ec3ebd 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -497,6 +497,8 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU
|
||||
set_source_files_properties(${SRC_DIR}/simeck-simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3")
|
||||
set_source_files_properties(${SRC_DIR}/simon128-simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3")
|
||||
set_source_files_properties(${SRC_DIR}/speck128-simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3")
|
||||
+ set_source_files_properties(${SRC_DIR}/simon-simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3")
|
||||
+ set_source_files_properties(${SRC_DIR}/speck-simd.cpp PROPERTIES COMPILE_FLAGS "-mssse3")
|
||||
if (CRYPTOPP_IA32_SSE41 AND NOT DISABLE_SSE4)
|
||||
set_source_files_properties(${SRC_DIR}/blake2-simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1")
|
||||
set_source_files_properties(${SRC_DIR}/simon64-simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1")
|
Loading…
x
Reference in New Issue
Block a user