Browse Source
Merge pull request #64 from ftrvxmtrx/openbsd-build
make it compile and run under OpenBSD
master
Devine Lu Linvega
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
16 additions and
2 deletions
-
tool
-
tui_main.c
|
|
@ -163,7 +163,7 @@ version_string_normalized() { |
|
|
|
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 @@ build_target() { |
|
|
|
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 |
|
|
@ -394,6 +397,12 @@ build_target() { |
|
|
|
# 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 |
|
|
|
add libraries -lrt |
|
|
|
|
|
@ -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; |
|
|
|