Gentoo Archives: gentoo-commits

From: "Miroslav Šulc" <fordfrog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/milkytracker/, media-sound/milkytracker/files/
Date: Sat, 08 Aug 2020 08:49:06
Message-Id: 1596876531.0396facd8f27eee98893cfc68de03905d9b95892.fordfrog@gentoo
1 commit: 0396facd8f27eee98893cfc68de03905d9b95892
2 Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 8 08:48:35 2020 +0000
4 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 8 08:48:51 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0396facd
7
8 media-sound/milkytracker: fixes
9
10 1) added xdg
11 2) switched to virtual/jack
12 3) fixed compilation wrt rtmidi
13
14 Closes: https://bugs.gentoo.org/736306
15 Closes: https://bugs.gentoo.org/735916
16 Package-Manager: Portage-3.0.1, Repoman-2.3.23
17 Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
18
19 ...ker-1.02.00-fix-hard-dependency-on-rtmidi.patch | 85 ++++++++++++++++++++++
20 ...02.00.ebuild => milkytracker-1.02.00-r1.ebuild} | 9 ++-
21 2 files changed, 92 insertions(+), 2 deletions(-)
22
23 diff --git a/media-sound/milkytracker/files/milkytracker-1.02.00-fix-hard-dependency-on-rtmidi.patch b/media-sound/milkytracker/files/milkytracker-1.02.00-fix-hard-dependency-on-rtmidi.patch
24 new file mode 100644
25 index 00000000000..090e433b5fd
26 --- /dev/null
27 +++ b/media-sound/milkytracker/files/milkytracker-1.02.00-fix-hard-dependency-on-rtmidi.patch
28 @@ -0,0 +1,85 @@
29 +From f85f5336df72dc44e407ae756ed20a8f8422cb76 Mon Sep 17 00:00:00 2001
30 +From: Dale Whinham <daleyo@×××××.com>
31 +Date: Sat, 11 Apr 2020 16:51:31 +0100
32 +Subject: [PATCH] Fix hard dependency on RtMidi
33 +
34 +It is perfectly reasonable for libasound to be installed, but not
35 +librtmidi, and so we should only enable the MIDI code if both are
36 +present.
37 +
38 +Fixes #207.
39 +---
40 + src/tracker/CMakeLists.txt | 1 +
41 + src/tracker/sdl/SDL_Main.cpp | 12 ++++++------
42 + 2 files changed, 7 insertions(+), 6 deletions(-)
43 +
44 +diff --git a/src/tracker/CMakeLists.txt b/src/tracker/CMakeLists.txt
45 +index 0a935330..f4243a0f 100644
46 +--- a/src/tracker/CMakeLists.txt
47 ++++ b/src/tracker/CMakeLists.txt
48 +@@ -348,6 +348,7 @@ elseif(WIN32)
49 + target_link_libraries(tracker midi)
50 + else()
51 + if(ALSA_FOUND AND RTMIDI_FOUND)
52 ++ target_compile_definitions(tracker PRIVATE -DHAVE_LIBRTMIDI)
53 + target_link_libraries(tracker midi)
54 + endif()
55 + endif()
56 +diff --git a/src/tracker/sdl/SDL_Main.cpp b/src/tracker/sdl/SDL_Main.cpp
57 +index 1a49fc12..75ffa1df 100644
58 +--- a/src/tracker/sdl/SDL_Main.cpp
59 ++++ b/src/tracker/sdl/SDL_Main.cpp
60 +@@ -78,7 +78,7 @@
61 + #include "PPSystem_POSIX.h"
62 + #include "PPPath_POSIX.h"
63 +
64 +-#ifdef HAVE_LIBASOUND
65 ++#ifdef HAVE_LIBRTMIDI
66 + #include "../midi/posix/MidiReceiver_pthread.h"
67 + #endif
68 + // --------------------------------------------------------------------------
69 +@@ -89,7 +89,7 @@ static SDL_TimerID timer;
70 + static PPScreen* myTrackerScreen = NULL;
71 + static Tracker* myTracker = NULL;
72 + static PPDisplayDevice* myDisplayDevice = NULL;
73 +-#ifdef HAVE_LIBASOUND
74 ++#ifdef HAVE_LIBRTMIDI
75 + static MidiReceiver* myMidiReceiver = NULL;
76 + #endif
77 +
78 +@@ -223,7 +223,7 @@ static Uint32 SDLCALL timerCallback(Uint32 interval, void* param)
79 + return interval;
80 + }
81 +
82 +-#ifdef HAVE_LIBASOUND
83 ++#ifdef HAVE_LIBRTMIDI
84 + class MidiEventHandler : public MidiReceiver::MidiEventHandler
85 + {
86 + public:
87 +@@ -829,7 +829,7 @@ myDisplayDevice = new PPDisplayDeviceFB(windowSize.width, windowSize.height, sca
88 + // Startup procedure
89 + myTracker->startUp(noSplash);
90 +
91 +-#ifdef HAVE_LIBASOUND
92 ++#ifdef HAVE_LIBRTMIDI
93 + InitMidi();
94 + #endif
95 +
96 +@@ -962,7 +962,7 @@ int main(int argc, char *argv[])
97 + initTracker(defaultBPP, orientation, swapRedBlue, noSplash);
98 + globalMutex->unlock();
99 +
100 +-#ifdef HAVE_LIBASOUND
101 ++#ifdef HAVE_LIBRTMIDI
102 + if (myMidiReceiver && recVelocity)
103 + {
104 + myMidiReceiver->setRecordVelocity(true);
105 +@@ -1036,7 +1036,7 @@ int main(int argc, char *argv[])
106 + SDL_RemoveTimer(timer);
107 +
108 + globalMutex->lock();
109 +-#ifdef HAVE_LIBASOUND
110 ++#ifdef HAVE_LIBRTMIDI
111 + delete myMidiReceiver;
112 + #endif
113 + delete myTracker;
114
115 diff --git a/media-sound/milkytracker/milkytracker-1.02.00.ebuild b/media-sound/milkytracker/milkytracker-1.02.00-r1.ebuild
116 similarity index 90%
117 rename from media-sound/milkytracker/milkytracker-1.02.00.ebuild
118 rename to media-sound/milkytracker/milkytracker-1.02.00-r1.ebuild
119 index d9dc64d7f6e..b27c6c5260b 100644
120 --- a/media-sound/milkytracker/milkytracker-1.02.00.ebuild
121 +++ b/media-sound/milkytracker/milkytracker-1.02.00-r1.ebuild
122 @@ -3,7 +3,7 @@
123
124 EAPI=7
125
126 -inherit cmake desktop
127 +inherit cmake desktop xdg
128
129 # This commit is needed so the milkytrace binary is linked properly, bug 711564
130 # It is also ~40kb so it is better to fetch it rather than ship it in-tree
131 @@ -24,7 +24,7 @@ RDEPEND="
132 media-libs/libsdl2[X]
133 sys-libs/zlib
134 alsa? ( media-libs/alsa-lib )
135 - jack? ( media-sound/jack-audio-connection-kit )"
136 + jack? ( virtual/jack )"
137 DEPEND="${RDEPEND}"
138
139 PATCHES=(
140 @@ -32,10 +32,15 @@ PATCHES=(
141 "${FILESDIR}/${P}-CVE-2019-14464.patch"
142 "${FILESDIR}/${P}-CVE-2019-1449x.patch"
143 "${FILESDIR}/${P}-CVE-2020-15569.patch"
144 + "${FILESDIR}/${P}-fix-hard-dependency-on-rtmidi.patch"
145 )
146
147 S="${WORKDIR}/MilkyTracker-${PV}"
148
149 +src_prepare() {
150 + cmake_src_prepare
151 +}
152 +
153 src_configure() {
154 local mycmakeargs=(
155 $(cmake_use_find_package alsa ALSA)