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

[vowpal-wabbit] New port #27323

Merged
merged 15 commits into from
Oct 24, 2022
Merged
33 changes: 33 additions & 0 deletions ports/vowpalwabbit/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO VowpalWabbit/vowpal_wabbit
REF 9496a6dd5610910a495ca004a93c8ab6913293e4
SHA512 df4da3f3ab763dbd113b0ace0552d676ec905a6ff0d942d9fc1828e36fb8440d1b75a61c1ea6de09879e0f52547366936d02a77dba2bac89503a075da12414db
HEAD_REF master
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DVW_INSTALL=ON
-DRAPIDJSON_SYS_DEP=ON
-DFMT_SYS_DEP=ON
-DSPDLOG_SYS_DEP=ON
-DVW_BOOST_MATH_SYS_DEP=ON
-DVW_ZLIB_SYS_DEP=ON
-DVW_BUILD_VW_C_WRAPPER=OFF
-DBUILD_TESTING=OFF
)
vcpkg_cmake_install()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/VowpalWabbit)

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
5 changes: 5 additions & 0 deletions ports/vowpalwabbit/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
vowpalwabbit provides CMake targets:

find_package(VowpalWabbit CONFIG REQUIRED)
# note: 4 additional targets are not displayed.
target_link_libraries(main PRIVATE VowpalWabbit::vw_io VowpalWabbit::vw_core VowpalWabbit::vw_common VowpalWabbit::vw_config)
25 changes: 25 additions & 0 deletions ports/vowpalwabbit/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "vowpalwabbit",
"version": "9.5.0",
"description": "Reduction based online learning framework with a focus on contextual bandits and reinforcement learning.",
"homepage": "https://github.com/vowpalwabbit/vowpal_wabbit",
"license": "BSD-3-Clause",
"supports": "!x86 & !uwp & !(windows & arm)",
"dependencies": [
"boost-math",
"flatbuffers",
"fmt",
"rapidjson",
"spdlog",
"string-view-lite",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
},
"zlib"
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7804,6 +7804,10 @@
"baseline": "1.3.204",
"port-version": 1
},
"vowpalwabbit": {
"baseline": "9.5.0",
"port-version": 0
},
"vs-yasm": {
"baseline": "0.5.0",
"port-version": 1
Expand Down
9 changes: 9 additions & 0 deletions versions/v-/vowpalwabbit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "4b93467f925e65589160e76cb2c20105b7f33f19",
"version": "9.5.0",
"port-version": 0
}
]
}