Skip to content
Draft
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
34 changes: 34 additions & 0 deletions ports/xdigest/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO rinrab/xdigest
REF "${VERSION}"
SHA512 9bb3ceaca9a3cf35b5dd562589158dc50ad3692c3d17d4b39e1f4a36a00861e30913de5ae3052836deb3ef76a45ad69c7822e2fb14a27c6d73dfcd6115a76d15
HEAD_REF trunk
)

vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
asm USE_ASM
)

if (VCPKG_TARGET_IS_WINDOWS AND USE_ASM)
vcpkg_find_acquire_program(NASM)
list(APPEND OPTIONS "-DCMAKE_ASM_NASM_COMPILER=${NASM}")
endif()

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DENABLE_TESTS=OFF
${FEATURE_OPTIONS}
${OPTIONS}
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/xdigest")

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
26 changes: 26 additions & 0 deletions ports/xdigest/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "xdigest",
"version": "0.3.0",
"description": "Extremely fast digest algorithms packaged into a lightweight library.",
"homepage": "https://github.com/rinrab/xdigest",
"license": "Apache-2.0",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"default-features": [
"asm"
],
"features": {
"asm": {
Copy link
Member

Choose a reason for hiding this comment

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

It seems like this shouldn't be a feature; if anything it would be something someone may want to force off, and that's not what features are for. (In particular, in vcpkg's model it is always assumed that turning on a feature is 'safe')

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, according to vcpkg's model, this should not be in the port at all? And it should decide whether to build assemblies or not on its own? If feature in vcpkg suppose to enable some specific optional modules let's say, that makes sense.

Also, in this case the feature should actually be safe to use as it's the core funtionality of the library.

"description": "Assembly-backed implementation for maximum performance.",
"supports": "!(windows & arm) & !android"
}
}
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -10832,6 +10832,10 @@
"baseline": "0.4.2",
"port-version": 1
},
"xdigest": {
"baseline": "0.3.0",
"port-version": 0
},
"xerces-c": {
"baseline": "3.3.0",
"port-version": 0
Expand Down
9 changes: 9 additions & 0 deletions versions/x-/xdigest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "d57a52c9ad30ded8e6a64bcb276b6ca07ef8645a",
"version": "0.3.0",
"port-version": 0
}
]
}