ref: 440e84edfc68af7416abd67b084c552a6ba4f09d
parent: 5a1db607207a1118ba3a1d43d8c9269c6138f33d
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Mon Mar 2 05:25:25 EST 2020
make it compile and run under OpenBSD
--- a/tool
+++ b/tool
@@ -163,7 +163,7 @@
echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }';
}
-if [[ ($os == bsd) || ($os == unknown) ]]; then
+if [[ ($os == unknown) ]]; then
warn "Build script not tested on this platform"
fi
@@ -320,7 +320,10 @@
else
# -flto is good on both clang and gcc on Linux
case $cc_id in
- gcc|clang) add cc_flags -flto;;
+ gcc|clang)
+ if [[ $os != bsd ]]; then
+ add cc_flags -flto
+ fi
esac
add cc_flags -s
fi
@@ -393,6 +396,12 @@
fi
# needed for using pbpaste instead of xclip
add cc_flags -DORCA_OS_MAC
+ ;;
+ bsd)
+ if [[ $portmidi_enabled = 1 ]]; then
+ add libraries "-L/usr/local/lib"
+ add cc_flags "-I/usr/local/include"
+ fi
;;
*)
# librt and high-res posix timers on Linux
--- a/tui_main.c
+++ b/tui_main.c
@@ -18,6 +18,11 @@
#include <portmidi.h>
#endif
+#if NCURSES_VERSION_PATCH < 20081122
+int _nc_has_mouse(void);
+#define has_mouse _nc_has_mouse
+#endif
+
#define TIME_DEBUG 0
#if TIME_DEBUG
static int spin_track_timeout = 0;