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

[vcpkg] initial openbsd (community) support #14549

Merged
merged 11 commits into from Nov 23, 2020

Conversation

jgilje
Copy link
Contributor

@jgilje jgilje commented Nov 12, 2020

Describe the pull request
This PR adds OpenBSD support for vcpkg. I've tested a couple of packages so far, which compile fine (libpq, botan, brotli, sdl2 with dependencies).The triplet-definition is added in the community folder. The patch consists mostly of a set of defines, I was helped in large part by looking at the previous FreeBSD support.

I've defaulted the port to use clang as the gcc included with OpenBSD is quite old (the last GPL2 release). In vcpkg_configure_make(), I've changed the behaviour when running configure to lookup bash in path first.

Quick instructions (included in the triplet file)
Bootstrap using
CC=/usr/bin/clang CXX=/usr/bin/clang++ ./bootstrap-vcpkg.sh
Use with
VCPKG_FORCE_SYSTEM_BINARIES=1 ./vcpkg install brotli

  • What does your PR fix?
    OpenBSD support for vcpkg

  • Which triplets are supported/not supported? Have you updated the CI baseline?
    x64-openbsd

  • Does your PR follow the maintainer guide?
    Yes

@NancyLi1013 NancyLi1013 added the category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed label Nov 13, 2020
Copy link
Contributor

@strega-nil strega-nil left a comment

Choose a reason for hiding this comment

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

This is great! Thanks so much for working on this, just some minor review comments 😄

scripts/cmake/vcpkg_configure_meson.cmake Outdated Show resolved Hide resolved
toolsrc/src/vcpkg/base/system.process.cpp Outdated Show resolved Hide resolved
scripts/toolchains/openbsd.cmake Outdated Show resolved Hide resolved
scripts/toolchains/openbsd.cmake Show resolved Hide resolved
scripts/toolchains/openbsd.cmake Outdated Show resolved Hide resolved
scripts/toolchains/openbsd.cmake Outdated Show resolved Hide resolved
@jgilje
Copy link
Contributor Author

jgilje commented Nov 13, 2020

@strega-nil Thanks, I'll work through your review. I also forgot to add a patched pkg-config to the PR (They ship a custom pkg-config implementation which lacks the {fcfiledir} variable, I hope I'll be able to upstream these changes in the future).

@PhoebeHui
Copy link
Contributor

Please ignore the CI failures, it's not relate to this change, I will rerun the PR after it fixed in baseline.

@strega-nil
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@strega-nil strega-nil left a comment

Choose a reason for hiding this comment

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

I'll run the scripts to update the docs before merging :)

@strega-nil strega-nil added info:reviewed Pull Request changes follow basic guidelines and removed requires:discussion labels Nov 18, 2020
@strega-nil
Copy link
Contributor

strega-nil commented Nov 18, 2020

Waiting on PR #14549 oops, commented on the wrong PR

@strega-nil strega-nil added depends:different-pr This PR or Issue depends on a PR which has been filed and removed depends:different-pr This PR or Issue depends on a PR which has been filed labels Nov 18, 2020
@strega-nil
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@PhoebeHui PhoebeHui removed the info:reviewed Pull Request changes follow basic guidelines label Nov 23, 2020
@PhoebeHui
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@strega-nil strega-nil merged commit d9633d9 into microsoft:master Nov 23, 2020
@strega-nil
Copy link
Contributor

@jgilje thanks so much!

@jgilje jgilje deleted the openbsd_community_support branch November 23, 2020 20:24
strega-nil added a commit to strega-nil/vcpkg that referenced this pull request May 5, 2021
* initial openbsd support in vcpkg

* after clang-format

* hardcoded in the preferred compiler for openbsd in bootstrap scipt (thanks @TorMFinn)

* Fetch a patched pkg-config because openbsd pkg-config lacks {fcfiledir}

* fixes from review feedback

* corrected hash for pkg-config.openbsd

* re-added missing endif()

* regenerate docs

* Update scripts/cmake/vcpkg_configure_meson.cmake

Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants