clementine, qjson, liblastfm: fix build failure with cmake 4#452435
clementine, qjson, liblastfm: fix build failure with cmake 4#452435vcunat merged 3 commits intoNixOS:masterfrom
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
a116a20 to
74f5641
Compare
|
This comment was marked as outdated.
This comment was marked as outdated.
|
This seems to be a sandbox related issue |
This comment was marked as duplicate.
This comment was marked as duplicate.
|
Ok, I dont own a macOS machine, so I'll have to run nixpkgs-review a few times to debug this, so I'll mark this PR as draft while not ready. |
- CMake 4 is no longer retro compatible with versions < 3.5
- CMake 4 is no longer retro compatible with versions < 3.5 - Policy CMP0053 may not be set to OLD behavior because this version of CMake no longer supports it. The policy was introduced in CMake version 3.1.0, and use of NEW behavior is now required.
- CMake 4 is no longer retro compatible with versions < 3.5 - Policy CMP0053 may not be set to OLD behavior because this version of CMake no longer supports it. The policy was introduced in CMake version 3.1.0, and use of NEW behavior is now required.
74f5641 to
e5cb53f
Compare
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
|
LordGrimmauld
left a comment
There was a problem hiding this comment.
Diff looks reasonable. I did not check the build, i trust the nixpkgs-review done by @Sigmanificient for that.
I did double-check upstream for potential better fixes, and came back empty-handed. Tbh i am surprised this is even possible to resurrect this easily, these dependencies are quite crusty. Qt5 is EOL, liblastfm is abandoned upstream, and qjson is tracking a fork of the original (abandoned) sourceforge repository (we should maybe fix the meta homepage for that, but that is a different orthogonal change).
Personally i'd just remove all of this stuff, but there is no harm in fixing it even if it is being removed in the near future, the work is already done. Thank you!
| # CMake 3.0.0 is deprecated and no longer supported by CMake > 4 | ||
| # https://github.com/NixOS/nixpkgs/issues/445447 | ||
| substituteInPlace 3rdparty/{qsqlite,qtsingleapplication,qtiocompressor,qxt}/CMakeLists.txt \ | ||
| cmake/{ParseArguments.cmake,Translations.cmake} \ | ||
| tests/CMakeLists.txt gst/moodbar/CMakeLists.txt \ | ||
| --replace-fail \ | ||
| "cmake_minimum_required(VERSION 3.0.0)" \ | ||
| "cmake_minimum_required(VERSION 3.10)" | ||
| substituteInPlace 3rdparty/libmygpo-qt5/CMakeLists.txt --replace-fail \ | ||
| "cmake_minimum_required( VERSION 3.0.0 FATAL_ERROR )" \ | ||
| "cmake_minimum_required(VERSION 3.10)" | ||
| substituteInPlace CMakeLists.txt --replace-fail \ | ||
| "cmake_policy(SET CMP0053 OLD)" \ | ||
| "" |
There was a problem hiding this comment.
Damn! This is a lot... Kudos for going to these lengths. With multiple 3rd-party deps i did accept the cmake flag as a shortcut in the past, but this is certainly a way XD
| sed -i CMakeLists.txt \ | ||
| -e 's,libprotobuf.a,protobuf,g' | ||
|
|
||
| # CMake 3.0.0 is deprecated and no longer supported by CMake > 4 |
There was a problem hiding this comment.
Upstream did some cmake cleanup in clementine-player/Clementine@fe3599c, but did not actually bump the cmake_minimum_required, so an update won't fix and there is no commits to fetch.
clementine-player/Clementine#7402 does technically exist, but the upstream CI failing across the board is concerning. It may still make sense to link it, but substituteInPlace really does seem like it is the best way.
| }) | ||
| ]; | ||
|
|
||
| # CMake 2.8.6 is deprecated and no longer supported by CMake > 4 |
There was a problem hiding this comment.
liblastfm is dead upstream, so makes sense to just substitute and be done with it.
| sha256 = "1f4wnxzx0qdmxzc7hqk28m0sva7z9p9xmxm6aifvjlp0ha6pmfxs"; | ||
| }; | ||
|
|
||
| # CMake 2.8.8 is deprecated and no longer supported by CMake > 4 |
There was a problem hiding this comment.
I am surprised this even still builds... Upstream claims build failures e.g. in flavio/qjson@1105e53...
That said, upstream does not have a fix for cmake 4 yet, so a substitute seems to make sense.
Fix
clementinebuild failure and its dependencies on newer cmake 4.Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.