On Mon, Dec 13, 2021 at 10:34:20PM +0100, bsduck@mailo.com wrote:
> Hello,
>
> I noticed ZynAddSubFX is now available on OpenBSD. That's a nice addition,
> thank you for porting!
>
> However, I can't find a way to connect it to a MIDI keyboard. There doesn't
> seem to be any MIDI backend supported as of now, am I right or am I missing
> something?
>
Hope you don't mind the late reply, MIDI is only supported through sndio on OpenBSD.
Please try the below diff to update to 3.0.6 which provides sndio backend and let me
know if MIDI backend works as expected.
Tests have been disabled since they lead to compile error looking for '-lrt'.
Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/zynaddsubfx/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- Makefile 8 Apr 2021 13:45:11 -0000 1.2
+++ Makefile 23 Feb 2022 22:52:12 -0000
@@ -5,7 +5,7 @@ ONLY_FOR_ARCHS= i386 amd64
COMMENT= synth capable of making a countless number of instruments
-DISTNAME= zynaddsubfx-3.0.5
+DISTNAME= zynaddsubfx-3.0.6
CATEGORIES= audio
@@ -16,8 +16,8 @@ MAINTAINER= Dimitri Karamazov <deserter6
# GPLv2+
PERMIT_PACKAGE= Yes
-WANTLIB+= ${COMPILER_LIBCXX} GL X11 c fftw3 lo m mxml portaudio
-WANTLIB+= z
+WANTLIB += ${COMPILER_LIBCXX} GL X11 c fftw3f lo m mxml sndio
+WANTLIB += z
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=zynaddsubfx/}
EXTRACT_SUFX= .tar.bz2
@@ -31,18 +31,19 @@ BUILD_DEPENDS= shells/bash-completion
RUN_DEPENDS= devel/desktop-file-utils \
x11/mruby-zest
-LIB_DEPENDS= math/fftw3 \
+LIB_DEPENDS= math/fftw3,float \
textproc/mxml \
- audio/liblo \
- audio/portaudio-svn
+ audio/liblo
-CONFIGURE_ARGS= -DPaEnable=ON \
- -DGuiModule=zest \
+CONFIGURE_ARGS= -DGuiModule=zest \
-DAlsaEnable=OFF \
+ -DDssiEnable=OFF \
-DJackEnable=OFF \
+ -DLashEnable=OFF \
-DOssEnable=OFF \
- -DDssiEnable=OFF \
- -DLashEnable=OFF
+ -DPaEnable=OFF \
+ -DSndioEnable=ON \
+ -DCompileTests=OFF
post-patch:
sed -i s,/usr/X11R6,${X11BASE}, ${WRKSRC}/src/CMakeLists.txt
Index: distinfo
===================================================================
RCS file: /cvs/ports/audio/zynaddsubfx/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo 29 Mar 2021 19:51:31 -0000 1.1.1.1
+++ distinfo 23 Feb 2022 22:52:12 -0000
@@ -1,2 +1,2 @@
-SHA256 (zynaddsubfx-3.0.5.tar.bz2) = dEcyImgRSh4KxfKBrDegmnjnYae+YZmcr3kQAEl4n2M=
-SIZE (zynaddsubfx-3.0.5.tar.bz2) = 8141703
+SHA256 (zynaddsubfx-3.0.6.tar.bz2) = y9Fgd49s8Uf5sEh3Ge3FGXoUBPRtfHv9ieFT8NjOca4=
+SIZE (zynaddsubfx-3.0.6.tar.bz2) = 10001014
Index: patches/patch-DPF_dgl_src_Window_cpp
===================================================================
RCS file: patches/patch-DPF_dgl_src_Window_cpp
diff -N patches/patch-DPF_dgl_src_Window_cpp
--- patches/patch-DPF_dgl_src_Window_cpp 29 Mar 2021 19:51:31 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-DPF_dgl_src_Window_cpp,v 1.1.1.1 2021/03/29 19:51:31 sthen Exp $
-
-get_current_dir_name not available on OpenBSD
-
---- DPF/dgl/src/Window.cpp.orig Tue Feb 9 14:55:13 2021
-+++ DPF/dgl/src/Window.cpp Tue Feb 9 14:55:56 2021
-@@ -1016,7 +1016,7 @@ bool Window::openFileBrowser(const FileBrowserOptions&
-
- if (startDir.isEmpty())
- {
-- if (char* const dir_name = get_current_dir_name())
-+ if (char* const dir_name = getcwd(NULL,0))
- {
- startDir = dir_name;
- std::free(dir_name);
Index: patches/patch-DPF_dgl_src_sofd_libsofd_c
===================================================================
RCS file: /cvs/ports/audio/zynaddsubfx/patches/patch-DPF_dgl_src_sofd_libsofd_c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-DPF_dgl_src_sofd_libsofd_c
--- patches/patch-DPF_dgl_src_sofd_libsofd_c 29 Mar 2021 19:51:31 -0000 1.1.1.1
+++ patches/patch-DPF_dgl_src_sofd_libsofd_c 23 Feb 2022 22:52:12 -0000
@@ -2,17 +2,18 @@ $OpenBSD: patch-DPF_dgl_src_sofd_libsofd
mntent.h not available on OpenBSD
---- DPF/dgl/src/sofd/libsofd.c.orig Fri Oct 23 23:56:41 2015
-+++ DPF/dgl/src/sofd/libsofd.c Tue Feb 9 14:45:34 2021
+Index: DPF/dgl/src/sofd/libsofd.c
+--- DPF/dgl/src/sofd/libsofd.c.orig
++++ DPF/dgl/src/sofd/libsofd.c
@@ -338,7 +338,6 @@ const char *x_fib_recent_file(const char *appname) {
}
- #ifdef SOFD_HAVE_X11
+ #ifdef HAVE_X11
-#include <mntent.h>
#include <dirent.h>
#include <X11/Xlib.h>
-@@ -1770,6 +1769,7 @@ static const char *ignore_devices[] = {
+@@ -1793,6 +1792,7 @@ static const char *ignore_devices[] = {
"/dev/loop", "/dev/vn"
};
@@ -20,7 +21,7 @@ mntent.h not available on OpenBSD
static int check_mount (const char *mountpoint, const char *fs, const char *device) {
size_t i;
if (!mountpoint || !fs || !device) return -1;
-@@ -1817,6 +1817,7 @@ static int read_mtab (Display *dpy, const char *mtab)
+@@ -1840,6 +1840,7 @@ static int read_mtab (Display *dpy, const char *mtab)
fclose (mt);
return found;
}
@@ -28,7 +29,7 @@ mntent.h not available on OpenBSD
static void populate_places (Display *dpy) {
char tmp[1024];
-@@ -1845,9 +1846,11 @@ static void populate_places (Display *dpy) {
+@@ -1868,9 +1869,11 @@ static void populate_places (Display *dpy) {
parse_gtk_bookmarks (dpy, _fib_cfg_custom_places);
}
Index: patches/patch-DPF_distrho_extra_Mutex_hpp
===================================================================
RCS file: /cvs/ports/audio/zynaddsubfx/patches/patch-DPF_distrho_extra_Mutex_hpp,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-DPF_distrho_extra_Mutex_hpp
--- patches/patch-DPF_distrho_extra_Mutex_hpp 29 Mar 2021 19:51:31 -0000 1.1.1.1
+++ patches/patch-DPF_distrho_extra_Mutex_hpp 23 Feb 2022 22:52:12 -0000
@@ -2,9 +2,10 @@ $OpenBSD: patch-DPF_distrho_extra_Mutex_
OpenBSD doesn't support pthread_condattr_setpshared
---- DPF/distrho/extra/Mutex.hpp.orig Sat Jul 25 18:05:19 2020
-+++ DPF/distrho/extra/Mutex.hpp Sat Jul 25 18:05:56 2020
-@@ -194,7 +194,9 @@ class Signal (public)
+Index: DPF/distrho/extra/Mutex.hpp
+--- DPF/distrho/extra/Mutex.hpp.orig
++++ DPF/distrho/extra/Mutex.hpp
+@@ -196,7 +196,9 @@ class Signal (public)
{
pthread_condattr_t cattr;
pthread_condattr_init(&cattr);
Index: patches/patch-cmake_BashCompletion_cmake
===================================================================
RCS file: /cvs/ports/audio/zynaddsubfx/patches/patch-cmake_BashCompletion_cmake,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-cmake_BashCompletion_cmake
--- patches/patch-cmake_BashCompletion_cmake 29 Mar 2021 19:51:31 -0000 1.1.1.1
+++ patches/patch-cmake_BashCompletion_cmake 23 Feb 2022 22:52:12 -0000
@@ -2,8 +2,9 @@ $OpenBSD: patch-cmake_BashCompletion_cma
fix bash_completion install
---- cmake/BashCompletion.cmake.orig Sat Feb 23 21:13:37 2019
-+++ cmake/BashCompletion.cmake Thu Mar 11 18:06:57 2021
+Index: cmake/BashCompletion.cmake
+--- cmake/BashCompletion.cmake.orig
++++ cmake/BashCompletion.cmake
@@ -71,9 +71,9 @@ ELSE()
SET(BASHCOMP_SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/install_${SCRIPT_NAME}_completion.sh")
@@ -13,6 +14,6 @@ fix bash_completion install
set -e\n\
-BASHCOMP_PKG_PATH=\"${BASHCOMP_USER_PATH}\"\n\
+BASHCOMP_PKG_PATH=\"\$DESTDIR${BASHCOMP_USER_PATH}\"\n\
- if [ -w \"${BASHCOMP_PKG_PATH}\" ]; then\n\
+ if [ -n \"${BASHCOMP_PKG_PATH}\" ]; then\n\
BASHCOMP_PKG_PATH=\"${BASHCOMP_PKG_PATH}\"\n\
fi\n\
Index: patches/patch-src_CMakeLists_txt
===================================================================
RCS file: /cvs/ports/audio/zynaddsubfx/patches/patch-src_CMakeLists_txt,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-src_CMakeLists_txt
--- patches/patch-src_CMakeLists_txt 29 Mar 2021 19:51:31 -0000 1.1.1.1
+++ patches/patch-src_CMakeLists_txt 23 Feb 2022 22:52:12 -0000
@@ -4,34 +4,23 @@ Remove -O3 flag
Add X11 libraries to LINK_PATH to fix build
OpenBSD doesn't have librt
---- src/CMakeLists.txt.orig Sat Feb 23 21:13:37 2019
-+++ src/CMakeLists.txt Sun Mar 21 20:27:19 2021
-@@ -208,7 +208,7 @@ set (BuildOptions_SSE
- )
+Index: src/CMakeLists.txt
+--- src/CMakeLists.txt.orig
++++ src/CMakeLists.txt
+@@ -261,7 +261,7 @@ set (BuildOptions_SSE
+ check_cxx_compiler_flag("${BuildOptions_SSE} -Werror" SUPPORT_SSE)
set (BuildOptionsBasic
- "-std=c++11 -Wno-unused-parameter -O3 -ffast-math -fomit-frame-pointer"
+ "-std=c++11 -Wno-unused-parameter -ffast-math -fomit-frame-pointer"
- CACHE STRING "basic X86 complier options"
+ CACHE STRING "basic X86 compiler options"
)
-
-@@ -450,9 +450,10 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zyn-version
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zyn-config.h.in
- ${CMAKE_CURRENT_BINARY_DIR}/zyn-config.h)
-
--link_directories(${AUDIO_LIBRARY_DIRS} ${ZLIB_LIBRARY_DIRS} ${FFTW_LIBRARY_DIRS} ${MXML_LIBRARY_DIRS} ${FLTK_LIBRARY_DIRS} ${NTK_LIBRARY_DIRS})
-+link_directories(${AUDIO_LIBRARY_DIRS} ${ZLIB_LIBRARY_DIRS} ${FFTW_LIBRARY_DIRS} ${MXML_LIBRARY_DIRS} ${FLTK_LIBRARY_DIRS} ${NTK_LIBRARY_DIRS} /usr/X11R6/lib)
+ STRING(APPEND BuildOptionsBasic " ${BuildOptions_ExtendedWarnings}")
+@@ -521,6 +521,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zyn-config.
+ link_directories(${AUDIO_LIBRARY_DIRS} ${ZLIB_LIBRARY_DIRS} ${FFTW3F_LIBRARY_DIRS} ${MXML_LIBRARY_DIRS} ${FLTK_LIBRARY_DIRS} ${NTK_LIBRARY_DIRS} ${X11_LIBRARY_DIRS})
include_directories(
+ /usr/X11R6/include
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
-@@ -499,7 +500,6 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
- elseif(APPLE)
- set(PTHREAD_LIBRARY pthread)
- else()
-- set(PLATFORM_LIBRARIES rt)
- set(PTHREAD_LIBRARY pthread)
- endif()
-
Index: patches/patch-src_Misc_Util_cpp
===================================================================
RCS file: /cvs/ports/audio/zynaddsubfx/patches/patch-src_Misc_Util_cpp,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-src_Misc_Util_cpp
--- patches/patch-src_Misc_Util_cpp 29 Mar 2021 19:51:31 -0000 1.1.1.1
+++ patches/patch-src_Misc_Util_cpp 23 Feb 2022 22:52:12 -0000
@@ -2,8 +2,9 @@ $OpenBSD: patch-src_Misc_Util_cpp,v 1.1.
OpenBSD doesn't support sched_setscheduler
---- src/Misc/Util.cpp.orig Sat Jul 25 18:00:34 2020
-+++ src/Misc/Util.cpp Sat Jul 25 18:02:04 2020
+Index: src/Misc/Util.cpp
+--- src/Misc/Util.cpp.orig
++++ src/Misc/Util.cpp
@@ -125,14 +125,6 @@ bool fileexists(const char *filename)
void set_realtime()
@@ -12,7 +13,7 @@ OpenBSD doesn't support sched_setschedul
- sched_param sc;
- sc.sched_priority = 60;
- //if you want get "sched_setscheduler undeclared" from compilation,
-- //you can safely remove the folowing line:
+- //you can safely remove the following line:
- sched_setscheduler(0, SCHED_FIFO, &sc);
- //if (err==0) printf("Real-time");
-
No comments:
Post a Comment