summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Graef2022-03-23 13:42:32 +0100
committerAlbert Graef2022-03-23 13:42:32 +0100
commite818af019fbd0314c5eea041701ff2e342ee3ecf (patch)
tree6e91e2ff4d338404a124a803204aa274c4393852
parentf11e4b2edd90914ecddb4ccbe8bec86e4659f617 (diff)
downloadaur-e818af019fbd0314c5eea041701ff2e342ee3ecf.tar.gz
Fix Faust API breakage.
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD17
-rw-r--r--faust-api-breakage.diff51
3 files changed, 68 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 97607aee7d93..81809d60c402 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = pd-faustgen2
pkgdesc = The FAUST compiler embedded in a Pd external
pkgver = 2.0.2
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/agraef/pd-faustgen
arch = i686
arch = x86_64
@@ -12,7 +12,8 @@ pkgbase = pd-faustgen2
depends = pd
depends = llvm-libs
source = https://github.com/agraef/pd-faustgen/releases/download/2.0.2/pd-faustgen2-2.0.2.tar.gz
+ source = faust-api-breakage.diff
md5sums = 1f1304a9790ee127e2f59ce92812c5d7
+ md5sums = a9d2cdb5d664a8c9954b1b09fcb7b22f
pkgname = pd-faustgen2
-
diff --git a/PKGBUILD b/PKGBUILD
index e0b943a1cee4..ce50a36eed33 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,15 +4,26 @@
pkgname=pd-faustgen2
prjname=pd-faustgen
pkgver=2.0.2
-pkgrel=1
+pkgrel=2
pkgdesc="The FAUST compiler embedded in a Pd external"
arch=("i686" "x86_64")
license=('MIT')
url="https://github.com/agraef/$prjname"
depends=('pd' 'llvm-libs')
makedepends=('faust' 'cmake' 'llvm')
-source=("https://github.com/agraef/$prjname/releases/download/$pkgver/$pkgname-$pkgver.tar.gz")
-md5sums=('1f1304a9790ee127e2f59ce92812c5d7')
+source=("https://github.com/agraef/$prjname/releases/download/$pkgver/$pkgname-$pkgver.tar.gz"
+ "faust-api-breakage.diff")
+md5sums=('1f1304a9790ee127e2f59ce92812c5d7'
+ 'a9d2cdb5d664a8c9954b1b09fcb7b22f')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+ # Work around recent API breakage in Faust version 2.37.3 and later. This
+ # should really be fixed upstream in pd-faustgen2 using some cmake magic,
+ # but this will do for now. Thanks to Björn Kessler for spotting this and
+ # contributing the patch.
+ patch -p1 -i ../faust-api-breakage.diff
+}
build() {
cd "$pkgname-$pkgver"
diff --git a/faust-api-breakage.diff b/faust-api-breakage.diff
new file mode 100644
index 000000000000..336f6cede28d
--- /dev/null
+++ b/faust-api-breakage.diff
@@ -0,0 +1,51 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0c885a6..ec23833 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -74,9 +74,9 @@ if(INSTALLED_FAUST)
+ ## also do a more general search in standard locations as a fallback.
+ get_filename_component(FAUST_LIBRARY_DIR ${FAUST_LIBRARY} DIRECTORY)
+ if(FAUST_LIBRARY_DIR)
+- find_path(FAUST_INCLUDE_DIR faust/dsp/llvm-c-dsp.h HINTS "${FAUST_LIBRARY_DIR}/../include" DOC "Faust include directory" NO_DEFAULT_PATH)
++ find_path(FAUST_INCLUDE_DIR faust/dsp/llvm-dsp-c.h HINTS "${FAUST_LIBRARY_DIR}/../include" DOC "Faust include directory" NO_DEFAULT_PATH)
+ if(NOT FAUST_INCLUDE_DIR)
+- find_path(FAUST_INCLUDE_DIR faust/dsp/llvm-c-dsp.h DOC "Faust include directory" REQUIRED)
++ find_path(FAUST_INCLUDE_DIR faust/dsp/llvm-dsp-c.h DOC "Faust include directory" REQUIRED)
+ endif()
+ find_path(FAUSTLIB all.lib HINTS "${FAUST_LIBRARY_DIR}/../share/faust" DOC "Faust library files" NO_DEFAULT_PATH)
+ if(NOT FAUSTLIB)
+@@ -84,7 +84,7 @@ if(INSTALLED_FAUST)
+ endif()
+ endif()
+ message(STATUS "Found installed Faust library at: ${FAUST_LIBRARY}")
+- if(FAUST_INCLUDE_DIR AND EXISTS "${FAUST_INCLUDE_DIR}/faust/dsp/llvm-c-dsp.h")
++ if(FAUST_INCLUDE_DIR AND EXISTS "${FAUST_INCLUDE_DIR}/faust/dsp/llvm-dsp-c.h")
+ message(STATUS "Found installed Faust include files at: ${FAUST_INCLUDE_DIR}")
+ else()
+ message(FATAL_ERROR "Faust include files not found, maybe you specified the wrong FAUST_INCLUDE_DIR directory? Otherwise try using the included Faust instead (INSTALLED_FAUST=OFF).")
+diff --git a/src/faust_tilde_ui.c b/src/faust_tilde_ui.c
+index 1d1d1db..6c06617 100644
+--- a/src/faust_tilde_ui.c
++++ b/src/faust_tilde_ui.c
+@@ -6,7 +6,7 @@
+
+
+ #include "faust_tilde_ui.h"
+-#include <faust/dsp/llvm-c-dsp.h>
++#include <faust/dsp/llvm-dsp-c.h>
+ #include <string.h>
+ #include <ctype.h>
+ #include <float.h>
+diff --git a/src/faustgen_tilde.c b/src/faustgen_tilde.c
+index becf76c..2bb9314 100644
+--- a/src/faustgen_tilde.c
++++ b/src/faustgen_tilde.c
+@@ -21,7 +21,7 @@
+ #if 0
+ #define FAUSTFLOAT t_sample
+ #endif
+-#include <faust/dsp/llvm-c-dsp.h>
++#include <faust/dsp/llvm-dsp-c.h>
+
+ #include "faust_tilde_ui.h"
+ #include "faust_tilde_io.h"