Ticket #71006: qsynth-057-102.diff

File qsynth-057-102.diff, 5.4 KB (added by RJVB (René Bertin), 6 weeks ago)

(cd port dir qsynth ; patch -Np3 -i qsynth-057-102.diff)

  • audio/qsynth/Portfile

    diff --git a/audio/qsynth/Portfile b/audio/qsynth/Portfile
    index 9f6a250a..f224beff 100644
    a b PortGroup qt5 1.0 
    55PortGroup           cmake 1.1
    66
    77name                qsynth
    8 version             0.5.7
    9 revision            2
     8version             1.0.2
    109maintainers         {gmail.com:rjvbertin @RJVB} {mojca @mojca} openmaintainer
    1110categories          audio
    12 platforms           {darwin > 9}
     11platforms           {darwin > 9} linux
    1312license             GPL-2+
    1413conflicts           qsynth-qt4
    1514
    long_description Qsynth is a fluidsynth GUI front-end application, written in 
    2120homepage            https://qsynth.sourceforge.io
    2221master_sites        sourceforge:project/${name}/${name}/${version}
    2322
    24 checksums           rmd160  feeebed368c7224d3c980db9efb0c30e9ab3ff75 \
    25                     sha256  86eef57606423f4a369d130c3e222d7f847ba1c57d2e7eefb4c0c8a7102735a2 \
    26                     size    315715
     23checksums           rmd160  8111406a8c911ae49f55c30779619efc6d44c465 \
     24                    sha256  48730f999300942f4be4401e71a64d074a569ead2179e0fc6dc6e129e23e60ea \
     25                    size    337605
    2726
    2827qt5.depends_build_component \
    2928                    qttools
    3029
    31 depends_lib-append \
    32                     port:fluidsynth
     30depends_lib-append  port:fluidsynth
    3331
    3432variant gm description {Use the MIDI instrument patches from port:fluid-soundfont} {
    3533    depends_run-append \
    variant gu description {Use the MIDI instrument patches from port:generaluser-so 
    4139}
    4240default_variants    +gu
    4341
    44 patchfiles-append   patch-src-CMakeLists.txt.diff
     42patchfiles-append   patch-support-older-qt5.diff
    4543
    4644configure.args-append \
    4745                    -DBUNDLE_INSTALL_DIR=${qt_apps_dir}
    if {${os.platform} eq "darwin"} { 
    5351        }
    5452    }
    5553} else {
     54    depends_lib-append \
     55                    port:pipewire
    5656    cmake.install_rpath-prepend \
    5757                    ${qt_libs_dir} \
    5858                    ${prefix}/lib/${build_arch}-linux-gnu
  • audio/qsynth/files/patch-src-CMakeLists.txt.diff

    diff --git a/audio/qsynth/files/patch-src-CMakeLists.txt.diff b/audio/qsynth/files/patch-src-CMakeLists.txt.diff
    index c1185dcb..46fba03c 100644
    a b  
    1 --- src/CMakeLists.txt
     1diff --git src/orig.CMakeLists.txt src/CMakeLists.txt
     2index c774daa..3a84ceb 100644
     3--- src/orig.CMakeLists.txt
    24+++ src/CMakeLists.txt
    3 @@ -106,7 +106,16 @@ if (WIN32)
     5@@ -183,9 +183,10 @@ if (CONFIG_PIPEWIRE)
    46 endif ()
    57 
    6  if (APPLE)
    7 -  set_target_properties ( qsynth PROPERTIES MACOSX_BUNDLE true )
    8 +  set_target_properties ( qsynth PROPERTIES
    9 +    MACOSX_BUNDLE true
    10 +    MACOSX_BUNDLE_GUI_IDENTIFIER "org.rncbc.qsynth"
    11 +    MACOSX_BUNDLE_BUNDLE_NAME "Qsynth"
    12 +    MACOSX_BUNDLE_DISPLAY_NAME "Qsynth"
    13 +    MACOSX_BUNDLE_INFO_STRING "Qsynth, a FluidSynth Qt GUI Interface"
    14 +    MACOSX_BUNDLE_LONG_VERSION_STRING "Qsynth ${VERSION}"
    15 +    MACOSX_BUNDLE_SHORT_VERSION_STRING "${VERSION}"
    16 +    MACOSX_BUNDLE_BUNDLE_VERSION "${VERSION}"
    17 +    MACOSX_BUNDLE_COPYRIGHT "Copyright (C) 2003-2016, rncbc aka Rui Nuno Capela. All rights reserved.")
    18  endif ()
    19  
    20  target_link_libraries ( qsynth
    21 @@ -129,12 +138,13 @@ set ( TRANSLATIONS
    22  qt5_add_translation ( QM_FILES ${TRANSLATIONS} )
    23  add_custom_target( translations ALL DEPENDS ${QM_FILES} )
    248 
    259-if (UNIX AND NOT APPLE)
    2610+if (UNIX)
    27    install ( TARGETS qsynth
    28 -     RUNTIME DESTINATION bin )
    29 +     RUNTIME DESTINATION bin
    30 +     BUNDLE DESTINATION ${BUNDLE_INSTALL_DIR} )
    31    install ( FILES ${QM_FILES}
    32       DESTINATION share/qsynth/translations )
    33 -  install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/qsynth.desktop
    34 +  install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/qsynth.desktop
    35       DESTINATION share/applications )
    36    install ( FILES images/qsynth.png
    37       DESTINATION share/pixmaps )
     11   install (TARGETS ${PROJECT_NAME} RUNTIME
     12-    DESTINATION ${CMAKE_INSTALL_BINDIR})
     13+    DESTINATION ${CMAKE_INSTALL_BINDIR}
     14+    BUNDLE DESTINATION ${BUNDLE_INSTALL_DIR})
     15   install (FILES ${QM_FILES}
     16     DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/translations)
     17   install (FILES images/${PROJECT_NAME}.png
  • new file audio/qsynth/files/patch-support-older-qt5.diff

    diff --git a/audio/qsynth/files/patch-support-older-qt5.diff b/audio/qsynth/files/patch-support-older-qt5.diff
    new file mode 100644
    index 00000000..b0546aef
    - +  
     1diff --git src/orig.qsynthSetupForm.cpp src/qsynthSetupForm.cpp
     2index 9fb77c7..28d2758 100644
     3--- src/orig.qsynthSetupForm.cpp
     4+++ src/qsynthSetupForm.cpp
     5@@ -1172,8 +1172,10 @@ qsynthSettingsItemEditor::qsynthSettingsItemEditor (
     6                m_u.pSpinBox->setMinimum(iRangeMin);
     7                m_u.pSpinBox->setMaximum(iRangeMax);
     8                m_u.pSpinBox->setAccelerated(true);
     9+#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
     10                m_u.pSpinBox->setStepType(
     11                        QAbstractSpinBox::AdaptiveDecimalStepType);
     12+#endif
     13                QObject::connect(m_u.pSpinBox,
     14                        SIGNAL(valueChanged(int)),
     15                        SLOT(committed())
     16@@ -1193,8 +1195,10 @@ qsynthSettingsItemEditor::qsynthSettingsItemEditor (
     17                m_u.pDoubleSpinBox->setMinimum(fRangeMin);
     18                m_u.pDoubleSpinBox->setMaximum(fRangeMax);
     19                m_u.pDoubleSpinBox->setAccelerated(true);
     20+#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
     21                m_u.pDoubleSpinBox->setStepType(
     22                        QAbstractSpinBox::AdaptiveDecimalStepType);
     23+#endif
     24                QObject::connect(m_u.pDoubleSpinBox,
     25                        SIGNAL(valueChanged(double)),
     26                        SLOT(committed())