diff options
| author | Chris Moore <crmoore@users.noreply.github.com> | 2020-04-27 09:53:55 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-27 06:53:55 -0700 |
| commit | ff32240ab46609829b22846d18f1a5b1ebef0f28 (patch) | |
| tree | 79f515d38f466cbccdd0df4cc3734784e0d100cf | |
| parent | 28ab0b15cd7cdc1004cac9a28a5ecab198c161b9 (diff) | |
| download | vcpkg-ff32240ab46609829b22846d18f1a5b1ebef0f28.tar.gz vcpkg-ff32240ab46609829b22846d18f1a5b1ebef0f28.zip | |
[Libtomcrypt, libtommath] new ports (#10960)
* Add initial version of libttommath port
* Add initial version of libtomcrypt port
* Remove unnecessary EXTRALIB flag.
* Remove deprecated include(vcpkg_common_functions)
* Add homepage to CONTROL file
* Update license copying in portfile
* [libtommath] make build for non-windows
* [libtomcrypt] make build for non-windows
* [libtomcrypt] update ci baseline
* [libtomcrypt] set HEAD_REF to upstream dev branch
* [libtommath] set HEAD_REF to upstream dev branch
* [libtomcrypt] Correct CFLAGS and include path
* [libtommath][libtomcrypt] Lowercase 'debug' folder. Tweak CRT flags. Use VCPKG_CONCURRENCY.
* [libtomcrypt] Remove x64-windows-static=fail from the ci baseline
Co-authored-by: Frederik Juul <frederik.juul@3shape.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
| -rw-r--r-- | ports/libtomcrypt/CONTROL | 5 | ||||
| -rw-r--r-- | ports/libtomcrypt/portfile.cmake | 95 | ||||
| -rw-r--r-- | ports/libtommath/CONTROL | 4 | ||||
| -rw-r--r-- | ports/libtommath/portfile.cmake | 91 | ||||
| -rw-r--r-- | scripts/ci.baseline.txt | 2 |
5 files changed, 197 insertions, 0 deletions
diff --git a/ports/libtomcrypt/CONTROL b/ports/libtomcrypt/CONTROL new file mode 100644 index 000000000..c5f79aa32 --- /dev/null +++ b/ports/libtomcrypt/CONTROL @@ -0,0 +1,5 @@ +Source: libtomcrypt +Version: 1.18.2-1 +Description: LibTomCrypt is a fairly comprehensive, modular and portable cryptographic toolkit that provides developers with a vast array of well known published block ciphers, one-way hash functions, chaining modes, pseudo-random number generators, public key cryptography and a plethora of other routines. +Homepage: https://www.libtom.net/LibTomCrypt/ +Build-Depends: libtommath
\ No newline at end of file diff --git a/ports/libtomcrypt/portfile.cmake b/ports/libtomcrypt/portfile.cmake new file mode 100644 index 000000000..e547d8375 --- /dev/null +++ b/ports/libtomcrypt/portfile.cmake @@ -0,0 +1,95 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libtom/libtomcrypt + REF v1.18.2 + SHA512 53accb4f92077ff1c52102bece270e77c497e599c392aa0bf4dbc173b6789e7e4f1012d8b5f257c438764197cb7bac8ba409a9d4e3a70e69bec5863b9495329e + HEAD_REF develop +) + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + + if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + set(CRTFLAG "/MD") + else() + set(CRTFLAG "/MT") + endif() + + # Make sure we start from a clean slate + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc clean + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME clean-${TARGET_TRIPLET}-dbg + ) + + #Debug Build + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc "CFLAGS=${CRTFLAG}d /DUSE_LTM /DLTM_DESC \"/I${CURRENT_INSTALLED_DIR}/include\"" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + + file(INSTALL + ${SOURCE_PATH}/tomcrypt.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + + # Clean up necessary to rebuild without debug symbols + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc clean + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME clean-${TARGET_TRIPLET}-rel + ) + + #Release Build + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc "CFLAGS=${CRTFLAG} /Ox /DNDEBUG /DUSE_LTM /DLTM_DESC \"/I${CURRENT_INSTALLED_DIR}/include\"" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-rel + ) + + file(INSTALL + ${SOURCE_PATH}/tomcrypt.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + + file(INSTALL + ${SOURCE_PATH}/src/headers/ + DESTINATION ${CURRENT_PACKAGES_DIR}/include + ) +else() + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(MAKE_FILE "makefile.shared") + else() + set(MAKE_FILE "makefile") + endif() + + set(ENV{CFLAGS} "-fPIC -DUSE_LTM -DLTM_DESC -I${CURRENT_INSTALLED_DIR}/include") + + vcpkg_execute_build_process( + COMMAND make -f ${MAKE_FILE} clean + WORKING_DIRECTORY ${SOURCE_PATH} + ) + vcpkg_execute_build_process( + COMMAND make -j${VCPKG_CONCURRENCY} -f ${MAKE_FILE} PREFIX=${CURRENT_PACKAGES_DIR}/debug LTC_DEBUG=1 install + WORKING_DIRECTORY ${SOURCE_PATH} + ) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + + vcpkg_execute_build_process( + COMMAND make -f ${MAKE_FILE} clean + WORKING_DIRECTORY ${SOURCE_PATH} + ) + vcpkg_execute_build_process( + COMMAND make -j${VCPKG_CONCURRENCY} -f ${MAKE_FILE} PREFIX=${CURRENT_PACKAGES_DIR} install + WORKING_DIRECTORY ${SOURCE_PATH} + ) + +endif() + +#Copy license +file( + INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright +)
\ No newline at end of file diff --git a/ports/libtommath/CONTROL b/ports/libtommath/CONTROL new file mode 100644 index 000000000..dd6359bed --- /dev/null +++ b/ports/libtommath/CONTROL @@ -0,0 +1,4 @@ +Source: libtommath +Version: 1.2.0-1 +Description: LibTomMath is a free open source portable number theoretic multiple-precision integer library written entirely in C. +Homepage: https://www.libtom.net/LibTomMath/ diff --git a/ports/libtommath/portfile.cmake b/ports/libtommath/portfile.cmake new file mode 100644 index 000000000..746ead449 --- /dev/null +++ b/ports/libtommath/portfile.cmake @@ -0,0 +1,91 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libtom/libtommath + REF v1.2.0 + SHA512 500bce4467d6cdb0b014e6c66d3b994a8d63b51475db6c3cd77c15c8368fbab4e3b5c458fcd5b35838b74c457a33c15b42d2356964f5ef2a0bd31fd544735c9a + HEAD_REF develop +) + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + + if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + set(CRTFLAG "/MD") + else() + set(CRTFLAG "/MT") + endif() + + # Make sure we start from a clean slate + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc clean + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME clean-${TARGET_TRIPLET}-dbg + ) + + #Debug Build + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc CFLAGS="${CRTFLAG}d" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + + file(INSTALL + ${SOURCE_PATH}/tommath.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + + # Clean up necessary to rebuild without debug symbols + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc clean + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME clean-${TARGET_TRIPLET}-rel + ) + + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc CFLAGS="${CRTFLAG}" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-rel + ) + + file(INSTALL + ${SOURCE_PATH}/tommath.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + + file(INSTALL + ${SOURCE_PATH}/tommath.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include + ) +else() + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(MAKE_FILE "makefile.shared") + else() + set(MAKE_FILE "makefile") + endif() + + vcpkg_execute_build_process( + COMMAND make -f ${MAKE_FILE} clean + WORKING_DIRECTORY ${SOURCE_PATH} + ) + + vcpkg_execute_build_process( + COMMAND make -j${VCPKG_CONCURRENCY} -f ${MAKE_FILE} PREFIX=${CURRENT_PACKAGES_DIR}/debug COMPILE_DEBUG=1 install + WORKING_DIRECTORY ${SOURCE_PATH} + ) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + + vcpkg_execute_build_process( + COMMAND make -f ${MAKE_FILE} clean + WORKING_DIRECTORY ${SOURCE_PATH} + ) + + vcpkg_execute_build_process( + COMMAND make -j${VCPKG_CONCURRENCY} -f ${MAKE_FILE} PREFIX=${CURRENT_PACKAGES_DIR} install + WORKING_DIRECTORY ${SOURCE_PATH} + ) +endif() + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright +)
\ No newline at end of file diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 6b5088409..25ed3d64b 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -915,6 +915,8 @@ libstk:arm-uwp=fail libstk:x64-uwp=fail
libtins:arm-uwp=fail
libtins:x64-uwp=fail
+libtomcrypt:arm64-windows=fail
+libtomcrypt:arm-uwp=fail
libtorrent:arm-uwp=fail
libtorrent:x64-uwp=fail
libudis86:arm-uwp=fail
|
