Skip to content

Commit ec41aad

Browse files
authored
fix: build errors in package fluida.lv2 (#315)
1 parent cbc7117 commit ec41aad

File tree

3 files changed

+49
-14
lines changed

3 files changed

+49
-14
lines changed

packages/fluida.lv2/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
libxputty-fix-asprintf.patch

packages/fluida.lv2/PKGBUILD

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,47 @@
11
# Maintainer: OSAMC <https://github.com/osam-cologne/archlinux-proaudio>
22
# Contributor: Christopher Arndt <aur -at- chrisarndt -dot- de>
33

4-
_projectname=Fluida.lv2
5-
_plugin_uri="https://github.com/brummer10/$_projectname"
6-
pkgname=${_projectname,,}
4+
_name=Fluida.lv2
5+
_plugin_uri="https://github.com/brummer10/$_name"
6+
pkgname=${_name,,}
77
pkgver=0.8
8-
pkgrel=2
8+
pkgrel=3
99
pkgdesc='An LV2 plugin which wraps the fluidsynth SF2 soundfont player'
1010
arch=(x86_64 aarch64)
11-
url="https://github.com/brummer10/$_projectname"
11+
url="https://github.com/brummer10/$_name"
1212
license=(GPL2)
13-
depends=(cairo)
13+
depends=(cairo gcc-libs glibc libx11)
1414
makedepends=(fluidsynth lv2 xxd)
1515
checkdepends=(lv2lint)
16-
optdepends=('lv2-host: for LV2 plugin')
16+
optdepends=('lv2-host: for loading the LV2 format plugin')
1717
groups=(lv2-plugins pro-audio)
18-
source=("https://github.com/brummer10/Fluida.lv2/releases/download/v$pkgver/${_projectname%*.lv2}_$pkgver.tar.gz")
19-
sha256sums=('67aa666bf68c13b3def8b47d19589a86ccd8f534aa2090d1304c6c025fe38e51')
18+
source=("https://github.com/brummer10/Fluida.lv2/releases/download/v$pkgver/${_name%*.lv2}_$pkgver.tar.gz"
19+
'libxputty-fix-asprintf.patch::https://github.com/brummer10/libxputty/commit/7eb70bf3f7bce0af9e1919d6c875cdb8efca734e.patch'
20+
'fluida-fix-asprintf.patch')
21+
sha256sums=('67aa666bf68c13b3def8b47d19589a86ccd8f534aa2090d1304c6c025fe38e51'
22+
'15fe7e3e2ec8efe62dc9bb4c0830eaf3ed0373cd39ebd755f2d9193710ebbf76'
23+
'ee62982b9d8f3a713bf15e31510727a5ac36c8a1c7c4985a13ffcf7668289300')
24+
25+
26+
prepare() {
27+
cd ${_name%*.lv2}_$pkgver
28+
patch -p1 -N -r - -i "$srcdir"/fluida-fix-asprintf.patch
29+
cd libxputty
30+
patch -p1 -N -r - -i "$srcdir"/libxputty-fix-asprintf.patch
31+
}
2032

2133
build() {
22-
cd ${_projectname%*.lv2}_$pkgver
34+
cd ${_name%*.lv2}_$pkgver
2335
make
2436
}
2537

2638
check() {
27-
cd ${_projectname%*.lv2}_$pkgver
28-
lv2lint -Mpack -I Fluida/$_projectname "$_plugin_uri"
39+
cd ${_name%*.lv2}_$pkgver
40+
lv2lint -Mpack -I Fluida/$_name "$_plugin_uri"
2941
}
3042

3143
package() {
32-
depends+=('libfluidsynth.so')
33-
cd ${_projectname%*.lv2}_$pkgver
44+
depends+=(libfluidsynth.so)
45+
cd ${_name%*.lv2}_$pkgver
3446
make DESTDIR="$pkgdir" PREFIX=/usr install
3547
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
diff --git a/Fluida/fluida_ui.c b/Fluida/fluida_ui.c
2+
index d24a8a0..441e283 100644
3+
--- a/Fluida/fluida_ui.c
4+
+++ b/Fluida/fluida_ui.c
5+
@@ -491,7 +491,7 @@ void plugin_port_event(LV2UI_Handle handle, uint32_t port_index,
6+
LV2_ATOM_OBJECT_FOREACH(obj, ob) {
7+
if (ob->key == uris->atom_String) {
8+
ps->instruments = (char **)realloc(ps->instruments, (i+1) * sizeof(char *));
9+
- if (asprintf(&ps->instruments[i],(char*)LV2_ATOM_BODY(&ob->value))) {
10+
+ if (asprintf(&ps->instruments[i], "%s", (char*)LV2_ATOM_BODY(&ob->value))) {
11+
i++;
12+
}
13+
}
14+
@@ -504,7 +504,7 @@ void plugin_port_event(LV2UI_Handle handle, uint32_t port_index,
15+
LV2_ATOM_OBJECT_FOREACH(obj, ob) {
16+
if (ob->key == uris->atom_String) {
17+
ps->instruments = (char **)realloc(ps->instruments, (i+1) * sizeof(char *));
18+
- if (asprintf(&ps->instruments[i],(char*)LV2_ATOM_BODY(&ob->value))) {
19+
+ if (asprintf(&ps->instruments[i], "%s", (char*)LV2_ATOM_BODY(&ob->value))) {
20+
i++;
21+
}
22+
}

0 commit comments

Comments
 (0)