ref: d7a3b169c5ed0b06a9ad0fdb3057704da9a0b6ce
parent: 52202a6b7ac3da416c934980ac7e4b2eab22fe45
parent: 440e84edfc68af7416abd67b084c552a6ba4f09d
author: Devine Lu Linvega <aliceffekt@gmail.com>
date: Fri May 1 14:38:46 EDT 2020
Merge pull request #64 from ftrvxmtrx/openbsd-build 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;