all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* CMake fails when running find_package on HarfBuzz
@ 2024-09-22 18:23 Rovanion Luckey
  0 siblings, 0 replies; only message in thread
From: Rovanion Luckey @ 2024-09-22 18:23 UTC (permalink / raw)
  To: Guix Devel


[-- Attachment #1.1: Type: text/plain, Size: 1486 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1862 bytes --]

[-- Attachment #2: 0001-gnu-musescore-Update-to-4.4.2.patch --]
[-- Type: text/x-patch, Size: 3693 bytes --]

From 0c772688b36c9bc9df6584564f9ebafb39525f17 Mon Sep 17 00:00:00 2001
Message-Id: <0c772688b36c9bc9df6584564f9ebafb39525f17.1727029359.git.rovanion.luckey@gmail.com>
From: Rovanion Luckey <rovanion.luckey@gmail.com>
Date: Sun, 15 Sep 2024 21:59:16 +0200
Subject: [PATCH] gnu: musescore: Update to 4.4.2.

*  (musescore): Update to 4.4.2.

Change-Id: Id7771f90a91ec3fe1695f617cc98b0109bdf87fd
---
 gnu/packages/music.scm | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git gnu/packages/music.scm gnu/packages/music.scm
index 7fa94b6e14..117aa888c9 100644
--- gnu/packages/music.scm
+++ gnu/packages/music.scm
@@ -38,7 +38,7 @@
 ;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
 ;;; Copyright © 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
 ;;; Copyright © 2021 Frank Pursel <frank.pursel@gmail.com>
-;;; Copyright © 2021 Rovanion Luckey <rovanion.luckey@gmail.com>
+;;; Copyright © 2021-2024 Rovanion Luckey <rovanion.luckey@gmail.com>
 ;;; Copyright © 2021 Justin Veilleux <terramorpha@cock.li>
 ;;; Copyright © 2021, 2022, 2023 Felix Gruber <felgru@posteo.net>
 ;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
@@ -5379,7 +5379,7 @@ (define-public sfizz
 (define-public musescore
   (package
     (name "musescore")
-    (version "4.3.2")
+    (version "4.4.2")
     (source
      (origin
        (method git-fetch)
@@ -5388,13 +5388,13 @@ (define-public musescore
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1hx0l6d7avyfbh88hwn01h9q51mgd9zix91q2kgg1ax73pqxhfs2"))
+        (base32 "13z0snyjvxz8cnp8vcia6bb9mc7zbvsapnvl279fhnfsbf4a62y2"))
        (modules '((guix build utils)))
        (snippet
         '(begin
            ;; Delete precompiled binaries.
-           (delete-file-recursively "src/diagnostics/crashpad_handler")
-           (substitute* "src/diagnostics/CMakeLists.txt"
+           (delete-file-recursively "src/framework/diagnostics/crashpad_handler")
+           (substitute* "src/framework/diagnostics/CMakeLists.txt"
              (("install") "#install"))))))
     (build-system qt-build-system)
     (arguments
@@ -5402,7 +5402,9 @@ (define-public musescore
        `("-DDOWNLOAD_SOUNDFONT=OFF"
          "-DBUILD_DIAGNOSTICS=OFF"
          "-DMUSESCORE_BUILD_CONFIG=release"
-         "-DUSE_SYSTEM_FREETYPE=ON")
+         "-DUSE_SYSTEM_FREETYPE=ON"
+         ;; MuseScore uses HarfBuzz to compile a vendored FreeType.
+         "-DMUE_COMPILE_USE_SYSTEM_HARFBUZZ=ON")
        ;; There are tests, but no simple target to run.  The command used to
        ;; run them is:
        ;;
@@ -5413,11 +5415,12 @@ (define-public musescore
        ;; So we simply skip them.
        #:tests? #f))
     (native-inputs
-     (list git-minimal pkg-config qttools-5))
+     (list git-minimal pkg-config qttools))
     (inputs
      (list alsa-lib
            freetype
            `(,gtk+ "bin")               ;for gtk-update-icon-cache
+           harfbuzz
            jack-1
            lame
            libogg
@@ -5427,14 +5430,14 @@ (define-public musescore
            portmidi
            pulseaudio
            python
-           qtbase-5
-           qtdeclarative-5
+           qtbase
+           qtdeclarative
            qtgraphicaleffects
-           qtnetworkauth-5
-           qtquickcontrols-5
-           qtquickcontrols2-5
+           qtnetworkauth
+           qtscxml
+           qt5compat
            qtscript
-           qtsvg-5
+           qtsvg
            qtx11extras
            qtxmlpatterns))
     (propagated-inputs

base-commit: b7c94d528875415ea7ec6225d88a6b3d55fa2e14
-- 
2.39.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-09-22 18:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-22 18:23 CMake fails when running find_package on HarfBuzz Rovanion Luckey

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.