-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[projectm4] Add new port #38535
base: master
Are you sure you want to change the base?
[projectm4] Add new port #38535
Conversation
@microsoft-github-policy-service agree |
cc6866f
to
739b5e2
Compare
739b5e2
to
a5c68db
Compare
This new overlay-port introduces the ProjectM Expression Evaluation Library, which is a prerequisite for building the ProjectM Library. This addition is to complement the PR #38535, which aims to address the external dependency concern. ProjectM: https://github.com/projectM-visualizer/projectm ProjectM Eval: https://github.com/projectM-visualizer/projectm-eval --- - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] 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. - [x] 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](https://cmake.org/cmake/help/latest/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html). - [x] The versioning scheme in `vcpkg.json` matches what upstream says. - [x] The license declaration in `vcpkg.json` matches what upstream says. - [x] The installed as the "copyright" file matches what upstream says. - [x] The source code of the component installed comes from an authoritative source. - [x] The generated "usage text" is accurate. See [adding-usage](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/examples/adding-usage.md) for context. - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is in the new port's versions file. - [x] Only one version is added to each modified port's versions file.
This new overlay-port introduces the ProjectM Expression Evaluation Library, which is a prerequisite for building the ProjectM Library. This addition is to complement the PR microsoft#38535, which aims to address the external dependency concern. ProjectM: https://github.com/projectM-visualizer/projectm ProjectM Eval: https://github.com/projectM-visualizer/projectm-eval --- - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] 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. - [x] 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](https://cmake.org/cmake/help/latest/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html). - [x] The versioning scheme in `vcpkg.json` matches what upstream says. - [x] The license declaration in `vcpkg.json` matches what upstream says. - [x] The installed as the "copyright" file matches what upstream says. - [x] The source code of the component installed comes from an authoritative source. - [x] The generated "usage text" is accurate. See [adding-usage](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/examples/adding-usage.md) for context. - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is in the new port's versions file. - [x] Only one version is added to each modified port's versions file.
09f7b85
to
9191092
Compare
9191092
to
a259cf3
Compare
a259cf3
to
6b2be3c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The port usage tests pass with the following triplets:
- x64-linux
- x64-windows
vcpkg_cmake_install() | ||
|
||
vcpkg_cmake_config_fixup( | ||
PACKAGE_NAME "projectm4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit-pick:
PACKAGE_NAME "projectm4" |
The default name is the port name, so this line is redundant.
But I acknowledge that it helps to mark the difference from the second config.
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO projectM-visualizer/projectm | ||
REF "f60cd86" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
REF "f60cd86" | |
REF f60cd86ab687e7b65e6e36a8f0a606dd1141ea23 |
It might be desirable to switch the regular version
scheme in the future, which would allow to express git tags like v${VERSION}
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dg0yt .
@Blaquewithaq Could you help switch to the release version like https://github.com/projectM-visualizer/projectm/releases/tag/v4.1.1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you help switch to the release version like https://github.com/projectM-visualizer/projectm/releases/tag/v4.1.1?
This was already discussed above, we had to make a small change in the build system in response to the above discussion, and this commit is not in the 4.1.1 release. So to resolve this, we have basically three options:
- We can revert to the 4.1.1 version and have to use the submodule option for the
projectm-eval
dependency, which, as stated, was requested to be changed to an external dependency. - Use the commit hash as-is in the port, which, apart from some cosmetic and GitHub-related changes, is essentially the same as v4.1.1
- Wait until the next projectM version is released which includes the projectm-eval dependency fix for vcpkg. In this case, we should close/draft this PR, as this might take a few months like Blaque said.
I'd personally be fine with keeping the commit hash, even if it's not perfect, and when we've released the next version (either 4.1.2 or 4.2.0), we'd update the port and go back to using the variable-based version tag instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd personally be fine with keeping the commit hash, even if it's not perfect, and when we've released the next version (either 4.1.2 or 4.2.0), we'd update the port and go back to using the variable-based version tag instead.
IMO that's fine for the first version of the new port.
And my suggested change is to use the full SHA1 now, not to switch versioning now.
@@ -0,0 +1,20 @@ | |||
{ | |||
"name": "projectm4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the common name of https://github.com/projectM-visualizer/projectm
is projectM
, could you help to confirm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"projectM" is the overall project/library name, but since there's been a huge change beween v3 and v4 regarding the overall API, and v4 is relatively new and not yet adopted widely, it makes sense to put the major number into the port name, which is also reflected in the CMake package name find_package(projectM4)
as well.
This is very similar to other libraries which exist in different versions, e.g. libSDL, which exists as ports sdl1, sdl2 and sdl3 for each respective major version.
We'd like to continue using the 4
suffix to disambiguate multiple major versions of projectM, especially as there are plans for an upcoming version 5 which will have different features and additional dependencies, e.g. the Vulkan SDK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed the inconsistencies, too, but I didn't want to open this discussion, assuming a deliberate choice.
It is normal for major versions to break things. And vcpkg probably will not allow to install different versions side-by-side unless headers and symbols have distinct filepaths/symbols. Adding version 5 may mean to remove version 4, at least from vcpkg CI. (Even openssl 1.1 wasn't accepted to stay when merging openssl 3.0.)
Repology.org indicates that other repositories keep the "projectm" name for version 4.
The long name matches the CMake package name, and and the package name is a ship which seems to have sailed with 4.0.1. However, cmake package name and port name do not need to match, and cmake config may implement a same-major-version matching policy for a given name, when the user supplies the desired version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"projectM" is the overall project/library name, but since there's been a huge change beween v3 and v4 regarding the overall API, and v4 is relatively new and not yet adopted widely, it makes sense to put the major number into the port name, which is also reflected in the CMake package name
find_package(projectM4)
as well.
About the API, as @dg0yt 's comment. And for the find_package
, this find modules is not typically provided by the package itself
This is very similar to other libraries which exist in different versions, e.g. libSDL, which exists as ports sdl1, sdl2 and sdl3 for each respective major version.
Some packages exist more than one port was retained for backwards compatibility. And for projectM
, according to the branch and release status, there's no old version released.
We'd like to continue using the
4
suffix to disambiguate multiple major versions of projectM, especially as there are plans for an upcoming version 5 which will have different features and additional dependencies, e.g. the Vulkan SDK.
Same as the first comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About the API, as @dg0yt 's comment. And for the
find_package
, this find modules is not typically provided by the package itself
Please note projectM uses Config packages now, not the old CMake Find modules. Config packages must be provided by the package, because they contain a lot of build-time information like versions, compiler flags used etc. which are specific to this package build. This is also stated in the linked documentation, reading "The config and version files are typically installed as part of the package".
This is especially true as projectM adds some important dependency flags into the configuration file, which downstream users need to properly link and run the library. Creating these files externally, or providing a generic Find module in the port will not work.
Some packages exist more than one port was retained for backwards compatibility. And for
projectM
, according to the branch and release status, there's no old version released.
We can of course remove the suffix from the port, and just go with projectm
for now. But we'll have to add this suffix for the next major version to prevent losing this backwards compatibility. Then vcpkg will have one unsuffixed port projectm
for 4.x releases, and one suffixed port projectm5
for 5.x releases. If that's the way it's handled in vcpkg, that's fine, but should be documented and clearly stated somewhere to avoid any lengthy discussion on this topic.
Besides that, here's the previous release: https://github.com/projectM-visualizer/projectm/releases/tag/v3.1.12
Due to the way the project was handled in the past in regards to versioning, there's no branch, just a tag. But it is there.
4.1.1 does not have support for vcpkg. I had to add code to make it vcpkg compatible. I can switch it back to version when they release 4.1.2 but until then it has to remain as is to work. |
To shorten this whole discussion and get the port merged in a good way - I'd like to ask @WangWeiLin-MV (or some other maintainer) what's actually left for us to change before the port is ready for merging? To summarize, I find these points which are the requested changes:
Is this the actual list to tick off and get the review done? Any other discussion points. e.g. regarding the handling of CMake Config package files, I can hardly understand why this would be an issue since all other ports using such files also install those from the actual package, and the ports don't provide find modules or any special treatment in the portfile. I also don't get the comment |
Therefore, only |
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. |
This is a new overlay-port to add the ProjectM library: https://github.com/projectM-visualizer/projectm
find_package
calls are REQUIRED, are satisfied byvcpkg.json
's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxx.vcpkg.json
matches what upstream says.vcpkg.json
matches what upstream says../vcpkg x-add-version --all
and committing the result.