diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..1e7a990 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "shared-modules"] + path = shared-modules + url = https://github.com/flathub/shared-modules.git diff --git a/io.lmms.LMMS.json b/io.lmms.LMMS.json index 641089d..9315b96 100644 --- a/io.lmms.LMMS.json +++ b/io.lmms.LMMS.json @@ -19,7 +19,9 @@ /* Allow loading, saving files from the home directory (portals don’t work yet) */ "--filesystem=home", /* Allow other instances to see lockfiles */ - "--env=TMPDIR=/var/tmp" + "--env=TMPDIR=/var/tmp", + "--env=QT_AUTO_SCREEN_SCALE_FACTOR=1", + "--env=LD_LIBRARY_PATH=/app/lib:/app/lib/libgig" ], "cleanup": [ "/include", @@ -29,6 +31,7 @@ "*.la" ], "modules": [ + "shared-modules/SDL/SDL-1.2.15.json", { "name": "fftw3f", "config-opts": [ @@ -94,6 +97,50 @@ } ] }, + { + "name" : "pyqt5", + "config-opts" : [ + "--disable-static", + "--enable-x11" + ], + "sources" : [ + { + "type" : "archive", + "url" : "https://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.11.3/PyQt5_gpl-5.11.3.zip", + "sha256" : "7cacf0712d76a702e0e2102a65f411fd72e7f64a851a47a72c03fbafbe447aae" + }, + { + "type": "script", + "commands": [ + "python3 configure.py --assume-shared --confirm-license --no-designer-plugin --no-qml-plugin --sysroot=/app --qsci-api --qsci-api-destdir=/app/qsci --sipdir=/app/share/sip --sip=/app/bin/sip --sip-incdir=/app/include QMAKE_CFLAGS_RELEASE='-I/usr/include/python3.7m/' QMAKE_CXXFLAGS_RELEASE='-I/usr/include/python3.7m/'" + ], + "dest-filename": "configure" + } + ], + "modules" : [ + { + "name" : "sip", + "sources" : [ + { + "type" : "archive", + "url" : "https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.12/sip-4.19.12.tar.gz", + "sha256" : "24617fc31b983df075500ecac0e99d2fb48bf63ba82d4a17518659e571923822" + }, + { + "type": "script", + "commands": [ + "python3 configure.py --sip-module PyQt5.sip -b ${FLATPAK_DEST}/bin -d ${FLATPAK_DEST}/lib/python3.7/site-packages -e ${FLATPAK_DEST}/include -v ${FLATPAK_DEST}/share/sip --stubsdir=${FLATPAK_DEST}/lib/python3.7/site-packages" + ], + "dest-filename": "configure" + } + ], + "cleanup" : [ + "/bin", + "/include" + ] + } + ] + }, { "name": "carla", "buildsystem": "simple", @@ -109,6 +156,39 @@ } ] }, + { + "name": "stk", + "build-commands": [ + "make -j $FLATPAK_BUILDER_N_JOBS -C src", + "make -j $FLATPAK_BUILDER_N_JOBS -C projects/effects libeffects", + "make -j $FLATPAK_BUILDER_N_JOBS -C projects/ragamatic libragamat", + "make -j $FLATPAK_BUILDER_N_JOBS -C projects/eguitar libeguitar" + ], + "post-install": [ + "sh ./stk-install.sh" + ], + "sources": [ + { + "type": "archive", + "url": "http://ccrma.stanford.edu/software/stk/release/stk-4.6.1.tar.gz", + "sha256": "e77ba3c80cdd93ca02c34098b9b7f918df3d648c87f1ed5d94fe854debd6d101" + }, + { + "type": "file", + "path": "stk-install.sh" + } + ] + }, + { + "name": "gig", + "sources": [ + { + "type": "archive", + "url": "http://download.linuxsampler.org/packages/libgig-4.1.0.tar.bz2", + "sha256": "06a280278a323963042acdf13b092644cceb43ef367fcbb9ca7bbedff132bd0b" + } + ] + }, { "name": "fltk", "config-opts": [ @@ -130,8 +210,7 @@ "/share/man", "/lib/pkgconfig", "*.la" - ] - }, + } { "name": "lmms", "buildsystem": "cmake-ninja", diff --git a/shared-modules b/shared-modules new file mode 160000 index 0000000..83318c8 --- /dev/null +++ b/shared-modules @@ -0,0 +1 @@ +Subproject commit 83318c84a6a561624579b8dce6091d04c1197073 diff --git a/stk-install.sh b/stk-install.sh new file mode 100644 index 0000000..e2d9c9b --- /dev/null +++ b/stk-install.sh @@ -0,0 +1,54 @@ + +INCLUDE_DIR=/app/include +DATA_DIR=/app/share +LIB_DIR=/app/lib +BIN_DIR=/app/bin + + + + +install -Dm644 -t $INCLUDE_DIR/stk include/* +install -Dm644 -t $LIB_DIR src/libstk.* +install -Dm644 -t $DATA_DIR/stk/rawwaves rawwaves/*.raw + +#cp -pr projects/demo/tcl $DATA_DIR/stk/demo +#cp -pr projects/demo/scores $DATA_DIR/stk/demo +#cp -p projects/demo/demo $BIN_DIR/stk-demo +#cp -p projects/demo/Md2Skini $BIN_DIR/Md2Skini +#for f in Banded Drums Modal Physical Shakers StkDemo Voice ; do +# chmod +x projects/demo/$f +# sed -e 's,\./demo,$BIN_DIR/stk-demo,' -e '1i#! /bin/sh' \ +# -i projects/demo/$f +# cp -p projects/demo/$f $DATA_DIR/stk/demo +#done + +#cp -pr projects/examples/midifiles $DATA_DIR/stk/examples +#cp -pr projects/examples/rawwaves $DATA_DIR/stk/examples +#cp -pr projects/examples/scores $DATA_DIR/stk/examples +#for f in sine sineosc foursine audioprobe midiprobe duplex play \ +# record inetIn inetOut rtsine crtsine bethree controlbee \ +# threebees playsmf grains ; do +# cp -p projects/examples/$f $BIN_DIR/stk-$f +# # absolute links, will be shortened later +# ln -s $BIN_DIR/stk-$f $DATA_DIR/stk/examples/$f +#done + +install -Dm644 -t $DATA_DIR/stk/effects projects/effects/tcl +install -Dm644 -t $BIN_DIR/stk-effects projects/effects/effects +sed -e 's,\./effects,$BIN_DIR/stk-effects,' -e '1i#! /bin/sh' \ + -i projects/effects/StkEffects +install -Dm644 -t $DATA_DIR/stk/effects projects/effects/StkEffects + +install -Dm644 -t $DATA_DIR/stk/ragamatic projects/ragamatic/tcl +install -Dm644 -t $DATA_DIR/stk/ragamatic projects/ragamatic/rawwaves +install -Dm644 -t $BIN_DIR/stk-ragamat projects/ragamatic/ragamat +sed -e 's,\./ragamat,$BIN_DIR/stk-ragamat,' -e '1i#! /bin/sh' \ + -i projects/ragamatic/Raga +install -Dm644 -t $DATA_DIR/stk/ragamatic projects/ragamatic/Raga + +install -Dm644 -t $DATA_DIR/stk/eguitar projects/eguitar/tcl +install -Dm644 -t $DATA_DIR/stk/eguitar projects/eguitar/scores +install -Dm644 -t $BIN_DIR/stk-eguitar projects/eguitar/eguitar +sed -e 's,\./eguitar,$BIN_DIR/stk-eguitar,' -e '1i#! /bin/sh' \ + -i projects/eguitar/ElectricGuitar +install -Dm644 -t $DATA_DIR/stk/eguitar projects/eguitar/ElectricGuitar