aboutsummaryrefslogtreecommitdiff
path: root/audio/faust
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2021-03-05 04:00:10 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2021-03-05 04:00:10 +0000
commit9d65a5044e68a6f4f40199fdb1d9df6cef131e8f (patch)
tree848b98203283d25938aceb23322a27b3e621ebb0 /audio/faust
parent6609892845aeefe6f6d87a6159c4ca459eff913e (diff)
downloadports-9d65a5044e68a6f4f40199fdb1d9df6cef131e8f.tar.gz
ports-9d65a5044e68a6f4f40199fdb1d9df6cef131e8f.zip
audio/faust: Fix faust backends so that they are properly added to the compiler
Notes
Notes: svn path=/head/; revision=567359
Diffstat (limited to 'audio/faust')
-rw-r--r--audio/faust/Makefile13
-rw-r--r--audio/faust/files/backends.cmake11
2 files changed, 18 insertions, 6 deletions
diff --git a/audio/faust/Makefile b/audio/faust/Makefile
index d1dd503174bb..52a5e486be42 100644
--- a/audio/faust/Makefile
+++ b/audio/faust/Makefile
@@ -3,7 +3,7 @@
PORTNAME= faust
DISTVERSION= 2.30.5
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= audio devel
MAINTAINER= yuri@FreeBSD.org
@@ -28,11 +28,8 @@ SHEBANG_FILES= tools/faust2appls/* tools/benchmark/faustbench tools/sound2faust/
LLVM_VERSION= 11 # earlier versions lack dump() function(s) that cause unresolved symbols in libfaust.so
CMAKE_SOURCE_PATH= ${WRKSRC}/build
-CMAKE_ON= INCLUDE_DYNAMIC # only installs headers and not libs by default: https://github.com/grame-cncm/faust/issues/553
-CMAKE_ON+= LLVM_BUILD CPP_BUILD OCPP_BUILD # enable backends
-CMAKE_ARGS= -DLLVM_BACKEND=DYNAMIC -DLLVM_CONFIG=${LOCALBASE}/bin/llvm-config${LLVM_VERSION} \
- -DC_BACKEND=DYNAMIC \
- -DCPP_BACKEND=DYNAMIC
+CMAKE_ON= INCLUDE_DYNAMIC # only installs headers and not libs without INCLUDE_DYNAMIC or INCLUDE_STATIC: https://github.com/grame-cncm/faust/issues/553
+CMAKE_ARGS= -C ${FILESDIR}/backends.cmake -DLLVM_CONFIG=${LOCALBASE}/bin/llvm-config${LLVM_VERSION} \
CXXFLAGS+= -I${WRKSRC}/compiler/generator/cpp # fatal error: 'cpp_code_container.hh' file not found WHEN INCLUDE_STATIC=TRUE
CXXFLAGS+= `llvm-config${LLVM_VERSION} --cflags` -DLLVM_${LLVM_VERSION}0 # for the llvm backend
@@ -52,6 +49,10 @@ HTTPD_LIB_LIB_DEPENDS= libmicrohttpd.so:www/libmicrohttpd
PORTEXAMPLES= *
+xpre-configure:
+ @${MKDIR} ${CONFIGURE_WRKSRC}
+ @cd ${CONFIGURE_WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} ${CMAKE_SOURCE_PATH}
+
post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/faust
@${RM} -r ${STAGEDIR}${PREFIX}/lib/faust # https://github.com/grame-cncm/faust/issues/135
diff --git a/audio/faust/files/backends.cmake b/audio/faust/files/backends.cmake
new file mode 100644
index 000000000000..fe539d817665
--- /dev/null
+++ b/audio/faust/files/backends.cmake
@@ -0,0 +1,11 @@
+# backends.cmake is recommended by the upstream: https://github.com/grame-cncm/faust/wiki/backends
+
+# Below COMPILER,STATIC,DYNAMIC keywords can be enabled.
+# However, we disabled static libs in Makefile, so STATIC isn't used.
+
+set (C_BACKEND COMPILER DYNAMIC CACHE STRING "Include C backend" FORCE)
+set (CPP_BACKEND COMPILER DYNAMIC CACHE STRING "Include CPP backend" FORCE)
+set (LLVM_BACKEND COMPILER DYNAMIC CACHE STRING "Include LLVM backend" FORCE)
+#set (ASMJS_BACKEND ASMJS CACHE STRING "Include ASMJS backend" FORCE)
+#set (INTERP_BACKEND OFF CACHE STRING "Include INTERPRETER backend" FORCE)
+