pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

csound6: renamed folder to consistency with pkgsrc



Module Name:	pkgsrc-wip
Committed By:	Manuel Kuklinski <mk%asdfghasdfgh.de@localhost>
Pushed By:	mk
Date:		Sun Nov 5 19:49:30 2023 +0100
Changeset:	7bbad5b48d86fba96ee21d07fe88f9b00adc6063

Added Files:
	csound6/DESCR
	csound6/Makefile
	csound6/PLIST
	csound6/PLIST.jack
	csound6/PLIST.portaudio
	csound6/distinfo
	csound6/options.mk
	csound6/patches/patch-CMakeLists.txt
	csound6/patches/patch-Engine_linevent.c
	csound6/patches/patch-Frontends_csound_csound_main.c
	csound6/patches/patch-InOut_libsnd.c
	csound6/patches/patch-InOut_winEPS.c
	csound6/patches/patch-Opcodes_cpumeter.c
	csound6/patches/patch-Opcodes_wavegde.h
	csound6/patches/patch-Top_threads.c
	csound6/patches/patch-installer_macosx_release-build-azure.sh

Log Message:
csound6: renamed folder to consistency with pkgsrc

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=7bbad5b48d86fba96ee21d07fe88f9b00adc6063

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 csound6/DESCR                                      |  8 ++
 csound6/Makefile                                   | 55 +++++++++++++
 csound6/PLIST                                      | 63 +++++++++++++++
 csound6/PLIST.jack                                 | 64 +++++++++++++++
 csound6/PLIST.portaudio                            | 62 +++++++++++++++
 csound6/distinfo                                   | 15 ++++
 csound6/options.mk                                 | 53 +++++++++++++
 csound6/patches/patch-CMakeLists.txt               | 90 ++++++++++++++++++++++
 csound6/patches/patch-Engine_linevent.c            | 15 ++++
 .../patches/patch-Frontends_csound_csound_main.c   | 15 ++++
 csound6/patches/patch-InOut_libsnd.c               | 15 ++++
 csound6/patches/patch-InOut_winEPS.c               | 15 ++++
 csound6/patches/patch-Opcodes_cpumeter.c           | 17 ++++
 csound6/patches/patch-Opcodes_wavegde.h            | 16 ++++
 csound6/patches/patch-Top_threads.c                | 15 ++++
 .../patch-installer_macosx_release-build-azure.sh  | 15 ++++
 16 files changed, 533 insertions(+)

diffs:
diff --git a/csound6/DESCR b/csound6/DESCR
new file mode 100644
index 0000000000..909beaee38
--- /dev/null
+++ b/csound6/DESCR
@@ -0,0 +1,8 @@
+Csound is a software synthesis package in the tradition of so-called
+music-N languages, among which the best-known is Music V.  It consists
+of an orchestra- and score-driven executable, written in C for
+portability.  Since Csound is a computational language, it is highly
+flexible and efficient; complexity is gained only at the expense of
+computation time.  Basically Csound reads some files and creates the
+result as a file on disk or, on faster machines, through a DAC in real
+time.
diff --git a/csound6/Makefile b/csound6/Makefile
new file mode 100644
index 0000000000..ca2bfdde08
--- /dev/null
+++ b/csound6/Makefile
@@ -0,0 +1,55 @@
+# $NetBSD: Makefile,v 1.79 2023/08/14 05:23:46 wiz Exp $
+
+DISTNAME=	csound-6.18.1
+PKGNAME=	${DISTNAME:S/csound/csound6/}
+CATEGORIES=	audio
+MASTER_SITES=	${MASTER_SITE_GITHUB:=csound/}
+GITHUB_PROJECT=	csound
+
+MAINTAINER=	mrg%eterna.com.au@localhost
+HOMEPAGE=	https://github.com/csound/csound
+COMMENT=	Software synthesizer and sequencer
+LICENSE=	gnu-lgpl-v2.1 # or later
+
+USE_LANGUAGES=	c c++
+USE_TOOLS+=	bison flex
+
+CMAKE_ARGS+=	-DBUILD_HDF5_OPCODES=OFF
+# CMAKE_INSTALL_RPATH doesn't work for some reason, so do it here.
+LDFLAGS+=	${COMPILER_RPATH_FLAG}${PREFIX}/lib/csound6
+
+INSTALLATION_DIRS=	bin
+
+CHECK_PORTABILITY_SKIP+= \
+	Android/build-all.sh \
+	installer/misc/makedeb.sh \
+	installer/macosx/beta-build.sh \
+	installer/macosx/release-build.sh \
+	installer/macosx/release-build-10.8.sh \
+	installer/macosx/release-build-10.10.sh \
+	frontends/max_csound_tilde/installer/build-installer.sh \
+	frontends/max_csound_tilde/installer/build-installer-windows.sh
+
+.include "../../mk/bsd.prefs.mk"
+
+post-install:
+	cd ${DESTDIR}${PREFIX} && \
+	${LN} -f -s csound bin/csound6
+
+.include "options.mk"
+
+.include "../portmidi/buildlink3.mk"
+.include "../../audio/fluidsynth/buildlink3.mk"
+.include "../../audio/liblo/buildlink3.mk"
+.include "../../audio/libsamplerate/buildlink3.mk"
+.include "../../audio/libsndfile/buildlink3.mk"
+.include "../../devel/boost-libs/buildlink3.mk"
+.include "../../devel/cmake/build.mk"
+.include "../../graphics/png/buildlink3.mk"
+.include "../../lang/python/application.mk"
+.include "../../math/eigen3/buildlink3.mk"
+.include "../../www/curl/buildlink3.mk"
+.include "../../x11/fltk13/buildlink3.mk"
+.include "../../mk/jpeg.buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/csound6/PLIST b/csound6/PLIST
new file mode 100644
index 0000000000..83f68871fc
--- /dev/null
+++ b/csound6/PLIST
@@ -0,0 +1,63 @@
+@comment $NetBSD$
+bin/atsa
+bin/csanalyze
+bin/csbeats
+bin/csdebugger
+bin/csound
+bin/csound6
+bin/cvanal
+bin/dnoise
+bin/envext
+bin/extract
+bin/extractor
+bin/het_export
+bin/het_import
+bin/hetro
+bin/lpanal
+bin/lpc_export
+bin/lpc_import
+bin/mixer
+bin/pv_export
+bin/pv_import
+bin/pvanal
+bin/pvlook
+bin/scale
+bin/scsort
+bin/sdif2ad
+bin/sndinfo
+bin/src_conv
+bin/srconv
+lib/csound/plugins64-6.0/libampmidid.dylib
+lib/csound/plugins64-6.0/libarrayops.dylib
+lib/csound/plugins64-6.0/libbformdec2.dylib
+lib/csound/plugins64-6.0/libcmidi.dylib
+lib/csound/plugins64-6.0/libcontrol.dylib
+lib/csound/plugins64-6.0/libdeprecated.dylib
+lib/csound/plugins64-6.0/libdoppler.dylib
+lib/csound/plugins64-6.0/libfractalnoise.dylib
+lib/csound/plugins64-6.0/libftsamplebank.dylib
+lib/csound/plugins64-6.0/libipmidi.dylib
+lib/csound/plugins64-6.0/liblfsr.dylib
+lib/csound/plugins64-6.0/libmixer.dylib
+lib/csound/plugins64-6.0/libosc.dylib
+lib/csound/plugins64-6.0/libpadsynth.dylib
+lib/csound/plugins64-6.0/libpmidi.dylib
+lib/csound/plugins64-6.0/libpvsops.dylib
+lib/csound/plugins64-6.0/librtauhal.dylib
+lib/csound/plugins64-6.0/libscansyn.dylib
+lib/csound/plugins64-6.0/libsignalflowgraph.dylib
+lib/csound/plugins64-6.0/libstdutil.dylib
+lib/csound/plugins64-6.0/libtrigenvsegs.dylib
+lib/csound/plugins64-6.0/liburandom.dylib
+lib/libcsnd6.6.0.dylib
+lib/libcsnd6.dylib
+lib/libcsound64.6.0.dylib
+lib/libcsound64.dylib
+share/cmake/Csound/FindCsound.cmake
+share/locale/de/LC_MESSAGES/csound6.mo
+share/locale/en_US/LC_MESSAGES/csound6.mo
+share/locale/es/LC_MESSAGES/csound6.mo
+share/locale/es_CO/LC_MESSAGES/csound6.mo
+share/locale/fr/LC_MESSAGES/csound6.mo
+share/locale/it/LC_MESSAGES/csound6.mo
+share/locale/ru/LC_MESSAGES/csound6.mo
diff --git a/csound6/PLIST.jack b/csound6/PLIST.jack
new file mode 100644
index 0000000000..9b17b1437a
--- /dev/null
+++ b/csound6/PLIST.jack
@@ -0,0 +1,64 @@
+@comment $NetBSD$
+bin/atsa
+bin/csanalyze
+bin/csbeats
+bin/csdebugger
+bin/csound
+bin/csound6
+bin/cvanal
+bin/dnoise
+bin/envext
+bin/extract
+bin/extractor
+bin/het_export
+bin/het_import
+bin/hetro
+bin/lpanal
+bin/lpc_export
+bin/lpc_import
+bin/mixer
+bin/pv_export
+bin/pv_import
+bin/pvanal
+bin/pvlook
+bin/scale
+bin/scsort
+bin/sdif2ad
+bin/sndinfo
+bin/src_conv
+bin/srconv
+lib/csound/plugins64-6.0/libampmidid.dylib
+lib/csound/plugins64-6.0/libarrayops.dylib
+lib/csound/plugins64-6.0/libbformdec2.dylib
+lib/csound/plugins64-6.0/libcmidi.dylib
+lib/csound/plugins64-6.0/libcontrol.dylib
+lib/csound/plugins64-6.0/libdeprecated.dylib
+lib/csound/plugins64-6.0/libdoppler.dylib
+lib/csound/plugins64-6.0/libfractalnoise.dylib
+lib/csound/plugins64-6.0/libftsamplebank.dylib
+lib/csound/plugins64-6.0/libipmidi.dylib
+lib/csound/plugins64-6.0/liblfsr.dylib
+lib/csound/plugins64-6.0/libmixer.dylib
+lib/csound/plugins64-6.0/libosc.dylib
+lib/csound/plugins64-6.0/libpadsynth.dylib
+lib/csound/plugins64-6.0/libpvsops.dylib
+lib/csound/plugins64-6.0/librtauhal.dylib
+lib/csound/plugins64-6.0/librtpa.dylib
+lib/csound/plugins64-6.0/librtjack.dylib
+lib/csound/plugins64-6.0/libscansyn.dylib
+lib/csound/plugins64-6.0/libsignalflowgraph.dylib
+lib/csound/plugins64-6.0/libstdutil.dylib
+lib/csound/plugins64-6.0/libtrigenvsegs.dylib
+lib/csound/plugins64-6.0/liburandom.dylib
+lib/libcsnd6.6.0.dylib
+lib/libcsnd6.dylib
+lib/libcsound64.6.0.dylib
+lib/libcsound64.dylib
+share/cmake/Csound/FindCsound.cmake
+share/locale/de/LC_MESSAGES/csound6.mo
+share/locale/en_US/LC_MESSAGES/csound6.mo
+share/locale/es/LC_MESSAGES/csound6.mo
+share/locale/es_CO/LC_MESSAGES/csound6.mo
+share/locale/fr/LC_MESSAGES/csound6.mo
+share/locale/it/LC_MESSAGES/csound6.mo
+share/locale/ru/LC_MESSAGES/csound6.mo
diff --git a/csound6/PLIST.portaudio b/csound6/PLIST.portaudio
new file mode 100644
index 0000000000..0bff5fa3fb
--- /dev/null
+++ b/csound6/PLIST.portaudio
@@ -0,0 +1,62 @@
+@comment $NetBSD$
+bin/atsa
+bin/csanalyze
+bin/csbeats
+bin/csdebugger
+bin/csound
+bin/csound6
+bin/cvanal
+bin/dnoise
+bin/envext
+bin/extract
+bin/extractor
+bin/het_export
+bin/het_import
+bin/hetro
+bin/lpanal
+bin/lpc_export
+bin/lpc_import
+bin/mixer
+bin/pv_export
+bin/pv_import
+bin/pvanal
+bin/pvlook
+bin/scale
+bin/scsort
+bin/sdif2ad
+bin/sndinfo
+bin/src_conv
+bin/srconv
+lib/csound/plugins64-6.0/libampmidid.dylib
+lib/csound/plugins64-6.0/libarrayops.dylib
+lib/csound/plugins64-6.0/libbformdec2.dylib
+lib/csound/plugins64-6.0/libcmidi.dylib
+lib/csound/plugins64-6.0/libcontrol.dylib
+lib/csound/plugins64-6.0/libdeprecated.dylib
+lib/csound/plugins64-6.0/libdoppler.dylib
+lib/csound/plugins64-6.0/libfractalnoise.dylib
+lib/csound/plugins64-6.0/libftsamplebank.dylib
+lib/csound/plugins64-6.0/libipmidi.dylib
+lib/csound/plugins64-6.0/liblfsr.dylib
+lib/csound/plugins64-6.0/libmixer.dylib
+lib/csound/plugins64-6.0/libosc.dylib
+lib/csound/plugins64-6.0/libpadsynth.dylib
+lib/csound/plugins64-6.0/libpvsops.dylib
+lib/csound/plugins64-6.0/librtauhal.dylib
+lib/csound/plugins64-6.0/libscansyn.dylib
+lib/csound/plugins64-6.0/libsignalflowgraph.dylib
+lib/csound/plugins64-6.0/libstdutil.dylib
+lib/csound/plugins64-6.0/libtrigenvsegs.dylib
+lib/csound/plugins64-6.0/liburandom.dylib
+lib/libcsnd6.6.0.dylib
+lib/libcsnd6.dylib
+lib/libcsound64.6.0.dylib
+lib/libcsound64.dylib
+share/cmake/Csound/FindCsound.cmake
+share/locale/de/LC_MESSAGES/csound6.mo
+share/locale/en_US/LC_MESSAGES/csound6.mo
+share/locale/es/LC_MESSAGES/csound6.mo
+share/locale/es_CO/LC_MESSAGES/csound6.mo
+share/locale/fr/LC_MESSAGES/csound6.mo
+share/locale/it/LC_MESSAGES/csound6.mo
+share/locale/ru/LC_MESSAGES/csound6.mo
diff --git a/csound6/distinfo b/csound6/distinfo
new file mode 100644
index 0000000000..a023a96464
--- /dev/null
+++ b/csound6/distinfo
@@ -0,0 +1,15 @@
+$NetBSD: distinfo,v 1.13 2021/10/26 09:58:51 nia Exp $
+
+BLAKE2s (csound-6.18.1.tar.gz) = 2ac0b7c3bb2d00befb27ef8f6fef5eab0f6408f4839bd29082b369aa07fae828
+SHA512 (csound-6.18.1.tar.gz) = 4ea4dccb36017c96482389a8d139f6f55c79c5ceb9cc34e6d2bfabcb930b4833d0301be4a4b21929db27b2d8ce30754b5c5867acd2ea5a849135e1b8d1506acf
+Size (csound-6.18.1.tar.gz) = 31925161 bytes
+SHA1 (patch-CMakeLists.txt) = 09e27c0e936aba60d663db53720a17d07a96378c
+SHA1 (patch-Engine_linevent.c) = b141da5b28d775f44f5804a08c22371be0cad3aa
+SHA1 (patch-Frontends_csound_csound_main.c) = 871863a02e8b1a27b06a1a7cbc4b46b0f56f4149
+SHA1 (patch-InOut_libsnd.c) = d02c8d78beb4b762308f614650451c18ba0f6187
+SHA1 (patch-InOut_winEPS.c) = bf81045e5ca55ad516794fe8cc81090ed52cb5f3
+SHA1 (patch-Opcodes_cpumeter.c) = d1b80026b3f0ea203a1055553bb4bd43c7a1dde1
+SHA1 (patch-Opcodes_wavegde.h) = a94da3b1cf6bf5497c6b0ccc15bd9e1e554146d5
+SHA1 (patch-Top_csmodule.c) = 0481b898f954e427ea5cb65dea401584480c2511
+SHA1 (patch-Top_threads.c) = 1c296a92b62561428f5dd010834d6858ff83e481
+SHA1 (patch-installer_macosx_release-build-azure.sh) = 2d7d273b91ef72ea093ecc11fee6c6b36200fd0e
diff --git a/csound6/options.mk b/csound6/options.mk
new file mode 100644
index 0000000000..37f1c330a8
--- /dev/null
+++ b/csound6/options.mk
@@ -0,0 +1,53 @@
+# $NetBSD: options.mk,v 1.3 2020/10/06 00:26:51 mrg Exp $
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.csound6
+PKG_SUPPORTED_OPTIONS=	jack portaudio pulseaudio
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+.if ${OPSYS} == "Linux"
+PKG_SUPPORTED_OPTIONS+=	alsa
+PKG_SUGGESTED_OPTIONS+=	alsa
+.elif ${OPSYS} != "Darwin" && ${OPSYS} != "Haiku"
+PKG_SUGGESTED_OPTIONS+=	portaudio
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+=		alsa
+.if !empty(PKG_OPTIONS:Malsa)
+.include "../../audio/alsa-lib/buildlink3.mk"
+CMAKE_ARGS+=		-DUSE_ALSA=ON
+PLIST.alsa=		yes
+.else
+CMAKE_ARGS+=		-DUSE_ALSA=OFF
+.endif
+
+PLIST_VARS+=		jack
+.if !empty(PKG_OPTIONS:Mjack)
+.include "../../audio/jack/buildlink3.mk"
+CMAKE_ARGS+=		-DUSE_JACK=ON
+PLIST.jack=		yes
+.else
+CMAKE_ARGS+=		-DUSE_JACK=OFF
+.endif
+
+PLIST_VARS+=		portaudio
+.if !empty(PKG_OPTIONS:Mportaudio)
+.include "../portaudio/buildlink3.mk"
+CMAKE_ARGS+=		-DUSE_PORTAUDIO=ON
+CMAKE_ARGS+=		-DCMAKE_INCLUDE_PATH=${BUILDLINK_PREFIX.portaudio}/include/portaudio2
+CMAKE_ARGS+=		-DCMAKE_LIBRARY_PATH=${BUILDLINK_PREFIX.portaudio}/lib/portaudio2
+PLIST.portaudio=	yes
+.else
+CMAKE_ARGS+=		-DUSE_PORTAUDIO=OFF
+.endif
+
+PLIST_VARS+=            pulseaudio
+.if !empty(PKG_OPTIONS:Mpulseaudio)
+.include "../../audio/pulseaudio/buildlink3.mk"
+CMAKE_ARGS+=		-DUSE_PULSEAUDIO=ON
+PLIST.pulseaudio=	yes
+.else
+CMAKE_ARGS+=		-DUSE_PULSEAUDIO=OFF
+.endif
diff --git a/csound6/patches/patch-CMakeLists.txt b/csound6/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..64665b0dc0
--- /dev/null
+++ b/csound6/patches/patch-CMakeLists.txt
@@ -0,0 +1,90 @@
+$NetBSD$
+
+On Darwin, don't build as a framework.
+Add NetBSD support.
+
+--- CMakeLists.txt.orig	2022-11-23 19:53:55.000000000 +0000
++++ CMakeLists.txt
+@@ -1,7 +1,6 @@
+ cmake_minimum_required(VERSION 3.5)
+ 
+ # silence RPATH cmake warning
+-set(CMAKE_MACOSX_RPATH 1)
+ set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
+ 
+ 
+@@ -357,14 +356,14 @@ endif()
+ 
+ # Set plugins install directory
+ if(USE_DOUBLE)
+-    if(APPLE)
++    if(FALSE)
+         set(CSOUNDLIB "CsoundLib64")
+         set(PLUGIN_INSTALL_DIR "${CS_FRAMEWORK_DEST}/${CSOUNDLIB}.framework/Versions/${APIVERSION}/Resources/Opcodes64")
+     else()
+         set(CSOUNDLIB "csound64")
+     endif()
+ else()
+-    if(APPLE)
++    if(FALSE)
+         set(CSOUNDLIB "CsoundLib")
+         set(PLUGIN_INSTALL_DIR "${CS_FRAMEWORK_DEST}/${CSOUNDLIB}.framework/Versions/${APIVERSION}/Resources/Opcodes")
+     else()
+@@ -373,7 +372,7 @@ else()
+ endif()
+ 
+ # set default user plugin directory
+-if(APPLE)
++if(FALSE)
+     if(BUILD_INSTALLER)
+        	set(CS_FRAMEWORK_FULL_PATH "/Library/Frameworks/${CSOUNDLIB}.framework/Versions/${APIVERSION}/Resources/Opcodes64")
+     else()
+@@ -395,6 +394,12 @@ if(APPLE)
+     add_definitions("-DCS_DEFAULT_USER_PLUGINDIR=\"${DEFAULT_USER_PLUGINDIR}\"")
+ endif()
+ 
++if(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
++     set(NETBSD YES)
++else()
++     set(NETBSD NO)
++endif()
++
+ # LINUX definition
+ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
+     set(LINUX YES)
+@@ -405,7 +410,7 @@ endif()
+ 
+ 
+ 
+-if(LINUX)
++if(UNIX)
+     set(DEFAULT_OPCODEDIR "${PLUGIN_INSTALL_DIR}")
+     add_definitions("-DCS_DEFAULT_PLUGINDIR=\"${DEFAULT_OPCODEDIR}\"")
+     # dir relative to $HOME
+@@ -1112,7 +1117,7 @@ if(INIT_STATIC_MODULES)
+     set_target_properties(${CSOUNDLIB} PROPERTIES COMPILE_FLAGS "-DINIT_STATIC_MODULES")
+ endif()
+ 
+-if(APPLE)
++if(FALSE)
+     set_target_properties(${CSOUNDLIB} PROPERTIES FRAMEWORK YES)
+     set_target_properties(${CSOUNDLIB} PROPERTIES FRAMEWORK_VERSION "${APIVERSION}")
+     set_target_properties(${CSOUNDLIB} PROPERTIES PUBLIC_HEADER
+@@ -1145,6 +1150,7 @@ function(make_plugin libname srcs)
+     endwhile()
+ 
+     set_target_properties(${libname} PROPERTIES
++        INSTALL_NAME_DIR "${PLUGIN_INSTALL_DIR}"
+         RUNTIME_OUTPUT_DIRECTORY ${BUILD_PLUGINS_DIR}
+         LIBRARY_OUTPUT_DIRECTORY ${BUILD_PLUGINS_DIR}
+         ARCHIVE_OUTPUT_DIRECTORY ${BUILD_PLUGINS_DIR})
+@@ -1230,7 +1236,9 @@ if(LINUX)
+       list(APPEND libcsound_LIBS ${LIBRT_LIBRARY})
+       message(STATUS "  ADDING LIBRT LIBRARY: ${LIBRT_LIBRARY}.")
+     endif()
++endif()
+ 
++if(LINUX OR NETBSD)
+     find_library(LIBEXECINFO_LIBRARY execinfo)
+ 
+     if(LIBEXECINFO_LIBRARY)
diff --git a/csound6/patches/patch-Engine_linevent.c b/csound6/patches/patch-Engine_linevent.c
new file mode 100644
index 0000000000..6a64fa7ce3
--- /dev/null
+++ b/csound6/patches/patch-Engine_linevent.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-Engine_linevent.c,v 1.3 2019/11/02 22:25:46 mrg Exp $
+
+Add NetBSD and DragonFlyBSD support.
+
+--- Engine/linevent.c.orig	2014-01-07 08:54:20.000000000 -0800
++++ Engine/linevent.c	2014-02-12 23:45:21.000000000 -0800
+@@ -27,7 +27,7 @@
+ #include "linevent.h"
+ 
+ #ifdef PIPES
+-# if defined(SGI) || defined(LINUX) || defined(NeXT) || defined(__MACH__)
++# if defined(SGI) || defined(LINUX) || defined(NeXT) || defined(__MACH__) || defined(__NetBSD__) || defined(__DragonFly__)
+ #  define _popen popen
+ #  define _pclose pclose
+ # elif defined(__BEOS__) ||  defined(__HAIKU__) || defined(__MACH__)
diff --git a/csound6/patches/patch-Frontends_csound_csound_main.c b/csound6/patches/patch-Frontends_csound_csound_main.c
new file mode 100644
index 0000000000..1318298b18
--- /dev/null
+++ b/csound6/patches/patch-Frontends_csound_csound_main.c
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Port to NetBSD and DragonFly.
+
+--- Frontends/csound/csound_main.c.orig 2022-11-23 19:53:55.000000000 +0000
++++ Frontends/csound/csound_main.c
+@@ -76,6 +76,8 @@ static void nomsg_callback(CSOUND *csoun
+ #if defined(ANDROID) || (!defined(LINUX) && !defined(SGI) && \
+                          !defined(__HAIKU__) && !defined(__BEOS__) && \
+                          !defined(__MACH__) && !defined(__EMSCRIPTEN__))
++                         !defined(__MACH__) && !defined(__EMSCRIPTEN__) && \
++                         !defined(__NetBSD__) && !defined(__DragonFly__))
+ static char *signal_to_string(int sig)
+ {
+     switch(sig) {
diff --git a/csound6/patches/patch-InOut_libsnd.c b/csound6/patches/patch-InOut_libsnd.c
new file mode 100644
index 0000000000..f704508ced
--- /dev/null
+++ b/csound6/patches/patch-InOut_libsnd.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-InOut_libsnd.c,v 1.2 2014/08/05 05:12:38 mrg Exp $
+
+Add NetBSD and DragonFlyBSD support.
+
+--- InOut/libsnd.c.orig	2023-10-21 12:16:36.670142255 +0000
++++ InOut/libsnd.c
+@@ -33,7 +33,7 @@
+ 
+ #ifdef PIPES
+ # if defined(SGI) || defined(LINUX) || defined(__BEOS__) || defined(NeXT) ||  \
+-     defined(__MACH__)
++     defined(__MACH__) || defined(__NetBSD__) || defined(__DragonFly__)
+ #  define _popen popen
+ #  define _pclose pclose
+ # endif
diff --git a/csound6/patches/patch-InOut_winEPS.c b/csound6/patches/patch-InOut_winEPS.c
new file mode 100644
index 0000000000..2c6840db18
--- /dev/null
+++ b/csound6/patches/patch-InOut_winEPS.c
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Add NetBSD and DragonFlyBSD support.
+
+--- InOut/winEPS.c.orig 2022-11-23 19:53:55.000000000 +0000
++++ InOut/winEPS.c
+@@ -144,7 +144,7 @@ void PS_MakeGraph(CSOUND *csound, WINDAT
+      *  Get the current time and date
+      */
+     lt = time(NULL);
+-#ifndef LINUX
++#if !defined(LINUX) && !defined(__NetBSD__) && !defined(__DragonFly__)
+     {
+       struct tm *date_ptr;
+       char      *date;
diff --git a/csound6/patches/patch-Opcodes_cpumeter.c b/csound6/patches/patch-Opcodes_cpumeter.c
new file mode 100644
index 0000000000..b9c13747ba
--- /dev/null
+++ b/csound6/patches/patch-Opcodes_cpumeter.c
@@ -0,0 +1,17 @@
+$NetBSD: patch-Opcodes_cpumeter.c,v 1.4 2019/11/02 22:25:46 mrg Exp $
+
+Add NetBSD and DragonFlyBSD support.
+
+be best to patch this to use eg, getloadavg() or something not /proc.
+
+--- Opcodes/cpumeter.c.orig	2019-07-12 14:54:19.000000000 -0700
++++ Opcodes/cpumeter.c	2019-10-29 13:44:20.487656938 -0700
+@@ -36,7 +36,7 @@
+ #include <float.h>
+ 
+ // only available on Linux (no /proc/stat on OSX)
+-#if defined(LINUX)
++#if defined(LINUX) || defined(__NetBSD__) || defined(__DragonFly__)
+ /*######  Miscellaneous global stuff  ####################################*/
+ #define SMLBUFSIZ (512)
+ #define TEST (0)
diff --git a/csound6/patches/patch-Opcodes_wavegde.h b/csound6/patches/patch-Opcodes_wavegde.h
new file mode 100644
index 0000000000..902c30ef85
--- /dev/null
+++ b/csound6/patches/patch-Opcodes_wavegde.h
@@ -0,0 +1,16 @@
+$NetBSD: patch-Opcodes_wavegde.h,v 1.2 2019/11/02 22:25:46 mrg Exp $
+
+Use native len_t on SunOS.
+
+--- Opcodes/wavegde.h.orig	2019-07-12 14:54:19.000000000 -0700
++++ Opcodes/wavegde.h	2019-10-29 13:45:37.120974231 -0700
+@@ -43,7 +43,9 @@
+ #endif
+ 
+ /* TYPEDEFS */
++#ifndef __sun
+ typedef int64_t    len_t;    /* length type */
++#endif
+ 
+ /* CLASS DEFINITIONS */
+ 
diff --git a/csound6/patches/patch-Top_threads.c b/csound6/patches/patch-Top_threads.c
new file mode 100644
index 0000000000..1d3107fd93
--- /dev/null
+++ b/csound6/patches/patch-Top_threads.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-Top_threads.c,v 1.3 2019/11/02 22:25:46 mrg Exp $
+
+Add NetBSD and DragonFlyBSD support.
+
+--- Top/threads.c.orig	2019-07-12 14:54:19.000000000 -0700
++++ Top/threads.c	2019-10-29 13:37:43.363970338 -0700
+@@ -28,7 +28,7 @@
+ 
+ #ifndef HAVE_GETTIMEOFDAY
+ #if defined(LINUX)    || defined(__unix)   || defined(__unix__) || \
+-    defined(__MACH__) || defined(__HAIKU__)
++    defined(__MACH__) || defined(__HAIKU__) || defined(__NetBSD__) || defined(__DragonFly__)
+ #define HAVE_GETTIMEOFDAY 1
+ #endif
+ #endif
diff --git a/csound6/patches/patch-installer_macosx_release-build-azure.sh b/csound6/patches/patch-installer_macosx_release-build-azure.sh
new file mode 100644
index 0000000000..0ed17f8914
--- /dev/null
+++ b/csound6/patches/patch-installer_macosx_release-build-azure.sh
@@ -0,0 +1,15 @@
+$NetBSD: patch-installer_macosx_release-build-azure.sh,v 1.1 2020/10/10 14:02:37 mef Exp $
+
+Portability fix.
+
+--- installer/macosx/release-build-azure.sh.orig	2020-08-13 23:03:03.000000000 +0000
++++ installer/macosx/release-build-azure.sh
+@@ -35,7 +35,7 @@ ls /usr/local/lib
+ 
+ # sudo cp -a /Library/Frameworks/CsoundLib64.framework/libs/. $SYSTEM_DEFAULTWORKINGDIRECTORY/csoundLibs
+ 
+-if [ $# == 0 ]; then
++if [ $# = 0 ]; then
+   echo "Must give branch name to build from"
+   exit
+ else


Home | Main Index | Thread Index | Old Index