From 6fe91e5eba825f83d8276b363eeb973aee38c1bf Mon Sep 17 00:00:00 2001 From: quentin Date: Fri, 25 Jul 2025 21:28:54 -0500 Subject: [PATCH] Updated lmms 9999 --- media-sound/lmms/Manifest | 8 +- .../files/lmms-1.2.2-kwidgetsaddons.patch | 75 ++++++++++++ .../lmms/files/lmms-1.2.2-plugin-path.patch | 26 ++++ .../files/lmms-9999-no_compress_man.patch | 48 ++++++++ .../lmms/files/lmms-9999-plugin-path.patch | 26 ++++ media-sound/lmms/lmms-1.2.2.ebuild | 112 ------------------ media-sound/lmms/lmms-9999.ebuild | 54 ++++----- 7 files changed, 207 insertions(+), 142 deletions(-) create mode 100644 media-sound/lmms/files/lmms-1.2.2-kwidgetsaddons.patch create mode 100644 media-sound/lmms/files/lmms-1.2.2-plugin-path.patch create mode 100644 media-sound/lmms/files/lmms-9999-no_compress_man.patch create mode 100644 media-sound/lmms/files/lmms-9999-plugin-path.patch delete mode 100644 media-sound/lmms/lmms-1.2.2.ebuild diff --git a/media-sound/lmms/Manifest b/media-sound/lmms/Manifest index 1eddfc9..8376cff 100644 --- a/media-sound/lmms/Manifest +++ b/media-sound/lmms/Manifest @@ -1,4 +1,6 @@ +AUX lmms-1.2.2-kwidgetsaddons.patch 2444 BLAKE2B d254f7939536d3894a79b857e8039e5f7b517f91d9f36d9dcf9e416148c658c8dc61c8cd0fcf7dace5056f0d339fc1b98869113ee2c16a67b49e480acfc20dee SHA512 ca0bbac117d3363fbafd0f761ce7d1689c9aef1e062b0fef4d92934013e127fb3cbd130b3ba2b9b9ad8049d5944af976cf55d940bbafeb34716959e5eb8e44aa AUX lmms-1.2.2-no_compress_man.patch 1290 BLAKE2B 8d88782f2b17a1b2399e98559820e00e706d7f328eb140babde11ca239fd516b133e698c366fa34bf72c2047b64aa14108cc82a09d0869fffd5e3bea8c1936a5 SHA512 4a414e513a3257b5eb3f472ca321504e7037c314e3d218b612b9aa9391dd0d1b038b77467f112a069479abec1b1ab3372126e27db34ec22c2a89b902a66878bd -DIST lmms-1.2.2.tar.xz 22733960 BLAKE2B 8b561068194e9a4af8260675e784c25a92b6b2f731c29b677cbc16581306bbadcf27ea529adbcd735ff4adffedf3dd98ec7b2d89428a63ea600d022ecdae58e4 SHA512 df74d9e938f1c3807e9941b11db4ccfe9450e23b723c82774de15b7666ac39f1bfdd8519231e28849f994628190ecc92fa05d55bbc0b50a4421f2d183e729028 -EBUILD lmms-1.2.2.ebuild 2490 BLAKE2B 861ba60936fced8170e1b4cf8ee17770487db4735a4c5bc1448bfb465fb16876db06d2985750b5bd2f7900ba6299f5e37e69dbbcaf17597dfbb00774670c4c75 SHA512 214fe582fe5346cd9ba2970e102bcb38d5b7cc7be81672e700c7a2a90280775a99e8b600e7918087f8d9f12a3324621a566686cdd7b97d45b45272aecf4c4ea1 -EBUILD lmms-9999.ebuild 2522 BLAKE2B a836cd05ede2f7345cbb8c8799a99b732d34cd8b63158c4f6aff3923d8da157cdab68c1de9d788c694fb5874bb5056e45393673a533c2700b7d03051ca5a9130 SHA512 d974f6c090a6e0e495bf9a8f003d31a0a4a2649b2aaeec95a563ff1ed203e3d108380244887318bc00965cb67b22dec7a769fe98fc9934e39bd4fb49aca2e4e4 +AUX lmms-1.2.2-plugin-path.patch 850 BLAKE2B acc62a4400438df292fcf78633ba1bcf672baedccb239720e42843577b9d539942c32996587e89cd614ee136d93ff04725910cf28f5be7afaabcb0f9572672fd SHA512 d5373901db6a091f105a03d07f8f3850d69569a2e4890fa5fdd07d2e6fea3b8e9a424a45c8a8dd1aee73aade8ee98659c934e6b6c4eea5a02d982d43a022f5d8 +AUX lmms-9999-no_compress_man.patch 1708 BLAKE2B d84d15049ffd13e21c5b7bde4ea9e5f342ae5a36399edc60546ec8d27d560a73fb8b8ad9ae8ff4153af76829ef41aa5b953244f2cd381d3ed9e98fdd47f283ef SHA512 9d92bf9ff4a8de50cd8bbb944bab16b2806922594a9ef645495bc9e9691f414088b764426e5833d16c1229842e2064ae3b2ff27c6a6e116134284d5eaca9e134 +AUX lmms-9999-plugin-path.patch 866 BLAKE2B b083ed330c42738b5040488939418075c0d6ddf960a1cf79afb38dfdda86a223362c1325fc02cdbc27a61a2799c05173dc1250aa56ccbaac46b857a4ccdc07e1 SHA512 93865b80f76c4ae2feab91f99261e05626654ce7db82a15fdc9386e93a395ea701bc2558ae04bb8411d9bc1877c38794f5302a3312d6f020b6a5109353f648b7 +EBUILD lmms-9999.ebuild 2593 BLAKE2B 0c3d381a4848f972bf50a2f6cc5b81d309bba0fd337366aab16495488bb3c6a176bfebba6224d6329f5e2c03cc21b433df103e8b8ea942835b90093adf0cefb8 SHA512 100c3ccb6ae8daf24c97ef9c0fd996a859af85267a966ad539a8a6a79b3a867405ab4abf46f2901dd8be3863b35af152fb557bd53608cd4af2157038f6ce7153 diff --git a/media-sound/lmms/files/lmms-1.2.2-kwidgetsaddons.patch b/media-sound/lmms/files/lmms-1.2.2-kwidgetsaddons.patch new file mode 100644 index 0000000..723e76a --- /dev/null +++ b/media-sound/lmms/files/lmms-1.2.2-kwidgetsaddons.patch @@ -0,0 +1,75 @@ +This patch removes an outdated workaround that causes a segfault when a recent +version of kwidgetsaddon is installed. It has been merged upstream, so there is +no need to use this beyond version 1.2.2. + +https://github.com/LMMS/lmms/issues/6587#issuecomment-1399220056 +https://github.com/LMMS/lmms/pull/6612 + +diff --git a/src/gui/MainApplication.cpp b/src/gui/MainApplication.cpp +index 994ae2771..9afa20a71 100644 +--- a/src/gui/MainApplication.cpp ++++ b/src/gui/MainApplication.cpp +@@ -35,6 +35,19 @@ MainApplication::MainApplication(int& argc, char** argv) : + 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 +diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp +index e6971f96d..26532eb5b 100644 +--- a/src/gui/MainWindow.cpp ++++ b/src/gui/MainWindow.cpp +@@ -33,7 +33,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -65,21 +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(kf5WidgetsAddon.resolve("_ZN19KAcceleratorManager10setNoAccelEP7QWidget")); +- if(setNoAccelerators) +- { +- setNoAccelerators(mainWindow); +- } +- kf5WidgetsAddon.unload(); +-} +-#endif + + + MainWindow::MainWindow() : +@@ -92,9 +76,6 @@ MainWindow::MainWindow() : + 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 ); diff --git a/media-sound/lmms/files/lmms-1.2.2-plugin-path.patch b/media-sound/lmms/files/lmms-1.2.2-plugin-path.patch new file mode 100644 index 0000000..0fabfbb --- /dev/null +++ b/media-sound/lmms/files/lmms-1.2.2-plugin-path.patch @@ -0,0 +1,26 @@ +https://bugs.gentoo.org/907285 +https://github.com/LMMS/lmms/issues/5884 +https://src.fedoraproject.org/rpms/lmms/blob/rawhide/f/lmms-1.2.2_lib_suffix.patch +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -564,6 +564,9 @@ IF(USE_CCACHE) + ENDIF() + ENDIF() + ++# pass LIB_SUFFIX ++add_definitions(-DLIB_SUFFIX="${LIB_SUFFIX}") ++ + # make sub-directories + ADD_SUBDIRECTORY(cmake) + ADD_SUBDIRECTORY(src) +--- a/src/core/PluginFactory.cpp ++++ b/src/core/PluginFactory.cpp +@@ -64,7 +64,7 @@ PluginFactory::PluginFactory() + // plugins at "C:/Program Files/LMMS/plugins/" + + #ifndef LMMS_BUILD_WIN32 +- addRelativeIfExists("../lib/lmms"); // Installed ++ addRelativeIfExists("../lib" LIB_SUFFIX "/lmms"); // Installed + #endif + addRelativeIfExists("plugins"); // Portable + #ifdef PLUGIN_DIR // We may also have received a relative directory via a define diff --git a/media-sound/lmms/files/lmms-9999-no_compress_man.patch b/media-sound/lmms/files/lmms-9999-no_compress_man.patch new file mode 100644 index 0000000..dbb2b8b --- /dev/null +++ b/media-sound/lmms/files/lmms-9999-no_compress_man.patch @@ -0,0 +1,48 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -756,7 +756,7 @@ + ADD_SUBDIRECTORY(cmake/install) + + FIND_PACKAGE(UnixCommands) +-IF(GZIP) ++IF(FALSE) + ADD_CUSTOM_COMMAND(OUTPUT "${CMAKE_BINARY_DIR}/lmms.1.gz" + COMMAND ${GZIP} -c ${CMAKE_SOURCE_DIR}/doc/lmms.1 > ${CMAKE_BINARY_DIR}/lmms.1.gz + DEPENDS "${CMAKE_SOURCE_DIR}/doc/lmms.1" +@@ -767,7 +767,6 @@ + ADD_CUSTOM_TARGET(manpage ALL + DEPENDS "${CMAKE_BINARY_DIR}/lmms.1.gz") + ELSEIF(UNIX) +- MESSAGE(FATAL_ERROR "Can't find gzip required for generating lmms.1.gz") + ENDIF() + + # install headers +@@ -785,7 +784,7 @@ + # + ADD_CUSTOM_TARGET(distclean + COMMAND make clean +- COMMAND rm -rf `find -name cmake_install.cmake` `find -name Makefile` `find -type d -name CMakeFiles` CMakeCache.txt lmmsconfig.h lmms.1.gz) ++ COMMAND rm -rf `find -name cmake_install.cmake` `find -name Makefile` `find -type d -name CMakeFiles` CMakeCache.txt lmmsconfig.h lmms.1) + + # + # add tarball-target +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -132,7 +132,7 @@ + SET_PROPERTY(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT lmms) + ENDIF() + +-SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${LMMS_RCC_OUT} lmmsconfig.h lmms.1.gz") ++SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${LMMS_RCC_OUT} lmmsconfig.h lmms.1") + + IF(LMMS_BUILD_WIN32) + SET(EXTRA_LIBRARIES "winmm") +@@ -218,7 +218,7 @@ + ELSE(CMAKE_INSTALL_MANDIR) + SET(INSTALL_MANDIR ${CMAKE_INSTALL_PREFIX}/share/man) + ENDIF(CMAKE_INSTALL_MANDIR) +- INSTALL(FILES "${CMAKE_BINARY_DIR}/lmms.1.gz" ++ INSTALL(FILES "${CMAKE_SOURCE_DIR}/doc/lmms.1" + DESTINATION "${INSTALL_MANDIR}/man1/" + PERMISSIONS OWNER_READ GROUP_READ WORLD_READ) + ENDIF() diff --git a/media-sound/lmms/files/lmms-9999-plugin-path.patch b/media-sound/lmms/files/lmms-9999-plugin-path.patch new file mode 100644 index 0000000..0d04bf8 --- /dev/null +++ b/media-sound/lmms/files/lmms-9999-plugin-path.patch @@ -0,0 +1,26 @@ +https://bugs.gentoo.org/907285 +https://github.com/LMMS/lmms/issues/5884 +https://src.fedoraproject.org/rpms/lmms/blob/rawhide/f/lmms-1.2.2_lib_suffix.patch +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -657,6 +657,9 @@ ENDIF() + # use ccache + include(CompileCache) + ++# pass LIB_SUFFIX ++add_definitions(-DLIB_SUFFIX="${LIB_SUFFIX}") ++ + # make sub-directories + ADD_SUBDIRECTORY(cmake) + ADD_SUBDIRECTORY(src) +--- a/src/core/PluginFactory.cpp ++++ b/src/core/PluginFactory.cpp +@@ -78,7 +78,7 @@ void PluginFactory::setupSearchPaths() + // plugins at "C:/Program Files/LMMS/plugins/" + + #ifndef LMMS_BUILD_WIN32 +- addRelativeIfExists("../lib/lmms"); // Installed ++ addRelativeIfExists("../lib" LIB_SUFFIX "/lmms"); // Installed + #endif + addRelativeIfExists("plugins"); // Portable + #ifdef PLUGIN_DIR // We may also have received a relative directory via a define diff --git a/media-sound/lmms/lmms-1.2.2.ebuild b/media-sound/lmms/lmms-1.2.2.ebuild deleted file mode 100644 index 1dab4af..0000000 --- a/media-sound/lmms/lmms-1.2.2.ebuild +++ /dev/null @@ -1,112 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -# The order is important here! Both, cmake and xdg define src_prepare. -# We need the one from cmake -inherit xdg cmake - -DESCRIPTION="Cross-platform music production software" -HOMEPAGE="https://lmms.io" -if [[ ${PV} == "9999" ]]; then - EGIT_REPO_URI="https://github.com/LMMS/lmms.git" - inherit git-r3 -else - SRC_URI="https://github.com/LMMS/lmms/releases/download/v${PV/_/-}/${PN}_${PV/_/-}.tar.xz -> ${P}.tar.xz" - KEYWORDS="amd64 x86" - S="${WORKDIR}/${P/_/-}" -fi - -LICENSE="GPL-2 LGPL-2" -SLOT="0" - -IUSE="alsa debug fluidsynth jack libgig mp3 ogg portaudio pulseaudio sdl soundio stk vst calf caps cmt swh tap" - -COMMON_DEPEND=" - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtwidgets:5 - dev-qt/qtxml:5 - >=media-libs/libsamplerate-0.1.8 - >=media-libs/libsndfile-1.0.11 - sci-libs/fftw:3.0 - sys-libs/zlib - >=x11-libs/fltk-1.3.0_rc3:1 - alsa? ( media-libs/alsa-lib ) - fluidsynth? ( media-sound/fluidsynth ) - jack? ( virtual/jack ) - libgig? ( media-libs/libgig ) - mp3? ( media-sound/lame ) - ogg? ( - media-libs/libogg - media-libs/libvorbis - ) - portaudio? ( >=media-libs/portaudio-19_pre ) - pulseaudio? ( media-sound/pulseaudio ) - sdl? ( - media-libs/libsdl - >=media-libs/sdl-sound-1.0.1 - ) - soundio? ( media-libs/libsoundio ) - stk? ( media-libs/stk ) - vst? ( virtual/wine ) -" -DEPEND="${COMMON_DEPEND} - dev-qt/qtx11extras:5 -" -BDEPEND=" - dev-qt/linguist-tools:5 -" -RDEPEND="${COMMON_DEPEND} - calf? ( media-plugins/calf ) - caps? ( media-plugins/caps-plugins ) - cmt? ( media-plugins/cmt-plugins ) - swh? ( media-plugins/swh-plugins ) - tap? ( media-plugins/tap-plugins ) -" - -DOCS=( README.md doc/AUTHORS ) - -S="${WORKDIR}/${PN}" - -PATCHES=( - "${FILESDIR}/${PN}-1.2.2-no_compress_man.patch" #733284 -) - -src_configure() { - local mycmakeargs+=( - -DUSE_WERROR=FALSE - -DWANT_CAPS=$(usex caps) - -DWANT_TAP=$(usex tap) - -DWANT_SWH=$(usex swh) - -DWANT_CMT=$(usex cmt) - -DWANT_CALF=$(usex calf) - -DWANT_QT5=TRUE - -DWANT_ALSA=$(usex alsa) - -DWANT_JACK=$(usex jack) - -DWANT_GIG=$(usex libgig) - -DWANT_MP3LAME=$(usex mp3) - -DWANT_OGGVORBIS=$(usex ogg) - -DWANT_PORTAUDIO=$(usex portaudio) - -DWANT_PULSEAUDIO=$(usex pulseaudio) - -DWANT_SDL=$(usex sdl) - -DWANT_SOUNDIO=$(usex soundio) - -DWANT_STK=$(usex stk) - -DWANT_VST=$(usex vst) - -DWANT_SF2=$(usex fluidsynth) - ) - cmake_src_configure -} - -pkg_preinst() { - xdg_pkg_preinst -} - -pkg_postinst() { - xdg_pkg_postinst -} - -pkg_postrm() { - xdg_pkg_postrm -} diff --git a/media-sound/lmms/lmms-9999.ebuild b/media-sound/lmms/lmms-9999.ebuild index 93cb2b8..7c08bf9 100644 --- a/media-sound/lmms/lmms-9999.ebuild +++ b/media-sound/lmms/lmms-9999.ebuild @@ -1,11 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -# The order is important here! Both, cmake and xdg define src_prepare. -# We need the one from cmake -inherit xdg cmake +inherit cmake xdg DESCRIPTION="Cross-platform music production software" HOMEPAGE="https://lmms.io" @@ -13,15 +11,15 @@ if [[ ${PV} == "9999" ]]; then EGIT_REPO_URI="https://github.com/LMMS/lmms.git" inherit git-r3 else - SRC_URI="https://github.com/LMMS/lmms/releases/download/v${PV/_/-}/${PN}_${PV/_/-}.tar.xz -> ${P}.tar.xz" - KEYWORDS="amd64 x86" - S="${WORKDIR}/${P/_/-}" + SRC_URI="https://github.com/LMMS/lmms/releases/download/v${PV/_/-}/${PN}_${PV/_/-}.tar.xz" + S="${WORKDIR}/${PN}" + KEYWORDS="~amd64 ~x86" fi LICENSE="GPL-2 LGPL-2" SLOT="0" -IUSE="alsa debug fluidsynth jack libgig mp3 ogg portaudio pulseaudio sdl soundio stk vst calf caps cmt swh tap" +IUSE="alsa debug fluidsynth jack libgig mp3 ogg portaudio pulseaudio sdl soundio stk test vst calf caps cmt swh tap" COMMON_DEPEND=" dev-qt/qtcore:5 @@ -32,7 +30,7 @@ COMMON_DEPEND=" >=media-libs/libsndfile-1.0.11 sci-libs/fftw:3.0 sys-libs/zlib - >=x11-libs/fltk-1.3.0_rc3:1 + x11-libs/fltk:1= alsa? ( media-libs/alsa-lib ) fluidsynth? ( media-sound/fluidsynth ) jack? ( virtual/jack ) @@ -43,7 +41,7 @@ COMMON_DEPEND=" media-libs/libvorbis ) portaudio? ( >=media-libs/portaudio-19_pre ) - pulseaudio? ( media-sound/pulseaudio ) + pulseaudio? ( media-libs/libpulse ) sdl? ( media-libs/libsdl >=media-libs/sdl-sound-1.0.1 @@ -54,10 +52,10 @@ COMMON_DEPEND=" " DEPEND="${COMMON_DEPEND} dev-qt/qtx11extras:5 + test? ( dev-qt/qttest:5 ) " BDEPEND=" dev-qt/linguist-tools:5 - dev-perl/List-MoreUtils " RDEPEND="${COMMON_DEPEND} calf? ( media-plugins/calf ) @@ -69,21 +67,27 @@ RDEPEND="${COMMON_DEPEND} DOCS=( README.md doc/AUTHORS ) -S="${WORKDIR}/${PN}-${PV}" - PATCHES=( - #"${FILESDIR}/${PN}-1.2.2-no_compress_man.patch" #733284 + "${FILESDIR}/${PN}-9999-no_compress_man.patch" #733284 + "${FILESDIR}/${PN}-9999-plugin-path.patch" #907285 ) +src_prepare() { + cmake_src_prepare + + if use !test; then + sed -i '/ADD_SUBDIRECTORY(tests)/d' CMakeLists.txt || die + fi +} + src_configure() { - local mycmakeargs+=( + local mycmakeargs=( -DUSE_WERROR=FALSE -DWANT_CAPS=$(usex caps) -DWANT_TAP=$(usex tap) -DWANT_SWH=$(usex swh) -DWANT_CMT=$(usex cmt) -DWANT_CALF=$(usex calf) - -DWANT_QT5=TRUE -DWANT_ALSA=$(usex alsa) -DWANT_JACK=$(usex jack) -DWANT_GIG=$(usex libgig) @@ -97,17 +101,13 @@ src_configure() { -DWANT_VST=$(usex vst) -DWANT_SF2=$(usex fluidsynth) ) + cmake_src_configure } -pkg_preinst() { - xdg_pkg_preinst -} - -pkg_postinst() { - xdg_pkg_postinst -} - -pkg_postrm() { - xdg_pkg_postrm +src_test() { + # tests are hidden inside a subdir and ctest does not detect them without + # running inside that subdir + local BUILD_DIR="${BUILD_DIR}/tests" + cmake_src_test }