From 61898cfbd69a426dc10800ff6bb9d2bd5a9008d8 Mon Sep 17 00:00:00 2001 From: Sol Fisher Romanoff Date: Sun, 29 Aug 2021 16:42:15 +0300 Subject: [PATCH 1/3] libnyquist: Add support for BSD operating systems Signed-off-by: Sol Fisher Romanoff --- lib-src/libnyquist/nyquist/sys/unix/switches.h | 3 ++- lib-src/libnyquist/nyquist/xlisp/xlisp.h | 18 ++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/lib-src/libnyquist/nyquist/sys/unix/switches.h b/lib-src/libnyquist/nyquist/sys/unix/switches.h index 91e226359..63e164cc1 100644 --- a/lib-src/libnyquist/nyquist/sys/unix/switches.h +++ b/lib-src/libnyquist/nyquist/sys/unix/switches.h @@ -39,7 +39,8 @@ */ #define nyquist_printf printf -#if __APPLE__ && __GNUC__ /* Mac OS X */ +/* BSD, macOS and other Unixes */ +#if __APPLE__ || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) #define NEED_ULONG 1 #else #include diff --git a/lib-src/libnyquist/nyquist/xlisp/xlisp.h b/lib-src/libnyquist/nyquist/xlisp/xlisp.h index 44d52c358..8d624dbf6 100644 --- a/lib-src/libnyquist/nyquist/xlisp/xlisp.h +++ b/lib-src/libnyquist/nyquist/xlisp/xlisp.h @@ -21,7 +21,7 @@ extern "C" { #endif #include /* needed for getenv(); note that this was a problem - for PMAX implementation, but I assume PMAX is obsolete now. + for PMAX implementation, but I assume PMAX is obsolete now. - RBD 16apr04 */ #include #include @@ -55,7 +55,7 @@ extern "C" { // #define IFMT "%ld" // #endif /* #define SAVERESTORE */ -#define XL_LITTLE_ENDIAN +#define XL_LITTLE_ENDIAN #define _longjmp longjmp #define _setjmp setjmp #endif @@ -188,6 +188,16 @@ extern long ptrtoabs(); #endif #endif +/* BSD */ +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) +#include +#if defined(__LITTLE_ENDIAN__) +#define XL_LITTLE_ENDIAN +#else +#define XL_BIG_ENDIAN +#endif +#endif + /* default important definitions */ #ifndef NNODES #define NNODES 1000 @@ -283,7 +293,7 @@ extern long ptrtoabs(); #define FT_OBCLASS 14 #define FT_OBSHOW 15 #define FT_OBISA 16 - + /* macro to push a value onto the argument stack */ #define pusharg(x) {if (xlsp >= xlargstktop) xlargstkoverflow();\ *xlsp++ = (x);} @@ -337,7 +347,7 @@ void dbg_gc_xlsave(LVAL *n); #define xlunbind(e) {for (; xldenv != (e); xldenv = cdr(xldenv))\ setvalue(car(car(xldenv)),cdr(car(xldenv)));} -/* type predicates */ +/* type predicates */ #define atomp(x) ((x) == NIL || ntype(x) != CONS) #define null(x) ((x) == NIL) #define listp(x) ((x) == NIL || ntype(x) == CONS) From e0c5447ca5ac75090c20673a02c8196eb44c929e Mon Sep 17 00:00:00 2001 From: Sol Fisher Romanoff Date: Sun, 29 Aug 2021 16:43:12 +0300 Subject: [PATCH 2/3] Add FreeBSD build manifest Signed-off-by: Sol Fisher Romanoff --- .builds/freebsd.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .builds/freebsd.yml diff --git a/.builds/freebsd.yml b/.builds/freebsd.yml new file mode 100644 index 000000000..74ba12651 --- /dev/null +++ b/.builds/freebsd.yml @@ -0,0 +1,25 @@ +image: freebsd/latest +packages: + - x11-toolkits/wxgtk31 + - devel/cmake + - devel/ninja + - devel/pkgconf + - audio/lame + - audio/libsndfile + - audio/libsoxr + - audio/portaudio + - audio/lv2 + - audio/lilv + - audio/suil + - audio/vamp-plugin-sdk + - audio/portmidi + - audio/libid3tag + - audio/twolame + - audio/libmad + - audio/soundtouch + - multimedia/ffmpeg +sources: + - https://git.sr.ht/~tenacity/tenacity +tasks: + - configure: cmake -G Ninja -S tenacity -B build + - build: cmake --build build From 001fac3beb6de794edb8f3ea525e3695c34c367d Mon Sep 17 00:00:00 2001 From: Sol Fisher Romanoff Date: Mon, 30 Aug 2021 15:21:15 +0300 Subject: [PATCH 3/3] BUILDING.md: Add FreeBSD install instructions Signed-off-by: Sol Fisher Romanoff --- BUILDING.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/BUILDING.md b/BUILDING.md index 20c01947d..919ebe14a 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -29,7 +29,7 @@ directory, such as `~/Downloads/wxWidgets-build`: ``` cd ~/Downloads mkdir wxWidgets-build && cd wxWidgets-build # create and go to a new empty build directory -cmake -G Ninja ~/Downloads/wxWidgets-3.1.5 # configure wxWidgets from the assumed download location +cmake -G Ninja ~/Downloads/wxWidgets-3.1.5 # configure wxWidgets from the assumed download location cmake --build . # actual compilation ``` @@ -142,6 +142,16 @@ sudo apk add gtk+3.0-dev zlib-dev libpng-dev tiff-dev libjpeg-turbo-dev expat-de TODO: add portsmf and libsbsms to this package list when aports are accepted. + +#### FreeBSD + +wxWidgets 3.1.5 is packaged in FreeBSD's repositories. Install it and the rest +of Tenacity's dependencies: + +``` +sudo pkg install wx31-gtk3 cmake ninja pkgconf lame libsndfile libsoxr portaudio lv2 lilv suil vamp-plugin-sdk portmidi libid3tag twolame libmad soundtouch ffmpeg +``` + #### vcpkg on Linux Optionally, you can build dependencies from source using vcpkg, with the