aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoby Kahane <kobykahane@gmail.com>2018-10-17 21:51:09 +0300
committerRobert Schumacher <roschuma@microsoft.com>2018-10-17 11:51:09 -0700
commit0fe909718c28d7377d07ed7130524d4a11a0c8bd (patch)
tree310a432daad90983c9fb5e2aa8b57b8be7a488ec
parent82eb85df4198ed1f608c5cc51cb962f7eab38dca (diff)
downloadvcpkg-0fe909718c28d7377d07ed7130524d4a11a0c8bd.tar.gz
vcpkg-0fe909718c28d7377d07ed7130524d4a11a0c8bd.zip
[cryptopp] update to 7.0 (#4346)
* [cryptopp] update to 7.0 * [cryptopp] Fix Linux builds
-rw-r--r--ports/cryptopp/CONTROL2
-rw-r--r--ports/cryptopp/cmake.patch34
-rw-r--r--ports/cryptopp/patch.patch10
-rw-r--r--ports/cryptopp/portfile.cmake25
-rw-r--r--ports/cryptopp/simon-speck.patch13
5 files changed, 48 insertions, 36 deletions
diff --git a/ports/cryptopp/CONTROL b/ports/cryptopp/CONTROL
index 6fea020bd..89db4de57 100644
--- a/ports/cryptopp/CONTROL
+++ b/ports/cryptopp/CONTROL
@@ -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.
diff --git a/ports/cryptopp/cmake.patch b/ports/cryptopp/cmake.patch
index fbe725eb9..699ebd564 100644
--- a/ports/cryptopp/cmake.patch
+++ b/ports/cryptopp/cmake.patch
@@ -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)
diff --git a/ports/cryptopp/patch.patch b/ports/cryptopp/patch.patch
index 5c49d2757..937738d5b 100644
--- a/ports/cryptopp/patch.patch
+++ b/ports/cryptopp/patch.patch
@@ -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
diff --git a/ports/cryptopp/portfile.cmake b/ports/cryptopp/portfile.cmake
index 6b4b844c4..82893be41 100644
--- a/ports/cryptopp/portfile.cmake
+++ b/ports/cryptopp/portfile.cmake
@@ -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:
diff --git a/ports/cryptopp/simon-speck.patch b/ports/cryptopp/simon-speck.patch
new file mode 100644
index 000000000..a1d911930
--- /dev/null
+++ b/ports/cryptopp/simon-speck.patch
@@ -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")