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

[enkits] New port #34277

Closed
wants to merge 14 commits into from
Closed

[enkits] New port #34277

wants to merge 14 commits into from

Conversation

RT2Code
Copy link
Contributor

@RT2Code RT2Code commented Oct 5, 2023

Add new port enkits : https://github.com/dougbinks/enkiTS

  • Changes comply with the maintainer guide
  • The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines.
  • Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all find_package calls are REQUIRED, are satisfied by vcpkg.json's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxx
  • 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 accurate. See adding-usage for context.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is in the new port's versions file.
  • Only one version is added to each modified port's versions file.

@RT2Code RT2Code changed the title [enkits] [enkits] New port Oct 5, 2023
@MonicaLiu0311 MonicaLiu0311 added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Oct 7, 2023
@MonicaLiu0311
Copy link
Contributor

Note: I will be converting your PR to draft status. When you're ready, please revert to "ready for review".

@MonicaLiu0311 MonicaLiu0311 marked this pull request as draft October 7, 2023 08:39
@RT2Code RT2Code marked this pull request as ready for review October 7, 2023 09:45
@MonicaLiu0311
Copy link
Contributor

Please provide the usage file.

@RT2Code
Copy link
Contributor Author

RT2Code commented Oct 9, 2023

It should be good to go.

@MonicaLiu0311
Copy link
Contributor

MonicaLiu0311 commented Oct 10, 2023

The name case and location issues of the config file:

1> [CMake] CMake Error at G:/enkits/scripts/buildsystems/vcpkg.cmake:859 (_find_package):
1> [CMake]   Could not find a package configuration file provided by "unofficial-enkits"
1> [CMake]   with any of the following names:
1> [CMake] 
1> [CMake]     unofficial-enkitsConfig.cmake
1> [CMake]     unofficial-enkits-config.cmake

Edit: solved.

@MonicaLiu0311
Copy link
Contributor

The usage test passed on x64-windows (header files found):

enkits provides CMake targets:

    find_package(unofficial-enkits CONFIG REQUIRED)
    target_link_libraries(main PRIVATE unofficial::enkiTS::enkiTS)

@MonicaLiu0311 MonicaLiu0311 added the info:reviewed Pull Request changes follow basic guidelines label Oct 10, 2023
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(FILES ${ENKITS_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/enkiTS)
+ install(
+ EXPORT unofficial-enkiTS-config
Copy link
Contributor

Choose a reason for hiding this comment

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

This creates an invalid file name. You musts not use upper-case with -config.cmake. CMake only looks for <lower-case-package>config.cmake. And we do want lower-case unofficial-<port> package names.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Out of curiosity, why did you accept this PR then? I fail to see the difference with mine in this case.

Copy link
Contributor

Choose a reason for hiding this comment

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

... unexpected. I didn't even notice that it was a second PR. I only noticed that "unofficial" was "gone" again, and I found the config was added upstream.

Copy link
Contributor

Choose a reason for hiding this comment

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

The case-sensitivity problem is real: #34487, dougbinks/enkiTS#103.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, thanks for the information and the fix. I used uppercase because that's what was done upstream (unreleased yet) and I hoped to be able to remove the patch on the next release, but I didn't know this could be an issue for CMake.

+ install(FILES ${ENKITS_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/enkiTS)
+ install(
+ EXPORT unofficial-enkiTS-config
+ NAMESPACE unofficial::enkiTS::
Copy link
Contributor

Choose a reason for hiding this comment

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

We also want lower-case unofficial::<port>:: here.

@@ -0,0 +1,27 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't upstream support shared linkage on non-win32?


vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/unofficial-enkiTS PACKAGE_NAME unofficial-enkiTS)
Copy link
Contributor

Choose a reason for hiding this comment

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

... lower-case ...

Comment on lines +3 to +4
find_package(unofficial-enkits CONFIG REQUIRED)
target_link_libraries(main PRIVATE unofficial::enkiTS::enkiTS)
Copy link
Contributor

@dg0yt dg0yt Oct 10, 2023

Choose a reason for hiding this comment

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

unofficial::enkits::enkiTS

+ install(
+ EXPORT unofficial-enkiTS-config
+ NAMESPACE unofficial::enkiTS::
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/unofficial-enkiTS)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/unofficial-enkiTS)
+ DESTINATION share/unofficial-enkits)


vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/unofficial-enkiTS PACKAGE_NAME unofficial-enkiTS)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/unofficial-enkiTS PACKAGE_NAME unofficial-enkiTS)
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-enkits)

@MonicaLiu0311 MonicaLiu0311 removed the info:reviewed Pull Request changes follow basic guidelines label Oct 10, 2023
@BillyONeal
Copy link
Member

I think this was done by #34386 ?

@RT2Code
Copy link
Contributor Author

RT2Code commented Oct 14, 2023

Yes, it's the same with minor differences due to inconsistent reviews. I'm closing it.

@RT2Code RT2Code closed this Oct 14, 2023
@RT2Code RT2Code deleted the enkits branch October 14, 2023 01:41
@MonicaLiu0311
Copy link
Contributor

Duplicate of #34386.

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!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants