Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[kenlm] New Port #13692

Merged
merged 25 commits into from
Oct 20, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
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
52 changes: 52 additions & 0 deletions ports/kenlm/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO kpu/kenlm
REF 689a25aae9171b3ea46bd80d4189f540f35f1a02
SHA512 a1d3521b3458c791eb1242451b4eaafda870f68b5baeb359549eba10ed69ca417eeaaac95fd0d48350852661af7688c6b640361e9f70af57ae24d261c4ac0b85
HEAD_REF master
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
vcpkg_build_cmake(ADD_BIN_TO_PATH)
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved

# Headers
file(
INSTALL ${SOURCE_PATH}/util
DESTINATION ${CURRENT_PACKAGES_DIR}/include
FILES_MATCHING
PATTERN "*.hh"
PATTERN "*.h"
)
file(
INSTALL ${SOURCE_PATH}/lm
DESTINATION ${CURRENT_PACKAGES_DIR}/include
FILES_MATCHING
PATTERN "*.hh"
PATTERN "*.h"
PATTERN "*test_data*" EXCLUDE
)
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved

# Lib
file(GLOB_RECURSE LIBS
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}"
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}"
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}"
)

file(GLOB_RECURSE DEBUG_LIBS
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}"
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}"
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}"
)

file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved

JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
# Copyright and License
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/kenlm RENAME copyright)
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/kenlm RENAME license)
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved

vcpkg_copy_pdbs()
17 changes: 17 additions & 0 deletions ports/kenlm/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "kenlm",
"version-string": "689a25aae9171b3ea46bd80d4189f540f35f1a02",
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
"port-version": 1,
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
"description": "KenLM: Faster and Smaller Language Model Queries",
"dependencies": [
"boost-interprocess",
"boost-program-options",
"boost-ptr-container",
"boost-system",
"boost-test",
"boost-thread",
"bzip2",
"liblzma",
"zlib"
]
}