Skip to content

[libbpf] Add new port#51968

Merged
vicroms merged 1 commit into
microsoft:masterfrom
chris1786:libbpf
May 26, 2026
Merged

[libbpf] Add new port#51968
vicroms merged 1 commit into
microsoft:masterfrom
chris1786:libbpf

Conversation

@chris1786
Copy link
Copy Markdown
Contributor

@chris1786 chris1786 commented May 25, 2026

  • Changes comply with the maintainer guide.
  • The packaged project shows strong association with the chosen port name. Check this box if at least one of the following criteria is met:
    • The project is in Repology: https://repology.org/project/libbpf/versions
    • The project is amongst the first web search results for "" or " C++". Include a screenshot of the search engine results in the PR.
    • The port name follows the 'GitHubOrg-GitHubRepo' form or equivalent Owner-Project form.
  • Optional dependencies of the build are all controlled by the port. A dependency is controlled if it is declared an unconditional dependency in vcpkg.json, or explicitly disabled through patches or build system arguments such as CMAKE_DISABLE_FIND_PACKAGE_Xxx or VCPKG_LOCK_FIND_PACKAGE
  • The versioning scheme in vcpkg.json matches what upstream says.
  • The license declaration in vcpkg.json matches what upstream says.
  • The installed as the "copyright" file matches what upstream says.
  • The source code of the component installed comes from an authoritative source.
  • The generated "usage text" is brief and accurate. See adding-usage for context. Don't add a usage file if the automatically generated usage is correct.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Exactly one version is added in each modified versions file.

list(APPEND OPTIONS "BUILD_STATIC_ONLY=y")
endif()

if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This library does not have a configuration step, and requires the build step to be executed within the source tree. I couldn't find a way to get vcpkg_make_configure or vcpkg_make_install to support this, so have implemented the required logic within the port itself.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is easily solved by: Adding a configure script.
This script can capture configuration options and save them to a Makefile which is invoked for the actual build. Example: ports/libcap/configure. (ports/*/configure for more.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There is even an Q&A: #49572

@chris1786 chris1786 marked this pull request as ready for review May 25, 2026 16:12
@vicroms vicroms merged commit 45929bd into microsoft:master May 26, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants