aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2021-04-18 18:54:29 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2021-04-18 20:19:55 +0000
commit3484bcc34aa95e82e362e699dc01865792b3631e (patch)
tree6f1b37810b6dab1bf70983e22bf512c56be790a1
parent290aebe319f02e442f4789d11df6d5175db8f16d (diff)
downloadports-3484bcc34aa95e82e362e699dc01865792b3631e.tar.gz
ports-3484bcc34aa95e82e362e699dc01865792b3631e.zip
New port: audio/nyquist: Language for sound synthesis and music composition
-rw-r--r--audio/Makefile1
-rw-r--r--audio/nyquist/Makefile44
-rw-r--r--audio/nyquist/distinfo3
-rw-r--r--audio/nyquist/files/patch-CMakeLists.txt53
-rw-r--r--audio/nyquist/files/patch-liblo_src_lo__types__internal.h10
-rw-r--r--audio/nyquist/files/patch-portaudio_src_hostapi_oss_pa__unix__oss.c11
-rw-r--r--audio/nyquist/files/patch-sys_unix_term.c11
-rw-r--r--audio/nyquist/pkg-descr6
-rw-r--r--audio/nyquist/pkg-plist183
9 files changed, 322 insertions, 0 deletions
diff --git a/audio/Makefile b/audio/Makefile
index 477c15d2ee23..f0f95e727285 100644
--- a/audio/Makefile
+++ b/audio/Makefile
@@ -537,6 +537,7 @@
SUBDIR += normalize
SUBDIR += nosefart
SUBDIR += noson-app
+ SUBDIR += nyquist
SUBDIR += oaml
SUBDIR += ocp
SUBDIR += ogg2mp3
diff --git a/audio/nyquist/Makefile b/audio/nyquist/Makefile
new file mode 100644
index 000000000000..202c51223952
--- /dev/null
+++ b/audio/nyquist/Makefile
@@ -0,0 +1,44 @@
+PORTNAME= nyquist
+DISTVERSION= 3.16
+CATEGORIES= audio java
+MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${DISTVERSION}/
+DISTNAME= nyqsrc${DISTVERSION:S/.//}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Language for sound synthesis and music composition (sound is broken) # likely caused by outdated bundled PortAudio, reported to upstream Apr 18, 2021
+
+LICENSE= BSD3CLAUSE
+
+USES= cmake zip
+
+WRKSRC= ${WRKDIR}/${PORTNAME}
+
+CFLAGS+= -Dulong=uint32_t -DXL_BIG_ENDIAN -DHAVE_SYS_SOUNDCARD_H
+
+USE_JAVA= yes
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|nyquistDir = prefs.get("nyquist-dir", "");|nyquistDir = "${DATADIR}";|' ${WRKSRC}/jnyqide/MainFrame.java
+
+do-install:
+ # executable
+ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/ny ${STAGEDIR}${PREFIX}/bin
+ # runtime
+ ${MKDIR} ${STAGEDIR}${DATADIR}
+ cd ${WRKSRC} && \
+ ${COPYTREE_SHARE} runtime ${STAGEDIR}${DATADIR} && \
+ ${COPYTREE_SHARE} lib ${STAGEDIR}${DATADIR} && \
+ ${COPYTREE_SHARE} doc ${STAGEDIR}${DATADIR} && \
+ ${COPYTREE_SHARE} demos ${STAGEDIR}${DATADIR}
+ # Java IDE
+ ${INSTALL_DATA} ${WRKSRC}/jnyqide/jNyqIDE.jar ${STAGEDIR}${JAVAJARDIR}
+ @(echo "#!/bin/sh"; \
+ echo ""; \
+ echo "${JAVA} -jar ${JAVAJARDIR}/jNyqIDE.jar \""$$"@\"" \
+ ) > ${STAGEDIR}${PREFIX}/bin/jny
+ @${CHMOD} +x ${STAGEDIR}${PREFIX}/bin/jny
+ # NyquistWords.txt
+ ${MKDIR} ${STAGEDIR}${JAVAJARDIR}/jnyqide
+ ${INSTALL_DATA} ${WRKSRC}/jnyqide/NyquistWords.txt ${STAGEDIR}${JAVAJARDIR}/jnyqide
+
+.include <bsd.port.mk>
diff --git a/audio/nyquist/distinfo b/audio/nyquist/distinfo
new file mode 100644
index 000000000000..3115575f932e
--- /dev/null
+++ b/audio/nyquist/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1618724946
+SHA256 (nyqsrc316.zip) = b37fd42290d82c265ff1c733f9d08ac211460ff48b8415758ab0034ef9af7916
+SIZE (nyqsrc316.zip) = 12788616
diff --git a/audio/nyquist/files/patch-CMakeLists.txt b/audio/nyquist/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..477b841ce2fb
--- /dev/null
+++ b/audio/nyquist/files/patch-CMakeLists.txt
@@ -0,0 +1,53 @@
+--- CMakeLists.txt.orig 2020-10-09 03:20:26 UTC
++++ CMakeLists.txt
+@@ -299,13 +299,17 @@ if(UNIX)
+ portaudio/src/hostapi/coreaudio/pa_mac_core_internal.h
+ portaudio/src/hostapi/coreaudio/pa_mac_core.c)
+ set(portaudio_SRCS ${portaudio_SRCS} ${portaudio_mac_SRCS})
+- else(APPLE)
++ elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
++ set(portaudio_freebsd_SRCS
++ portaudio/src/hostapi/oss/pa_unix_oss.c)
++ set(portaudio_SRCS ${portaudio_SRCS} ${portaudio_freebsd_SRCS})
++ else()
+ # Linux
+ set(portaudio_linux_SRCS
+ portaudio/src/hostapi/alsa/pa_linux_alsa.c
+ portaudio/src/hostapi/oss/pa_unix_oss.c)
+ set(portaudio_SRCS ${portaudio_SRCS} ${portaudio_linux_SRCS})
+- endif(APPLE)
++ endif()
+ else(UNIX)
+ #WIN32
+ set(portaudio_SRCS ${portaudio_SRCS}
+@@ -343,8 +347,8 @@ if(UNIX)
+ target_include_directories(portaudio_static PRIVATE
+ PROPERTY INCLUDE_DIRECTORIES
+ ${CMAKE_CURRENT_SOURCE_DIR}/portaudio/src/os/unix)
+-if(APPLE)
+-else(APPLE)
++if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
++else(APPLE OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+ # Linux
+ set(USE_ALSA 1 CACHE BOOL "Use ALSA audio rather than OSS")
+
+@@ -355,7 +359,7 @@ else(APPLE)
+ endif(USE_ALSA)
+ set_target_properties(portaudio_static PROPERTIES COMPILE_FLAGS
+ "-DPA_USE_OSS=1 -DHAVE_LINUX_SOUNDCARD_H ${ALSA_FLAGS}")
+-endif(APPLE)
++endif(APPLE OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+ else(UNIX)
+ # Windows
+ set_target_properties(portaudio_static PROPERTIES COMPILE_FLAGS
+@@ -807,7 +811,9 @@ if(UNIX)
+ add_definitions("-DPA_USE_COREAUDIO")
+ add_definitions("-DCMTSTUFF")
+ add_definitions("-Dmacintosh")
+- else(APPLE)
++ elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
++ set(EXTRA_PA_LIBS pthread m)
++ else()
+ # Linux
+ set(EXTRA_PA_LIBS asound pthread m)
+ endif(APPLE)
diff --git a/audio/nyquist/files/patch-liblo_src_lo__types__internal.h b/audio/nyquist/files/patch-liblo_src_lo__types__internal.h
new file mode 100644
index 000000000000..e1909fa3b17a
--- /dev/null
+++ b/audio/nyquist/files/patch-liblo_src_lo__types__internal.h
@@ -0,0 +1,10 @@
+--- liblo/src/lo_types_internal.h.orig 2021-04-18 05:50:40 UTC
++++ liblo/src/lo_types_internal.h
+@@ -8,6 +8,7 @@
+ #ifdef HAVE_SYS_SOCKET_H
+ #include <sys/types.h>
+ #include <sys/socket.h>
++#include <netinet/in.h>
+ #endif
+
+ #ifdef HAVE_POLL
diff --git a/audio/nyquist/files/patch-portaudio_src_hostapi_oss_pa__unix__oss.c b/audio/nyquist/files/patch-portaudio_src_hostapi_oss_pa__unix__oss.c
new file mode 100644
index 000000000000..0c08175e3be2
--- /dev/null
+++ b/audio/nyquist/files/patch-portaudio_src_hostapi_oss_pa__unix__oss.c
@@ -0,0 +1,11 @@
+--- portaudio/src/hostapi/oss/pa_unix_oss.c.orig 2021-04-18 05:58:24 UTC
++++ portaudio/src/hostapi/oss/pa_unix_oss.c
+@@ -71,7 +71,7 @@
+ # define DEVICE_NAME_BASE "/dev/dsp"
+ # endif
+ #elif defined(HAVE_LINUX_SOUNDCARD_H)
+-# include <linux/soundcard.h>
++# include <sys/soundcard.h>
+ # define DEVICE_NAME_BASE "/dev/dsp"
+ #elif defined(HAVE_MACHINE_SOUNDCARD_H)
+ # include <machine/soundcard.h> /* JH20010905 */
diff --git a/audio/nyquist/files/patch-sys_unix_term.c b/audio/nyquist/files/patch-sys_unix_term.c
new file mode 100644
index 000000000000..4a524b29288b
--- /dev/null
+++ b/audio/nyquist/files/patch-sys_unix_term.c
@@ -0,0 +1,11 @@
+--- sys/unix/term.c.orig 2021-04-18 05:56:28 UTC
++++ sys/unix/term.c
+@@ -10,7 +10,7 @@
+
+
+ #include <termios.h>
+-#ifndef __APPLE__
++#if !defined(__APPLE__) && !defined(__FreeBSD__)
+ #include <asm/ioctls.h>
+ #endif
+ #include <sys/ioctl.h>
diff --git a/audio/nyquist/pkg-descr b/audio/nyquist/pkg-descr
new file mode 100644
index 000000000000..67a3af033d19
--- /dev/null
+++ b/audio/nyquist/pkg-descr
@@ -0,0 +1,6 @@
+Nyquist is a sound synthesis and composition language offering a Lisp syntax as
+well as an imperative language syntax (SAL) and a powerful integrated
+development environment. Nyquist is an elegant and powerful system based on
+functional programming.
+
+WWW: http://www.cs.cmu.edu/~music/music.software.html
diff --git a/audio/nyquist/pkg-plist b/audio/nyquist/pkg-plist
new file mode 100644
index 000000000000..7e028a2ab039
--- /dev/null
+++ b/audio/nyquist/pkg-plist
@@ -0,0 +1,183 @@
+bin/jny
+bin/ny
+%%JAVAJARDIR%%/jNyqIDE.jar
+%%JAVAJARDIR%%/jnyqide/NyquistWords.txt
+%%DATADIR%%/demos/allewis/cmusic_pres.pdf
+%%DATADIR%%/demos/allewis/cmusic_pres.ppt
+%%DATADIR%%/demos/audio/demo-snd.aiff
+%%DATADIR%%/demos/audio/happy.wav
+%%DATADIR%%/demos/audio/labels.txt
+%%DATADIR%%/demos/audio/pv.wav
+%%DATADIR%%/demos/index.htm
+%%DATADIR%%/demos/pitch_change.htm
+%%DATADIR%%/demos/probability_distributions.htm
+%%DATADIR%%/demos/src/osc-test.lsp
+%%DATADIR%%/demos/src/test.mid
+%%DATADIR%%/demos/voice_synthesis.htm
+%%DATADIR%%/demos/warble_tutorial.htm
+%%DATADIR%%/demos/wind_tutorial.htm
+%%DATADIR%%/doc/arcsine-fig.gif
+%%DATADIR%%/doc/bernoulli-fig.gif
+%%DATADIR%%/doc/beta-fig.gif
+%%DATADIR%%/doc/bilateral-fig.gif
+%%DATADIR%%/doc/binomial-fig.gif
+%%DATADIR%%/doc/cauchy-fig.gif
+%%DATADIR%%/doc/exponential-fig.gif
+%%DATADIR%%/doc/fig1.gif
+%%DATADIR%%/doc/fig2.gif
+%%DATADIR%%/doc/fig3.gif
+%%DATADIR%%/doc/fig4.gif
+%%DATADIR%%/doc/fig5.gif
+%%DATADIR%%/doc/fig6.gif
+%%DATADIR%%/doc/foot.html
+%%DATADIR%%/doc/gamma-fig.gif
+%%DATADIR%%/doc/gaussian-fig.gif
+%%DATADIR%%/doc/geometric-fig.gif
+%%DATADIR%%/doc/guide.html
+%%DATADIR%%/doc/home.html
+%%DATADIR%%/doc/hyperbolic-fig.gif
+%%DATADIR%%/doc/indx.html
+%%DATADIR%%/doc/linear-fig.gif
+%%DATADIR%%/doc/logistic-fig.gif
+%%DATADIR%%/doc/moog-fig.gif
+%%DATADIR%%/doc/musicbib.html
+%%DATADIR%%/doc/nyquist-icon.png
+%%DATADIR%%/doc/nyquistman.pdf
+%%DATADIR%%/doc/nyquiststyle.css
+%%DATADIR%%/doc/part1.html
+%%DATADIR%%/doc/part10.html
+%%DATADIR%%/doc/part11.html
+%%DATADIR%%/doc/part12.html
+%%DATADIR%%/doc/part13.html
+%%DATADIR%%/doc/part14.html
+%%DATADIR%%/doc/part15.html
+%%DATADIR%%/doc/part16.html
+%%DATADIR%%/doc/part17.html
+%%DATADIR%%/doc/part18.html
+%%DATADIR%%/doc/part19.html
+%%DATADIR%%/doc/part2.html
+%%DATADIR%%/doc/part3.html
+%%DATADIR%%/doc/part4.html
+%%DATADIR%%/doc/part5.html
+%%DATADIR%%/doc/part6.html
+%%DATADIR%%/doc/part7.html
+%%DATADIR%%/doc/part8.html
+%%DATADIR%%/doc/part9.html
+%%DATADIR%%/doc/poisson-fig.gif
+%%DATADIR%%/doc/readme-linux.txt
+%%DATADIR%%/doc/sdl-man.pdf
+%%DATADIR%%/doc/title.html
+%%DATADIR%%/lib/dist-test.lsp
+%%DATADIR%%/lib/distributions.lsp
+%%DATADIR%%/lib/examples.lsp
+%%DATADIR%%/lib/examples.sal
+%%DATADIR%%/lib/extensions.lsp
+%%DATADIR%%/lib/gnuplot.sal
+%%DATADIR%%/lib/grapheq.lsp
+%%DATADIR%%/lib/instruments.txt
+%%DATADIR%%/lib/lpc.lsp
+%%DATADIR%%/lib/midishow.lsp
+%%DATADIR%%/lib/piano/att11025.pcm
+%%DATADIR%%/lib/piano/att16000.pcm
+%%DATADIR%%/lib/piano/att22050.pcm
+%%DATADIR%%/lib/piano/att32000.pcm
+%%DATADIR%%/lib/piano/att44100.pcm
+%%DATADIR%%/lib/piano/att48000.pcm
+%%DATADIR%%/lib/piano/att8000.pcm
+%%DATADIR%%/lib/piano/autoload.lsp
+%%DATADIR%%/lib/piano/demo.mid
+%%DATADIR%%/lib/piano/demo.mp3
+%%DATADIR%%/lib/piano/dur.tab
+%%DATADIR%%/lib/piano/gmax.tab
+%%DATADIR%%/lib/piano/piano.htm
+%%DATADIR%%/lib/piano/pianosyn.lsp
+%%DATADIR%%/lib/piano/pn00.cod
+%%DATADIR%%/lib/piano/pn01.cod
+%%DATADIR%%/lib/piano/pn02.cod
+%%DATADIR%%/lib/piano/pn03.cod
+%%DATADIR%%/lib/piano/pn04.cod
+%%DATADIR%%/lib/piano/pn05.cod
+%%DATADIR%%/lib/piano/pn06.cod
+%%DATADIR%%/lib/piano/pn07.cod
+%%DATADIR%%/lib/piano/pn08.cod
+%%DATADIR%%/lib/piano/pn09.cod
+%%DATADIR%%/lib/piano/pn10.cod
+%%DATADIR%%/lib/piano/pn11.cod
+%%DATADIR%%/lib/piano/pn12.cod
+%%DATADIR%%/lib/piano/pn13.cod
+%%DATADIR%%/lib/piano/pn14.cod
+%%DATADIR%%/lib/piano/pn15.cod
+%%DATADIR%%/lib/piano/pn16.cod
+%%DATADIR%%/lib/piano/pn17.cod
+%%DATADIR%%/lib/piano/pn18.cod
+%%DATADIR%%/lib/piano/pn19.cod
+%%DATADIR%%/lib/piano/pn20.cod
+%%DATADIR%%/lib/piano/pn21.cod
+%%DATADIR%%/lib/piano/pn22.cod
+%%DATADIR%%/lib/piano/rls11025.pcm
+%%DATADIR%%/lib/piano/rls16000.pcm
+%%DATADIR%%/lib/piano/rls22050.pcm
+%%DATADIR%%/lib/piano/rls32000.pcm
+%%DATADIR%%/lib/piano/rls44100.pcm
+%%DATADIR%%/lib/piano/rls48000.pcm
+%%DATADIR%%/lib/piano/rls8000.pcm
+%%DATADIR%%/lib/piano/rlsrate.tab
+%%DATADIR%%/lib/plugin-test.lsp
+%%DATADIR%%/lib/reverb.lsp
+%%DATADIR%%/lib/spectral-centroid.lsp
+%%DATADIR%%/lib/spectral-centroid.sal
+%%DATADIR%%/lib/spectrum.lsp
+%%DATADIR%%/lib/statistics.lsp
+%%DATADIR%%/lib/surround.lsp
+%%DATADIR%%/lib/time-delay-fns.lsp
+%%DATADIR%%/lib/vectors.lsp
+%%DATADIR%%/lib/xm-test.lsp
+%%DATADIR%%/runtime/dspprims.lsp
+%%DATADIR%%/runtime/envelopes.lsp
+%%DATADIR%%/runtime/equalizer.lsp
+%%DATADIR%%/runtime/evalenv.lsp
+%%DATADIR%%/runtime/fileio.lsp
+%%DATADIR%%/runtime/init.lsp
+%%DATADIR%%/runtime/misc.lsp
+%%DATADIR%%/runtime/nyinit-dbg.lsp
+%%DATADIR%%/runtime/nyinit.lsp
+%%DATADIR%%/runtime/nyqmisc.lsp
+%%DATADIR%%/runtime/nyquist-plot.txt
+%%DATADIR%%/runtime/nyquist.lsp
+%%DATADIR%%/runtime/printrec.lsp
+%%DATADIR%%/runtime/profile.lsp
+%%DATADIR%%/runtime/rawwaves/mand1.raw
+%%DATADIR%%/runtime/rawwaves/mand10.raw
+%%DATADIR%%/runtime/rawwaves/mand11.raw
+%%DATADIR%%/runtime/rawwaves/mand12.raw
+%%DATADIR%%/runtime/rawwaves/mand2.raw
+%%DATADIR%%/runtime/rawwaves/mand3.raw
+%%DATADIR%%/runtime/rawwaves/mand4.raw
+%%DATADIR%%/runtime/rawwaves/mand5.raw
+%%DATADIR%%/runtime/rawwaves/mand6.raw
+%%DATADIR%%/runtime/rawwaves/mand7.raw
+%%DATADIR%%/runtime/rawwaves/mand8.raw
+%%DATADIR%%/runtime/rawwaves/mand9.raw
+%%DATADIR%%/runtime/rawwaves/mandpluk.raw
+%%DATADIR%%/runtime/rawwaves/marmstk1.raw
+%%DATADIR%%/runtime/rawwaves/sinewave.raw
+%%DATADIR%%/runtime/sal-parse.lsp
+%%DATADIR%%/runtime/sal.lsp
+%%DATADIR%%/runtime/seq.lsp
+%%DATADIR%%/runtime/seqfnint.lsp
+%%DATADIR%%/runtime/seqmidi.lsp
+%%DATADIR%%/runtime/sliders.lsp
+%%DATADIR%%/runtime/sndfnint.lsp
+%%DATADIR%%/runtime/spec-plot.lsp
+%%DATADIR%%/runtime/spectral-analysis.lsp
+%%DATADIR%%/runtime/stk.lsp
+%%DATADIR%%/runtime/system.lsp
+%%DATADIR%%/runtime/test.lsp
+%%DATADIR%%/runtime/upic.sal
+%%DATADIR%%/runtime/velocity.lsp
+%%DATADIR%%/runtime/xlinit.lsp
+%%DATADIR%%/runtime/xm.lsp
+@dir %%DATADIR%%/demos/images
+@dir %%DATADIR%%/demos/mateos
+@dir %%DATADIR%%/demos/pmorales
+@dir %%DATADIR%%/demos/sdl