diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ab00824..ac01ab0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,6 +44,11 @@ jobs: - name: Set up vcpkg uses: lukka/run-vcpkg@v11 + with: + # Without this, the default '**/vcpkg.json' glob also matches + # packaging/bbalouki-itch/vcpkg.json (a vcpkg *port* manifest with + # no builtin-baseline), and the action fails to find the baseline. + vcpkgJsonGlob: "vcpkg.json" - name: Cache CMake build uses: actions/cache@v4 @@ -130,6 +135,11 @@ jobs: - name: Set up vcpkg uses: lukka/run-vcpkg@v11 + with: + # Without this, the default '**/vcpkg.json' glob also matches + # packaging/bbalouki-itch/vcpkg.json (a vcpkg *port* manifest with + # no builtin-baseline), and the action fails to find the baseline. + vcpkgJsonGlob: "vcpkg.json" - name: Configure CMake (export compile commands) run: | @@ -170,6 +180,11 @@ jobs: - name: Set up vcpkg uses: lukka/run-vcpkg@v11 + with: + # Without this, the default '**/vcpkg.json' glob also matches + # packaging/bbalouki-itch/vcpkg.json (a vcpkg *port* manifest with + # no builtin-baseline), and the action fails to find the baseline. + vcpkgJsonGlob: "vcpkg.json" - name: Configure CMake (ASAN + UBSAN) run: | @@ -216,6 +231,11 @@ jobs: - name: Set up vcpkg uses: lukka/run-vcpkg@v11 + with: + # Without this, the default '**/vcpkg.json' glob also matches + # packaging/bbalouki-itch/vcpkg.json (a vcpkg *port* manifest with + # no builtin-baseline), and the action fails to find the baseline. + vcpkgJsonGlob: "vcpkg.json" - name: Configure CMake (coverage) run: | @@ -305,6 +325,11 @@ jobs: - name: Set up vcpkg uses: lukka/run-vcpkg@v11 + with: + # Without this, the default '**/vcpkg.json' glob also matches + # packaging/bbalouki-itch/vcpkg.json (a vcpkg *port* manifest with + # no builtin-baseline), and the action fails to find the baseline. + vcpkgJsonGlob: "vcpkg.json" - name: Configure CMake (Python bindings) run: | @@ -352,6 +377,11 @@ jobs: - name: Set up vcpkg uses: lukka/run-vcpkg@v11 + with: + # Without this, the default '**/vcpkg.json' glob also matches + # packaging/bbalouki-itch/vcpkg.json (a vcpkg *port* manifest with + # no builtin-baseline), and the action fails to find the baseline. + vcpkgJsonGlob: "vcpkg.json" - name: Configure CMake (benchmarks) run: | diff --git a/packaging b/packaging deleted file mode 160000 index 115a19b..0000000 --- a/packaging +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 115a19b0306f80635bf2911e3b1d4a4ab409cfbf diff --git a/packaging/bbalouki-itch/portfile.cmake b/packaging/bbalouki-itch/portfile.cmake new file mode 100644 index 0000000..8d9242a --- /dev/null +++ b/packaging/bbalouki-itch/portfile.cmake @@ -0,0 +1,42 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO bbalouki/itchcpp + REF "v${VERSION}" + SHA512 81ebc631a6a1d23b903a8726354f3abce1f76050521e031025b5cd7a9ebd055f0fbf84b8686978edc7aabbcaeb5458e2c621c17fa26147828f3a7b31f8d9eeef + HEAD_REF main +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + arrow ITCH_WITH_ARROW + python ITCH_BUILD_PYTHON +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} + -DITCH_BUILD_TESTS=OFF + -DITCH_BUILD_BENCHMARKS=OFF + -DITCH_BUILD_EXAMPLES=OFF + -DITCH_PROJECT_ENV=PROD +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup( + PACKAGE_NAME "itch" + CONFIG_PATH "lib/cmake/itch" + +) +vcpkg_fixup_pkgconfig() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" +) + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/packaging/bbalouki-itch/usage b/packaging/bbalouki-itch/usage new file mode 100644 index 0000000..8570f9e --- /dev/null +++ b/packaging/bbalouki-itch/usage @@ -0,0 +1,4 @@ +itch provides CMake targets: + + find_package(itch CONFIG REQUIRED) + target_link_libraries(main PRIVATE itch::itch) diff --git a/packaging/bbalouki-itch/vcpkg.json b/packaging/bbalouki-itch/vcpkg.json new file mode 100644 index 0000000..eb40bad --- /dev/null +++ b/packaging/bbalouki-itch/vcpkg.json @@ -0,0 +1,36 @@ +{ + "name": "bbalouki-itch", + "version": "1.6.4", + "port-version": 1, + "maintainers": "Bertin Balouki SIMYELI", + "description": "A High-Performance C++ library for parsing the ITCH 5.0 protocol.", + "homepage": "https://github.com/bbalouki/itchcpp", + "documentation": "https://bbalouki.github.io/itchcpp/", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "arrow": { + "description": "Enable Apache Arrow / Parquet columnar export", + "dependencies": [ + { + "name": "arrow", + "features": ["parquet"] + } + ] + }, + "python": { + "description": "Build the pybind11 Python bindings", + "supports": "native", + "dependencies": ["pybind11"] + } + } +}