Hi,
I'm trying to upgrade MuseScore to 4.4.2 and have encountered the following issue. MuseScore has recently begun building its own freetype in order to vendor it with the program. In 4.4.1 they included a way to work around this for Linux package maintainers with the flag "-DMUE_COMPILE_USE_SYSTEM_HARFBUZZ=ON". When this flag is turned on MuseScore's CMakeLists run find_package(HarfBuzz). I've listed harfbuzz as an input MuseScore and /gnu/store/c1azv44lyxcsf80k7qk19wyjb31w5m0a-harfbuzz-8.3.0/lib/cmake/harfbuzz/harfbuzz-config.cmake gets run which starts with the, according to CMake, illegal string "@PACKAGE_INIT@".

I'm not well versed in CMakeLists syntax but looking at its manual [0] I find hints at it being related to making CMakeLists on the filesystem once installed. Looking at the commit that introduced line and the linked issue also points in this direction. But it is also mentioned that the CMake support of HarfBuzz is a community effort and is provided as-is without much testing.

My question now basically boils down to: Is it HarfBuzz that should be patched or MuseScore? Or is it the case that the CMakeLists-file packaged with HarfBuzz should be processed in some further way on our side?

I have included my current work in progress patch for Guix for you to reproduce the issue ith.

[0]: https://cmake.org/cmake/help/latest/module/CMakePackageConfigHelpers.html
[1]: https://github.com/harfbuzz/harfbuzz/commit/da9b838910e62825717a8b2de8ce9c92e396136e