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
4 changes: 4 additions & 0 deletions ports/libtomcrypt/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Source: libtomcrypt
Version: 1.18.2
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add the Homepage for this port in the CONTROL file?

Homepage: https://github.com/libtom/libtomcrypt

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. https://www.libtom.net
Build-Depends: libtommath
53 changes: 53 additions & 0 deletions ports/libtomcrypt/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO libtom/libtomcrypt
REF v1.18.2
SHA512 53accb4f92077ff1c52102bece270e77c497e599c392aa0bf4dbc173b6789e7e4f1012d8b5f257c438764197cb7bac8ba409a9d4e3a70e69bec5863b9495329e
HEAD_REF master
)

# Make sure we start from a clean slate
vcpkg_execute_build_process(
COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc clean
WORKING_DIRECTORY ${SOURCE_PATH}
)

#Debug Build
vcpkg_execute_build_process(
COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc CFLAGS="/MTd /DUSE_LTM /DLTM_DESC /I${CURRENT_PACKAGES_DIR}/.."
WORKING_DIRECTORY ${SOURCE_PATH}
)

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}
)

#Release Build
vcpkg_execute_build_process(
COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc CFLAGS="/Ox /DUSE_LTM /DLTM_DESC /I${CURRENT_PACKAGES_DIR}/.."
WORKING_DIRECTORY ${SOURCE_PATH}
)

file(INSTALL
${SOURCE_PATH}/tomcrypt.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/lib/
)

file(INSTALL
${SOURCE_PATH}/src/headers/
DESTINATION ${CURRENT_PACKAGES_DIR}/include
)

#Copy license
file(
INSTALL
${SOURCE_PATH}/LICENSE
DESTINATION ${CURRENT_PACKAGES_DIR}/share/libtomcrypt/ RENAME copyright
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please update

file(
    INSTALL 
    ${SOURCE_PATH}/LICENSE
    DESTINATION ${CURRENT_PACKAGES_DIR}/share/libtomcrypt/ RENAME copyright
) 

as

file(
    INSTALL 
    ${SOURCE_PATH}/LICENSE
    DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}  RENAME copyright
) 

?

3 changes: 3 additions & 0 deletions ports/libtommath/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Source: libtommath
Version: 1.2.0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add the Homepage for this port in the CONTROL file?

Homepage: https://github.com/libtom/libtommath

Description: LibTomMath is a free open source portable number theoretic multiple-precision integer library written entirely in C. https://www.libtom.net
50 changes: 50 additions & 0 deletions ports/libtommath/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO libtom/libtommath
REF v1.2.0
SHA512 500bce4467d6cdb0b014e6c66d3b994a8d63b51475db6c3cd77c15c8368fbab4e3b5c458fcd5b35838b74c457a33c15b42d2356964f5ef2a0bd31fd544735c9a
HEAD_REF master
)

# Make sure we start from a clean slate
vcpkg_execute_build_process(
COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc clean
WORKING_DIRECTORY ${SOURCE_PATH}
)

#Debug Build
vcpkg_execute_build_process(
COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc CFLAGS="/MTd"
WORKING_DIRECTORY ${SOURCE_PATH}/
)

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}
)

vcpkg_execute_build_process(
COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc
WORKING_DIRECTORY ${SOURCE_PATH}/
)

file(INSTALL
${SOURCE_PATH}/tommath.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
)

file(INSTALL
${SOURCE_PATH}/tommath.h
DESTINATION ${CURRENT_PACKAGES_DIR}/include
)

file(INSTALL
${SOURCE_PATH}/LICENSE
DESTINATION ${CURRENT_PACKAGES_DIR}/share/libtommath/copyright
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please update

file(INSTALL
    ${SOURCE_PATH}/LICENSE
    DESTINATION ${CURRENT_PACKAGES_DIR}/share/libtommath/copyright
)

as

file(INSTALL
    ${SOURCE_PATH}/LICENSE
    DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright
)

?