mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
audio/lmms: Fix issue caused by kwidgetsaddons
Add temporary patch to fix a crash at startup if kwidgetsaddons 5.101.0 is installed. The patch was obtained from LMMS ticket related with this issue[1]. [1] https://github.com/LMMS/lmms/issues/6587 Since I'm here reorder Makefile to make linters happy. PR: 270470 Reported by: Manuel <gnuandbsdguy@gmail.com> MFH: 2023Q2
This commit is contained in:
parent
dac6c9cae4
commit
8827164af8
3 changed files with 73 additions and 12 deletions
|
@ -1,7 +1,7 @@
|
|||
PORTNAME= lmms
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 1.2.2
|
||||
PORTREVISION= 6
|
||||
PORTREVISION= 7
|
||||
PORTEPOCH= 2
|
||||
CATEGORIES= audio
|
||||
|
||||
|
@ -41,28 +41,24 @@ USE_LDCONFIG= yes
|
|||
USE_QT= core gui widgets x11extras xml buildtools:build linguisttools:build qmake:build
|
||||
USE_XORG= xcursor xext xfixes xft xinerama xrender
|
||||
|
||||
CMAKE_ON= WANT_QT5
|
||||
CMAKE_OFF= WANT_ALSA WANT_CALF WANT_CAPS WANT_CMT WANT_SWH WANT_STK \
|
||||
WANT_TAP WANT_VST
|
||||
CMAKE_ON= WANT_QT5
|
||||
|
||||
OPTIONS_DEFINE= OSS JACK PULSEAUDIO PORTAUDIO SDL SNDIO
|
||||
OPTIONS_DEFAULT= OSS
|
||||
|
||||
JACK_CMAKE_BOOL= WANT_JACK
|
||||
JACK_LIB_DEPENDS= libjack.so:audio/jack
|
||||
|
||||
PULSEAUDIO_CMAKE_BOOL= WANT_PULSEAUDIO
|
||||
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
|
||||
|
||||
PORTAUDIO_CMAKE_BOOL= WANT_PORTAUDIO
|
||||
JACK_CMAKE_BOOL= WANT_JACK
|
||||
PORTAUDIO_LIB_DEPENDS= libportaudio.so:audio/portaudio
|
||||
|
||||
SDL_CMAKE_OFF= WANT_SDL
|
||||
PORTAUDIO_CMAKE_BOOL= WANT_PORTAUDIO
|
||||
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
|
||||
PULSEAUDIO_CMAKE_BOOL= WANT_PULSEAUDIO
|
||||
SDL_USES= sdl
|
||||
SDL_USE= SDL=sdl
|
||||
|
||||
SNDIO_CMAKE_BOOL= WANT_SNDIO
|
||||
SDL_CMAKE_OFF= WANT_SDL
|
||||
SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio
|
||||
SNDIO_CMAKE_BOOL= WANT_SNDIO
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
|
|
21
audio/lmms/files/patch-src_gui_MainApplication.cpp
Normal file
21
audio/lmms/files/patch-src_gui_MainApplication.cpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
--- src/gui/MainApplication.cpp.orig 2023-06-17 16:02:33 UTC
|
||||
+++ src/gui/MainApplication.cpp
|
||||
@@ -35,6 +35,18 @@
|
||||
QApplication(argc, argv),
|
||||
m_queuedFile()
|
||||
{
|
||||
+#if !defined(LMMS_BUILD_WIN32) && !defined(LMMS_BUILD_APPLE) && !defined(LMMS_BUILD_HAIKU) && QT_VERSION >= 0x050000
|
||||
+ // Work around a bug of KXmlGui < 5.55
|
||||
+ // which breaks the recent files menu
|
||||
+ // https://bugs.kde.org/show_bug.cgi?id=337491
|
||||
+ for (auto child : children())
|
||||
+ {
|
||||
+ if (child->inherits("KCheckAcceleratorsInitializer"))
|
||||
+ {
|
||||
+ delete child;
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
#if defined(LMMS_BUILD_WIN32) && QT_VERSION >= 0x050000
|
||||
installNativeEventFilter(this);
|
||||
#endif
|
44
audio/lmms/files/patch-src_gui_MainWindow.cpp
Normal file
44
audio/lmms/files/patch-src_gui_MainWindow.cpp
Normal file
|
@ -0,0 +1,44 @@
|
|||
--- src/gui/MainWindow.cpp.orig 2023-06-17 16:07:46 UTC
|
||||
+++ src/gui/MainWindow.cpp
|
||||
@@ -33,7 +33,6 @@
|
||||
#include <QMenuBar>
|
||||
#include <QMessageBox>
|
||||
#include <QShortcut>
|
||||
-#include <QLibrary>
|
||||
#include <QSplitter>
|
||||
#include <QUrl>
|
||||
#include <QWhatsThis>
|
||||
@@ -65,23 +64,6 @@
|
||||
|
||||
#include "lmmsversion.h"
|
||||
|
||||
-#if !defined(LMMS_BUILD_WIN32) && !defined(LMMS_BUILD_APPLE) && !defined(LMMS_BUILD_HAIKU) && QT_VERSION >= 0x050000
|
||||
-//Work around an issue on KDE5 as per https://bugs.kde.org/show_bug.cgi?id=337491#c21
|
||||
-void disableAutoKeyAccelerators(QWidget* mainWindow)
|
||||
-{
|
||||
- using DisablerFunc = void(*)(QWidget*);
|
||||
- QLibrary kf5WidgetsAddon("KF5WidgetsAddons", 5);
|
||||
- DisablerFunc setNoAccelerators =
|
||||
- reinterpret_cast<DisablerFunc>(kf5WidgetsAddon.resolve("_ZN19KAcceleratorManager10setNoAccelEP7QWidget"));
|
||||
- if(setNoAccelerators)
|
||||
- {
|
||||
- setNoAccelerators(mainWindow);
|
||||
- }
|
||||
- kf5WidgetsAddon.unload();
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
-
|
||||
MainWindow::MainWindow() :
|
||||
m_workspace( NULL ),
|
||||
m_templatesMenu( NULL ),
|
||||
@@ -92,9 +74,6 @@
|
||||
m_metronomeToggle( 0 ),
|
||||
m_session( Normal )
|
||||
{
|
||||
-#if !defined(LMMS_BUILD_WIN32) && !defined(LMMS_BUILD_APPLE) && !defined(LMMS_BUILD_HAIKU) && QT_VERSION >= 0x050000
|
||||
- disableAutoKeyAccelerators(this);
|
||||
-#endif
|
||||
setAttribute( Qt::WA_DeleteOnClose );
|
||||
|
||||
QWidget * main_widget = new QWidget( this );
|
Loading…
Add table
Reference in a new issue