Browse Source
multimedia/munt: Updated for version 2.7.0, new maintainer.
multimedia/munt: Updated for version 2.7.0, new maintainer.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>pull/198/head
committed by
Willy Sudiarto Raharjo
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
8 changed files with 372 additions and 31 deletions
-
17multimedia/munt/README
-
9multimedia/munt/doinst.sh
-
93multimedia/munt/interleave.c
-
176multimedia/munt/munt.SlackBuild
-
18multimedia/munt/munt.info
-
1multimedia/munt/setcap.sh
-
4multimedia/munt/slack-desc
-
85multimedia/munt/system_rom_path.diff
@ -0,0 +1,9 @@ |
|||
if [ -x /usr/bin/update-desktop-database ]; then |
|||
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 |
|||
fi |
|||
|
|||
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then |
|||
if [ -x /usr/bin/gtk-update-icon-cache ]; then |
|||
/usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1 |
|||
fi |
|||
fi |
@ -0,0 +1,93 @@ |
|||
/* interleave.c - B. Watson, April 2023, WTFPL licensed. |
|||
|
|||
Given two files of the same size, creates a 3rd file whose contents are: |
|||
|
|||
file 1, byte 1 |
|||
file 2, byte 1 |
|||
file 1, byte 2 |
|||
file 2, byte 2 |
|||
file 1, byte 3 |
|||
file 2, byte 3 |
|||
...etc. |
|||
|
|||
If file1 contains "foo" and file2 contains "bar", the output will |
|||
be "fboaor". The output is always twice the size of one of the |
|||
input files (or, the same size as both input files combined). |
|||
|
|||
Output file is silently overwritten if it already exists. |
|||
|
|||
Exit status is 0 for success, non-zero for failure, with a hopefully |
|||
useful error message. |
|||
|
|||
Compile me with: |
|||
gcc -Wall -O2 -o interleave interleave.c |
|||
|
|||
This could be done more efficiently and without an artificial file |
|||
size limit, but the current implementation reads everything into a |
|||
statically sized buffer for simpliticy. |
|||
*/ |
|||
|
|||
#include <stdio.h> |
|||
#include <stdlib.h> |
|||
#include <unistd.h> |
|||
|
|||
#define MAX_SIZE (1024 * 1024) |
|||
|
|||
unsigned char blob1[MAX_SIZE + 1], blob2[MAX_SIZE + 1], output[MAX_SIZE * 2 + 1]; |
|||
|
|||
void die(const char *msg) { |
|||
if(msg) |
|||
fprintf(stderr, "interleave: %s\n", msg); |
|||
else |
|||
perror("interleave"); |
|||
exit(1); |
|||
} |
|||
|
|||
int read_file(const char *fname, unsigned char *dest) { |
|||
int bytes; |
|||
FILE *f = fopen(fname, "rb"); |
|||
|
|||
if(!f) die(NULL); |
|||
if( (bytes = fread(dest, 1, MAX_SIZE + 1, f)) < 1 ) die(NULL); |
|||
fclose(f); |
|||
|
|||
/* fprintf(stderr, "read %d bytes from %s\n", bytes, fname); */ |
|||
|
|||
return bytes; |
|||
} |
|||
|
|||
void write_output(const char *fname, int bytes) { |
|||
int i; |
|||
unsigned char *p = output; |
|||
FILE *f = fopen(fname, "wb"); |
|||
|
|||
if(!f) die(NULL); |
|||
|
|||
for(i = 0; i < bytes; i++) { |
|||
*p++ = blob1[i]; |
|||
*p++ = blob2[i]; |
|||
} |
|||
|
|||
if( (fwrite(output, 1, bytes * 2, f)) < (bytes * 2) ) die(NULL); |
|||
|
|||
fclose(f); |
|||
} |
|||
|
|||
int main(int argc, char **argv) { |
|||
int size1, size2; |
|||
|
|||
if(argc != 4) |
|||
die("usage:\n\tinterleave <input1> <input2> <output>"); |
|||
|
|||
size1 = read_file(argv[1], blob1); |
|||
size2 = read_file(argv[2], blob2); |
|||
|
|||
if(size1 > MAX_SIZE) |
|||
die("input file too big (max 1MB each)"); |
|||
if(size1 != size2) |
|||
die("input files are not the same size"); |
|||
|
|||
write_output(argv[3], size1); |
|||
|
|||
return 0; |
|||
} |
@ -1,10 +1,16 @@ |
|||
PRGNAM="munt" |
|||
VERSION="2.2.0" |
|||
HOMEPAGE="http://munt.sourceforge.net/" |
|||
DOWNLOAD="https://downloads.sourceforge.net/project/munt/munt/2.2.0/munt-2.2.0.tar.gz" |
|||
MD5SUM="627a5c7a61c40a4e27025f6a6b912b63" |
|||
VERSION="2.7.0" |
|||
HOMEPAGE="https://github.com/munt/munt/" |
|||
DOWNLOAD="https://github.com/munt/munt/archive/mt32emu_qt_1_11_1/munt-mt32emu_qt_1_11_1.tar.gz \ |
|||
http://dbwbp.com/synthbin/Roland%20MT32%20(various%20OS%20_%20extra%20ROMs.zip \ |
|||
http://dbwbp.com/synthbin/Roland%20-%20CM32L%20-%20CONTROL.1989-12-05.v1.02.ROM.zip \ |
|||
http://dbwbp.com/synthbin/Roland%20-%20CM32L%20-%20PCM%20Maskrom.ROM.zip" |
|||
MD5SUM="5a167d0a101d3781a751b21e3e7f46f2 \ |
|||
1635fd528b41fefd262e4b075cb583c0 \ |
|||
a84cd91f8959bcae86ba06661ce4791d \ |
|||
8278cfbb6c6d55edb39168182ce322ed" |
|||
DOWNLOAD_x86_64="" |
|||
MD5SUM_x86_64="" |
|||
REQUIRES="" |
|||
MAINTAINER="Dugan Chen" |
|||
EMAIL="thedoogster [at] gmail [dot] com" |
|||
MAINTAINER="B. Watson" |
|||
EMAIL="urchlay@slackware.uk" |
@ -0,0 +1 @@ |
|||
[ -x /sbin/setcap ] && /sbin/setcap cap_ipc_lock,cap_sys_nice=ep usr/bin/mt32emu-qt |
@ -0,0 +1,85 @@ |
|||
diff -Naur munt-mt32emu_qt_1_11_1/mt32emu_alsadrv/README.txt munt-mt32emu_qt_1_11_1.patched/mt32emu_alsadrv/README.txt
|
|||
--- munt-mt32emu_qt_1_11_1/mt32emu_alsadrv/README.txt 2022-08-03 11:39:49.000000000 -0400
|
|||
+++ munt-mt32emu_qt_1_11_1.patched/mt32emu_alsadrv/README.txt 2023-04-11 14:52:33.660273547 -0400
|
|||
@@ -29,7 +29,7 @@
|
|||
mt32d and xmt32 will be installed to /usr/local/bin |
|||
|
|||
Please ensure that the ROM files are installed in |
|||
-/usr/share/mt32-rom-data
|
|||
+/usr/share/munt/roms
|
|||
|
|||
If the ROM files are correctly installed yet the |
|||
program cannot open them, check the filenames (case sensitive) |
|||
diff -Naur munt-mt32emu_qt_1_11_1/mt32emu_alsadrv/src/alsadrv.cpp munt-mt32emu_qt_1_11_1.patched/mt32emu_alsadrv/src/alsadrv.cpp
|
|||
--- munt-mt32emu_qt_1_11_1/mt32emu_alsadrv/src/alsadrv.cpp 2022-08-03 11:39:49.000000000 -0400
|
|||
+++ munt-mt32emu_qt_1_11_1.patched/mt32emu_alsadrv/src/alsadrv.cpp 2023-04-11 14:54:40.209261637 -0400
|
|||
@@ -44,7 +44,7 @@
|
|||
FILE *recwav_file = NULL; |
|||
|
|||
#define PERC_CHANNEL 9 |
|||
-const char default_rom_dir[] = "/usr/share/mt32-rom-data/";
|
|||
+const char default_rom_dir[] = "/usr/share/munt/roms/";
|
|||
|
|||
#include <mt32emu/mt32emu.h> |
|||
|
|||
diff -Naur munt-mt32emu_qt_1_11_1/mt32emu_alsadrv/src/console.cpp munt-mt32emu_qt_1_11_1.patched/mt32emu_alsadrv/src/console.cpp
|
|||
--- munt-mt32emu_qt_1_11_1/mt32emu_alsadrv/src/console.cpp 2022-08-03 11:39:49.000000000 -0400
|
|||
+++ munt-mt32emu_qt_1_11_1.patched/mt32emu_alsadrv/src/console.cpp 2023-04-11 14:54:09.900264489 -0400
|
|||
@@ -139,7 +139,7 @@
|
|||
|
|||
printf("\n"); |
|||
printf("-f romdir : Directory with ROM files to load\n" |
|||
- " (default: '/usr/share/mt32-rom-data/')\n");
|
|||
+ " (default: '/usr/share/munt/roms/')\n");
|
|||
printf("-o romsearch : Search algorithm to use when loading ROM files:\n" |
|||
" (0 - try both but CM32-L first, 1 - CM32-L only,\n" |
|||
" 2 - MT-32 only, default: 0)\n"); |
|||
diff -Naur munt-mt32emu_qt_1_11_1/mt32emu_alsadrv/src/xmt32.cpp munt-mt32emu_qt_1_11_1.patched/mt32emu_alsadrv/src/xmt32.cpp
|
|||
--- munt-mt32emu_qt_1_11_1/mt32emu_alsadrv/src/xmt32.cpp 2022-08-03 11:39:49.000000000 -0400
|
|||
+++ munt-mt32emu_qt_1_11_1.patched/mt32emu_alsadrv/src/xmt32.cpp 2023-04-11 14:53:38.143267478 -0400
|
|||
@@ -489,7 +489,7 @@
|
|||
|
|||
printf("\n"); |
|||
printf("-f romdir : Directory with ROM files to load\n" |
|||
- " (default: '/usr/share/mt32-rom-data/')\n");
|
|||
+ " (default: '/usr/share/munt/roms/')\n");
|
|||
printf("-o romsearch : Search algorithm to use when loading ROM files:\n" |
|||
" (0 - try both but CM32-L first, 1 - CM32-L only,\n" |
|||
" 2 - MT-32 only, default: 0)\n"); |
|||
diff -Naur munt-mt32emu_qt_1_11_1/mt32emu_qt/src/Master.cpp munt-mt32emu_qt_1_11_1.patched/mt32emu_qt/src/Master.cpp
|
|||
--- munt-mt32emu_qt_1_11_1/mt32emu_qt/src/Master.cpp 2022-08-03 11:39:49.000000000 -0400
|
|||
+++ munt-mt32emu_qt_1_11_1.patched/mt32emu_qt/src/Master.cpp 2023-04-11 14:56:27.938251499 -0400
|
|||
@@ -583,20 +583,7 @@
|
|||
} |
|||
|
|||
QString Master::getDefaultROMSearchPath() { |
|||
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
|
|||
- QString defaultPath;
|
|||
- QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
|||
- if (env.contains("USERPROFILE")) {
|
|||
- defaultPath = env.value("USERPROFILE");
|
|||
- } else if (env.contains("HOME")) {
|
|||
- defaultPath = env.value("HOME");
|
|||
- } else {
|
|||
- defaultPath = ".";
|
|||
- }
|
|||
- return defaultPath + "/roms/";
|
|||
-#else
|
|||
- return "./roms/";
|
|||
-#endif
|
|||
+ return "/usr/share/munt/roms/";
|
|||
} |
|||
|
|||
void Master::loadSynthProfile(SynthProfile &synthProfile, QString name) { |
|||
diff -Naur munt-mt32emu_qt_1_11_1/mt32emu_smf2wav/src/mt32emu-smf2wav.cpp munt-mt32emu_qt_1_11_1.patched/mt32emu_smf2wav/src/mt32emu-smf2wav.cpp
|
|||
--- munt-mt32emu_qt_1_11_1/mt32emu_smf2wav/src/mt32emu-smf2wav.cpp 2022-08-03 11:39:49.000000000 -0400
|
|||
+++ munt-mt32emu_qt_1_11_1.patched/mt32emu_smf2wav/src/mt32emu-smf2wav.cpp 2023-04-11 14:56:27.938251499 -0400
|
|||
@@ -917,7 +917,7 @@
|
|||
|
|||
static bool loadROMs(MT32Emu::Service &service, const Options &options) { |
|||
const char *romDirNameUtf8 = options.romDir; |
|||
- if (romDirNameUtf8 == NULL) romDirNameUtf8 = ".";
|
|||
+ if (romDirNameUtf8 == NULL) romDirNameUtf8 = "/usr/share/munt/roms";
|
|||
char *romDirName = g_filename_from_utf8(romDirNameUtf8, strlen(romDirNameUtf8), NULL, NULL, NULL); |
|||
GDir *romDir = g_dir_open(romDirName, 0, NULL); |
|||
if (NULL == romDir) { |
Write
Preview
Loading…
Cancel
Save
Reference in new issue