vcpkg/ports/argon2/portfile.cmake

49 lines
1.6 KiB
CMake
Raw Normal View History

[Argon2] Add new port (#24747) * start of argon2 port * continue development * attempt to compile with optimization * add feature to enable hardware optimizations * fix symbol visibility * set symbol visibility * add pkg-config * use libs.private for threading * use last release * start of argon2 port * continue development * attempt to compile with optimization * add feature to enable hardware optimizations * fix symbol visibility * set symbol visibility * add pkg-config * use libs.private for threading * use last release * publish the command line tool * Argon2 port * add version info for argon2 * use preferred vcpkg cmake functions * update version * fix compile of x64-windows-static * update version * Update ports/argon2/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update ports/argon2/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * install pdbs Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * add argon2 licence * use target-specific functions for link libraries * use upstream pkgconfig file * export library for cmake * update version hash * don't use deprecated vcpkg_fixup_cmake_targets * fix cmake integration * update version * fix thread.c includes when building on mingw32 * export header path and thread dependency properly * don't export the argon2_tool * fix output clash between library and tool on mingw * use declspec for symbol visibility with mingw * update version * fix missing PDBs for library due to tool/library filename clash * update argon2 version * quote filenames for safety Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * update arong2 version * note upstream PR for visibility patch * always build with hardware optimizations if supported by compiler * update argon2 version Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
2022-08-30 07:38:21 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO P-H-C/phc-winner-argon2
REF 20190702
SHA512 0a4cb89e8e63399f7df069e2862ccd05308b7652bf4ab74372842f66bcc60776399e0eaf979a7b7e31436b5e6913fe5b0a6949549d8c82ebd06e0629b106e85f
HEAD_REF master
PATCHES
visibility.patch
2023-04-25 09:33:59 +08:00
visibility-for-tool.patch
[Argon2] Add new port (#24747) * start of argon2 port * continue development * attempt to compile with optimization * add feature to enable hardware optimizations * fix symbol visibility * set symbol visibility * add pkg-config * use libs.private for threading * use last release * start of argon2 port * continue development * attempt to compile with optimization * add feature to enable hardware optimizations * fix symbol visibility * set symbol visibility * add pkg-config * use libs.private for threading * use last release * publish the command line tool * Argon2 port * add version info for argon2 * use preferred vcpkg cmake functions * update version * fix compile of x64-windows-static * update version * Update ports/argon2/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update ports/argon2/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * install pdbs Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * add argon2 licence * use target-specific functions for link libraries * use upstream pkgconfig file * export library for cmake * update version hash * don't use deprecated vcpkg_fixup_cmake_targets * fix cmake integration * update version * fix thread.c includes when building on mingw32 * export header path and thread dependency properly * don't export the argon2_tool * fix output clash between library and tool on mingw * use declspec for symbol visibility with mingw * update version * fix missing PDBs for library due to tool/library filename clash * update argon2 version * quote filenames for safety Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * update arong2 version * note upstream PR for visibility patch * always build with hardware optimizations if supported by compiler * update argon2 version Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
2022-08-30 07:38:21 +08:00
thread-header.patch
)
2023-04-25 09:33:59 +08:00
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
[Argon2] Add new port (#24747) * start of argon2 port * continue development * attempt to compile with optimization * add feature to enable hardware optimizations * fix symbol visibility * set symbol visibility * add pkg-config * use libs.private for threading * use last release * start of argon2 port * continue development * attempt to compile with optimization * add feature to enable hardware optimizations * fix symbol visibility * set symbol visibility * add pkg-config * use libs.private for threading * use last release * publish the command line tool * Argon2 port * add version info for argon2 * use preferred vcpkg cmake functions * update version * fix compile of x64-windows-static * update version * Update ports/argon2/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update ports/argon2/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * install pdbs Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * add argon2 licence * use target-specific functions for link libraries * use upstream pkgconfig file * export library for cmake * update version hash * don't use deprecated vcpkg_fixup_cmake_targets * fix cmake integration * update version * fix thread.c includes when building on mingw32 * export header path and thread dependency properly * don't export the argon2_tool * fix output clash between library and tool on mingw * use declspec for symbol visibility with mingw * update version * fix missing PDBs for library due to tool/library filename clash * update argon2 version * quote filenames for safety Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * update arong2 version * note upstream PR for visibility patch * always build with hardware optimizations if supported by compiler * update argon2 version Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
2022-08-30 07:38:21 +08:00
2023-04-25 09:33:59 +08:00
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
hwopt WITH_OPTIMIZATIONS
tool BUILD_TOOL
)
[Argon2] Add new port (#24747) * start of argon2 port * continue development * attempt to compile with optimization * add feature to enable hardware optimizations * fix symbol visibility * set symbol visibility * add pkg-config * use libs.private for threading * use last release * start of argon2 port * continue development * attempt to compile with optimization * add feature to enable hardware optimizations * fix symbol visibility * set symbol visibility * add pkg-config * use libs.private for threading * use last release * publish the command line tool * Argon2 port * add version info for argon2 * use preferred vcpkg cmake functions * update version * fix compile of x64-windows-static * update version * Update ports/argon2/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update ports/argon2/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * install pdbs Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * add argon2 licence * use target-specific functions for link libraries * use upstream pkgconfig file * export library for cmake * update version hash * don't use deprecated vcpkg_fixup_cmake_targets * fix cmake integration * update version * fix thread.c includes when building on mingw32 * export header path and thread dependency properly * don't export the argon2_tool * fix output clash between library and tool on mingw * use declspec for symbol visibility with mingw * update version * fix missing PDBs for library due to tool/library filename clash * update argon2 version * quote filenames for safety Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * update arong2 version * note upstream PR for visibility patch * always build with hardware optimizations if supported by compiler * update argon2 version Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
2022-08-30 07:38:21 +08:00
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
2023-04-25 09:33:59 +08:00
-DUPSTREAM_VER=${VERSION}
OPTIONS_DEBUG
-DBUILD_TOOL=OFF
[Argon2] Add new port (#24747) * start of argon2 port * continue development * attempt to compile with optimization * add feature to enable hardware optimizations * fix symbol visibility * set symbol visibility * add pkg-config * use libs.private for threading * use last release * start of argon2 port * continue development * attempt to compile with optimization * add feature to enable hardware optimizations * fix symbol visibility * set symbol visibility * add pkg-config * use libs.private for threading * use last release * publish the command line tool * Argon2 port * add version info for argon2 * use preferred vcpkg cmake functions * update version * fix compile of x64-windows-static * update version * Update ports/argon2/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update ports/argon2/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * install pdbs Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * add argon2 licence * use target-specific functions for link libraries * use upstream pkgconfig file * export library for cmake * update version hash * don't use deprecated vcpkg_fixup_cmake_targets * fix cmake integration * update version * fix thread.c includes when building on mingw32 * export header path and thread dependency properly * don't export the argon2_tool * fix output clash between library and tool on mingw * use declspec for symbol visibility with mingw * update version * fix missing PDBs for library due to tool/library filename clash * update argon2 version * quote filenames for safety Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * update arong2 version * note upstream PR for visibility patch * always build with hardware optimizations if supported by compiler * update argon2 version Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
2022-08-30 07:38:21 +08:00
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
2023-04-25 09:33:59 +08:00
file(COPY "${CMAKE_CURRENT_LIST_DIR}/unofficial-argon2-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-argon2")
vcpkg_cmake_config_fixup(CONFIG_PATH share/unofficial-argon2 PACKAGE_NAME unofficial-argon2)
# Migration path
file(COPY "${CMAKE_CURRENT_LIST_DIR}/unofficial-libargon2-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-libargon2")
if(BUILD_TOOL)
vcpkg_copy_tools(TOOL_NAMES argon2 AUTO_CLEAN)
endif()
[Argon2] Add new port (#24747) * start of argon2 port * continue development * attempt to compile with optimization * add feature to enable hardware optimizations * fix symbol visibility * set symbol visibility * add pkg-config * use libs.private for threading * use last release * start of argon2 port * continue development * attempt to compile with optimization * add feature to enable hardware optimizations * fix symbol visibility * set symbol visibility * add pkg-config * use libs.private for threading * use last release * publish the command line tool * Argon2 port * add version info for argon2 * use preferred vcpkg cmake functions * update version * fix compile of x64-windows-static * update version * Update ports/argon2/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update ports/argon2/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * install pdbs Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * add argon2 licence * use target-specific functions for link libraries * use upstream pkgconfig file * export library for cmake * update version hash * don't use deprecated vcpkg_fixup_cmake_targets * fix cmake integration * update version * fix thread.c includes when building on mingw32 * export header path and thread dependency properly * don't export the argon2_tool * fix output clash between library and tool on mingw * use declspec for symbol visibility with mingw * update version * fix missing PDBs for library due to tool/library filename clash * update argon2 version * quote filenames for safety Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * update arong2 version * note upstream PR for visibility patch * always build with hardware optimizations if supported by compiler * update argon2 version Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
2022-08-30 07:38:21 +08:00
2023-04-25 09:33:59 +08:00
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/argon2.h" "defined(USING_ARGON2_DLL)" "1")
endif()
[Argon2] Add new port (#24747) * start of argon2 port * continue development * attempt to compile with optimization * add feature to enable hardware optimizations * fix symbol visibility * set symbol visibility * add pkg-config * use libs.private for threading * use last release * start of argon2 port * continue development * attempt to compile with optimization * add feature to enable hardware optimizations * fix symbol visibility * set symbol visibility * add pkg-config * use libs.private for threading * use last release * publish the command line tool * Argon2 port * add version info for argon2 * use preferred vcpkg cmake functions * update version * fix compile of x64-windows-static * update version * Update ports/argon2/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update ports/argon2/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * install pdbs Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * add argon2 licence * use target-specific functions for link libraries * use upstream pkgconfig file * export library for cmake * update version hash * don't use deprecated vcpkg_fixup_cmake_targets * fix cmake integration * update version * fix thread.c includes when building on mingw32 * export header path and thread dependency properly * don't export the argon2_tool * fix output clash between library and tool on mingw * use declspec for symbol visibility with mingw * update version * fix missing PDBs for library due to tool/library filename clash * update argon2 version * quote filenames for safety Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * update arong2 version * note upstream PR for visibility patch * always build with hardware optimizations if supported by compiler * update argon2 version Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
2022-08-30 07:38:21 +08:00
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
2023-04-25 09:33:59 +08:00
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")