2017-12-20 22:07:40 +01:00
PORTNAME = faust
2022-12-26 05:21:05 +01:00
DISTVERSION = 2.54.9
2017-12-20 22:07:40 +01:00
CATEGORIES = audio devel
MAINTAINER = yuri@FreeBSD.org
COMMENT = Functional programming language for realtime audio signal processing
2022-09-07 23:06:12 +02:00
WWW = https://faust.grame.fr/
2017-12-20 22:07:40 +01:00
LICENSE = GPLv2
2021-02-16 21:33:33 +01:00
LICENSE_FILE = ${ WRKSRC } /COPYING.txt
2017-12-20 22:07:40 +01:00
2021-02-17 19:29:03 +01:00
LIB_DEPENDS = libLLVM-${ LLVM_VERSION } .so:devel/llvm${ LLVM_VERSION }
2021-02-16 22:33:04 +01:00
RUN_DEPENDS = bash:shells/bash
2017-12-20 22:07:40 +01:00
2022-12-26 05:21:05 +01:00
USES = compiler:c++14-lang cmake llvm:min= 15,lib ncurses python pkgconfig shebangfix # llvm: versions <11 lacked dump() function(s) that cause unresolved symbols in libfaust.so
2021-12-07 03:46:51 +01:00
USE_LDCONFIG = yes
2017-12-20 22:07:40 +01:00
USE_GITHUB = yes
GH_ACCOUNT = grame-cncm
2021-02-16 21:33:33 +01:00
GH_TUPLE = \
2022-10-05 05:43:31 +02:00
grame-cncm:faustlibraries:f9efea9:grame_cncm_faustlibraries/libraries
2021-02-16 21:33:33 +01:00
SHEBANG_FILES = tools/faust2appls/* tools/benchmark/faustbench tools/sound2faust/sound2reader
CMAKE_SOURCE_PATH = ${ WRKSRC } /build
2021-03-05 05:00:10 +01:00
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 } \
2021-02-17 19:29:03 +01:00
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
2022-07-21 21:52:31 +02:00
CXXFLAGS_riscv64 = -fPIC # attempt to fix failure: can't create dynamic relocation R_RISCV_HI20 against symbol: vtable for LV2UI in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
2021-02-16 21:33:33 +01:00
LDFLAGS += -lexecinfo
OPTIONS_DEFINE = EXAMPLES HIGHLIGHT HTTPD_LIB
2021-02-17 19:29:03 +01:00
OPTIONS_DEFAULT = HIGHLIGHT HTTPD_LIB
2018-07-20 22:06:39 +02:00
OPTIONS_SUB = yes
2021-02-16 21:33:33 +01:00
EXAMPLES_CMAKE_BOOL = FREEBSD_INSTALL_EXAMPLES
2018-07-20 22:06:39 +02:00
HIGHLIGHT_DESC = Syntax highlighting in Kate, gedit, Highlight, vim
HTTPD_LIB_DESC = Build httpd support library
2017-12-20 22:07:40 +01:00
2021-02-17 19:29:03 +01:00
HTTPD_CMAKE_BOOL = INCLUDE_HTTP
2017-12-20 22:07:40 +01:00
HTTPD_LIB_LIB_DEPENDS = libmicrohttpd.so:www/libmicrohttpd
2021-02-16 21:33:33 +01:00
PORTEXAMPLES = *
2017-12-20 22:07:40 +01:00
2022-10-05 05:43:31 +02:00
post-patch :
# change qmake (5) -> qmake6
@cd ${ WRKSRC } && \
${ REINPLACE_CMD } -i '' -e 's|echo qmake)|echo qmake6)|; s|echo qmake-qt5)|echo qmake6)|' \
tools/faust2appls/faust2*
2017-12-20 22:07:40 +01:00
post-install :
@${ STRIP_CMD } ${ STAGEDIR } ${ PREFIX } /bin/faust
2018-02-08 08:29:35 +01:00
@${ RM } -r ${ STAGEDIR } ${ PREFIX } /lib/faust # https://github.com/grame-cncm/faust/issues/135
2021-02-16 21:33:33 +01:00
@${ FIND } ${ STAGEDIR } -name android | ${ XARGS } ${ RM } -r
2017-12-20 22:07:40 +01:00
post-install-HIGHLIGHT-on :
# 1) kate
@${ MKDIR } ${ STAGEDIR } ${ PREFIX } /share/apps/katepart/syntax
${ INSTALL_DATA } ${ WRKSRC } /syntax-highlighting/faust.xml ${ STAGEDIR } ${ PREFIX } /share/apps/katepart/syntax/
# 2) gedit
@${ MKDIR } ${ STAGEDIR } ${ PREFIX } /share/gtksourceview-2.0/language-specs ${ STAGEDIR } ${ PREFIX } /share/gtksourceview-3.0/language-specs
${ INSTALL_DATA } ${ WRKSRC } /syntax-highlighting/faust.lang ${ STAGEDIR } ${ PREFIX } /share/gtksourceview-2.0/language-specs/
${ INSTALL_DATA } ${ WRKSRC } /syntax-highlighting/faust.lang ${ STAGEDIR } ${ PREFIX } /share/gtksourceview-3.0/language-specs/
# 4) Highlight
@${ MKDIR } ${ STAGEDIR } ${ PREFIX } /share/highlight/langDefs
${ INSTALL_DATA } ${ WRKSRC } /syntax-highlighting/dsp.lang ${ STAGEDIR } ${ PREFIX } /share/highlight/langDefs/
# 5) VIM
@${ MKDIR } ${ STAGEDIR } ${ PREFIX } /share/vim/vimfiles/syntax
${ INSTALL_DATA } ${ WRKSRC } /syntax-highlighting/faust.vim ${ STAGEDIR } ${ PREFIX } /share/vim/vimfiles/syntax/
# 6) EMACS TODO
. i n c l u d e < b s d . p o r t . m k >