crypto++: Fix building. Add cmake build system, add GIT package. Update FAIL_LIST
This commit is contained in:
@@ -9,14 +9,10 @@ List of packages that currently fail to build
|
||||
|
||||
- coq
|
||||
|
||||
- crypto++
|
||||
|
||||
- freerdp-git
|
||||
|
||||
- gprbuild-gpl
|
||||
|
||||
- gst-python
|
||||
|
||||
- gtkada
|
||||
|
||||
- innoextract
|
||||
|
||||
60
mingw-w64-crypto++-git/PKGBUILD
Normal file
60
mingw-w64-crypto++-git/PKGBUILD
Normal file
@@ -0,0 +1,60 @@
|
||||
# Maintainer: Alexey Pavlov <Alexpux@gmail.com>
|
||||
|
||||
_realname=crypto++
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=r711.1160f41
|
||||
pkgrel=1
|
||||
pkgdesc="Crypto++ Library is a free C++ class library of cryptographic schemes."
|
||||
arch=('any')
|
||||
url="http://www.cryptopp.com/"
|
||||
license=('Boost Software License 1.0')
|
||||
options=('staticlibs' 'strip')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-cmake" "git")
|
||||
source=(${_realname}::"git+https://github.com/weidai11/cryptopp.git"
|
||||
libcrypto++.pc
|
||||
missing-sources.patch
|
||||
cryptopp-cmake.patch
|
||||
resolve-namespace-conflict.patch
|
||||
fix-test-linking.patch)
|
||||
md5sums=('SKIP'
|
||||
'fdf6ec125726e944269b13a6883abc1c'
|
||||
'b27bcb0cc2938f5af6a07d724ce42b62'
|
||||
'88fc344f33a404dccfa9f74ca9f532eb'
|
||||
'947648b79dc1194217eb0ef0423dd413'
|
||||
'038003a889c79e024754bc6f08cdafff')
|
||||
|
||||
pkgver() {
|
||||
cd ${_realname}
|
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd ${_realname}
|
||||
sed -i -e 's/^CXXFLAGS/#CXXFLAGS/' GNUmakefile
|
||||
patch -p1 -i ${srcdir}/missing-sources.patch
|
||||
patch -p1 -i ${srcdir}/cryptopp-cmake.patch
|
||||
patch -p1 -i ${srcdir}/resolve-namespace-conflict.patch
|
||||
patch -p1 -i ${srcdir}/fix-test-linking.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
[[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST}
|
||||
mkdir ${srcdir}/build-${MINGW_CHOST}
|
||||
cd ${srcdir}/build-${MINGW_CHOST}
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
|
||||
${MINGW_PREFIX}/bin/cmake \
|
||||
-G"MSYS Makefiles" \
|
||||
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
|
||||
../${_realname}
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd ${srcdir}/build-${MINGW_CHOST}
|
||||
make DESTDIR=${pkgdir} install
|
||||
|
||||
install -D -m644 ${srcdir}/${_realname}/License.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
|
||||
}
|
||||
534
mingw-w64-crypto++-git/cryptopp-cmake.patch
Normal file
534
mingw-w64-crypto++-git/cryptopp-cmake.patch
Normal file
@@ -0,0 +1,534 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
new file mode 100644
|
||||
index 0000000..a0c6371
|
||||
--- /dev/null
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -0,0 +1,510 @@
|
||||
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||
+
|
||||
+PROJECT(cryptopp)
|
||||
+
|
||||
+set(CRYPTOPP_VERSION_MAJOR 5)
|
||||
+set(CRYPTOPP_VERSION_MINOR 6)
|
||||
+set(CRYPTOPP_VERSION_BUILD 2)
|
||||
+set(CRYPTOPP_VERSION "${CRYPTOPP_VERSION_MAJOR}.${CRYPTOPP_VERSION_MINOR}.${CRYPTOPP_VERSION_BUILD}")
|
||||
+
|
||||
+###################################
|
||||
+# Global platform-specific settings
|
||||
+###################################
|
||||
+IF(MSVC)
|
||||
+ ADD_DEFINITIONS(-DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_WARNINGS -MP -D_SCL_SECURE_NO_WARNINGS -EHsc)
|
||||
+ SET(CMAKE_CXX_FLAGS "-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS")
|
||||
+ELSE()
|
||||
+ ADD_DEFINITIONS(-Wall -Wno-unused-function -Wno-unused-variable -fvisibility=hidden -Wnon-virtual-dtor -Wreorder -Wstrict-null-sentinel -Wsign-promo)
|
||||
+ IF(MINGW)
|
||||
+ ADD_DEFINITIONS(-DWIN32 -D_WINDOWS)
|
||||
+ ELSE()
|
||||
+ ADD_DEFINITIONS(-fPIC)
|
||||
+ ENDIF()
|
||||
+ENDIF()
|
||||
+
|
||||
+SET(CRYPTOPP_LDFLAGS "")
|
||||
+
|
||||
+#########################
|
||||
+# User Settings
|
||||
+#########################
|
||||
+IF(CRYPTOPP_ADDED_DEFINITIONS)
|
||||
+ ADD_DEFINITIONS(${CRYPTOPP_ADDED_DEFINITIONS})
|
||||
+ENDIF()
|
||||
+
|
||||
+IF(CRYPTOPP_ADDED_LDFLAGS)
|
||||
+ SET(CRYPTOPP_LDFLAGS ${CRYPTOPP_LDFLAGS} ${CRYPTOPP_ADDED_LDFLAGS})
|
||||
+ENDIF()
|
||||
+
|
||||
+IF(NOT DEFINED CRYPTOPP_LIBRARY_TYPE)
|
||||
+ SET(CRYPTOPP_LIBRARY_TYPE "BOTH" CACHE STRING "Type of library to build, STATIC, SHARED or BOTH.")
|
||||
+ELSE()
|
||||
+ SET(CRYPTOPP_LIBRARY_TYPE ${CRYPTOPP_LIBRARY_TYPE} CACHE STRING "Type of library to build, STATIC or SHARED.")
|
||||
+ENDIF()
|
||||
+
|
||||
+IF(NOT DEFINED CRYPTOPP_RUNTIME_TYPE)
|
||||
+ SET(CRYPTOPP_RUNTIME_TYPE "STATIC" CACHE STRING "Type of runtime to use, STATIC or SHARED.")
|
||||
+ELSE()
|
||||
+ SET(CRYPTOPP_RUNTIME_TYPE ${CRYPTOPP_RUNTIME_TYPE} CACHE STRING "Type of runtime to use, STATIC or SHARED.")
|
||||
+ENDIF()
|
||||
+
|
||||
+IF(NOT DEFINED CRYPTOPP_BUILD_TESTS)
|
||||
+ SET(CRYPTOPP_BUILD_TESTS TRUE CACHE BOOL "If enabled, builds tests.")
|
||||
+ELSE()
|
||||
+ SET(CRYPTOPP_BUILD_TESTS ${CRYPTOPP_BUILD_TESTS} CACHE BOOL "If enabled, builds tests.")
|
||||
+ENDIF()
|
||||
+
|
||||
+#########################
|
||||
+# Project-wide Settings
|
||||
+#########################
|
||||
+SET(CRYPTOPP_COMPILE_DEFS_OPT COMPILE_DEFINITIONS_DEBUG CRYPTOPP_DEBUG_BUILD)
|
||||
+SET(EXEC_PERMS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
+
|
||||
+STRING(TOUPPER ${CRYPTOPP_LIBRARY_TYPE} CRYPTOPP_LIBRARY_TYPE_UPPER)
|
||||
+STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "STATIC" CRYPTOPP_STATIC)
|
||||
+IF(NOT CRYPTOPP_STATIC)
|
||||
+ STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "BOTH" CRYPTOPP_STATIC)
|
||||
+ENDIF()
|
||||
+STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "SHARED" CRYPTOPP_SHARED)
|
||||
+IF(NOT CRYPTOPP_SHARED)
|
||||
+ STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "BOTH" CRYPTOPP_SHARED)
|
||||
+ENDIF()
|
||||
+
|
||||
+STRING(TOUPPER ${CRYPTOPP_RUNTIME_TYPE} CRYPTOPP_RUNTIME_TYPE_UPPER)
|
||||
+STRING(COMPARE EQUAL ${CRYPTOPP_RUNTIME_TYPE_UPPER} "STATIC" CRYPTOPP_STATIC_RUNTIME)
|
||||
+
|
||||
+IF(CRYPTOPP_STATIC_RUNTIME)
|
||||
+ IF(WIN32)
|
||||
+ SET(CompilerFlags
|
||||
+ CMAKE_CXX_FLAGS
|
||||
+ CMAKE_CXX_FLAGS_DEBUG
|
||||
+ CMAKE_CXX_FLAGS_RELEASE
|
||||
+ CMAKE_C_FLAGS
|
||||
+ CMAKE_C_FLAGS_DEBUG
|
||||
+ CMAKE_C_FLAGS_RELEASE
|
||||
+ )
|
||||
+ FOREACH(CompilerFlag ${CompilerFlags})
|
||||
+ STRING(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
|
||||
+ ENDFOREACH()
|
||||
+ ENDIF()
|
||||
+ENDIF()
|
||||
+
|
||||
+# --------------------------------------------------------------------------
|
||||
+# Install directories
|
||||
+
|
||||
+string(TOLOWER ${PROJECT_NAME} projectname)
|
||||
+set(CRYPTOPP_INSTALL_SUBDIR "${projectname}-${CRYPTOPP_VERSION_MAJOR}.${CRYPTOPP_VERSION_MINOR}")
|
||||
+
|
||||
+if(NOT CRYPTOPP_INSTALL_BIN_DIR)
|
||||
+ set(CRYPTOPP_INSTALL_BIN_DIR "bin")
|
||||
+endif()
|
||||
+
|
||||
+if(NOT CRYPTOPP_INSTALL_INCLUDE_DIR)
|
||||
+ set(CRYPTOPP_INSTALL_INCLUDE_DIR "include/${projectname}")
|
||||
+endif()
|
||||
+
|
||||
+if(NOT CRYPTOPP_INSTALL_LIB_DIR)
|
||||
+ set(CRYPTOPP_INSTALL_LIB_DIR "lib")
|
||||
+endif()
|
||||
+
|
||||
+if(NOT CRYPTOPP_INSTALL_SHARE_DIR)
|
||||
+ set(CRYPTOPP_INSTALL_SHARE_DIR "share")
|
||||
+endif()
|
||||
+
|
||||
+if(NOT CRYPTOPP_INSTALL_DATA_DIR)
|
||||
+ set(CRYPTOPP_INSTALL_DATA_DIR "${CRYPTOPP_INSTALL_SHARE_DIR}/${CRYPTOPP_INSTALL_SUBDIR}")
|
||||
+endif()
|
||||
+
|
||||
+#########################
|
||||
+# Crypto++ Library
|
||||
+#########################
|
||||
+
|
||||
+CONFIGURE_FILE(adhoc.cpp.proto ${CMAKE_CURRENT_SOURCE_DIR}/adhoc.cpp)
|
||||
+
|
||||
+SET(CRYPTOPP_SRCS_FIPS
|
||||
+ algebra.cpp
|
||||
+ algparam.cpp
|
||||
+ asn.cpp
|
||||
+ authenc.cpp
|
||||
+ basecode.cpp
|
||||
+ cbcmac.cpp
|
||||
+ ccm.cpp
|
||||
+ channels.cpp
|
||||
+ cmac.cpp
|
||||
+ cpu.cpp
|
||||
+ cryptlib.cpp
|
||||
+ des.cpp
|
||||
+ dessp.cpp
|
||||
+ dh.cpp
|
||||
+ dll.cpp
|
||||
+ dsa.cpp
|
||||
+ ec2n.cpp
|
||||
+ eccrypto.cpp
|
||||
+ ecp.cpp
|
||||
+ emsa2.cpp
|
||||
+ eprecomp.cpp
|
||||
+ files.cpp
|
||||
+ filters.cpp
|
||||
+ fips140.cpp
|
||||
+ gcm.cpp
|
||||
+ gf2n.cpp
|
||||
+ gfpcrypt.cpp
|
||||
+ hex.cpp
|
||||
+ hmac.cpp
|
||||
+ hrtimer.cpp
|
||||
+ integer.cpp
|
||||
+ iterhash.cpp
|
||||
+ misc.cpp
|
||||
+ modes.cpp
|
||||
+ modexppc.cpp
|
||||
+ mqueue.cpp
|
||||
+ nbtheory.cpp
|
||||
+ oaep.cpp
|
||||
+ osrng.cpp
|
||||
+ pch.cpp
|
||||
+ pkcspad.cpp
|
||||
+ pssr.cpp
|
||||
+ pubkey.cpp
|
||||
+ queue.cpp
|
||||
+ randpool.cpp
|
||||
+ rdtables.cpp
|
||||
+ rijndael.cpp
|
||||
+ rng.cpp
|
||||
+ rsa.cpp
|
||||
+ rw.cpp
|
||||
+ sha.cpp
|
||||
+ simple.cpp
|
||||
+ skipjack.cpp
|
||||
+ strciphr.cpp
|
||||
+ trdlocal.cpp
|
||||
+)
|
||||
+
|
||||
+SET(CRYPTOPP_SRCS
|
||||
+ 3way.cpp
|
||||
+ adhoc.cpp.proto
|
||||
+ adler32.cpp
|
||||
+ arc4.cpp
|
||||
+ base32.cpp
|
||||
+ base64.cpp
|
||||
+ bfinit.cpp
|
||||
+ blowfish.cpp
|
||||
+ blumshub.cpp
|
||||
+ camellia.cpp
|
||||
+ cast.cpp
|
||||
+ casts.cpp
|
||||
+ crc.cpp
|
||||
+ default.cpp
|
||||
+ dh2.cpp
|
||||
+ eax.cpp
|
||||
+ elgamal.cpp
|
||||
+ esign.cpp
|
||||
+ gf256.cpp
|
||||
+ gf2_32.cpp
|
||||
+ gost.cpp
|
||||
+ gzip.cpp
|
||||
+ ida.cpp
|
||||
+ idea.cpp
|
||||
+ luc.cpp
|
||||
+ mars.cpp
|
||||
+ marss.cpp
|
||||
+ md2.cpp
|
||||
+ md4.cpp
|
||||
+ md5.cpp
|
||||
+ mqv.cpp
|
||||
+ network.cpp
|
||||
+ panama.cpp
|
||||
+ polynomi.cpp
|
||||
+ rabin.cpp
|
||||
+ rc2.cpp
|
||||
+ rc5.cpp
|
||||
+ rc6.cpp
|
||||
+ ripemd.cpp
|
||||
+ safer.cpp
|
||||
+ salsa.cpp
|
||||
+ seal.cpp
|
||||
+ seed.cpp
|
||||
+ serpent.cpp
|
||||
+ sha3.cpp
|
||||
+ shacal2.cpp
|
||||
+ shark.cpp
|
||||
+ sharkbox.cpp
|
||||
+ socketft.cpp
|
||||
+ sosemanuk.cpp
|
||||
+ square.cpp
|
||||
+ squaretb.cpp
|
||||
+ tea.cpp
|
||||
+ tftables.cpp
|
||||
+ tiger.cpp
|
||||
+ tigertab.cpp
|
||||
+ ttmac.cpp
|
||||
+ twofish.cpp
|
||||
+ vmac.cpp
|
||||
+ wait.cpp
|
||||
+ wake.cpp
|
||||
+ whrlpool.cpp
|
||||
+ winpipes.cpp
|
||||
+ xtr.cpp
|
||||
+ xtrcrypt.cpp
|
||||
+ zdeflate.cpp
|
||||
+ zinflate.cpp
|
||||
+ zlib.cpp
|
||||
+)
|
||||
+SET(CRYPTOPP_HDRS
|
||||
+ 3way.h
|
||||
+ adler32.h
|
||||
+ aes.h
|
||||
+ algebra.h
|
||||
+ algparam.h
|
||||
+ arc4.h
|
||||
+ argnames.h
|
||||
+ asn.h
|
||||
+ authenc.h
|
||||
+ base32.h
|
||||
+ base64.h
|
||||
+ basecode.h
|
||||
+ blowfish.h
|
||||
+ blumshub.h
|
||||
+ camellia.h
|
||||
+ cast.h
|
||||
+ cbcmac.h
|
||||
+ ccm.h
|
||||
+ channels.h
|
||||
+ cmac.h
|
||||
+ config.h
|
||||
+ cpu.h
|
||||
+ crc.h
|
||||
+ cryptlib.h
|
||||
+ default.h
|
||||
+ des.h
|
||||
+ dh.h
|
||||
+ dh2.h
|
||||
+ dmac.h
|
||||
+ dsa.h
|
||||
+ eax.h
|
||||
+ ec2n.h
|
||||
+ eccrypto.h
|
||||
+ ecp.h
|
||||
+ elgamal.h
|
||||
+ emsa2.h
|
||||
+ eprecomp.h
|
||||
+ esign.h
|
||||
+ files.h
|
||||
+ filters.h
|
||||
+ fips140.h
|
||||
+ fltrimpl.h
|
||||
+ gcm.h
|
||||
+ gf256.h
|
||||
+ gf2_32.h
|
||||
+ gf2n.h
|
||||
+ gfpcrypt.h
|
||||
+ gost.h
|
||||
+ gzip.h
|
||||
+ hex.h
|
||||
+ hmac.h
|
||||
+ hrtimer.h
|
||||
+ ida.h
|
||||
+ idea.h
|
||||
+ integer.h
|
||||
+ iterhash.h
|
||||
+ lubyrack.h
|
||||
+ luc.h
|
||||
+ mars.h
|
||||
+ md2.h
|
||||
+ md4.h
|
||||
+ md5.h
|
||||
+ mdc.h
|
||||
+ misc.h
|
||||
+ modarith.h
|
||||
+ modes.h
|
||||
+ modexppc.h
|
||||
+ mqueue.h
|
||||
+ mqv.h
|
||||
+ nbtheory.h
|
||||
+ network.h
|
||||
+ nr.h
|
||||
+ oaep.h
|
||||
+ oids.h
|
||||
+ osrng.h
|
||||
+ panama.h
|
||||
+ pch.h
|
||||
+ pkcspad.h
|
||||
+ polynomi.h
|
||||
+ pssr.h
|
||||
+ pubkey.h
|
||||
+ pwdbased.h
|
||||
+ queue.h
|
||||
+ rabin.h
|
||||
+ randpool.h
|
||||
+ rc2.h
|
||||
+ rc5.h
|
||||
+ rc6.h
|
||||
+ rijndael.h
|
||||
+ ripemd.h
|
||||
+ rng.h
|
||||
+ rsa.h
|
||||
+ rw.h
|
||||
+ safer.h
|
||||
+ salsa.h
|
||||
+ seal.h
|
||||
+ secblock.h
|
||||
+ seckey.h
|
||||
+ seed.h
|
||||
+ serpent.h
|
||||
+ sha.h
|
||||
+ sha3.h
|
||||
+ shacal2.h
|
||||
+ shark.h
|
||||
+ simple.h
|
||||
+ skipjack.h
|
||||
+ smartptr.h
|
||||
+ socketft.h
|
||||
+ sosemanuk.h
|
||||
+ square.h
|
||||
+ stdcpp.h
|
||||
+ strciphr.h
|
||||
+ tea.h
|
||||
+ tiger.h
|
||||
+ trdlocal.h
|
||||
+ trunhash.h
|
||||
+ ttmac.h
|
||||
+ twofish.h
|
||||
+ vmac.h
|
||||
+ wait.h
|
||||
+ wake.h
|
||||
+ whrlpool.h
|
||||
+ winpipes.h
|
||||
+ words.h
|
||||
+ xtr.h
|
||||
+ xtrcrypt.h
|
||||
+ zdeflate.h
|
||||
+ zinflate.h
|
||||
+ zlib.h
|
||||
+)
|
||||
+
|
||||
+SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS} ${CRYPTOPP_SRCS_FIPS})
|
||||
+
|
||||
+IF(MSVC)
|
||||
+ SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS} ${CRYPTOPP_HDRS} cryptopp.rc)
|
||||
+ IF(CMAKE_CL_64)
|
||||
+ ENABLE_LANGUAGE(ASM_MASM)
|
||||
+ ADD_CUSTOM_COMMAND(
|
||||
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj
|
||||
+ MAIN_DEPENDENCY x64dll.asm
|
||||
+ COMMAND ${CMAKE_ASM_MASM_COMPILER} /Fo ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj /c ${CMAKE_CURRENT_SOURCE_DIR}/x64dll.asm
|
||||
+ )
|
||||
+ ADD_CUSTOM_COMMAND(
|
||||
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj
|
||||
+ MAIN_DEPENDENCY x64masm.asm
|
||||
+ COMMAND ${CMAKE_ASM_MASM_COMPILER} /Fo ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj /c ${CMAKE_CURRENT_SOURCE_DIR}/x64masm.asm
|
||||
+ )
|
||||
+ ENDIF()
|
||||
+ENDIF()
|
||||
+
|
||||
+#########################
|
||||
+# Crypto++ Static library
|
||||
+#########################
|
||||
+IF(CRYPTOPP_STATIC)
|
||||
+ #add_definitions(-DCRYPTOPP_IMPORTS)
|
||||
+ IF(CMAKE_CL_64)
|
||||
+ SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS}
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj
|
||||
+ )
|
||||
+ ENDIF()
|
||||
+ ADD_LIBRARY(cryptlib STATIC
|
||||
+ ${CRYPTOPP_SRCS}
|
||||
+ )
|
||||
+ SET_TARGET_PROPERTIES(cryptlib PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT} COMPILE_DEFINITIONS CRYPTOPP_LIBRARY_BUILD)
|
||||
+ IF(CRYPTOPP_LDFLAGS)
|
||||
+ SET_TARGET_PROPERTIES(cryptlib PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS})
|
||||
+ ENDIF()
|
||||
+ SET_TARGET_PROPERTIES(cryptlib PROPERTIES OUTPUT_NAME "cryptopp")
|
||||
+ TARGET_LINK_LIBRARIES(cryptlib)
|
||||
+
|
||||
+ INSTALL(
|
||||
+ TARGETS cryptlib
|
||||
+ DESTINATION ${CRYPTOPP_INSTALL_LIB_DIR}
|
||||
+ )
|
||||
+ENDIF()
|
||||
+
|
||||
+#########################
|
||||
+# Crypto++ Shared library
|
||||
+#########################
|
||||
+IF(CRYPTOPP_SHARED)
|
||||
+ add_definitions(-DCRYPTOPP_EXPORTS)
|
||||
+ ADD_LIBRARY(cryptopp SHARED
|
||||
+ ${CRYPTOPP_SRCS_FIPS}
|
||||
+ )
|
||||
+ SET_TARGET_PROPERTIES(cryptopp PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT} COMPILE_DEFINITIONS CRYPTOPP_LIBRARY_BUILD)
|
||||
+ IF(CRYPTOPP_LDFLAGS)
|
||||
+ SET_TARGET_PROPERTIES(cryptopp PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS})
|
||||
+ ENDIF()
|
||||
+ TARGET_LINK_LIBRARIES(cryptopp)
|
||||
+
|
||||
+ INSTALL(
|
||||
+ TARGETS cryptopp
|
||||
+ PERMISSIONS ${EXEC_PERMS}
|
||||
+ RUNTIME DESTINATION ${CRYPTOPP_INSTALL_BIN_DIR}
|
||||
+ LIBRARY DESTINATION ${CRYPTOPP_INSTALL_LIB_DIR}
|
||||
+ ARCHIVE DESTINATION ${CRYPTOPP_INSTALL_LIB_DIR}
|
||||
+ )
|
||||
+ INSTALL(FILES ${CRYPTOPP_HDRS}
|
||||
+ DESTINATION ${CRYPTOPP_INSTALL_INCLUDE_DIR}
|
||||
+ )
|
||||
+ENDIF()
|
||||
+
|
||||
+#########################
|
||||
+# Crypto++ Test
|
||||
+#########################
|
||||
+IF(CRYPTOPP_BUILD_TESTS AND CRYPTOPP_STATIC)
|
||||
+ SET(TEST_SRCS
|
||||
+ adhoc.cpp
|
||||
+ bench.cpp
|
||||
+ bench2.cpp
|
||||
+ datatest.cpp
|
||||
+ dlltest.cpp
|
||||
+ fipsalgt.cpp
|
||||
+ regtest.cpp
|
||||
+ test.cpp
|
||||
+ validat1.cpp
|
||||
+ validat2.cpp
|
||||
+ validat3.cpp
|
||||
+ fipstest.cpp
|
||||
+ )
|
||||
+ IF(WIN32)
|
||||
+ SET(TEST_SRCS ${TEST_SRCS}
|
||||
+ bench.h
|
||||
+ factory.h
|
||||
+ validate.h
|
||||
+ )
|
||||
+ ENDIF()
|
||||
+ ADD_EXECUTABLE(cryptest ${TEST_SRCS})
|
||||
+ IF(WIN32)
|
||||
+ IF(MSVC)
|
||||
+ TARGET_LINK_LIBRARIES(cryptest ws2_32.lib cryptlib)
|
||||
+ ELSE()
|
||||
+ TARGET_LINK_LIBRARIES(cryptest cryptlib ws2_32)
|
||||
+ ENDIF()
|
||||
+ ENDIF()
|
||||
+ FILE(COPY TestData DESTINATION . FILES_MATCHING PATTERN TestData/*)
|
||||
+ SET_TARGET_PROPERTIES(cryptest PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT})
|
||||
+ IF(CRYPTOPP_LDFLAGS)
|
||||
+ SET_TARGET_PROPERTIES(cryptest PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS})
|
||||
+ ENDIF()
|
||||
+ENDIF()
|
||||
+
|
||||
+#-----------------------------------------------------------------------------
|
||||
+# pkgconfig support
|
||||
+# enabled by default on Unix, disabled by default on other platforms
|
||||
+if(UNIX OR MINGW)
|
||||
+ option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" ON)
|
||||
+else()
|
||||
+ option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" OFF)
|
||||
+endif()
|
||||
+if(BUILD_PKGCONFIG_FILES)
|
||||
+ # install in lib and not share (see multi-arch note above)
|
||||
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libcrypto++.pc.cmake.in
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/libcrypto++.pc @ONLY)
|
||||
+ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libcrypto++.pc DESTINATION
|
||||
+ ${CRYPTOPP_INSTALL_LIB_DIR}/pkgconfig )
|
||||
+endif()
|
||||
+
|
||||
diff --git a/libcrypto++.pc.cmake.in b/libcrypto++.pc.cmake.in
|
||||
new file mode 100644
|
||||
index 0000000..a0c6371
|
||||
--- /dev/null
|
||||
+++ b/libcrypto++.pc.cmake.in
|
||||
@@ -0,0 +1,12 @@
|
||||
+prefix=@CMAKE_INSTALL_PREFIX@
|
||||
+bindir=${prefix}/@CRYPTOPP_INSTALL_BIN_DIR@
|
||||
+libdir=${prefix}/@CRYPTOPP_INSTALL_LIB_DIR@
|
||||
+includedir=${prefix}/@CRYPTOPP_INSTALL_INCLUDE_DIR@
|
||||
+
|
||||
+Name: libcrypto++
|
||||
+Description: Class library of cryptographic schemes
|
||||
+URL: http://www.cryptopp.com/
|
||||
+Version: @CRYPTOPP_VERSION@
|
||||
+Libs: -L${libdir} -lcryptopp
|
||||
+Cflags: -I${includedir}
|
||||
+
|
||||
526
mingw-w64-crypto++-git/cryptopp-cmake.patch.orig
Normal file
526
mingw-w64-crypto++-git/cryptopp-cmake.patch.orig
Normal file
@@ -0,0 +1,526 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
new file mode 100644
|
||||
index 0000000..a0c6371
|
||||
--- /dev/null
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -0,0 +1,502 @@
|
||||
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||
+
|
||||
+PROJECT(cryptopp)
|
||||
+
|
||||
+set(CRYPTOPP_VERSION_MAJOR 5)
|
||||
+set(CRYPTOPP_VERSION_MINOR 6)
|
||||
+set(CRYPTOPP_VERSION_BUILD 2)
|
||||
+set(CRYPTOPP_VERSION "${CRYPTOPP_VERSION_MAJOR}.${CRYPTOPP_VERSION_MINOR}.${CRYPTOPP_VERSION_BUILD}")
|
||||
+
|
||||
+###################################
|
||||
+# Global platform-specific settings
|
||||
+###################################
|
||||
+IF(MSVC)
|
||||
+ ADD_DEFINITIONS(-DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_WARNINGS -MP -D_SCL_SECURE_NO_WARNINGS -EHsc)
|
||||
+ SET(CMAKE_CXX_FLAGS "-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS")
|
||||
+ELSE()
|
||||
+ ADD_DEFINITIONS(-Wall -Wno-unused-function -Wno-unused-variable -fvisibility=hidden -Wnon-virtual-dtor -Wreorder -Wstrict-null-sentinel -Wsign-promo)
|
||||
+ IF(MINGW)
|
||||
+ ADD_DEFINITIONS(-DWIN32 -D_WINDOWS)
|
||||
+ ELSE()
|
||||
+ ADD_DEFINITIONS(-fPIC)
|
||||
+ ENDIF()
|
||||
+ENDIF()
|
||||
+
|
||||
+SET(CRYPTOPP_LDFLAGS "")
|
||||
+
|
||||
+#########################
|
||||
+# User Settings
|
||||
+#########################
|
||||
+IF(CRYPTOPP_ADDED_DEFINITIONS)
|
||||
+ ADD_DEFINITIONS(${CRYPTOPP_ADDED_DEFINITIONS})
|
||||
+ENDIF()
|
||||
+
|
||||
+IF(CRYPTOPP_ADDED_LDFLAGS)
|
||||
+ SET(CRYPTOPP_LDFLAGS ${CRYPTOPP_LDFLAGS} ${CRYPTOPP_ADDED_LDFLAGS})
|
||||
+ENDIF()
|
||||
+
|
||||
+IF(NOT DEFINED CRYPTOPP_LIBRARY_TYPE)
|
||||
+ SET(CRYPTOPP_LIBRARY_TYPE "BOTH" CACHE STRING "Type of library to build, STATIC, SHARED or BOTH.")
|
||||
+ELSE()
|
||||
+ SET(CRYPTOPP_LIBRARY_TYPE ${CRYPTOPP_LIBRARY_TYPE} CACHE STRING "Type of library to build, STATIC or SHARED.")
|
||||
+ENDIF()
|
||||
+
|
||||
+IF(NOT DEFINED CRYPTOPP_RUNTIME_TYPE)
|
||||
+ SET(CRYPTOPP_RUNTIME_TYPE "STATIC" CACHE STRING "Type of runtime to use, STATIC or SHARED.")
|
||||
+ELSE()
|
||||
+ SET(CRYPTOPP_RUNTIME_TYPE ${CRYPTOPP_RUNTIME_TYPE} CACHE STRING "Type of runtime to use, STATIC or SHARED.")
|
||||
+ENDIF()
|
||||
+
|
||||
+IF(NOT DEFINED CRYPTOPP_BUILD_TESTS)
|
||||
+ SET(CRYPTOPP_BUILD_TESTS TRUE CACHE BOOL "If enabled, builds tests.")
|
||||
+ELSE()
|
||||
+ SET(CRYPTOPP_BUILD_TESTS ${CRYPTOPP_BUILD_TESTS} CACHE BOOL "If enabled, builds tests.")
|
||||
+ENDIF()
|
||||
+
|
||||
+#########################
|
||||
+# Project-wide Settings
|
||||
+#########################
|
||||
+SET(CRYPTOPP_COMPILE_DEFS_OPT COMPILE_DEFINITIONS_DEBUG CRYPTOPP_DEBUG_BUILD)
|
||||
+SET(EXEC_PERMS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
+
|
||||
+STRING(TOUPPER ${CRYPTOPP_LIBRARY_TYPE} CRYPTOPP_LIBRARY_TYPE_UPPER)
|
||||
+STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "STATIC" CRYPTOPP_STATIC)
|
||||
+IF(NOT CRYPTOPP_STATIC)
|
||||
+ STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "BOTH" CRYPTOPP_STATIC)
|
||||
+ENDIF()
|
||||
+STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "SHARED" CRYPTOPP_SHARED)
|
||||
+IF(NOT CRYPTOPP_SHARED)
|
||||
+ STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "BOTH" CRYPTOPP_SHARED)
|
||||
+ENDIF()
|
||||
+
|
||||
+STRING(TOUPPER ${CRYPTOPP_RUNTIME_TYPE} CRYPTOPP_RUNTIME_TYPE_UPPER)
|
||||
+STRING(COMPARE EQUAL ${CRYPTOPP_RUNTIME_TYPE_UPPER} "STATIC" CRYPTOPP_STATIC_RUNTIME)
|
||||
+
|
||||
+IF(CRYPTOPP_STATIC_RUNTIME)
|
||||
+ IF(WIN32)
|
||||
+ SET(CompilerFlags
|
||||
+ CMAKE_CXX_FLAGS
|
||||
+ CMAKE_CXX_FLAGS_DEBUG
|
||||
+ CMAKE_CXX_FLAGS_RELEASE
|
||||
+ CMAKE_C_FLAGS
|
||||
+ CMAKE_C_FLAGS_DEBUG
|
||||
+ CMAKE_C_FLAGS_RELEASE
|
||||
+ )
|
||||
+ FOREACH(CompilerFlag ${CompilerFlags})
|
||||
+ STRING(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
|
||||
+ ENDFOREACH()
|
||||
+ ENDIF()
|
||||
+ENDIF()
|
||||
+
|
||||
+# --------------------------------------------------------------------------
|
||||
+# Install directories
|
||||
+
|
||||
+string(TOLOWER ${PROJECT_NAME} projectname)
|
||||
+set(CRYPTOPP_INSTALL_SUBDIR "${projectname}-${CRYPTOPP_VERSION_MAJOR}.${CRYPTOPP_VERSION_MINOR}")
|
||||
+
|
||||
+if(NOT CRYPTOPP_INSTALL_BIN_DIR)
|
||||
+ set(CRYPTOPP_INSTALL_BIN_DIR "bin")
|
||||
+endif()
|
||||
+
|
||||
+if(NOT CRYPTOPP_INSTALL_INCLUDE_DIR)
|
||||
+ set(CRYPTOPP_INSTALL_INCLUDE_DIR "include/${projectname}")
|
||||
+endif()
|
||||
+
|
||||
+if(NOT CRYPTOPP_INSTALL_LIB_DIR)
|
||||
+ set(CRYPTOPP_INSTALL_LIB_DIR "lib")
|
||||
+endif()
|
||||
+
|
||||
+if(NOT CRYPTOPP_INSTALL_SHARE_DIR)
|
||||
+ set(CRYPTOPP_INSTALL_SHARE_DIR "share")
|
||||
+endif()
|
||||
+
|
||||
+if(NOT CRYPTOPP_INSTALL_DATA_DIR)
|
||||
+ set(CRYPTOPP_INSTALL_DATA_DIR "${CRYPTOPP_INSTALL_SHARE_DIR}/${CRYPTOPP_INSTALL_SUBDIR}")
|
||||
+endif()
|
||||
+
|
||||
+#########################
|
||||
+# Crypto++ Library
|
||||
+#########################
|
||||
+
|
||||
+CONFIGURE_FILE(adhoc.cpp.proto ${CMAKE_CURRENT_SOURCE_DIR}/adhoc.cpp)
|
||||
+
|
||||
+SET(CRYPTOPP_SRCS_FIPS
|
||||
+ algebra.cpp
|
||||
+ algparam.cpp
|
||||
+ asn.cpp
|
||||
+ authenc.cpp
|
||||
+ basecode.cpp
|
||||
+ cbcmac.cpp
|
||||
+ ccm.cpp
|
||||
+ channels.cpp
|
||||
+ cmac.cpp
|
||||
+ cpu.cpp
|
||||
+ cryptlib.cpp
|
||||
+ des.cpp
|
||||
+ dessp.cpp
|
||||
+ dh.cpp
|
||||
+ dll.cpp
|
||||
+ dsa.cpp
|
||||
+ ec2n.cpp
|
||||
+ eccrypto.cpp
|
||||
+ ecp.cpp
|
||||
+ emsa2.cpp
|
||||
+ eprecomp.cpp
|
||||
+ files.cpp
|
||||
+ filters.cpp
|
||||
+ fips140.cpp
|
||||
+ gcm.cpp
|
||||
+ gf2n.cpp
|
||||
+ gfpcrypt.cpp
|
||||
+ hex.cpp
|
||||
+ hmac.cpp
|
||||
+ hrtimer.cpp
|
||||
+ integer.cpp
|
||||
+ iterhash.cpp
|
||||
+ misc.cpp
|
||||
+ modes.cpp
|
||||
+ modexppc.cpp
|
||||
+ mqueue.cpp
|
||||
+ nbtheory.cpp
|
||||
+ oaep.cpp
|
||||
+ osrng.cpp
|
||||
+ pch.cpp
|
||||
+ pkcspad.cpp
|
||||
+ pssr.cpp
|
||||
+ pubkey.cpp
|
||||
+ queue.cpp
|
||||
+ randpool.cpp
|
||||
+ rdtables.cpp
|
||||
+ rijndael.cpp
|
||||
+ rng.cpp
|
||||
+ rsa.cpp
|
||||
+ rw.cpp
|
||||
+ sha.cpp
|
||||
+ simple.cpp
|
||||
+ skipjack.cpp
|
||||
+ strciphr.cpp
|
||||
+ trdlocal.cpp
|
||||
+)
|
||||
+
|
||||
+SET(CRYPTOPP_SRCS
|
||||
+ 3way.cpp
|
||||
+ adhoc.cpp.proto
|
||||
+ adler32.cpp
|
||||
+ arc4.cpp
|
||||
+ base32.cpp
|
||||
+ base64.cpp
|
||||
+ bfinit.cpp
|
||||
+ blowfish.cpp
|
||||
+ blumshub.cpp
|
||||
+ camellia.cpp
|
||||
+ cast.cpp
|
||||
+ casts.cpp
|
||||
+ crc.cpp
|
||||
+ default.cpp
|
||||
+ dh2.cpp
|
||||
+ eax.cpp
|
||||
+ elgamal.cpp
|
||||
+ esign.cpp
|
||||
+ gf256.cpp
|
||||
+ gf2_32.cpp
|
||||
+ gost.cpp
|
||||
+ gzip.cpp
|
||||
+ ida.cpp
|
||||
+ idea.cpp
|
||||
+ luc.cpp
|
||||
+ mars.cpp
|
||||
+ marss.cpp
|
||||
+ md2.cpp
|
||||
+ md4.cpp
|
||||
+ md5.cpp
|
||||
+ mqv.cpp
|
||||
+ network.cpp
|
||||
+ panama.cpp
|
||||
+ polynomi.cpp
|
||||
+ rabin.cpp
|
||||
+ rc2.cpp
|
||||
+ rc5.cpp
|
||||
+ rc6.cpp
|
||||
+ ripemd.cpp
|
||||
+ safer.cpp
|
||||
+ salsa.cpp
|
||||
+ seal.cpp
|
||||
+ seed.cpp
|
||||
+ serpent.cpp
|
||||
+ sha3.cpp
|
||||
+ shacal2.cpp
|
||||
+ shark.cpp
|
||||
+ sharkbox.cpp
|
||||
+ socketft.cpp
|
||||
+ sosemanuk.cpp
|
||||
+ square.cpp
|
||||
+ squaretb.cpp
|
||||
+ tea.cpp
|
||||
+ tftables.cpp
|
||||
+ tiger.cpp
|
||||
+ tigertab.cpp
|
||||
+ ttmac.cpp
|
||||
+ twofish.cpp
|
||||
+ vmac.cpp
|
||||
+ wait.cpp
|
||||
+ wake.cpp
|
||||
+ whrlpool.cpp
|
||||
+ winpipes.cpp
|
||||
+ xtr.cpp
|
||||
+ xtrcrypt.cpp
|
||||
+ zdeflate.cpp
|
||||
+ zinflate.cpp
|
||||
+ zlib.cpp
|
||||
+)
|
||||
+SET(CRYPTOPP_HDRS
|
||||
+ 3way.h
|
||||
+ adler32.h
|
||||
+ aes.h
|
||||
+ algebra.h
|
||||
+ algparam.h
|
||||
+ arc4.h
|
||||
+ argnames.h
|
||||
+ asn.h
|
||||
+ authenc.h
|
||||
+ base32.h
|
||||
+ base64.h
|
||||
+ basecode.h
|
||||
+ blowfish.h
|
||||
+ blumshub.h
|
||||
+ camellia.h
|
||||
+ cast.h
|
||||
+ cbcmac.h
|
||||
+ ccm.h
|
||||
+ channels.h
|
||||
+ cmac.h
|
||||
+ config.h
|
||||
+ cpu.h
|
||||
+ crc.h
|
||||
+ cryptlib.h
|
||||
+ default.h
|
||||
+ des.h
|
||||
+ dh.h
|
||||
+ dh2.h
|
||||
+ dmac.h
|
||||
+ dsa.h
|
||||
+ eax.h
|
||||
+ ec2n.h
|
||||
+ eccrypto.h
|
||||
+ ecp.h
|
||||
+ elgamal.h
|
||||
+ emsa2.h
|
||||
+ eprecomp.h
|
||||
+ esign.h
|
||||
+ files.h
|
||||
+ filters.h
|
||||
+ fips140.h
|
||||
+ fltrimpl.h
|
||||
+ gcm.h
|
||||
+ gf256.h
|
||||
+ gf2_32.h
|
||||
+ gf2n.h
|
||||
+ gfpcrypt.h
|
||||
+ gost.h
|
||||
+ gzip.h
|
||||
+ hex.h
|
||||
+ hmac.h
|
||||
+ hrtimer.h
|
||||
+ ida.h
|
||||
+ idea.h
|
||||
+ integer.h
|
||||
+ iterhash.h
|
||||
+ lubyrack.h
|
||||
+ luc.h
|
||||
+ mars.h
|
||||
+ md2.h
|
||||
+ md4.h
|
||||
+ md5.h
|
||||
+ mdc.h
|
||||
+ misc.h
|
||||
+ modarith.h
|
||||
+ modes.h
|
||||
+ modexppc.h
|
||||
+ mqueue.h
|
||||
+ mqv.h
|
||||
+ nbtheory.h
|
||||
+ network.h
|
||||
+ nr.h
|
||||
+ oaep.h
|
||||
+ oids.h
|
||||
+ osrng.h
|
||||
+ panama.h
|
||||
+ pch.h
|
||||
+ pkcspad.h
|
||||
+ polynomi.h
|
||||
+ pssr.h
|
||||
+ pubkey.h
|
||||
+ pwdbased.h
|
||||
+ queue.h
|
||||
+ rabin.h
|
||||
+ randpool.h
|
||||
+ rc2.h
|
||||
+ rc5.h
|
||||
+ rc6.h
|
||||
+ rijndael.h
|
||||
+ ripemd.h
|
||||
+ rng.h
|
||||
+ rsa.h
|
||||
+ rw.h
|
||||
+ safer.h
|
||||
+ salsa.h
|
||||
+ seal.h
|
||||
+ secblock.h
|
||||
+ seckey.h
|
||||
+ seed.h
|
||||
+ serpent.h
|
||||
+ sha.h
|
||||
+ sha3.h
|
||||
+ shacal2.h
|
||||
+ shark.h
|
||||
+ simple.h
|
||||
+ skipjack.h
|
||||
+ smartptr.h
|
||||
+ socketft.h
|
||||
+ sosemanuk.h
|
||||
+ square.h
|
||||
+ stdcpp.h
|
||||
+ strciphr.h
|
||||
+ tea.h
|
||||
+ tiger.h
|
||||
+ trdlocal.h
|
||||
+ trunhash.h
|
||||
+ ttmac.h
|
||||
+ twofish.h
|
||||
+ vmac.h
|
||||
+ wait.h
|
||||
+ wake.h
|
||||
+ whrlpool.h
|
||||
+ winpipes.h
|
||||
+ words.h
|
||||
+ xtr.h
|
||||
+ xtrcrypt.h
|
||||
+ zdeflate.h
|
||||
+ zinflate.h
|
||||
+ zlib.h
|
||||
+)
|
||||
+
|
||||
+SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS} ${CRYPTOPP_SRCS_FIPS})
|
||||
+
|
||||
+IF(MSVC)
|
||||
+ SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS} ${CRYPTOPP_HDRS} cryptopp.rc)
|
||||
+ IF(CMAKE_CL_64)
|
||||
+ ENABLE_LANGUAGE(ASM_MASM)
|
||||
+ ADD_CUSTOM_COMMAND(
|
||||
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj
|
||||
+ MAIN_DEPENDENCY x64dll.asm
|
||||
+ COMMAND ${CMAKE_ASM_MASM_COMPILER} /Fo ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj /c ${CMAKE_CURRENT_SOURCE_DIR}/x64dll.asm
|
||||
+ )
|
||||
+ ADD_CUSTOM_COMMAND(
|
||||
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj
|
||||
+ MAIN_DEPENDENCY x64masm.asm
|
||||
+ COMMAND ${CMAKE_ASM_MASM_COMPILER} /Fo ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj /c ${CMAKE_CURRENT_SOURCE_DIR}/x64masm.asm
|
||||
+ )
|
||||
+ ENDIF()
|
||||
+ENDIF()
|
||||
+
|
||||
+#########################
|
||||
+# Crypto++ Static library
|
||||
+#########################
|
||||
+IF(CRYPTOPP_STATIC)
|
||||
+ IF(CMAKE_CL_64)
|
||||
+ SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS}
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj
|
||||
+ )
|
||||
+ ENDIF()
|
||||
+ ADD_LIBRARY(cryptlib STATIC
|
||||
+ ${CRYPTOPP_SRCS}
|
||||
+ )
|
||||
+ SET_TARGET_PROPERTIES(cryptlib PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT} COMPILE_DEFINITIONS CRYPTOPP_LIBRARY_BUILD)
|
||||
+ IF(CRYPTOPP_LDFLAGS)
|
||||
+ SET_TARGET_PROPERTIES(cryptlib PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS})
|
||||
+ ENDIF()
|
||||
+ TARGET_LINK_LIBRARIES(cryptlib)
|
||||
+ENDIF()
|
||||
+
|
||||
+#########################
|
||||
+# Crypto++ Shared library
|
||||
+#########################
|
||||
+IF(CRYPTOPP_SHARED)
|
||||
+ ADD_LIBRARY(cryptopp SHARED
|
||||
+ ${CRYPTOPP_SRCS_FIPS}
|
||||
+ )
|
||||
+ SET_TARGET_PROPERTIES(cryptopp PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT} COMPILE_DEFINITIONS CRYPTOPP_LIBRARY_BUILD)
|
||||
+ IF(CRYPTOPP_LDFLAGS)
|
||||
+ SET_TARGET_PROPERTIES(cryptopp PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS})
|
||||
+ ENDIF()
|
||||
+ TARGET_LINK_LIBRARIES(cryptopp)
|
||||
+
|
||||
+ INSTALL(
|
||||
+ TARGETS cryptopp
|
||||
+ PERMISSIONS ${EXEC_PERMS}
|
||||
+ RUNTIME DESTINATION ${CRYPTOPP_INSTALL_BIN_DIR}
|
||||
+ LIBRARY DESTINATION ${CRYPTOPP_INSTALL_LIB_DIR}
|
||||
+ ARCHIVE DESTINATION ${CRYPTOPP_INSTALL_LIB_DIR}
|
||||
+ )
|
||||
+ INSTALL(FILES ${CRYPTOPP_HDRS}
|
||||
+ DESTINATION ${CRYPTOPP_INSTALL_INCLUDE_DIR}
|
||||
+ )
|
||||
+ENDIF()
|
||||
+
|
||||
+#########################
|
||||
+# Crypto++ Test
|
||||
+#########################
|
||||
+IF(CRYPTOPP_BUILD_TESTS AND CRYPTOPP_STATIC)
|
||||
+ SET(TEST_SRCS
|
||||
+ adhoc.cpp
|
||||
+ bench.cpp
|
||||
+ bench2.cpp
|
||||
+ datatest.cpp
|
||||
+ dlltest.cpp
|
||||
+ fipsalgt.cpp
|
||||
+ regtest.cpp
|
||||
+ test.cpp
|
||||
+ validat1.cpp
|
||||
+ validat2.cpp
|
||||
+ validat3.cpp
|
||||
+ fipstest.cpp
|
||||
+ )
|
||||
+ IF(WIN32)
|
||||
+ SET(TEST_SRCS ${TEST_SRCS}
|
||||
+ bench.h
|
||||
+ factory.h
|
||||
+ validate.h
|
||||
+ )
|
||||
+ ENDIF()
|
||||
+ ADD_EXECUTABLE(cryptest ${TEST_SRCS})
|
||||
+ IF(WIN32)
|
||||
+ IF(MSVC)
|
||||
+ TARGET_LINK_LIBRARIES(cryptest ws2_32.lib cryptlib)
|
||||
+ ELSE()
|
||||
+ TARGET_LINK_LIBRARIES(cryptest cryptlib ws2_32)
|
||||
+ ENDIF()
|
||||
+ ENDIF()
|
||||
+ FILE(COPY TestData DESTINATION . FILES_MATCHING PATTERN TestData/*)
|
||||
+ SET_TARGET_PROPERTIES(cryptest PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT})
|
||||
+ IF(CRYPTOPP_LDFLAGS)
|
||||
+ SET_TARGET_PROPERTIES(cryptest PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS})
|
||||
+ ENDIF()
|
||||
+ENDIF()
|
||||
+
|
||||
+#-----------------------------------------------------------------------------
|
||||
+# pkgconfig support
|
||||
+# enabled by default on Unix, disabled by default on other platforms
|
||||
+if(UNIX OR MINGW)
|
||||
+ option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" ON)
|
||||
+else()
|
||||
+ option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" OFF)
|
||||
+endif()
|
||||
+if(BUILD_PKGCONFIG_FILES)
|
||||
+ # install in lib and not share (see multi-arch note above)
|
||||
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libcrypto++.pc.cmake.in
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/libcrypto++.pc @ONLY)
|
||||
+ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libcrypto++.pc DESTINATION
|
||||
+ ${CRYPTOPP_INSTALL_LIB_DIR}/pkgconfig )
|
||||
+endif()
|
||||
+
|
||||
diff --git a/libcrypto++.pc.cmake.in b/libcrypto++.pc.cmake.in
|
||||
new file mode 100644
|
||||
index 0000000..a0c6371
|
||||
--- /dev/null
|
||||
+++ b/libcrypto++.pc.cmake.in
|
||||
@@ -0,0 +1,12 @@
|
||||
+prefix=@CMAKE_INSTALL_PREFIX@
|
||||
+bindir=${prefix}/@CRYPTOPP_INSTALL_BIN_DIR@
|
||||
+libdir=${prefix}/@CRYPTOPP_INSTALL_LIB_DIR@
|
||||
+includedir=${prefix}/@CRYPTOPP_INSTALL_INCLUDE_DIR@
|
||||
+
|
||||
+Name: libcrypto++
|
||||
+Description: Class library of cryptographic schemes
|
||||
+URL: http://www.cryptopp.com/
|
||||
+Version: @CRYPTOPP_VERSION@
|
||||
+Libs: -L${libdir} -lcryptopp
|
||||
+Cflags: -I${includedir}
|
||||
+
|
||||
18
mingw-w64-crypto++-git/fix-test-linking.patch
Normal file
18
mingw-w64-crypto++-git/fix-test-linking.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
--- a/winpipes.h 2015-07-24 12:17:47.681944900 +0300
|
||||
+++ b/winpipes.h 2015-07-24 12:17:58.280460900 +0300
|
||||
@@ -116,7 +116,6 @@
|
||||
NetworkSource::GetWaitObjects;
|
||||
|
||||
private:
|
||||
- HANDLE GetHandle() const {return WindowsHandle::GetHandle();}
|
||||
NetworkReceiver & AccessReceiver() {return *this;}
|
||||
};
|
||||
|
||||
@@ -131,7 +130,6 @@
|
||||
NetworkSink::GetWaitObjects;
|
||||
|
||||
private:
|
||||
- HANDLE GetHandle() const {return WindowsHandle::GetHandle();}
|
||||
NetworkSender & AccessSender() {return *this;}
|
||||
};
|
||||
|
||||
11
mingw-w64-crypto++-git/libcrypto++.pc
Normal file
11
mingw-w64-crypto++-git/libcrypto++.pc
Normal file
@@ -0,0 +1,11 @@
|
||||
# Written by Alexander Rødseth <rodseth@gmail.com>
|
||||
|
||||
prefix=/usr
|
||||
libdir=${prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: libcrypto++
|
||||
Description: Class library of cryptographic schemes
|
||||
Version: 5.6.2
|
||||
Libs: -L${libdir} -lcryptopp
|
||||
Cflags: -I${includedir}
|
||||
28
mingw-w64-crypto++-git/missing-sources.patch
Normal file
28
mingw-w64-crypto++-git/missing-sources.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
--- src/GNUmakefile.orig 2014-07-23 23:40:41.007000000 +0400
|
||||
+++ src/GNUmakefile 2014-07-23 23:41:05.280600000 +0400
|
||||
@@ -131,7 +131,7 @@
|
||||
TESTOBJS = bench.o bench2.o test.o validat1.o validat2.o validat3.o adhoc.o datatest.o regtest.o fipsalgt.o dlltest.o
|
||||
LIBOBJS = $(filter-out $(TESTOBJS),$(OBJS))
|
||||
|
||||
-DLLSRCS = algebra.cpp algparam.cpp asn.cpp basecode.cpp cbcmac.cpp channels.cpp cryptlib.cpp des.cpp dessp.cpp dh.cpp dll.cpp dsa.cpp ec2n.cpp eccrypto.cpp ecp.cpp eprecomp.cpp files.cpp filters.cpp fips140.cpp fipstest.cpp gf2n.cpp gfpcrypt.cpp hex.cpp hmac.cpp integer.cpp iterhash.cpp misc.cpp modes.cpp modexppc.cpp mqueue.cpp nbtheory.cpp oaep.cpp osrng.cpp pch.cpp pkcspad.cpp pubkey.cpp queue.cpp randpool.cpp rdtables.cpp rijndael.cpp rng.cpp rsa.cpp sha.cpp simple.cpp skipjack.cpp strciphr.cpp trdlocal.cpp
|
||||
+DLLSRCS = algebra.cpp algparam.cpp asn.cpp basecode.cpp cbcmac.cpp channels.cpp cpu.cpp cryptlib.cpp des.cpp dessp.cpp dh.cpp dll.cpp dsa.cpp ec2n.cpp eccrypto.cpp ecp.cpp emsa2.cpp eprecomp.cpp files.cpp filters.cpp fips140.cpp fipstest.cpp gf2n.cpp gfpcrypt.cpp hex.cpp hmac.cpp hrtimer.cpp integer.cpp iterhash.cpp misc.cpp modes.cpp modexppc.cpp mqueue.cpp nbtheory.cpp oaep.cpp osrng.cpp pch.cpp pkcspad.cpp pssr.cpp pubkey.cpp queue.cpp randpool.cpp rdtables.cpp rijndael.cpp rng.cpp rsa.cpp sha.cpp simple.cpp skipjack.cpp strciphr.cpp trdlocal.cpp
|
||||
DLLOBJS = $(DLLSRCS:.cpp=.export.o)
|
||||
LIBIMPORTOBJS = $(LIBOBJS:.o=.import.o)
|
||||
TESTIMPORTOBJS = $(TESTOBJS:.o=.import.o)
|
||||
--- /dev/null 2014-07-23 23:52:53.000000000 +0400
|
||||
+++ src/modexppc.cpp 2014-07-23 20:41:34.132400000 +0400
|
||||
@@ -0,0 +1,14 @@
|
||||
+// modexppc.cpp - written and placed in the public domain by Wei Dai
|
||||
+
|
||||
+#include "pch.h"
|
||||
+
|
||||
+#ifndef CRYPTOPP_IMPORTS
|
||||
+
|
||||
+#include "modexppc.h"
|
||||
+#include "asn.h"
|
||||
+NAMESPACE_BEGIN(CryptoPP)
|
||||
+
|
||||
+
|
||||
+NAMESPACE_END
|
||||
+
|
||||
+#endif
|
||||
11
mingw-w64-crypto++-git/resolve-namespace-conflict.patch
Normal file
11
mingw-w64-crypto++-git/resolve-namespace-conflict.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/validat1.cpp 2015-07-24 11:37:41.137857300 +0300
|
||||
+++ b/validat1.cpp 2015-07-24 11:38:06.164853700 +0300
|
||||
@@ -132,7 +132,7 @@
|
||||
cout << "\nTesting Settings...\n\n";
|
||||
|
||||
word32 w;
|
||||
- memcpy_s(&w, sizeof(w), "\x01\x02\x03\x04", 4);
|
||||
+ CryptoPP::memcpy_s(&w, sizeof(w), "\x01\x02\x03\x04", 4);
|
||||
|
||||
if (w == 0x04030201L)
|
||||
{
|
||||
@@ -3,46 +3,57 @@
|
||||
_realname=crypto++
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=5.6.2
|
||||
pkgrel=3
|
||||
pkgdesc="Crypto++ Library is a free C++ class library of cryptographic schemes."
|
||||
pkgrel=4
|
||||
pkgdesc="Crypto++ Library is a free C++ class library of cryptographic schemes (mingw-w64)"
|
||||
arch=('any')
|
||||
url="http://www.cryptopp.com/"
|
||||
license=('Boost Software License 1.0')
|
||||
options=('staticlibs' 'strip')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-cmake" "unzip")
|
||||
source=("http://www.cryptopp.com/cryptopp${pkgver//./}.zip"
|
||||
libcrypto++.pc
|
||||
missing-sources.patch)
|
||||
missing-sources.patch
|
||||
cryptopp-cmake.patch
|
||||
resolve-namespace-conflict.patch
|
||||
fix-test-linking.patch)
|
||||
md5sums=('7ed022585698df48e65ce9218f6c6a67'
|
||||
'9aa03e5f77303f1c3685c796b17aa204'
|
||||
'b27bcb0cc2938f5af6a07d724ce42b62')
|
||||
'fdf6ec125726e944269b13a6883abc1c'
|
||||
'b27bcb0cc2938f5af6a07d724ce42b62'
|
||||
'88fc344f33a404dccfa9f74ca9f532eb'
|
||||
'947648b79dc1194217eb0ef0423dd413'
|
||||
'038003a889c79e024754bc6f08cdafff')
|
||||
noextract=(cryptopp${pkgver//./}.zip)
|
||||
|
||||
prepare() {
|
||||
cd ${srcdir}
|
||||
unzip cryptopp${pkgver//./}.zip -d ${_realname}
|
||||
|
||||
cd ${_realname}
|
||||
sed -i -e 's/^CXXFLAGS/#CXXFLAGS/' GNUmakefile
|
||||
patch -p1 -i ${srcdir}/missing-sources.patch
|
||||
patch -p1 -i ${srcdir}/cryptopp-cmake.patch
|
||||
patch -p1 -i ${srcdir}/resolve-namespace-conflict.patch
|
||||
patch -p1 -i ${srcdir}/fix-test-linking.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
sed -i -e 's/^CXXFLAGS/#CXXFLAGS/' GNUmakefile
|
||||
patch -p1 -i ${srcdir}/missing-sources.patch
|
||||
make -f GNUMakefile
|
||||
make cryptopp.dll
|
||||
[[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST}
|
||||
mkdir ${srcdir}/build-${MINGW_CHOST}
|
||||
cd ${srcdir}/build-${MINGW_CHOST}
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
|
||||
${MINGW_PREFIX}/bin/cmake \
|
||||
-G"MSYS Makefiles" \
|
||||
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
|
||||
../${_realname}
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd ${srcdir}
|
||||
cd ${srcdir}/build-${MINGW_CHOST}
|
||||
make DESTDIR=${pkgdir} -j1 install
|
||||
|
||||
mkdir -p ${pkgdir}${MINGW_PREFIX}/include/cryptopp
|
||||
cp *.h ${pkgdir}${MINGW_PREFIX}/include/cryptopp
|
||||
|
||||
mkdir -p ${pkgdir}${MINGW_PREFIX}/lib
|
||||
|
||||
install -d ${pkgdir}${MINGW_PREFIX}/{bin,lib/pkgconfig,include/cryptopp}
|
||||
install -m644 *.h ${pkgdir}${MINGW_PREFIX}/include/cryptopp/
|
||||
install -m644 cryptopp.dll "${pkgdir}${MINGW_PREFIX}/bin/cryptopp.dll"
|
||||
install -m644 *.a "${pkgdir}${MINGW_PREFIX}/lib/"
|
||||
install -m644 ${srcdir}/libcrypto++.pc "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/libcrypto++.pc"
|
||||
install -D -m644 License.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
|
||||
|
||||
sed -e "s|/usr|${MINGW_PREFIX}|g" -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/libcrypto++.pc
|
||||
install -D -m644 ${srcdir}/${_realname}/License.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
|
||||
}
|
||||
|
||||
534
mingw-w64-crypto++/cryptopp-cmake.patch
Normal file
534
mingw-w64-crypto++/cryptopp-cmake.patch
Normal file
@@ -0,0 +1,534 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
new file mode 100644
|
||||
index 0000000..a0c6371
|
||||
--- /dev/null
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -0,0 +1,510 @@
|
||||
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||
+
|
||||
+PROJECT(cryptopp)
|
||||
+
|
||||
+set(CRYPTOPP_VERSION_MAJOR 5)
|
||||
+set(CRYPTOPP_VERSION_MINOR 6)
|
||||
+set(CRYPTOPP_VERSION_BUILD 2)
|
||||
+set(CRYPTOPP_VERSION "${CRYPTOPP_VERSION_MAJOR}.${CRYPTOPP_VERSION_MINOR}.${CRYPTOPP_VERSION_BUILD}")
|
||||
+
|
||||
+###################################
|
||||
+# Global platform-specific settings
|
||||
+###################################
|
||||
+IF(MSVC)
|
||||
+ ADD_DEFINITIONS(-DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_WARNINGS -MP -D_SCL_SECURE_NO_WARNINGS -EHsc)
|
||||
+ SET(CMAKE_CXX_FLAGS "-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS")
|
||||
+ELSE()
|
||||
+ ADD_DEFINITIONS(-Wall -Wno-unused-function -Wno-unused-variable -fvisibility=hidden -Wnon-virtual-dtor -Wreorder -Wstrict-null-sentinel -Wsign-promo)
|
||||
+ IF(MINGW)
|
||||
+ ADD_DEFINITIONS(-DWIN32 -D_WINDOWS)
|
||||
+ ELSE()
|
||||
+ ADD_DEFINITIONS(-fPIC)
|
||||
+ ENDIF()
|
||||
+ENDIF()
|
||||
+
|
||||
+SET(CRYPTOPP_LDFLAGS "")
|
||||
+
|
||||
+#########################
|
||||
+# User Settings
|
||||
+#########################
|
||||
+IF(CRYPTOPP_ADDED_DEFINITIONS)
|
||||
+ ADD_DEFINITIONS(${CRYPTOPP_ADDED_DEFINITIONS})
|
||||
+ENDIF()
|
||||
+
|
||||
+IF(CRYPTOPP_ADDED_LDFLAGS)
|
||||
+ SET(CRYPTOPP_LDFLAGS ${CRYPTOPP_LDFLAGS} ${CRYPTOPP_ADDED_LDFLAGS})
|
||||
+ENDIF()
|
||||
+
|
||||
+IF(NOT DEFINED CRYPTOPP_LIBRARY_TYPE)
|
||||
+ SET(CRYPTOPP_LIBRARY_TYPE "BOTH" CACHE STRING "Type of library to build, STATIC, SHARED or BOTH.")
|
||||
+ELSE()
|
||||
+ SET(CRYPTOPP_LIBRARY_TYPE ${CRYPTOPP_LIBRARY_TYPE} CACHE STRING "Type of library to build, STATIC or SHARED.")
|
||||
+ENDIF()
|
||||
+
|
||||
+IF(NOT DEFINED CRYPTOPP_RUNTIME_TYPE)
|
||||
+ SET(CRYPTOPP_RUNTIME_TYPE "STATIC" CACHE STRING "Type of runtime to use, STATIC or SHARED.")
|
||||
+ELSE()
|
||||
+ SET(CRYPTOPP_RUNTIME_TYPE ${CRYPTOPP_RUNTIME_TYPE} CACHE STRING "Type of runtime to use, STATIC or SHARED.")
|
||||
+ENDIF()
|
||||
+
|
||||
+IF(NOT DEFINED CRYPTOPP_BUILD_TESTS)
|
||||
+ SET(CRYPTOPP_BUILD_TESTS TRUE CACHE BOOL "If enabled, builds tests.")
|
||||
+ELSE()
|
||||
+ SET(CRYPTOPP_BUILD_TESTS ${CRYPTOPP_BUILD_TESTS} CACHE BOOL "If enabled, builds tests.")
|
||||
+ENDIF()
|
||||
+
|
||||
+#########################
|
||||
+# Project-wide Settings
|
||||
+#########################
|
||||
+SET(CRYPTOPP_COMPILE_DEFS_OPT COMPILE_DEFINITIONS_DEBUG CRYPTOPP_DEBUG_BUILD)
|
||||
+SET(EXEC_PERMS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
+
|
||||
+STRING(TOUPPER ${CRYPTOPP_LIBRARY_TYPE} CRYPTOPP_LIBRARY_TYPE_UPPER)
|
||||
+STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "STATIC" CRYPTOPP_STATIC)
|
||||
+IF(NOT CRYPTOPP_STATIC)
|
||||
+ STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "BOTH" CRYPTOPP_STATIC)
|
||||
+ENDIF()
|
||||
+STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "SHARED" CRYPTOPP_SHARED)
|
||||
+IF(NOT CRYPTOPP_SHARED)
|
||||
+ STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "BOTH" CRYPTOPP_SHARED)
|
||||
+ENDIF()
|
||||
+
|
||||
+STRING(TOUPPER ${CRYPTOPP_RUNTIME_TYPE} CRYPTOPP_RUNTIME_TYPE_UPPER)
|
||||
+STRING(COMPARE EQUAL ${CRYPTOPP_RUNTIME_TYPE_UPPER} "STATIC" CRYPTOPP_STATIC_RUNTIME)
|
||||
+
|
||||
+IF(CRYPTOPP_STATIC_RUNTIME)
|
||||
+ IF(WIN32)
|
||||
+ SET(CompilerFlags
|
||||
+ CMAKE_CXX_FLAGS
|
||||
+ CMAKE_CXX_FLAGS_DEBUG
|
||||
+ CMAKE_CXX_FLAGS_RELEASE
|
||||
+ CMAKE_C_FLAGS
|
||||
+ CMAKE_C_FLAGS_DEBUG
|
||||
+ CMAKE_C_FLAGS_RELEASE
|
||||
+ )
|
||||
+ FOREACH(CompilerFlag ${CompilerFlags})
|
||||
+ STRING(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
|
||||
+ ENDFOREACH()
|
||||
+ ENDIF()
|
||||
+ENDIF()
|
||||
+
|
||||
+# --------------------------------------------------------------------------
|
||||
+# Install directories
|
||||
+
|
||||
+string(TOLOWER ${PROJECT_NAME} projectname)
|
||||
+set(CRYPTOPP_INSTALL_SUBDIR "${projectname}-${CRYPTOPP_VERSION_MAJOR}.${CRYPTOPP_VERSION_MINOR}")
|
||||
+
|
||||
+if(NOT CRYPTOPP_INSTALL_BIN_DIR)
|
||||
+ set(CRYPTOPP_INSTALL_BIN_DIR "bin")
|
||||
+endif()
|
||||
+
|
||||
+if(NOT CRYPTOPP_INSTALL_INCLUDE_DIR)
|
||||
+ set(CRYPTOPP_INSTALL_INCLUDE_DIR "include/${projectname}")
|
||||
+endif()
|
||||
+
|
||||
+if(NOT CRYPTOPP_INSTALL_LIB_DIR)
|
||||
+ set(CRYPTOPP_INSTALL_LIB_DIR "lib")
|
||||
+endif()
|
||||
+
|
||||
+if(NOT CRYPTOPP_INSTALL_SHARE_DIR)
|
||||
+ set(CRYPTOPP_INSTALL_SHARE_DIR "share")
|
||||
+endif()
|
||||
+
|
||||
+if(NOT CRYPTOPP_INSTALL_DATA_DIR)
|
||||
+ set(CRYPTOPP_INSTALL_DATA_DIR "${CRYPTOPP_INSTALL_SHARE_DIR}/${CRYPTOPP_INSTALL_SUBDIR}")
|
||||
+endif()
|
||||
+
|
||||
+#########################
|
||||
+# Crypto++ Library
|
||||
+#########################
|
||||
+
|
||||
+CONFIGURE_FILE(adhoc.cpp.proto ${CMAKE_CURRENT_SOURCE_DIR}/adhoc.cpp)
|
||||
+
|
||||
+SET(CRYPTOPP_SRCS_FIPS
|
||||
+ algebra.cpp
|
||||
+ algparam.cpp
|
||||
+ asn.cpp
|
||||
+ authenc.cpp
|
||||
+ basecode.cpp
|
||||
+ cbcmac.cpp
|
||||
+ ccm.cpp
|
||||
+ channels.cpp
|
||||
+ cmac.cpp
|
||||
+ cpu.cpp
|
||||
+ cryptlib.cpp
|
||||
+ des.cpp
|
||||
+ dessp.cpp
|
||||
+ dh.cpp
|
||||
+ dll.cpp
|
||||
+ dsa.cpp
|
||||
+ ec2n.cpp
|
||||
+ eccrypto.cpp
|
||||
+ ecp.cpp
|
||||
+ emsa2.cpp
|
||||
+ eprecomp.cpp
|
||||
+ files.cpp
|
||||
+ filters.cpp
|
||||
+ fips140.cpp
|
||||
+ gcm.cpp
|
||||
+ gf2n.cpp
|
||||
+ gfpcrypt.cpp
|
||||
+ hex.cpp
|
||||
+ hmac.cpp
|
||||
+ hrtimer.cpp
|
||||
+ integer.cpp
|
||||
+ iterhash.cpp
|
||||
+ misc.cpp
|
||||
+ modes.cpp
|
||||
+ modexppc.cpp
|
||||
+ mqueue.cpp
|
||||
+ nbtheory.cpp
|
||||
+ oaep.cpp
|
||||
+ osrng.cpp
|
||||
+ pch.cpp
|
||||
+ pkcspad.cpp
|
||||
+ pssr.cpp
|
||||
+ pubkey.cpp
|
||||
+ queue.cpp
|
||||
+ randpool.cpp
|
||||
+ rdtables.cpp
|
||||
+ rijndael.cpp
|
||||
+ rng.cpp
|
||||
+ rsa.cpp
|
||||
+ rw.cpp
|
||||
+ sha.cpp
|
||||
+ simple.cpp
|
||||
+ skipjack.cpp
|
||||
+ strciphr.cpp
|
||||
+ trdlocal.cpp
|
||||
+)
|
||||
+
|
||||
+SET(CRYPTOPP_SRCS
|
||||
+ 3way.cpp
|
||||
+ adhoc.cpp.proto
|
||||
+ adler32.cpp
|
||||
+ arc4.cpp
|
||||
+ base32.cpp
|
||||
+ base64.cpp
|
||||
+ bfinit.cpp
|
||||
+ blowfish.cpp
|
||||
+ blumshub.cpp
|
||||
+ camellia.cpp
|
||||
+ cast.cpp
|
||||
+ casts.cpp
|
||||
+ crc.cpp
|
||||
+ default.cpp
|
||||
+ dh2.cpp
|
||||
+ eax.cpp
|
||||
+ elgamal.cpp
|
||||
+ esign.cpp
|
||||
+ gf256.cpp
|
||||
+ gf2_32.cpp
|
||||
+ gost.cpp
|
||||
+ gzip.cpp
|
||||
+ ida.cpp
|
||||
+ idea.cpp
|
||||
+ luc.cpp
|
||||
+ mars.cpp
|
||||
+ marss.cpp
|
||||
+ md2.cpp
|
||||
+ md4.cpp
|
||||
+ md5.cpp
|
||||
+ mqv.cpp
|
||||
+ network.cpp
|
||||
+ panama.cpp
|
||||
+ polynomi.cpp
|
||||
+ rabin.cpp
|
||||
+ rc2.cpp
|
||||
+ rc5.cpp
|
||||
+ rc6.cpp
|
||||
+ ripemd.cpp
|
||||
+ safer.cpp
|
||||
+ salsa.cpp
|
||||
+ seal.cpp
|
||||
+ seed.cpp
|
||||
+ serpent.cpp
|
||||
+ sha3.cpp
|
||||
+ shacal2.cpp
|
||||
+ shark.cpp
|
||||
+ sharkbox.cpp
|
||||
+ socketft.cpp
|
||||
+ sosemanuk.cpp
|
||||
+ square.cpp
|
||||
+ squaretb.cpp
|
||||
+ tea.cpp
|
||||
+ tftables.cpp
|
||||
+ tiger.cpp
|
||||
+ tigertab.cpp
|
||||
+ ttmac.cpp
|
||||
+ twofish.cpp
|
||||
+ vmac.cpp
|
||||
+ wait.cpp
|
||||
+ wake.cpp
|
||||
+ whrlpool.cpp
|
||||
+ winpipes.cpp
|
||||
+ xtr.cpp
|
||||
+ xtrcrypt.cpp
|
||||
+ zdeflate.cpp
|
||||
+ zinflate.cpp
|
||||
+ zlib.cpp
|
||||
+)
|
||||
+SET(CRYPTOPP_HDRS
|
||||
+ 3way.h
|
||||
+ adler32.h
|
||||
+ aes.h
|
||||
+ algebra.h
|
||||
+ algparam.h
|
||||
+ arc4.h
|
||||
+ argnames.h
|
||||
+ asn.h
|
||||
+ authenc.h
|
||||
+ base32.h
|
||||
+ base64.h
|
||||
+ basecode.h
|
||||
+ blowfish.h
|
||||
+ blumshub.h
|
||||
+ camellia.h
|
||||
+ cast.h
|
||||
+ cbcmac.h
|
||||
+ ccm.h
|
||||
+ channels.h
|
||||
+ cmac.h
|
||||
+ config.h
|
||||
+ cpu.h
|
||||
+ crc.h
|
||||
+ cryptlib.h
|
||||
+ default.h
|
||||
+ des.h
|
||||
+ dh.h
|
||||
+ dh2.h
|
||||
+ dmac.h
|
||||
+ dsa.h
|
||||
+ eax.h
|
||||
+ ec2n.h
|
||||
+ eccrypto.h
|
||||
+ ecp.h
|
||||
+ elgamal.h
|
||||
+ emsa2.h
|
||||
+ eprecomp.h
|
||||
+ esign.h
|
||||
+ files.h
|
||||
+ filters.h
|
||||
+ fips140.h
|
||||
+ fltrimpl.h
|
||||
+ gcm.h
|
||||
+ gf256.h
|
||||
+ gf2_32.h
|
||||
+ gf2n.h
|
||||
+ gfpcrypt.h
|
||||
+ gost.h
|
||||
+ gzip.h
|
||||
+ hex.h
|
||||
+ hmac.h
|
||||
+ hrtimer.h
|
||||
+ ida.h
|
||||
+ idea.h
|
||||
+ integer.h
|
||||
+ iterhash.h
|
||||
+ lubyrack.h
|
||||
+ luc.h
|
||||
+ mars.h
|
||||
+ md2.h
|
||||
+ md4.h
|
||||
+ md5.h
|
||||
+ mdc.h
|
||||
+ misc.h
|
||||
+ modarith.h
|
||||
+ modes.h
|
||||
+ modexppc.h
|
||||
+ mqueue.h
|
||||
+ mqv.h
|
||||
+ nbtheory.h
|
||||
+ network.h
|
||||
+ nr.h
|
||||
+ oaep.h
|
||||
+ oids.h
|
||||
+ osrng.h
|
||||
+ panama.h
|
||||
+ pch.h
|
||||
+ pkcspad.h
|
||||
+ polynomi.h
|
||||
+ pssr.h
|
||||
+ pubkey.h
|
||||
+ pwdbased.h
|
||||
+ queue.h
|
||||
+ rabin.h
|
||||
+ randpool.h
|
||||
+ rc2.h
|
||||
+ rc5.h
|
||||
+ rc6.h
|
||||
+ rijndael.h
|
||||
+ ripemd.h
|
||||
+ rng.h
|
||||
+ rsa.h
|
||||
+ rw.h
|
||||
+ safer.h
|
||||
+ salsa.h
|
||||
+ seal.h
|
||||
+ secblock.h
|
||||
+ seckey.h
|
||||
+ seed.h
|
||||
+ serpent.h
|
||||
+ sha.h
|
||||
+ sha3.h
|
||||
+ shacal2.h
|
||||
+ shark.h
|
||||
+ simple.h
|
||||
+ skipjack.h
|
||||
+ smartptr.h
|
||||
+ socketft.h
|
||||
+ sosemanuk.h
|
||||
+ square.h
|
||||
+ stdcpp.h
|
||||
+ strciphr.h
|
||||
+ tea.h
|
||||
+ tiger.h
|
||||
+ trdlocal.h
|
||||
+ trunhash.h
|
||||
+ ttmac.h
|
||||
+ twofish.h
|
||||
+ vmac.h
|
||||
+ wait.h
|
||||
+ wake.h
|
||||
+ whrlpool.h
|
||||
+ winpipes.h
|
||||
+ words.h
|
||||
+ xtr.h
|
||||
+ xtrcrypt.h
|
||||
+ zdeflate.h
|
||||
+ zinflate.h
|
||||
+ zlib.h
|
||||
+)
|
||||
+
|
||||
+SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS} ${CRYPTOPP_SRCS_FIPS})
|
||||
+
|
||||
+IF(MSVC)
|
||||
+ SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS} ${CRYPTOPP_HDRS} cryptopp.rc)
|
||||
+ IF(CMAKE_CL_64)
|
||||
+ ENABLE_LANGUAGE(ASM_MASM)
|
||||
+ ADD_CUSTOM_COMMAND(
|
||||
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj
|
||||
+ MAIN_DEPENDENCY x64dll.asm
|
||||
+ COMMAND ${CMAKE_ASM_MASM_COMPILER} /Fo ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj /c ${CMAKE_CURRENT_SOURCE_DIR}/x64dll.asm
|
||||
+ )
|
||||
+ ADD_CUSTOM_COMMAND(
|
||||
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj
|
||||
+ MAIN_DEPENDENCY x64masm.asm
|
||||
+ COMMAND ${CMAKE_ASM_MASM_COMPILER} /Fo ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj /c ${CMAKE_CURRENT_SOURCE_DIR}/x64masm.asm
|
||||
+ )
|
||||
+ ENDIF()
|
||||
+ENDIF()
|
||||
+
|
||||
+#########################
|
||||
+# Crypto++ Static library
|
||||
+#########################
|
||||
+IF(CRYPTOPP_STATIC)
|
||||
+ #add_definitions(-DCRYPTOPP_IMPORTS)
|
||||
+ IF(CMAKE_CL_64)
|
||||
+ SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS}
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj
|
||||
+ )
|
||||
+ ENDIF()
|
||||
+ ADD_LIBRARY(cryptlib STATIC
|
||||
+ ${CRYPTOPP_SRCS}
|
||||
+ )
|
||||
+ SET_TARGET_PROPERTIES(cryptlib PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT} COMPILE_DEFINITIONS CRYPTOPP_LIBRARY_BUILD)
|
||||
+ IF(CRYPTOPP_LDFLAGS)
|
||||
+ SET_TARGET_PROPERTIES(cryptlib PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS})
|
||||
+ ENDIF()
|
||||
+ SET_TARGET_PROPERTIES(cryptlib PROPERTIES OUTPUT_NAME "cryptopp")
|
||||
+ TARGET_LINK_LIBRARIES(cryptlib)
|
||||
+
|
||||
+ INSTALL(
|
||||
+ TARGETS cryptlib
|
||||
+ DESTINATION ${CRYPTOPP_INSTALL_LIB_DIR}
|
||||
+ )
|
||||
+ENDIF()
|
||||
+
|
||||
+#########################
|
||||
+# Crypto++ Shared library
|
||||
+#########################
|
||||
+IF(CRYPTOPP_SHARED)
|
||||
+ add_definitions(-DCRYPTOPP_EXPORTS)
|
||||
+ ADD_LIBRARY(cryptopp SHARED
|
||||
+ ${CRYPTOPP_SRCS_FIPS}
|
||||
+ )
|
||||
+ SET_TARGET_PROPERTIES(cryptopp PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT} COMPILE_DEFINITIONS CRYPTOPP_LIBRARY_BUILD)
|
||||
+ IF(CRYPTOPP_LDFLAGS)
|
||||
+ SET_TARGET_PROPERTIES(cryptopp PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS})
|
||||
+ ENDIF()
|
||||
+ TARGET_LINK_LIBRARIES(cryptopp)
|
||||
+
|
||||
+ INSTALL(
|
||||
+ TARGETS cryptopp
|
||||
+ PERMISSIONS ${EXEC_PERMS}
|
||||
+ RUNTIME DESTINATION ${CRYPTOPP_INSTALL_BIN_DIR}
|
||||
+ LIBRARY DESTINATION ${CRYPTOPP_INSTALL_LIB_DIR}
|
||||
+ ARCHIVE DESTINATION ${CRYPTOPP_INSTALL_LIB_DIR}
|
||||
+ )
|
||||
+ INSTALL(FILES ${CRYPTOPP_HDRS}
|
||||
+ DESTINATION ${CRYPTOPP_INSTALL_INCLUDE_DIR}
|
||||
+ )
|
||||
+ENDIF()
|
||||
+
|
||||
+#########################
|
||||
+# Crypto++ Test
|
||||
+#########################
|
||||
+IF(CRYPTOPP_BUILD_TESTS AND CRYPTOPP_STATIC)
|
||||
+ SET(TEST_SRCS
|
||||
+ adhoc.cpp
|
||||
+ bench.cpp
|
||||
+ bench2.cpp
|
||||
+ datatest.cpp
|
||||
+ dlltest.cpp
|
||||
+ fipsalgt.cpp
|
||||
+ regtest.cpp
|
||||
+ test.cpp
|
||||
+ validat1.cpp
|
||||
+ validat2.cpp
|
||||
+ validat3.cpp
|
||||
+ fipstest.cpp
|
||||
+ )
|
||||
+ IF(WIN32)
|
||||
+ SET(TEST_SRCS ${TEST_SRCS}
|
||||
+ bench.h
|
||||
+ factory.h
|
||||
+ validate.h
|
||||
+ )
|
||||
+ ENDIF()
|
||||
+ ADD_EXECUTABLE(cryptest ${TEST_SRCS})
|
||||
+ IF(WIN32)
|
||||
+ IF(MSVC)
|
||||
+ TARGET_LINK_LIBRARIES(cryptest ws2_32.lib cryptlib)
|
||||
+ ELSE()
|
||||
+ TARGET_LINK_LIBRARIES(cryptest cryptlib ws2_32)
|
||||
+ ENDIF()
|
||||
+ ENDIF()
|
||||
+ FILE(COPY TestData DESTINATION . FILES_MATCHING PATTERN TestData/*)
|
||||
+ SET_TARGET_PROPERTIES(cryptest PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT})
|
||||
+ IF(CRYPTOPP_LDFLAGS)
|
||||
+ SET_TARGET_PROPERTIES(cryptest PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS})
|
||||
+ ENDIF()
|
||||
+ENDIF()
|
||||
+
|
||||
+#-----------------------------------------------------------------------------
|
||||
+# pkgconfig support
|
||||
+# enabled by default on Unix, disabled by default on other platforms
|
||||
+if(UNIX OR MINGW)
|
||||
+ option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" ON)
|
||||
+else()
|
||||
+ option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" OFF)
|
||||
+endif()
|
||||
+if(BUILD_PKGCONFIG_FILES)
|
||||
+ # install in lib and not share (see multi-arch note above)
|
||||
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libcrypto++.pc.cmake.in
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/libcrypto++.pc @ONLY)
|
||||
+ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libcrypto++.pc DESTINATION
|
||||
+ ${CRYPTOPP_INSTALL_LIB_DIR}/pkgconfig )
|
||||
+endif()
|
||||
+
|
||||
diff --git a/libcrypto++.pc.cmake.in b/libcrypto++.pc.cmake.in
|
||||
new file mode 100644
|
||||
index 0000000..a0c6371
|
||||
--- /dev/null
|
||||
+++ b/libcrypto++.pc.cmake.in
|
||||
@@ -0,0 +1,12 @@
|
||||
+prefix=@CMAKE_INSTALL_PREFIX@
|
||||
+bindir=${prefix}/@CRYPTOPP_INSTALL_BIN_DIR@
|
||||
+libdir=${prefix}/@CRYPTOPP_INSTALL_LIB_DIR@
|
||||
+includedir=${prefix}/@CRYPTOPP_INSTALL_INCLUDE_DIR@
|
||||
+
|
||||
+Name: libcrypto++
|
||||
+Description: Class library of cryptographic schemes
|
||||
+URL: http://www.cryptopp.com/
|
||||
+Version: @CRYPTOPP_VERSION@
|
||||
+Libs: -L${libdir} -lcryptopp
|
||||
+Cflags: -I${includedir}
|
||||
+
|
||||
526
mingw-w64-crypto++/cryptopp-cmake.patch.orig
Normal file
526
mingw-w64-crypto++/cryptopp-cmake.patch.orig
Normal file
@@ -0,0 +1,526 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
new file mode 100644
|
||||
index 0000000..a0c6371
|
||||
--- /dev/null
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -0,0 +1,502 @@
|
||||
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||
+
|
||||
+PROJECT(cryptopp)
|
||||
+
|
||||
+set(CRYPTOPP_VERSION_MAJOR 5)
|
||||
+set(CRYPTOPP_VERSION_MINOR 6)
|
||||
+set(CRYPTOPP_VERSION_BUILD 2)
|
||||
+set(CRYPTOPP_VERSION "${CRYPTOPP_VERSION_MAJOR}.${CRYPTOPP_VERSION_MINOR}.${CRYPTOPP_VERSION_BUILD}")
|
||||
+
|
||||
+###################################
|
||||
+# Global platform-specific settings
|
||||
+###################################
|
||||
+IF(MSVC)
|
||||
+ ADD_DEFINITIONS(-DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_WARNINGS -MP -D_SCL_SECURE_NO_WARNINGS -EHsc)
|
||||
+ SET(CMAKE_CXX_FLAGS "-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS")
|
||||
+ELSE()
|
||||
+ ADD_DEFINITIONS(-Wall -Wno-unused-function -Wno-unused-variable -fvisibility=hidden -Wnon-virtual-dtor -Wreorder -Wstrict-null-sentinel -Wsign-promo)
|
||||
+ IF(MINGW)
|
||||
+ ADD_DEFINITIONS(-DWIN32 -D_WINDOWS)
|
||||
+ ELSE()
|
||||
+ ADD_DEFINITIONS(-fPIC)
|
||||
+ ENDIF()
|
||||
+ENDIF()
|
||||
+
|
||||
+SET(CRYPTOPP_LDFLAGS "")
|
||||
+
|
||||
+#########################
|
||||
+# User Settings
|
||||
+#########################
|
||||
+IF(CRYPTOPP_ADDED_DEFINITIONS)
|
||||
+ ADD_DEFINITIONS(${CRYPTOPP_ADDED_DEFINITIONS})
|
||||
+ENDIF()
|
||||
+
|
||||
+IF(CRYPTOPP_ADDED_LDFLAGS)
|
||||
+ SET(CRYPTOPP_LDFLAGS ${CRYPTOPP_LDFLAGS} ${CRYPTOPP_ADDED_LDFLAGS})
|
||||
+ENDIF()
|
||||
+
|
||||
+IF(NOT DEFINED CRYPTOPP_LIBRARY_TYPE)
|
||||
+ SET(CRYPTOPP_LIBRARY_TYPE "BOTH" CACHE STRING "Type of library to build, STATIC, SHARED or BOTH.")
|
||||
+ELSE()
|
||||
+ SET(CRYPTOPP_LIBRARY_TYPE ${CRYPTOPP_LIBRARY_TYPE} CACHE STRING "Type of library to build, STATIC or SHARED.")
|
||||
+ENDIF()
|
||||
+
|
||||
+IF(NOT DEFINED CRYPTOPP_RUNTIME_TYPE)
|
||||
+ SET(CRYPTOPP_RUNTIME_TYPE "STATIC" CACHE STRING "Type of runtime to use, STATIC or SHARED.")
|
||||
+ELSE()
|
||||
+ SET(CRYPTOPP_RUNTIME_TYPE ${CRYPTOPP_RUNTIME_TYPE} CACHE STRING "Type of runtime to use, STATIC or SHARED.")
|
||||
+ENDIF()
|
||||
+
|
||||
+IF(NOT DEFINED CRYPTOPP_BUILD_TESTS)
|
||||
+ SET(CRYPTOPP_BUILD_TESTS TRUE CACHE BOOL "If enabled, builds tests.")
|
||||
+ELSE()
|
||||
+ SET(CRYPTOPP_BUILD_TESTS ${CRYPTOPP_BUILD_TESTS} CACHE BOOL "If enabled, builds tests.")
|
||||
+ENDIF()
|
||||
+
|
||||
+#########################
|
||||
+# Project-wide Settings
|
||||
+#########################
|
||||
+SET(CRYPTOPP_COMPILE_DEFS_OPT COMPILE_DEFINITIONS_DEBUG CRYPTOPP_DEBUG_BUILD)
|
||||
+SET(EXEC_PERMS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
+
|
||||
+STRING(TOUPPER ${CRYPTOPP_LIBRARY_TYPE} CRYPTOPP_LIBRARY_TYPE_UPPER)
|
||||
+STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "STATIC" CRYPTOPP_STATIC)
|
||||
+IF(NOT CRYPTOPP_STATIC)
|
||||
+ STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "BOTH" CRYPTOPP_STATIC)
|
||||
+ENDIF()
|
||||
+STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "SHARED" CRYPTOPP_SHARED)
|
||||
+IF(NOT CRYPTOPP_SHARED)
|
||||
+ STRING(COMPARE EQUAL "${CRYPTOPP_LIBRARY_TYPE_UPPER}" "BOTH" CRYPTOPP_SHARED)
|
||||
+ENDIF()
|
||||
+
|
||||
+STRING(TOUPPER ${CRYPTOPP_RUNTIME_TYPE} CRYPTOPP_RUNTIME_TYPE_UPPER)
|
||||
+STRING(COMPARE EQUAL ${CRYPTOPP_RUNTIME_TYPE_UPPER} "STATIC" CRYPTOPP_STATIC_RUNTIME)
|
||||
+
|
||||
+IF(CRYPTOPP_STATIC_RUNTIME)
|
||||
+ IF(WIN32)
|
||||
+ SET(CompilerFlags
|
||||
+ CMAKE_CXX_FLAGS
|
||||
+ CMAKE_CXX_FLAGS_DEBUG
|
||||
+ CMAKE_CXX_FLAGS_RELEASE
|
||||
+ CMAKE_C_FLAGS
|
||||
+ CMAKE_C_FLAGS_DEBUG
|
||||
+ CMAKE_C_FLAGS_RELEASE
|
||||
+ )
|
||||
+ FOREACH(CompilerFlag ${CompilerFlags})
|
||||
+ STRING(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
|
||||
+ ENDFOREACH()
|
||||
+ ENDIF()
|
||||
+ENDIF()
|
||||
+
|
||||
+# --------------------------------------------------------------------------
|
||||
+# Install directories
|
||||
+
|
||||
+string(TOLOWER ${PROJECT_NAME} projectname)
|
||||
+set(CRYPTOPP_INSTALL_SUBDIR "${projectname}-${CRYPTOPP_VERSION_MAJOR}.${CRYPTOPP_VERSION_MINOR}")
|
||||
+
|
||||
+if(NOT CRYPTOPP_INSTALL_BIN_DIR)
|
||||
+ set(CRYPTOPP_INSTALL_BIN_DIR "bin")
|
||||
+endif()
|
||||
+
|
||||
+if(NOT CRYPTOPP_INSTALL_INCLUDE_DIR)
|
||||
+ set(CRYPTOPP_INSTALL_INCLUDE_DIR "include/${projectname}")
|
||||
+endif()
|
||||
+
|
||||
+if(NOT CRYPTOPP_INSTALL_LIB_DIR)
|
||||
+ set(CRYPTOPP_INSTALL_LIB_DIR "lib")
|
||||
+endif()
|
||||
+
|
||||
+if(NOT CRYPTOPP_INSTALL_SHARE_DIR)
|
||||
+ set(CRYPTOPP_INSTALL_SHARE_DIR "share")
|
||||
+endif()
|
||||
+
|
||||
+if(NOT CRYPTOPP_INSTALL_DATA_DIR)
|
||||
+ set(CRYPTOPP_INSTALL_DATA_DIR "${CRYPTOPP_INSTALL_SHARE_DIR}/${CRYPTOPP_INSTALL_SUBDIR}")
|
||||
+endif()
|
||||
+
|
||||
+#########################
|
||||
+# Crypto++ Library
|
||||
+#########################
|
||||
+
|
||||
+CONFIGURE_FILE(adhoc.cpp.proto ${CMAKE_CURRENT_SOURCE_DIR}/adhoc.cpp)
|
||||
+
|
||||
+SET(CRYPTOPP_SRCS_FIPS
|
||||
+ algebra.cpp
|
||||
+ algparam.cpp
|
||||
+ asn.cpp
|
||||
+ authenc.cpp
|
||||
+ basecode.cpp
|
||||
+ cbcmac.cpp
|
||||
+ ccm.cpp
|
||||
+ channels.cpp
|
||||
+ cmac.cpp
|
||||
+ cpu.cpp
|
||||
+ cryptlib.cpp
|
||||
+ des.cpp
|
||||
+ dessp.cpp
|
||||
+ dh.cpp
|
||||
+ dll.cpp
|
||||
+ dsa.cpp
|
||||
+ ec2n.cpp
|
||||
+ eccrypto.cpp
|
||||
+ ecp.cpp
|
||||
+ emsa2.cpp
|
||||
+ eprecomp.cpp
|
||||
+ files.cpp
|
||||
+ filters.cpp
|
||||
+ fips140.cpp
|
||||
+ gcm.cpp
|
||||
+ gf2n.cpp
|
||||
+ gfpcrypt.cpp
|
||||
+ hex.cpp
|
||||
+ hmac.cpp
|
||||
+ hrtimer.cpp
|
||||
+ integer.cpp
|
||||
+ iterhash.cpp
|
||||
+ misc.cpp
|
||||
+ modes.cpp
|
||||
+ modexppc.cpp
|
||||
+ mqueue.cpp
|
||||
+ nbtheory.cpp
|
||||
+ oaep.cpp
|
||||
+ osrng.cpp
|
||||
+ pch.cpp
|
||||
+ pkcspad.cpp
|
||||
+ pssr.cpp
|
||||
+ pubkey.cpp
|
||||
+ queue.cpp
|
||||
+ randpool.cpp
|
||||
+ rdtables.cpp
|
||||
+ rijndael.cpp
|
||||
+ rng.cpp
|
||||
+ rsa.cpp
|
||||
+ rw.cpp
|
||||
+ sha.cpp
|
||||
+ simple.cpp
|
||||
+ skipjack.cpp
|
||||
+ strciphr.cpp
|
||||
+ trdlocal.cpp
|
||||
+)
|
||||
+
|
||||
+SET(CRYPTOPP_SRCS
|
||||
+ 3way.cpp
|
||||
+ adhoc.cpp.proto
|
||||
+ adler32.cpp
|
||||
+ arc4.cpp
|
||||
+ base32.cpp
|
||||
+ base64.cpp
|
||||
+ bfinit.cpp
|
||||
+ blowfish.cpp
|
||||
+ blumshub.cpp
|
||||
+ camellia.cpp
|
||||
+ cast.cpp
|
||||
+ casts.cpp
|
||||
+ crc.cpp
|
||||
+ default.cpp
|
||||
+ dh2.cpp
|
||||
+ eax.cpp
|
||||
+ elgamal.cpp
|
||||
+ esign.cpp
|
||||
+ gf256.cpp
|
||||
+ gf2_32.cpp
|
||||
+ gost.cpp
|
||||
+ gzip.cpp
|
||||
+ ida.cpp
|
||||
+ idea.cpp
|
||||
+ luc.cpp
|
||||
+ mars.cpp
|
||||
+ marss.cpp
|
||||
+ md2.cpp
|
||||
+ md4.cpp
|
||||
+ md5.cpp
|
||||
+ mqv.cpp
|
||||
+ network.cpp
|
||||
+ panama.cpp
|
||||
+ polynomi.cpp
|
||||
+ rabin.cpp
|
||||
+ rc2.cpp
|
||||
+ rc5.cpp
|
||||
+ rc6.cpp
|
||||
+ ripemd.cpp
|
||||
+ safer.cpp
|
||||
+ salsa.cpp
|
||||
+ seal.cpp
|
||||
+ seed.cpp
|
||||
+ serpent.cpp
|
||||
+ sha3.cpp
|
||||
+ shacal2.cpp
|
||||
+ shark.cpp
|
||||
+ sharkbox.cpp
|
||||
+ socketft.cpp
|
||||
+ sosemanuk.cpp
|
||||
+ square.cpp
|
||||
+ squaretb.cpp
|
||||
+ tea.cpp
|
||||
+ tftables.cpp
|
||||
+ tiger.cpp
|
||||
+ tigertab.cpp
|
||||
+ ttmac.cpp
|
||||
+ twofish.cpp
|
||||
+ vmac.cpp
|
||||
+ wait.cpp
|
||||
+ wake.cpp
|
||||
+ whrlpool.cpp
|
||||
+ winpipes.cpp
|
||||
+ xtr.cpp
|
||||
+ xtrcrypt.cpp
|
||||
+ zdeflate.cpp
|
||||
+ zinflate.cpp
|
||||
+ zlib.cpp
|
||||
+)
|
||||
+SET(CRYPTOPP_HDRS
|
||||
+ 3way.h
|
||||
+ adler32.h
|
||||
+ aes.h
|
||||
+ algebra.h
|
||||
+ algparam.h
|
||||
+ arc4.h
|
||||
+ argnames.h
|
||||
+ asn.h
|
||||
+ authenc.h
|
||||
+ base32.h
|
||||
+ base64.h
|
||||
+ basecode.h
|
||||
+ blowfish.h
|
||||
+ blumshub.h
|
||||
+ camellia.h
|
||||
+ cast.h
|
||||
+ cbcmac.h
|
||||
+ ccm.h
|
||||
+ channels.h
|
||||
+ cmac.h
|
||||
+ config.h
|
||||
+ cpu.h
|
||||
+ crc.h
|
||||
+ cryptlib.h
|
||||
+ default.h
|
||||
+ des.h
|
||||
+ dh.h
|
||||
+ dh2.h
|
||||
+ dmac.h
|
||||
+ dsa.h
|
||||
+ eax.h
|
||||
+ ec2n.h
|
||||
+ eccrypto.h
|
||||
+ ecp.h
|
||||
+ elgamal.h
|
||||
+ emsa2.h
|
||||
+ eprecomp.h
|
||||
+ esign.h
|
||||
+ files.h
|
||||
+ filters.h
|
||||
+ fips140.h
|
||||
+ fltrimpl.h
|
||||
+ gcm.h
|
||||
+ gf256.h
|
||||
+ gf2_32.h
|
||||
+ gf2n.h
|
||||
+ gfpcrypt.h
|
||||
+ gost.h
|
||||
+ gzip.h
|
||||
+ hex.h
|
||||
+ hmac.h
|
||||
+ hrtimer.h
|
||||
+ ida.h
|
||||
+ idea.h
|
||||
+ integer.h
|
||||
+ iterhash.h
|
||||
+ lubyrack.h
|
||||
+ luc.h
|
||||
+ mars.h
|
||||
+ md2.h
|
||||
+ md4.h
|
||||
+ md5.h
|
||||
+ mdc.h
|
||||
+ misc.h
|
||||
+ modarith.h
|
||||
+ modes.h
|
||||
+ modexppc.h
|
||||
+ mqueue.h
|
||||
+ mqv.h
|
||||
+ nbtheory.h
|
||||
+ network.h
|
||||
+ nr.h
|
||||
+ oaep.h
|
||||
+ oids.h
|
||||
+ osrng.h
|
||||
+ panama.h
|
||||
+ pch.h
|
||||
+ pkcspad.h
|
||||
+ polynomi.h
|
||||
+ pssr.h
|
||||
+ pubkey.h
|
||||
+ pwdbased.h
|
||||
+ queue.h
|
||||
+ rabin.h
|
||||
+ randpool.h
|
||||
+ rc2.h
|
||||
+ rc5.h
|
||||
+ rc6.h
|
||||
+ rijndael.h
|
||||
+ ripemd.h
|
||||
+ rng.h
|
||||
+ rsa.h
|
||||
+ rw.h
|
||||
+ safer.h
|
||||
+ salsa.h
|
||||
+ seal.h
|
||||
+ secblock.h
|
||||
+ seckey.h
|
||||
+ seed.h
|
||||
+ serpent.h
|
||||
+ sha.h
|
||||
+ sha3.h
|
||||
+ shacal2.h
|
||||
+ shark.h
|
||||
+ simple.h
|
||||
+ skipjack.h
|
||||
+ smartptr.h
|
||||
+ socketft.h
|
||||
+ sosemanuk.h
|
||||
+ square.h
|
||||
+ stdcpp.h
|
||||
+ strciphr.h
|
||||
+ tea.h
|
||||
+ tiger.h
|
||||
+ trdlocal.h
|
||||
+ trunhash.h
|
||||
+ ttmac.h
|
||||
+ twofish.h
|
||||
+ vmac.h
|
||||
+ wait.h
|
||||
+ wake.h
|
||||
+ whrlpool.h
|
||||
+ winpipes.h
|
||||
+ words.h
|
||||
+ xtr.h
|
||||
+ xtrcrypt.h
|
||||
+ zdeflate.h
|
||||
+ zinflate.h
|
||||
+ zlib.h
|
||||
+)
|
||||
+
|
||||
+SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS} ${CRYPTOPP_SRCS_FIPS})
|
||||
+
|
||||
+IF(MSVC)
|
||||
+ SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS} ${CRYPTOPP_HDRS} cryptopp.rc)
|
||||
+ IF(CMAKE_CL_64)
|
||||
+ ENABLE_LANGUAGE(ASM_MASM)
|
||||
+ ADD_CUSTOM_COMMAND(
|
||||
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj
|
||||
+ MAIN_DEPENDENCY x64dll.asm
|
||||
+ COMMAND ${CMAKE_ASM_MASM_COMPILER} /Fo ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj /c ${CMAKE_CURRENT_SOURCE_DIR}/x64dll.asm
|
||||
+ )
|
||||
+ ADD_CUSTOM_COMMAND(
|
||||
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj
|
||||
+ MAIN_DEPENDENCY x64masm.asm
|
||||
+ COMMAND ${CMAKE_ASM_MASM_COMPILER} /Fo ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj /c ${CMAKE_CURRENT_SOURCE_DIR}/x64masm.asm
|
||||
+ )
|
||||
+ ENDIF()
|
||||
+ENDIF()
|
||||
+
|
||||
+#########################
|
||||
+# Crypto++ Static library
|
||||
+#########################
|
||||
+IF(CRYPTOPP_STATIC)
|
||||
+ IF(CMAKE_CL_64)
|
||||
+ SET(CRYPTOPP_SRCS ${CRYPTOPP_SRCS}
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/x64dll.obj
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/x64masm.obj
|
||||
+ )
|
||||
+ ENDIF()
|
||||
+ ADD_LIBRARY(cryptlib STATIC
|
||||
+ ${CRYPTOPP_SRCS}
|
||||
+ )
|
||||
+ SET_TARGET_PROPERTIES(cryptlib PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT} COMPILE_DEFINITIONS CRYPTOPP_LIBRARY_BUILD)
|
||||
+ IF(CRYPTOPP_LDFLAGS)
|
||||
+ SET_TARGET_PROPERTIES(cryptlib PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS})
|
||||
+ ENDIF()
|
||||
+ TARGET_LINK_LIBRARIES(cryptlib)
|
||||
+ENDIF()
|
||||
+
|
||||
+#########################
|
||||
+# Crypto++ Shared library
|
||||
+#########################
|
||||
+IF(CRYPTOPP_SHARED)
|
||||
+ ADD_LIBRARY(cryptopp SHARED
|
||||
+ ${CRYPTOPP_SRCS_FIPS}
|
||||
+ )
|
||||
+ SET_TARGET_PROPERTIES(cryptopp PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT} COMPILE_DEFINITIONS CRYPTOPP_LIBRARY_BUILD)
|
||||
+ IF(CRYPTOPP_LDFLAGS)
|
||||
+ SET_TARGET_PROPERTIES(cryptopp PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS})
|
||||
+ ENDIF()
|
||||
+ TARGET_LINK_LIBRARIES(cryptopp)
|
||||
+
|
||||
+ INSTALL(
|
||||
+ TARGETS cryptopp
|
||||
+ PERMISSIONS ${EXEC_PERMS}
|
||||
+ RUNTIME DESTINATION ${CRYPTOPP_INSTALL_BIN_DIR}
|
||||
+ LIBRARY DESTINATION ${CRYPTOPP_INSTALL_LIB_DIR}
|
||||
+ ARCHIVE DESTINATION ${CRYPTOPP_INSTALL_LIB_DIR}
|
||||
+ )
|
||||
+ INSTALL(FILES ${CRYPTOPP_HDRS}
|
||||
+ DESTINATION ${CRYPTOPP_INSTALL_INCLUDE_DIR}
|
||||
+ )
|
||||
+ENDIF()
|
||||
+
|
||||
+#########################
|
||||
+# Crypto++ Test
|
||||
+#########################
|
||||
+IF(CRYPTOPP_BUILD_TESTS AND CRYPTOPP_STATIC)
|
||||
+ SET(TEST_SRCS
|
||||
+ adhoc.cpp
|
||||
+ bench.cpp
|
||||
+ bench2.cpp
|
||||
+ datatest.cpp
|
||||
+ dlltest.cpp
|
||||
+ fipsalgt.cpp
|
||||
+ regtest.cpp
|
||||
+ test.cpp
|
||||
+ validat1.cpp
|
||||
+ validat2.cpp
|
||||
+ validat3.cpp
|
||||
+ fipstest.cpp
|
||||
+ )
|
||||
+ IF(WIN32)
|
||||
+ SET(TEST_SRCS ${TEST_SRCS}
|
||||
+ bench.h
|
||||
+ factory.h
|
||||
+ validate.h
|
||||
+ )
|
||||
+ ENDIF()
|
||||
+ ADD_EXECUTABLE(cryptest ${TEST_SRCS})
|
||||
+ IF(WIN32)
|
||||
+ IF(MSVC)
|
||||
+ TARGET_LINK_LIBRARIES(cryptest ws2_32.lib cryptlib)
|
||||
+ ELSE()
|
||||
+ TARGET_LINK_LIBRARIES(cryptest cryptlib ws2_32)
|
||||
+ ENDIF()
|
||||
+ ENDIF()
|
||||
+ FILE(COPY TestData DESTINATION . FILES_MATCHING PATTERN TestData/*)
|
||||
+ SET_TARGET_PROPERTIES(cryptest PROPERTIES ${CRYPTOPP_COMPILE_DEFS_OPT})
|
||||
+ IF(CRYPTOPP_LDFLAGS)
|
||||
+ SET_TARGET_PROPERTIES(cryptest PROPERTIES LINK_FLAGS ${CRYPTOPP_LDFLAGS})
|
||||
+ ENDIF()
|
||||
+ENDIF()
|
||||
+
|
||||
+#-----------------------------------------------------------------------------
|
||||
+# pkgconfig support
|
||||
+# enabled by default on Unix, disabled by default on other platforms
|
||||
+if(UNIX OR MINGW)
|
||||
+ option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" ON)
|
||||
+else()
|
||||
+ option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" OFF)
|
||||
+endif()
|
||||
+if(BUILD_PKGCONFIG_FILES)
|
||||
+ # install in lib and not share (see multi-arch note above)
|
||||
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libcrypto++.pc.cmake.in
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/libcrypto++.pc @ONLY)
|
||||
+ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libcrypto++.pc DESTINATION
|
||||
+ ${CRYPTOPP_INSTALL_LIB_DIR}/pkgconfig )
|
||||
+endif()
|
||||
+
|
||||
diff --git a/libcrypto++.pc.cmake.in b/libcrypto++.pc.cmake.in
|
||||
new file mode 100644
|
||||
index 0000000..a0c6371
|
||||
--- /dev/null
|
||||
+++ b/libcrypto++.pc.cmake.in
|
||||
@@ -0,0 +1,12 @@
|
||||
+prefix=@CMAKE_INSTALL_PREFIX@
|
||||
+bindir=${prefix}/@CRYPTOPP_INSTALL_BIN_DIR@
|
||||
+libdir=${prefix}/@CRYPTOPP_INSTALL_LIB_DIR@
|
||||
+includedir=${prefix}/@CRYPTOPP_INSTALL_INCLUDE_DIR@
|
||||
+
|
||||
+Name: libcrypto++
|
||||
+Description: Class library of cryptographic schemes
|
||||
+URL: http://www.cryptopp.com/
|
||||
+Version: @CRYPTOPP_VERSION@
|
||||
+Libs: -L${libdir} -lcryptopp
|
||||
+Cflags: -I${includedir}
|
||||
+
|
||||
18
mingw-w64-crypto++/fix-test-linking.patch
Normal file
18
mingw-w64-crypto++/fix-test-linking.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
--- a/winpipes.h 2015-07-24 12:17:47.681944900 +0300
|
||||
+++ b/winpipes.h 2015-07-24 12:17:58.280460900 +0300
|
||||
@@ -116,7 +116,6 @@
|
||||
NetworkSource::GetWaitObjects;
|
||||
|
||||
private:
|
||||
- HANDLE GetHandle() const {return WindowsHandle::GetHandle();}
|
||||
NetworkReceiver & AccessReceiver() {return *this;}
|
||||
};
|
||||
|
||||
@@ -131,7 +130,6 @@
|
||||
NetworkSink::GetWaitObjects;
|
||||
|
||||
private:
|
||||
- HANDLE GetHandle() const {return WindowsHandle::GetHandle();}
|
||||
NetworkSender & AccessSender() {return *this;}
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@ prefix=/usr
|
||||
libdir=${prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: libcrypto++-5.6.2
|
||||
Name: libcrypto++
|
||||
Description: Class library of cryptographic schemes
|
||||
Version: 5.6.2
|
||||
Libs: -L${libdir} -lcryptopp
|
||||
|
||||
11
mingw-w64-crypto++/resolve-namespace-conflict.patch
Normal file
11
mingw-w64-crypto++/resolve-namespace-conflict.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/validat1.cpp 2015-07-24 11:37:41.137857300 +0300
|
||||
+++ b/validat1.cpp 2015-07-24 11:38:06.164853700 +0300
|
||||
@@ -132,7 +132,7 @@
|
||||
cout << "\nTesting Settings...\n\n";
|
||||
|
||||
word32 w;
|
||||
- memcpy_s(&w, sizeof(w), "\x01\x02\x03\x04", 4);
|
||||
+ CryptoPP::memcpy_s(&w, sizeof(w), "\x01\x02\x03\x04", 4);
|
||||
|
||||
if (w == 0x04030201L)
|
||||
{
|
||||
Reference in New Issue
Block a user