aboutsummaryrefslogtreecommitdiff
path: root/audio/speech-denoiser-lv2
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2018-10-26 06:12:30 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2018-10-26 06:12:30 +0000
commitc9f8910968b564c55dbdeb250b5d7fffca2df1e9 (patch)
tree326bd88f5e35a6fb17c020f70b883989a655a530 /audio/speech-denoiser-lv2
parent97bba4d51d9255737f415a01b0c2ca44e5b43fbd (diff)
downloadports-c9f8910968b564c55dbdeb250b5d7fffca2df1e9.tar.gz
ports-c9f8910968b564c55dbdeb250b5d7fffca2df1e9.zip
audio/speech-denoiser-lv2: Fix build on 12; Fix build on non-Intel architectures
On 12: Remove the unsupported optimization option On non-Intel architectures: make SSE options based on the port option on amd64/i386 only Reported by: fallout
Notes
Notes: svn path=/head/; revision=483007
Diffstat (limited to 'audio/speech-denoiser-lv2')
-rw-r--r--audio/speech-denoiser-lv2/Makefile8
-rw-r--r--audio/speech-denoiser-lv2/files/patch-meson.build17
-rw-r--r--audio/speech-denoiser-lv2/files/patch-meson__options.txt4
3 files changed, 27 insertions, 2 deletions
diff --git a/audio/speech-denoiser-lv2/Makefile b/audio/speech-denoiser-lv2/Makefile
index 9c03d992d1f2..17fe5a7770a2 100644
--- a/audio/speech-denoiser-lv2/Makefile
+++ b/audio/speech-denoiser-lv2/Makefile
@@ -2,6 +2,7 @@
PORTNAME= speech-denoiser
DISTVERSION= g20181007
+PORTREVISION= 1
CATEGORIES= audio
PKGNAMESUFFIX= -lv2
@@ -23,6 +24,13 @@ PLIST_FILES= lib/lv2/sdenoise.lv2/manifest.ttl \
lib/lv2/sdenoise.lv2/sdenoise.so \
lib/lv2/sdenoise.lv2/sdenoise.ttl
+OPTIONS_DEFINE_amd64= SIMD
+OPTIONS_DEFINE_i386= SIMD
+OPTIONS_DEFAULT_amd64= SIMD
+OPTIONS_DEFAULT_i386= SIMD
+
+SIMD_MESON_ON= -Duse_sse=true
+
pre-configure:
@cd ${WRKSRC} && ${LN} -s _build build
diff --git a/audio/speech-denoiser-lv2/files/patch-meson.build b/audio/speech-denoiser-lv2/files/patch-meson.build
index 4d3969e26297..b8444059a5b2 100644
--- a/audio/speech-denoiser-lv2/files/patch-meson.build
+++ b/audio/speech-denoiser-lv2/files/patch-meson.build
@@ -9,8 +9,21 @@
inc_rnnoise = include_directories('rnnoise/include')
#dependencies for speech denoise
-@@ -25,7 +25,7 @@ endif
- cflags = ['-msse','-msse2','-mfpmath=sse','-ffast-math','-fomit-frame-pointer','-fno-finite-math-only']
+@@ -19,13 +19,17 @@ lv2_dep = dependency('lv2', required : t
+ nr_dep = [m_dep,lv2_dep,lib_rnnoise]
+
+ #compiler optimization flags
+-if meson.get_compiler('c').get_id() == 'clang'
+- add_global_arguments('-mrecip', language : 'c')
++#if meson.get_compiler('c').get_id() == 'clang'
++# add_global_arguments('-mrecip', language : 'c')
++#endif
++if get_option('use_sse')
++ cflags = ['-msse','-msse2','-mfpmath=sse','-ffast-math','-fomit-frame-pointer','-fno-finite-math-only']
++else
++ cflags = ['-ffast-math','-fomit-frame-pointer','-fno-finite-math-only']
+ endif
+-cflags = ['-msse','-msse2','-mfpmath=sse','-ffast-math','-fomit-frame-pointer','-fno-finite-math-only']
#install folder
-install_folder = 'sdenoise.lv2'
diff --git a/audio/speech-denoiser-lv2/files/patch-meson__options.txt b/audio/speech-denoiser-lv2/files/patch-meson__options.txt
new file mode 100644
index 000000000000..71cfce41e2d1
--- /dev/null
+++ b/audio/speech-denoiser-lv2/files/patch-meson__options.txt
@@ -0,0 +1,4 @@
+--- meson_options.txt.orig 2018-10-26 06:03:32 UTC
++++ meson_options.txt
+@@ -0,0 +1 @@
++option('use_sse', type: 'boolean', value: false, description: 'Use SSE optimization')