From c3fd5d92cbf461b0cca90e447f1eba77dbd32c5b Mon Sep 17 00:00:00 2001 From: Robert Clausecker Date: Mon, 14 Jun 2021 18:47:58 +0200 Subject: [PATCH] audio/timidity++: patch and unbreak on riscv64 RISC-V does not have FP exceptions and nobody has bothered to stub out the fpsetmask() calls. Remove these calls on platforms that don't support them to unbreak the build. --- audio/timidity++/Makefile | 3 +-- audio/timidity++/files/patch-timidity_timidity.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 audio/timidity++/files/patch-timidity_timidity.c diff --git a/audio/timidity++/Makefile b/audio/timidity++/Makefile index 9112397fb2fb..818dc1dba1b3 100644 --- a/audio/timidity++/Makefile +++ b/audio/timidity++/Makefile @@ -2,6 +2,7 @@ PORTNAME= timidity++ PORTVERSION= 2.15.0 +PORTREVISION= 1 CATEGORIES+= audio MASTER_SITES= SF/timidity/TiMidity%2B%2B/TiMidity%2B%2B-${PORTVERSION} DISTNAME= TiMidity++-${PORTVERSION} @@ -11,8 +12,6 @@ COMMENT?= Software MIDI player LICENSE= GPLv2+ -BROKEN_riscv64= fails to compile: needs FP_X_INV from empty sys/riscv/include/ieeefp.h - LIB_DEPENDS= libarc.so:archivers/libarc .if !defined(PKGNAMESUFFIX) LIB_DEPENDS+= libvorbis.so:audio/libvorbis \ diff --git a/audio/timidity++/files/patch-timidity_timidity.c b/audio/timidity++/files/patch-timidity_timidity.c new file mode 100644 index 000000000000..02d244d5e017 --- /dev/null +++ b/audio/timidity++/files/patch-timidity_timidity.c @@ -0,0 +1,12 @@ +--- timidity/timidity.c.orig 2021-06-14 16:42:38 UTC ++++ timidity/timidity.c +@@ -5393,7 +5393,8 @@ MAIN_INTERFACE void timidity_start_initialize(void) + fp_except fpexp; + #endif + +-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) ++#if defined(FP_X_INV) && defined(FP_X_DZ) && \ ++ (defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) + fpexp = fpgetmask(); + fpsetmask(fpexp & ~(FP_X_INV|FP_X_DZ)); + #endif -- 2.31.1