public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/musescore] f45: Fix flatpak build
@ 2026-11-12 20:56 Yaakov Selkowitz
  0 siblings, 0 replies; only message in thread
From: Yaakov Selkowitz @ 2026-11-12 20:56 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/musescore
            Branch : f45
            Commit : cdbbd3cbe5c9600e161b334fde827b0f2e017d97
            Author : Yaakov Selkowitz <yselkowi@redhat.com>
            Date   : 2026-11-12T13:52:55-07:00
            Stats  : +64/-40 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/musescore/c/cdbbd3cbe5c9600e161b334fde827b0f2e017d97?branch=f45

            Log:
            Fix flatpak build

liblouis and most of these fonts (except for gnu-free-fonts, which are in
the flatpak runtime) need to be built specifically for this flatpak and
therefore will also be in the /app prefix in that case.

---
diff --git a/musescore-unbundle-fonts.patch b/musescore-unbundle-fonts.patch
index 3c2eeb7..402338e 100644
--- a/musescore-unbundle-fonts.patch
+++ b/musescore-unbundle-fonts.patch
@@ -39,7 +39,7 @@
  
      if (fileName.isEmpty()) {         // defaults to built-in xml
 -        path = u":/fonts/fonts_figuredbass.xml";
-+        path = u"/usr/share/" MUSE_APP_INSTALL_NAME "fonts/fonts_figuredbass.xml";
++        path = u"" MUSE_APP_INSTALL_PREFIX "/share/" MUSE_APP_INSTALL_NAME "fonts/fonts_figuredbass.xml";
          g_FBFonts.clear();
      } else {
          path = fileName;
@@ -58,7 +58,7 @@
  
      if (fileName.isEmpty()) {         // defaults to built-in xml
 -        path = ":/fonts/fonts_tablature.xml";
-+        path = u"/usr/share/" MUSE_APP_INSTALL_NAME "fonts/fonts_tablature.xml";
++        path = u"" MUSE_APP_INSTALL_PREFIX "/share/" MUSE_APP_INSTALL_NAME "fonts/fonts_tablature.xml";
          m_durationFonts.clear();
          m_fretFonts.clear();
      } else {
@@ -93,10 +93,10 @@
 -        fdb->addFont(FontDataKey(u"Edwin", false, true), ":/fonts/edwin/Edwin-Italic.otf");
 -        fdb->addFont(FontDataKey(u"Edwin", true, false), ":/fonts/edwin/Edwin-Bold.otf");
 -        fdb->addFont(FontDataKey(u"Edwin", true, true), ":/fonts/edwin/Edwin-BdIta.otf");
-+        fdb->addFont(FontDataKey(u"Edwin", false, false), "/usr/share/fonts/edwin-fonts/Edwin-Roman.otf");
-+        fdb->addFont(FontDataKey(u"Edwin", false, true), "/usr/share/fonts/edwin-fonts/Edwin-Italic.otf");
-+        fdb->addFont(FontDataKey(u"Edwin", true, false), "/usr/share/fonts/edwin-fonts/Edwin-Bold.otf");
-+        fdb->addFont(FontDataKey(u"Edwin", true, true), "/usr/share/fonts/edwin-fonts/Edwin-BdIta.otf");
++        fdb->addFont(FontDataKey(u"Edwin", false, false), MUSE_APP_INSTALL_PREFIX "/share/fonts/edwin-fonts/Edwin-Roman.otf");
++        fdb->addFont(FontDataKey(u"Edwin", false, true), MUSE_APP_INSTALL_PREFIX "/share/fonts/edwin-fonts/Edwin-Italic.otf");
++        fdb->addFont(FontDataKey(u"Edwin", true, false), MUSE_APP_INSTALL_PREFIX "/share/fonts/edwin-fonts/Edwin-Bold.otf");
++        fdb->addFont(FontDataKey(u"Edwin", true, true), MUSE_APP_INSTALL_PREFIX "/share/fonts/edwin-fonts/Edwin-BdIta.otf");
  
          // MusicSymbol[Text]
          auto addMusicFont = [this, fdb](const std::string& name, const FontDataKey& fontDataKey, const muse::io::path_t& filePath){
@@ -120,22 +120,22 @@
 -        fdb->addFont(FontDataKey(u"Finale Maestro Text"), ":/fonts/finalemaestro/FinaleMaestroText.otf");
 -        addMusicFont("Finale Broadway", FontDataKey(u"Finale Broadway"), ":/fonts/finalebroadway/FinaleBroadway.otf");
 -        fdb->addFont(FontDataKey(u"Finale Broadway Text"), ":/fonts/finalebroadway/FinaleBroadwayText.otf");
-+        addMusicFont("Bravura", FontDataKey(u"Bravura"), "/usr/share/fonts/steinberg-bravura-fonts/Bravura.otf");
-+        fdb->addFont(FontDataKey(u"Bravura Text"), "/usr/share/fonts/steinberg-bravuratext-fonts/BravuraText.otf");
-+        addMusicFont("Leland", FontDataKey(u"Leland"), "/usr/share/fonts/leland-fonts/Leland.otf");
-+        fdb->addFont(FontDataKey(u"Leland Text"), "/usr/share/fonts/leland-text-fonts/LelandText.otf");
-+        addMusicFont("Emmentaler", FontDataKey(u"MScore"), "/usr/share/fonts/mscore-fonts/MScore.otf");
-+        fdb->addFont(FontDataKey(u"MScore Text"), "/usr/share/fonts/mscoretext-fonts/MScoreText.ttf");
-+        addMusicFont("Gonville", FontDataKey(u"Gootville"), "/usr/share/fonts/gootville-fonts/Gootville.otf");
-+        fdb->addFont(FontDataKey(u"Gootville Text"), "/usr/share/fonts/gootville-text-fonts/GootvilleText.otf");
-+        addMusicFont("MuseJazz", FontDataKey(u"MuseJazz"), "/usr/share/fonts/musejazz-fonts/MuseJazz.otf");
-+        fdb->addFont(FontDataKey(u"MuseJazz Text"), "/usr/share/fonts/musejazz-text-fonts/MuseJazzText.otf");
-+        addMusicFont("Petaluma", FontDataKey(u"Petaluma"), "/usr/share/fonts/steinberg-petaluma-fonts/Petaluma.otf");
-+        fdb->addFont(FontDataKey(u"Petaluma Text"), "/usr/share/fonts/steinberg-petalumatext-fonts/PetalumaText.otf");
-+        addMusicFont("Finale Maestro", FontDataKey(u"Finale Maestro"), "/usr/share/fonts/finale-maestro-fonts/FinaleMaestro.otf");
-+        fdb->addFont(FontDataKey(u"Finale Maestro Text"), "/usr/share/fonts/finale-maestro-text-fonts/FinaleMaestroText-Regular.otf");
-+        addMusicFont("Finale Broadway", FontDataKey(u"Finale Broadway"), "/usr/share/fonts/finale-broadway-fonts/FinaleBroadway.otf");
-+        fdb->addFont(FontDataKey(u"Finale Broadway Text"), "/usr/share/fonts/finale-broadway-text-fonts/FinaleBroadwayText.otf");
++        addMusicFont("Bravura", FontDataKey(u"Bravura"), MUSE_APP_INSTALL_PREFIX "/share/fonts/steinberg-bravura-fonts/Bravura.otf");
++        fdb->addFont(FontDataKey(u"Bravura Text"), MUSE_APP_INSTALL_PREFIX "/share/fonts/steinberg-bravuratext-fonts/BravuraText.otf");
++        addMusicFont("Leland", FontDataKey(u"Leland"), MUSE_APP_INSTALL_PREFIX "/share/fonts/leland-fonts/Leland.otf");
++        fdb->addFont(FontDataKey(u"Leland Text"), MUSE_APP_INSTALL_PREFIX "/share/fonts/leland-text-fonts/LelandText.otf");
++        addMusicFont("Emmentaler", FontDataKey(u"MScore"), MUSE_APP_INSTALL_PREFIX "/share/fonts/mscore-fonts/MScore.otf");
++        fdb->addFont(FontDataKey(u"MScore Text"), MUSE_APP_INSTALL_PREFIX "/share/fonts/mscoretext-fonts/MScoreText.ttf");
++        addMusicFont("Gonville", FontDataKey(u"Gootville"), MUSE_APP_INSTALL_PREFIX "/share/fonts/gootville-fonts/Gootville.otf");
++        fdb->addFont(FontDataKey(u"Gootville Text"), MUSE_APP_INSTALL_PREFIX "/share/fonts/gootville-text-fonts/GootvilleText.otf");
++        addMusicFont("MuseJazz", FontDataKey(u"MuseJazz"), MUSE_APP_INSTALL_PREFIX "/share/fonts/musejazz-fonts/MuseJazz.otf");
++        fdb->addFont(FontDataKey(u"MuseJazz Text"), MUSE_APP_INSTALL_PREFIX "/share/fonts/musejazz-text-fonts/MuseJazzText.otf");
++        addMusicFont("Petaluma", FontDataKey(u"Petaluma"), MUSE_APP_INSTALL_PREFIX "/share/fonts/steinberg-petaluma-fonts/Petaluma.otf");
++        fdb->addFont(FontDataKey(u"Petaluma Text"), MUSE_APP_INSTALL_PREFIX "/share/fonts/steinberg-petalumatext-fonts/PetalumaText.otf");
++        addMusicFont("Finale Maestro", FontDataKey(u"Finale Maestro"), MUSE_APP_INSTALL_PREFIX "/share/fonts/finale-maestro-fonts/FinaleMaestro.otf");
++        fdb->addFont(FontDataKey(u"Finale Maestro Text"), MUSE_APP_INSTALL_PREFIX "/share/fonts/finale-maestro-text-fonts/FinaleMaestroText-Regular.otf");
++        addMusicFont("Finale Broadway", FontDataKey(u"Finale Broadway"), MUSE_APP_INSTALL_PREFIX "/share/fonts/finale-broadway-fonts/FinaleBroadway.otf");
++        fdb->addFont(FontDataKey(u"Finale Broadway Text"), MUSE_APP_INSTALL_PREFIX "/share/fonts/finale-broadway-text-fonts/FinaleBroadwayText.otf");
  
          // Tabulature
 -        fdb->addFont(FontDataKey(u"FreeSerif"), ":/fonts/FreeSerif.ttf");
@@ -149,26 +149,34 @@
 +        fdb->addFont(FontDataKey(u"FreeSerif", false, true), "/usr/share/fonts/gnu-free/FreeSerifItalic.ttf");
 +        fdb->addFont(FontDataKey(u"FreeSerif", true, true), "/usr/share/fonts/gnu-free/FreeSerifBoldItalic.ttf");
 +        fdb->addFont(FontDataKey(u"FreeSans"), "/usr/share/fonts/gnu-free/FreeSans.ttf");
-+        fdb->addFont(FontDataKey(u"MScoreTabulature"), "/usr/share/fonts/mscoretabulature-fonts/mscoreTab.ttf");
++        fdb->addFont(FontDataKey(u"MScoreTabulature"), MUSE_APP_INSTALL_PREFIX "/share/fonts/mscoretabulature-fonts/mscoreTab.ttf");
  
          // Figured Bass
 -        fdb->addFont(FontDataKey(u"MscoreBC"), ":/fonts/mscore-BC.ttf");
-+        fdb->addFont(FontDataKey(u"MscoreBC"), "/usr/share/fonts/mscorebc-fonts/mscore-BC.ttf");
++        fdb->addFont(FontDataKey(u"MscoreBC"), MUSE_APP_INSTALL_PREFIX "/share/fonts/mscorebc-fonts/mscore-BC.ttf");
  
          // Roman Numeral Analysis
 -        fdb->addFont(FontDataKey(u"Campania"), ":/fonts/campania/Campania.otf");
-+        fdb->addFont(FontDataKey(u"Campania"), "/usr/share/fonts/marcsabatella-campania-fonts/Campania.otf");
++        fdb->addFont(FontDataKey(u"Campania"), MUSE_APP_INSTALL_PREFIX "/share/fonts/marcsabatella-campania-fonts/Campania.otf");
  
          // Defaults
          fdb->setDefaultFont(Font::Type::Unknown, FontDataKey(u"Edwin"));
 --- MuseScore-4.7.2/src/engraving/internal/engravingfontsprovider.cpp.orig	2026-05-25 02:55:43.000000000 -0600
 +++ MuseScore-4.7.2/src/engraving/internal/engravingfontsprovider.cpp	2026-05-26 10:32:54.789822365 -0600
-@@ -36,7 +36,7 @@ EngravingFontsProvider::EngravingFontsPr
+@@ -20,6 +20,7 @@
+  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+  */
+ 
++#include "muse_framework_config.h"
+ #include "engravingfontsprovider.h"
+ 
+ #include "global/stringutils.h"
+@@ -36,7 +37,7 @@ EngravingFontsProvider::EngravingFontsPr
  
  void EngravingFontsProvider::addInternalFont(const std::string& name, const std::string& family, const muse::io::path_t& filePath)
  {
 -    muse::io::path_t basePath = muse::io::dirpath(filePath.toQString());
-+    muse::io::path_t basePath = "/usr/share/SMuFL/Fonts/" + name;
++    muse::io::path_t basePath = MUSE_APP_INSTALL_PREFIX "/share/SMuFL/Fonts/" + name;
      muse::io::path_t metadataPath = basePath + "/metadata.json";
      std::shared_ptr<EngravingFont> f = std::make_shared<EngravingFont>(name, family, filePath, metadataPath, iocContext());
      m_symbolFonts.push_back(f);
@@ -195,13 +203,21 @@
      }
  
 -    if (QFontDatabase::addApplicationFont(":/ui/data/MusescoreIcon.ttf") == -1) {
-+    if (QFontDatabase::addApplicationFont("/usr/share/fonts/musescoreicon-fonts/MusescoreIcon.ttf") == -1) {
++    if (QFontDatabase::addApplicationFont(MUSE_APP_INSTALL_PREFIX "/share/fonts/musescoreicon-fonts/MusescoreIcon.ttf") == -1) {
          LOGE() << "Unable load icon font: `:/ui/data/MusescoreIcon.ttf`";
      }
  
 --- MuseScore-4.7.2/src/notation/internal/engravingfontscontroller.cpp.orig	2026-05-25 02:55:43.000000000 -0600
 +++ MuseScore-4.7.2/src/notation/internal/engravingfontscontroller.cpp	2026-05-26 10:32:54.790364435 -0600
-@@ -66,7 +66,11 @@ void EngravingFontsController::scanAllDi
+@@ -20,6 +20,7 @@
+  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+  */
+ 
++#include "muse_framework_config.h"
+ #include "engravingfontscontroller.h"
+ 
+ #include <QDirIterator>
+@@ -66,7 +67,11 @@ void EngravingFontsController::scanAllDi
      // The first location is the user-wide location, so we should iterate in reverse order so that
      // user-specific fonts can override system-wide fonts
      for (auto it = globalFontsPaths.crbegin(); it != globalFontsPaths.crend(); ++it) {
@@ -219,14 +235,14 @@
      fontLocations << qgetenv("LocalAppData").replace("\\", "/") + "/Microsoft/Windows/Fonts";
  #endif
 +    // Fedora addition: also search in subdirs of /usr/share/fonts
-+    fontLocations.append("/usr/share/fonts/finale-broadway-fonts");
-+    fontLocations.append("/usr/share/fonts/finale-maestro-fonts");
-+    fontLocations.append("/usr/share/fonts/gootville-fonts");
-+    fontLocations.append("/usr/share/fonts/leland-fonts");
-+    fontLocations.append("/usr/share/fonts/mscore-fonts");
-+    fontLocations.append("/usr/share/fonts/musejazz-fonts");
-+    fontLocations.append("/usr/share/fonts/steinberg-bravura-fonts");
-+    fontLocations.append("/usr/share/fonts/steinberg-petaluma-fonts");
++    fontLocations.append(MUSE_APP_INSTALL_PREFIX "/share/fonts/finale-broadway-fonts");
++    fontLocations.append(MUSE_APP_INSTALL_PREFIX "/share/fonts/finale-maestro-fonts");
++    fontLocations.append(MUSE_APP_INSTALL_PREFIX "/share/fonts/gootville-fonts");
++    fontLocations.append(MUSE_APP_INSTALL_PREFIX "/share/fonts/leland-fonts");
++    fontLocations.append(MUSE_APP_INSTALL_PREFIX "/share/fonts/mscore-fonts");
++    fontLocations.append(MUSE_APP_INSTALL_PREFIX "/share/fonts/musejazz-fonts");
++    fontLocations.append(MUSE_APP_INSTALL_PREFIX "/share/fonts/steinberg-bravura-fonts");
++    fontLocations.append(MUSE_APP_INSTALL_PREFIX "/share/fonts/steinberg-petaluma-fonts");
      for (const QString& dir : fontLocations) {
          QDirIterator it(dir, { "*.ttf", "*.otf" }, QDir::Files);
          while (it.hasNext()) {

diff --git a/musescore-unbundle-libs.patch b/musescore-unbundle-libs.patch
index 39d4cb4..e8f83a1 100644
--- a/musescore-unbundle-libs.patch
+++ b/musescore-unbundle-libs.patch
@@ -32,12 +32,20 @@
  
 --- MuseScore-4.7.2/src/braille/internal/notationbraille.cpp.orig	2026-05-25 02:55:43.000000000 -0600
 +++ MuseScore-4.7.2/src/braille/internal/notationbraille.cpp	2026-05-26 10:20:47.013692746 -0600
-@@ -901,7 +901,7 @@ void NotationBraille::setCursorColor(con
+@@ -20,6 +20,7 @@
+  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+  */
+ 
++#include "muse_framework_config.h"
+ #include "notationbraille.h"
+ 
+ #include "translation.h"
+@@ -901,7 +902,7 @@ void NotationBraille::setCursorColor(con
  
  path_t NotationBraille::tablesDefaultDirPath() const
  {
 -    return globalConfiguration()->appDataPath() + "tables";
-+    return "/usr/share/liblouis/tables";
++    return MUSE_APP_INSTALL_PREFIX "/share/liblouis/tables";
  }
  
  void NotationBraille::setCurrentEngravingItem(EngravingItem* e, bool select)
@@ -48,7 +56,7 @@
      smufl-symbols.mus
      unicode-to-ascii.dis
 -    DESTINATION ${Mscore_SHARE_NAME}${Mscore_INSTALL_NAME}tables
-+    DESTINATION /usr/share/liblouis/tables
++    DESTINATION ${CMAKE_INSTALL_PREFIX}/share/liblouis/tables
  )
 --- MuseScore-4.7.2/src/framework/audio/engine/CMakeLists.txt.orig	2026-05-25 02:55:43.000000000 -0600
 +++ MuseScore-4.7.2/src/framework/audio/engine/CMakeLists.txt	2026-05-26 10:20:47.014043570 -0600

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

only message in thread, other threads:[~2026-11-12 20:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-12 20:56 [rpms/musescore] f45: Fix flatpak build Yaakov Selkowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox