From 3e3c864af58db8ad4d4e7acc5bcdd5f404a2c607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Thu, 23 Jan 2020 17:26:58 +0100 Subject: [PATCH] New package: wildmidi-0.4.3 --- common/shlibs | 1 + srcpkgs/libwildmidi | 1 + srcpkgs/libwildmidi-devel | 1 + srcpkgs/wildmidi/patches/fix-midi_file.patch | 16 ++++++++ srcpkgs/wildmidi/template | 42 ++++++++++++++++++++ 5 files changed, 61 insertions(+) create mode 120000 srcpkgs/libwildmidi create mode 120000 srcpkgs/libwildmidi-devel create mode 100644 srcpkgs/wildmidi/patches/fix-midi_file.patch create mode 100644 srcpkgs/wildmidi/template diff --git a/common/shlibs b/common/shlibs index 35fcd4de243..041a0fb150c 100644 --- a/common/shlibs +++ b/common/shlibs @@ -1736,6 +1736,7 @@ libssl.so.45 libssl45-2.7.2_1 libtls.so.17 libtls17-2.7.2_1 libvamp-hostsdk.so.3 libvamp-plugin-sdk-2.2_6 libportmidi.so portmidi-217_1 +libWildMidi.so.2 libwildmidi-0.4.3_1 libsox.so.3 sox-14.4.2_1 libsoxr.so.0 libsoxr-0.1.2_1 libsoxr-lsr.so.0 libsoxr-0.1.2_1 diff --git a/srcpkgs/libwildmidi b/srcpkgs/libwildmidi new file mode 120000 index 00000000000..e20d971e60a --- /dev/null +++ b/srcpkgs/libwildmidi @@ -0,0 +1 @@ +wildmidi \ No newline at end of file diff --git a/srcpkgs/libwildmidi-devel b/srcpkgs/libwildmidi-devel new file mode 120000 index 00000000000..e20d971e60a --- /dev/null +++ b/srcpkgs/libwildmidi-devel @@ -0,0 +1 @@ +wildmidi \ No newline at end of file diff --git a/srcpkgs/wildmidi/patches/fix-midi_file.patch b/srcpkgs/wildmidi/patches/fix-midi_file.patch new file mode 100644 index 00000000000..eac4f5803a9 --- /dev/null +++ b/srcpkgs/wildmidi/patches/fix-midi_file.patch @@ -0,0 +1,16 @@ +--- src/wildmidi.c 2018-11-24 09:55:50.000000000 +0100 ++++ src/wildmidi.c 2020-01-23 17:07:12.497649804 +0100 +@@ -1978,12 +1978,7 @@ + if (!real_file) real_file = argv[optind]; + else real_file++; + +- strncpy(midi_file, real_file, strlen(real_file)); +- midi_file[strlen(real_file)-4] = '.'; +- midi_file[strlen(real_file)-3] = 'm'; +- midi_file[strlen(real_file)-2] = 'i'; +- midi_file[strlen(real_file)-1] = 'd'; +- ++ snprintf(midi_file, sizeof(midi_file), "%s.mid", real_file); + printf("\rWriting %s: %u bytes.\r\n", midi_file, getmidisize); + write_midi_output(getmidibuffer,getmidisize); + free(getmidibuffer); diff --git a/srcpkgs/wildmidi/template b/srcpkgs/wildmidi/template new file mode 100644 index 00000000000..35a808d9953 --- /dev/null +++ b/srcpkgs/wildmidi/template @@ -0,0 +1,42 @@ +# Template file for 'wildmidi' +pkgname=wildmidi +version=0.4.3 +revision=1 +wrksrc="${pkgname}-${pkgname}-${version}" +build_style=cmake +configure_args="-DWANT_ALSA=ON -DWANT_OSS=ON" +hostmakedepends="pkg-config" +makedepends="alsa-lib-devel" +depends="libwildmidi" +short_desc="Simple software midi player" +maintainer="Jürgen Buchmüller " +license="GPL-3.0-or-later" +homepage="http://www.mindwerks.net/projects/wildmidi" +distfiles="https://github.com/Mindwerks/${pkgname}/archive/${pkgname}-${version}.tar.gz" +checksum=498e5a96455bb4b91b37188ad6dcb070824e92c44f5ed452b90adbaec8eef3c5 + +post_install() { + sed -i cfg/wildmidi.cfg -e "s;/usr/share/midi/freepats;/usr/share/freepats;" + vsconf cfg/wildmidi.cfg +} + +libwildmidi_package() { + depends="freepats" + short_desc+=" - library" + conf_files="/etc/wildmidi/wildmidi.cfg" + pkg_install() { + vmove "usr/lib/*.so.*" + vinstall cfg/wildmidi.cfg 644 etc/wildmidi + } +} + +libwildmidi-devel_package() { + depends="libwildmidi>=${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove "usr/lib/*.so" + vmove usr/lib/pkgconfig + vmove usr/share/man/man3 + } +}