new package: lenmus
This commit is contained in:
parent
9a05280d40
commit
93eb3684fc
22
x11-packages/lenmus/CMakeLists.txt.patch
Normal file
22
x11-packages/lenmus/CMakeLists.txt.patch
Normal file
@ -0,0 +1,22 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1251,16 +1251,16 @@
|
||||
if (UNIX AND NOT APPLE)
|
||||
# Install desktop entry
|
||||
install(FILES ${LENMUS_ROOT_DIR}/res/desktop/org.lenmus.lenmus.desktop
|
||||
- DESTINATION "/usr/share/applications"
|
||||
+ DESTINATION "@TERMUX_PREFIX@/share/applications"
|
||||
COMPONENT main )
|
||||
# Install icon
|
||||
install(FILES ${LENMUS_ROOT_DIR}/res/icons/lenmus.png
|
||||
- DESTINATION "/usr/share/pixmaps"
|
||||
+ DESTINATION "@TERMUX_PREFIX@/share/pixmaps"
|
||||
COMPONENT main )
|
||||
|
||||
# Install AppStream upstream metadata
|
||||
install(FILES ${LENMUS_ROOT_DIR}/res/other/org.lenmus.lenmus.appdata.xml
|
||||
- DESTINATION "/usr/share/metainfo"
|
||||
+ DESTINATION "@TERMUX_PREFIX@/share/metainfo"
|
||||
COMPONENT main )
|
||||
endif(UNIX AND NOT APPLE)
|
||||
|
27
x11-packages/lenmus/build.sh
Normal file
27
x11-packages/lenmus/build.sh
Normal file
@ -0,0 +1,27 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://www.lenmus.org/
|
||||
TERMUX_PKG_DESCRIPTION="A free program to help you in the study of music theory and ear training"
|
||||
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=6.0.0
|
||||
TERMUX_PKG_SRCURL=https://github.com/lenmus/lenmus/archive/refs/tags/Release_${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=235a44a04e827fb9a118073ffcc92dc3714df073b7c67e915b860d3a8480e4fd
|
||||
TERMUX_PKG_DEPENDS="fluidsynth, fontconfig, freetype, libc++, libpng, libsqlite, portmidi, wxwidgets, zlib"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
-DFLUIDR3_PATH=$TERMUX_PREFIX/share/soundfonts
|
||||
-DLENMUS_COMPILER_GCC=0
|
||||
-DLENMUS_COMPILER_MSVC=0
|
||||
-DMAN_INSTALL_DIR=$TERMUX_PREFIX/share/man
|
||||
"
|
||||
|
||||
termux_step_create_debscripts() {
|
||||
echo "#!$TERMUX_PREFIX/bin/sh" > postinst
|
||||
echo "if [ ! -e $TERMUX_PREFIX/share/soundfonts/FluidR3_GM.sf2 ]; then" >> postinst
|
||||
echo " echo" >> postinst
|
||||
echo " echo You may need to get \\\`FluidR3_GM.sf2\\' from somewhere and put it into:" >> postinst
|
||||
echo " echo" >> postinst
|
||||
echo " echo ' '$TERMUX_PREFIX/share/soundfonts/" >> postinst
|
||||
echo " echo" >> postinst
|
||||
echo "fi" >> postinst
|
||||
echo "exit 0" >> postinst
|
||||
chmod 0755 postinst
|
||||
}
|
36
x11-packages/lenmus/use-pulseaudio.patch
Normal file
36
x11-packages/lenmus/use-pulseaudio.patch
Normal file
@ -0,0 +1,36 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -357,7 +357,10 @@
|
||||
set( LENMUS_SOURCE_ROOT "\"${LENMUS_ROOT_DIR}/\"" )
|
||||
|
||||
# Audio driver and device to use
|
||||
-if(UNIX AND NOT APPLE)
|
||||
+if(ANDROID)
|
||||
+ set(LENMUS_AUDIO_DRIVER "pulseaudio")
|
||||
+ set(LENMUS_PULSEAUDIO_DEVICE "default")
|
||||
+elseif(UNIX AND NOT APPLE)
|
||||
set(LENMUS_AUDIO_DRIVER "alsa")
|
||||
set(LENMUS_ALSA_DEVICE "default")
|
||||
elseif(WIN32)
|
||||
--- a/lenmus_config.h.cmake
|
||||
+++ b/lenmus_config.h.cmake
|
||||
@@ -127,6 +127,7 @@
|
||||
#define LENMUS_ALSA_DEVICE "@LENMUS_ALSA_DEVICE@"
|
||||
#define LENMUS_DSOUND_DEVICE "@LENMUS_DSOUND_DEVICE@"
|
||||
#define LENMUS_COREAUDIO_DEVICE "@LENMUS_COREAUDIO_DEVICE@"
|
||||
+#define LENMUS_PULSEAUDIO_DEVICE "@LENMUS_PULSEAUDIO_DEVICE@"
|
||||
#define LENMUS_SOUNDFONT_PATH "@LENMUS_SOUNDFONT_PATH@" //Linux only
|
||||
|
||||
|
||||
--- a/src/sound/lenmus_midi_server.cpp
|
||||
+++ b/src/sound/lenmus_midi_server.cpp
|
||||
@@ -162,6 +162,9 @@
|
||||
else if (strcmp(LENMUS_AUDIO_DRIVER, "coreaudio") == 0 && strcmp(LENMUS_COREAUDIO_DEVICE, "default") != 0)
|
||||
fluid_settings_setstr(m_pSettings, "audio.coreaudio.device", LENMUS_COREAUDIO_DEVICE);
|
||||
|
||||
+ else if (strcmp(LENMUS_AUDIO_DRIVER, "pulseaudio") == 0 && strcmp(LENMUS_PULSEAUDIO_DEVICE, "default") != 0)
|
||||
+ fluid_settings_setstr(m_pSettings, "audio.pulseaudio.device", LENMUS_PULSEAUDIO_DEVICE);
|
||||
+
|
||||
|
||||
//create the FluidSynth synthesizer
|
||||
m_pSynth = new_fluid_synth(m_pSettings);
|
22
x11-packages/lenmus/wx-3.1.patch
Normal file
22
x11-packages/lenmus/wx-3.1.patch
Normal file
@ -0,0 +1,22 @@
|
||||
--- a/include/lenmus_content_box_ctrol.h
|
||||
+++ b/include/lenmus_content_box_ctrol.h
|
||||
@@ -129,7 +129,7 @@
|
||||
wxWindow* GetHTMLWindow();
|
||||
wxColour GetHTMLBackgroundColour() const;
|
||||
void SetHTMLBackgroundColour(const wxColour& WXUNUSED(clr));
|
||||
- void SetHTMLBackgroundImage(const wxBitmap& WXUNUSED(bmpBg));
|
||||
+ void SetHTMLBackgroundImage(const wxBitmapBundle& WXUNUSED(bmpBg));
|
||||
void SetHTMLStatusText(const wxString& WXUNUSED(text));
|
||||
wxCursor GetHTMLCursor(HTMLCursor type) const;
|
||||
wxPoint GetRootCellCoords(size_t n) const;
|
||||
--- a/src/app/lenmus_content_box_ctrol.cpp
|
||||
+++ b/src/app/lenmus_content_box_ctrol.cpp
|
||||
@@ -989,7 +989,7 @@
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
-void ContentBoxCtrol::SetHTMLBackgroundImage(const wxBitmap& WXUNUSED(bmpBg))
|
||||
+void ContentBoxCtrol::SetHTMLBackgroundImage(const wxBitmapBundle& WXUNUSED(bmpBg))
|
||||
{
|
||||
// nothing to do
|
||||
}
|
Loading…
Reference in New Issue
Block a user