From 83bc5b0b706e8e0c8ee950f36fc78d25915e73a8 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Mon, 18 Feb 2019 15:17:07 +0000
Subject: [PATCH] community/lmms to 1.2.0rc7-3

---
 community/lmms/PKGBUILD | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/community/lmms/PKGBUILD b/community/lmms/PKGBUILD
index c40ad6401..f705450bf 100644
--- a/community/lmms/PKGBUILD
+++ b/community/lmms/PKGBUILD
@@ -13,7 +13,7 @@
 _pkgver=1.2.0-rc7
 pkgname=lmms
 pkgver=${_pkgver/-}
-pkgrel=2
+pkgrel=3
 pkgdesc='The Linux MultiMedia Studio'
 arch=('x86_64')
 url="https://lmms.io"
@@ -27,10 +27,12 @@ optdepends=('pulseaudio: pulseaudio support')
 source=("git+https://github.com/${pkgname}/${pkgname}.git#tag=v${_pkgver}"
         'git+https://github.com/Lukas-W/qt5-x11embed.git'
         'git+https://github.com/rampantpixels/rpmalloc.git'
+        "${pkgname}-fluidsynth2.patch::https://github.com/${pkgname}/${pkgname}/pull/4678/commits/c2e4f5a28d1612a706b8bee6d37b5ecc0bc38794.patch"
         'https://github.com/rampantpixels/rpmalloc/commit/1c580b394e1a20e63d63c72cad421f7be4422089.patch')
 sha512sums=('SKIP'
             'SKIP'
             'SKIP'
+            'c68cbff796f754bdf1af01d3f83abb1b3d36bdecb27bf3a8ec0242c2b3163709e5b43851fcd539b735c55e9b6a07ee44598ec0bc92305709c36655c720dd900c'
             '95b8df46fbb1194d30ba9dd34e7b0325590c63a1a2f34730fa62c00fea1a75e728733ee3c287ed2b31150e66aa18e170fe4725a0e7cad2518039a19b12dc389c')
 
 prepare() {
@@ -45,6 +47,8 @@ prepare() {
   sed -e 's|lib64|lib|g' -i cmake/modules/DetectMachine.cmake
   # setting proper DESTDIR based install path for bash-completion
   sed -e 's/\(${BASHCOMP_USER\)/\\$DESTDIR\1/g' -i cmake/modules/BashCompletion.cmake
+  # fix for fluidsynth > 2: https://github.com/LMMS/lmms/issues/4640
+  patch -Np1 -i ../${pkgname}-fluidsynth2.patch
   # upstream rpmalloc fix for ARM
   patch -p1 -d src/3rdparty/rpmalloc/rpmalloc -i "${srcdir}/1c580b394e1a20e63d63c72cad421f7be4422089.patch"
 }