[go: up one dir, main page]

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

[au] new port #41119

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

[au] new port #41119

wants to merge 3 commits into from

Conversation

andre-nguyen
Copy link
Contributor
@andre-nguyen andre-nguyen commented Sep 22, 2024
  • Changes comply with the maintainer guide.
  • SHA512s are updated for each updated download.
  • The "supports" clause reflects platforms that may be fixed by this new version.
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • When updating the upstream version, the "port-version" is reset (removed from vcpkg.json).
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

@andre-nguyen andre-nguyen marked this pull request as ready for review September 22, 2024 18:52
@andre-nguyen andre-nguyen changed the title draft: [au] new port [au] new port Sep 22, 2024
@JonLiu1993 JonLiu1993 added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Sep 23, 2024
ports/au/portfile.cmake Outdated Show resolved Hide resolved
ports/au/portfile.cmake Outdated Show resolved Hide resolved
ports/au/portfile.cmake Outdated Show resolved Hide resolved
@JonLiu1993 JonLiu1993 marked this pull request as draft September 23, 2024 07:21
@JonLiu1993
Copy link
Member

Note: I will be converting your PR to draft status. When you respond, please revert to "ready for review". That way, I can be aware that you've responded since you can't modify the tags.

@andre-nguyen
Copy link
Contributor Author

@JonLiu1993 Thank you for your review. I've gone ahead and opened a PR on the docs site microsoft/vcpkg-docs#405 to include some of the best practices you are showing here.

JonLiu1993
JonLiu1993 previously approved these changes Sep 24, 2024
@JonLiu1993
Copy link
Member

Tested usage successfully by au:x64-windows:

au is header-only and can be used from CMake via:

  find_path(AU_INCLUDE_DIRS "au/apply_magnitude.hh")
  target_include_directories(main PRIVATE ${AU_INCLUDE_DIRS})

@JonLiu1993 JonLiu1993 added the info:reviewed Pull Request changes follow basic guidelines label Sep 24, 2024
Copy link
Contributor
@dg0yt dg0yt left a comment

Choose a reason for hiding this comment

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

The manifest lacks a license field.

The patch could be minimized.

Comment on lines +26 to +10
-FetchContent_MakeAvailable(googletest)
-include(GoogleTest)
Copy link
Contributor

Choose a reason for hiding this comment

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

It is more or less enough to remove those two lines.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see, so that's the line that does the download, not the declare line.

)
-
- # Add the test, if requested.
- if (DEFINED ARG_GTEST_SRCS)
Copy link
Contributor

Choose a reason for hiding this comment

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

Changing this line to if(0) would be sufficient.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, patch looks much smaller now

REF "${VERSION}"
SHA512 4aa3282f6b76fbadd04ca572734f72c86b1b0b4e85fc21a03d1ab00b83d3aea319ab2dac3934361b5f6fa7c4a0dccece94fe0a57f3d73d208315b51b1950e374
HEAD_REF main
PATCHES cmakelists.patch
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit-pick:

Suggested change
PATCHES cmakelists.patch
PATCHES
cmakelists.patch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup

# (This is necessary for it to be usable in other CMake projects.)

-set(AU_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/Au)
+set(AU_CMAKE_DIR ${CMAKE_INSTALL_DATAROOTDIR}/cmake/Au)
Copy link
Contributor

Choose a reason for hiding this comment

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

This would be solved without patching with vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Au) (from the vpckg-cmake-config host port).

share/cmake/Au is also wrong, vcpkg wants share/au. (vcpkg_cmake_config_fixup would do it right, given the port name.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, that works, although I then needed to add

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")

because vcpkg_cmake_config_fixup left behind an empty lib folder.

vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}")
vcpkg_cmake_install()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
Copy link
Contributor

Choose a reason for hiding this comment

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

Wait, is this header-only? Then we don't need to build debug.

Suggested change
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")

here, and add the top of the file, add

set(VCPKG_BUILD_TYPE release)  # header-only

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like this works. 👍🏼

@JonLiu1993 JonLiu1993 removed the info:reviewed Pull Request changes follow basic guidelines label Sep 24, 2024
Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>
@JonLiu1993 JonLiu1993 added the info:reviewed Pull Request changes follow basic guidelines label Sep 25, 2024
@JavierMatosD
Copy link
Contributor

Since this port is attempting to take a two letter name, I'm tagging vcpkg-team-review to discuss whether or not there is a need for disambiguation.

@JavierMatosD JavierMatosD added the requires:vcpkg-team-review This PR or issue requires someone on the vcpkg team to take a further look. label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR! info:reviewed Pull Request changes follow basic guidelines requires:vcpkg-team-review This PR or issue requires someone on the vcpkg team to take a further look.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants