diff options
Diffstat (limited to 'audio')
-rw-r--r-- | audio/zynaddsubfx/Makefile | 106 | ||||
-rw-r--r-- | audio/zynaddsubfx/files/patch-git_ecfc42c | 93 | ||||
-rw-r--r-- | audio/zynaddsubfx/files/patch-src__Misc__Master.h | 11 | ||||
-rw-r--r-- | audio/zynaddsubfx/files/patch-src__Misc__Part.h | 10 | ||||
-rw-r--r-- | audio/zynaddsubfx/files/patch-src__Nio__SafeQueue.h | 10 | ||||
-rw-r--r-- | audio/zynaddsubfx/files/patch-src__UI__CMakeLists.txt | 17 | ||||
-rw-r--r-- | audio/zynaddsubfx/pkg-plist | 48 |
7 files changed, 223 insertions, 72 deletions
diff --git a/audio/zynaddsubfx/Makefile b/audio/zynaddsubfx/Makefile index 005144b86630..1e433aec9abb 100644 --- a/audio/zynaddsubfx/Makefile +++ b/audio/zynaddsubfx/Makefile @@ -15,76 +15,42 @@ LICENSE= GPLv2 LIB_DEPENDS= fftw3:${PORTSDIR}/math/fftw3 \ mxml:${PORTSDIR}/textproc/mxml -OPTIONS_DEFINE= ALSAMIDI DSSI GUI LASH LO JACK PORTAUDIO DOCS EXAMPLES +OPTIONS_DEFINE= GUI LASH LO JACK PORTAUDIO DOCS EXAMPLES OPTIONS_DEFAULT= GUI +OPTIONS_RADIO= AUDIO +OPTIONS_RADIO_AUDIO= ALSAMIDI DSSI +OPTIONS_SUB= yes + ALSAMIDI_DESC= MIDI input through ALSA DSSI_DESC= DSSI Plugin LO_DESC= Open Sound Control support via LibLO +ALSAMIDI_CMAKE_OFF= -DAlsaEnable:BOOL=OFF +ALSAMIDI_LIB_DEPENDS= asound:${PORTSDIR}/audio/alsa-lib +DSSI_BUILD_DEPENDS= dssi>0:${PORTSDIR}/audio/dssi +DSSI_CFLAGS= -I${LOCALBASE}/include/dssi +DSSI_CMAKE_OFF= -DDssiEnable:BOOL=OFF +DSSI_LIB_DEPENDS= dssialsacompat:${PORTSDIR}/audio/libdssialsacompat +DSSI_RUN_DEPENDS= dssi>0:${PORTSDIR}/audio/dssi +GUI_CMAKE_OFF= -DGuiModule:STRING=OFF +GUI_LIB_DEPENDS= fltk:${PORTSDIR}/x11-toolkits/fltk +GUI_ON= -DGuiModule:STRING=fltk +JACK_CMAKE_OFF= -DJackEnable:BOOL=OFF +JACK_LIB_DEPENDS= jack:${PORTSDIR}/audio/jack +LASH_CMAKE_OFF= -DLashEnabe:BOOL=OFF +LASH_LIB_DEPENDS= lash:${PORTSDIR}/audio/lash +LO_CMAKE_OFF= -DLibloEnable:BOOL=OFF +LO_LIB_DEPENDS= lo:${PORTSDIR}/audio/liblo +PORTAUDIO_BUILD_DEPENDS= portaudio>=19:${PORTSDIR}/audio/portaudio2 +PORTAUDIO_CFLAGS= -I${LOCALBASE}/include/portaudio2 +PORTAUDIO_CMAKE_OFF= -DPaEnabe:BOOL=OFF +PORTAUDIO_LDFLAGS= ${LOCALBASE}/lib/portaudio2/libportaudio.so +PORTAUDIO_RUN_DEPENDS= portaudio>=19:${PORTSDIR}/audio/portaudio2 + USE_BZIP2= yes -NO_STAGE= yes USES= cmake pkgconfig -PORTDOCS= * -PORTEXAMPLES= * - .include <bsd.port.options.mk> - -.if ${PORT_OPTIONS:MALSAMIDI} -LIB_DEPENDS+= asound:${PORTSDIR}/audio/alsa-lib -.else -CMAKE_ARGS+= -DAlsaEnable:BOOL=OFF -.endif - -.if ${PORT_OPTIONS:MDSSI} -BUILD_DEPENDS+= dssi>0:${PORTSDIR}/audio/dssi -LIB_DEPENDS+= dssialsacompat:${PORTSDIR}/audio/libdssialsacompat -RUN_DEPENDS+= dssi>0:${PORTSDIR}/audio/dssi -CFLAGS+= -I${LOCALBASE}/include/dssi -PLIST_SUB+= DSSI="" -.else -CMAKE_ARGS+= -DDssiEnable:BOOL=OFF -PLIST_SUB+= DSSI="@comment " -.endif - -.if ${PORT_OPTIONS:MGUI} -LIB_DEPENDS+= fltk:${PORTSDIR}/x11-toolkits/fltk -CMAKE_ARGS+= -DGuiModule:STRING=fltk -.else -CMAKE_ARGS+= -DGuiModule:STRING=OFF -.endif - -.if ${PORT_OPTIONS:MJACK} -LIB_DEPENDS+= jack:${PORTSDIR}/audio/jack -.else -CMAKE_ARGS+= -DJackEnable:BOOL=OFF -.endif - -.if ${PORT_OPTIONS:MLASH} -LIB_DEPENDS+= lash:${PORTSDIR}/audio/lash -.else -CMAKE_ARGS+= -DLashEnable:BOOL=OFF -.endif - -.if ${PORT_OPTIONS:MLO} -LIB_DEPENDS+= lo:${PORTSDIR}/audio/liblo -.else -CMAKE_ARGS+= -DLibloEnable:BOOL=OFF -.endif - -.if ${PORT_OPTIONS:MPORTAUDIO} -BUILD_DEPENDS+= portaudio>=19:${PORTSDIR}/audio/portaudio2 -RUN_DEPENDS+= portaudio>=19:${PORTSDIR}/audio/portaudio2 -CFLAGS+= -I${LOCALBASE}/include/portaudio2 -LDFLAGS+= ${LOCALBASE}/lib/portaudio2/libportaudio.so -.else -CMAKE_ARGS+= -DPaEnable:BOOL=OFF -.endif - -.if ${PORT_OPTIONS:MALSAMIDI} && ${PORT_OPTIONS:MDSSI} -IGNORE= selected mutually exclusive options: ALSAMIDI and DSSI -.endif - .include <bsd.port.pre.mk> .if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64" @@ -110,19 +76,15 @@ post-patch: 's|%%DATADIR%%|${DATADIR}|' ${WRKSRC}/src/Misc/Config.cpp post-install: - @${MKDIR} ${DATADIR}/banks - @(cd ${WRKDIR}/${DISTNAME}/instruments/banks \ - && ${COPYTREE_SHARE} . ${DATADIR}/banks) -.if ${PORT_OPTIONS:MDOCS} - @${MKDIR} ${DOCSDIR} + ${MKDIR} ${STAGEDIR}${DATADIR}/banks + (cd ${WRKDIR}/${DISTNAME}/instruments/banks \ + && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/banks) + ${MKDIR} ${STAGEDIR}${DOCSDIR} .for i in AUTHORS.txt FAQ.txt HISTORY.txt README.txt - (cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${DOCSDIR}) + (cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${STAGEDIR}${DOCSDIR}) .endfor -.endif -.if ${PORT_OPTIONS:MEXAMPLES} - @${MKDIR} ${EXAMPLESDIR} + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} (cd ${WRKDIR}/${DISTNAME}/instruments/examples \ - && ${INSTALL_DATA} * ${EXAMPLESDIR}) -.endif + && ${INSTALL_DATA} * ${STAGEDIR}${EXAMPLESDIR}) .include <bsd.port.post.mk> diff --git a/audio/zynaddsubfx/files/patch-git_ecfc42c b/audio/zynaddsubfx/files/patch-git_ecfc42c new file mode 100644 index 000000000000..9cb74c58c4f8 --- /dev/null +++ b/audio/zynaddsubfx/files/patch-git_ecfc42c @@ -0,0 +1,93 @@ +commit ecfc42ce3e2564e71ef78f48a2c736bf37f17281 +Author: fundamental <mark.d.mccurry@gmail.com> +Date: Wed Oct 31 23:43:55 2012 -0400 + + C++11: Build now compiles without errors + + Due to std::complex<T>::imag() and ::real() changing their signatures, in C++11, + code dealing with these was updated to compile under both versions of C++. + +diff --git a/src/Effects/Alienwah.cpp b/src/Effects/Alienwah.cpp +index 078a964..b3110ba 100644 +--- src/Effects/Alienwah.cpp ++++ src/Effects/Alienwah.cpp +@@ -65,7 +65,7 @@ void Alienwah::out(const Stereo<float *> &smp) + complex<float> tmp = clfol * x + oldclfol * x1; + + complex<float> out = tmp * oldl[oldk]; +- out.real() += (1 - fabs(fb)) * smp.l[i] * pangainL; ++ out += (1 - fabs(fb)) * smp.l[i] * pangainL; + + oldl[oldk] = out; + float l = out.real() * 10.0f * (fb + 0.1f); +@@ -74,7 +74,7 @@ void Alienwah::out(const Stereo<float *> &smp) + tmp = clfor * x + oldclfor * x1; + + out = tmp * oldr[oldk]; +- out.real() += (1 - fabs(fb)) * smp.r[i] * pangainR; ++ out += (1 - fabs(fb)) * smp.r[i] * pangainR; + + oldr[oldk] = out; + float r = out.real() * 10.0f * (fb + 0.1f); +diff --git a/src/Params/PADnoteParameters.cpp b/src/Params/PADnoteParameters.cpp +index 8d612b5..c972233 100644 +--- src/Params/PADnoteParameters.cpp ++++ src/Params/PADnoteParameters.cpp +@@ -477,7 +477,7 @@ void PADnoteParameters::generatespectrum_bandwidthMode(float *spectrum, + float idfreq = i / (float)profilesize - 0.5f; + idfreq *= ibw; + int spfreq = (int) (idfreq + ibasefreq); +- float fspfreq = fmod((double)idfreq + ibasefreq, 1.0f); ++ float fspfreq = fmodf((float)idfreq + ibasefreq, 1.0f); + if(spfreq <= 0) + continue; + if(spfreq >= size - 1) +diff --git a/src/Synth/OscilGen.cpp b/src/Synth/OscilGen.cpp +index 3351d82..44e40e4 100644 +--- src/Synth/OscilGen.cpp ++++ src/Synth/OscilGen.cpp +@@ -616,12 +616,9 @@ void OscilGen::prepare() + clearAll(oscilFFTfreqs); + if(Pcurrentbasefunc == 0) //the sine case + for(int i = 0; i < MAX_AD_HARMONICS - 1; ++i) { +- oscilFFTfreqs[i +- + 1].real() = -hmag[i] +- * sinf(hphase[i] * (i + 1)) / 2.0f; +- oscilFFTfreqs[i +- + 1].imag() = hmag[i] +- * cosf(hphase[i] * (i + 1)) / 2.0f; ++ oscilFFTfreqs[i + 1] = ++ std::complex<float>(-hmag[i] * sinf(hphase[i] * (i + 1)) / 2.0f, ++ hmag[i] * cosf(hphase[i] * (i + 1)) / 2.0f); + } + else + for(int j = 0; j < MAX_AD_HARMONICS; ++j) { +@@ -698,10 +695,12 @@ void OscilGen::adaptiveharmonic(fft_t *f, float freq) + break; + else { + if(down) { +- f[high].real() += inf[i].real() * (1.0f - low); +- f[high].imag() += inf[i].imag() * (1.0f - low); +- f[high + 1].real() += inf[i].real() * low; +- f[high + 1].imag() += inf[i].imag() * low; ++ f[high] = ++ std::complex<float>(f[high].real() + inf[i].real() * (1.0f - low), ++ f[high].imag() + inf[i].imag() * (1.0f - low)); ++ ++ f[high + 1] = std::complex<float>(f[high + 1].real() + inf[i].real() * low, ++ f[high + 1].imag() + inf[i].imag() * low); + } + else { + hc = inf[high].real() +@@ -1112,8 +1111,9 @@ void OscilGen::getfromXML(XMLwrapper *xml) + if(xml->enterbranch("BASE_FUNCTION")) { + for(int i = 1; i < synth->oscilsize / 2; ++i) + if(xml->enterbranch("BF_HARMONIC", i)) { +- basefuncFFTfreqs[i].real() = xml->getparreal("cos", 0.0f); +- basefuncFFTfreqs[i].imag() = xml->getparreal("sin", 0.0f); ++ basefuncFFTfreqs[i] = ++ std::complex<float>(xml->getparreal("cos", 0.0f), ++ xml->getparreal("sin", 0.0f)); + xml->exitbranch(); + } + xml->exitbranch(); diff --git a/audio/zynaddsubfx/files/patch-src__Misc__Master.h b/audio/zynaddsubfx/files/patch-src__Misc__Master.h new file mode 100644 index 000000000000..67ebe230c6f9 --- /dev/null +++ b/audio/zynaddsubfx/files/patch-src__Misc__Master.h @@ -0,0 +1,11 @@ +--- src/Misc/Master.h~ 2013-10-22 18:41:37.000000000 +0300 ++++ src/Misc/Master.h 2013-10-22 18:41:53.000000000 +0300 +@@ -33,6 +33,8 @@ + + #include "../Params/Controller.h" + ++#include <pthread.h> ++ + typedef enum { + MUTEX_TRYLOCK, MUTEX_LOCK, MUTEX_UNLOCK + } lockset; diff --git a/audio/zynaddsubfx/files/patch-src__Misc__Part.h b/audio/zynaddsubfx/files/patch-src__Misc__Part.h new file mode 100644 index 000000000000..4fc764126d2a --- /dev/null +++ b/audio/zynaddsubfx/files/patch-src__Misc__Part.h @@ -0,0 +1,10 @@ +--- src/Misc/Part.h~ 2013-10-22 18:39:58.000000000 +0300 ++++ src/Misc/Part.h 2013-10-22 18:40:09.000000000 +0300 +@@ -30,6 +30,7 @@ + #include "../Misc/Microtonal.h" + + #include <list> // For the monomemnotes list. ++#include <pthread.h> + + class EffectMgr; + class ADnoteParameters; diff --git a/audio/zynaddsubfx/files/patch-src__Nio__SafeQueue.h b/audio/zynaddsubfx/files/patch-src__Nio__SafeQueue.h new file mode 100644 index 000000000000..f57ee6e94268 --- /dev/null +++ b/audio/zynaddsubfx/files/patch-src__Nio__SafeQueue.h @@ -0,0 +1,10 @@ +--- src/Nio/SafeQueue.h~ 2013-10-22 18:37:27.000000000 +0300 ++++ src/Nio/SafeQueue.h 2013-10-22 18:37:34.000000000 +0300 +@@ -2,6 +2,7 @@ + #ifndef SAFEQUEUE_H + #define SAFEQUEUE_H + #include <cstdlib> ++#include <pthread.h> + #include <semaphore.h> + + /** diff --git a/audio/zynaddsubfx/files/patch-src__UI__CMakeLists.txt b/audio/zynaddsubfx/files/patch-src__UI__CMakeLists.txt new file mode 100644 index 000000000000..274cda37ee22 --- /dev/null +++ b/audio/zynaddsubfx/files/patch-src__UI__CMakeLists.txt @@ -0,0 +1,17 @@ +CMake 2.8.12 support. + +It does not make sense to add MYFLTK_LIBRARIES (which translates to +something like "-L/usr/local/lib -lfoo -lbar") to the link interface +library of a static library like libzynaddsubfx_gui.a. + +Removing FLTK_LIBRARIES does not cause any problems either, as +GUI_LIBRARIES in src/CMakeLists.txt sets all the required GUI-related +libraries that need to be linked against the zynaddsubfx binary. +--- src/UI/CMakeLists.txt~ 2013-10-22 18:26:35.000000000 +0300 ++++ src/UI/CMakeLists.txt 2013-10-22 18:26:39.000000000 +0300 +@@ -32,5 +32,3 @@ + NioUI.cpp + WidgetPDial.cpp + ) +- +-target_link_libraries(zynaddsubfx_gui ${FLTK_LIBRARIES} ${MYFLTK_LIBRARIES}) diff --git a/audio/zynaddsubfx/pkg-plist b/audio/zynaddsubfx/pkg-plist index 057f49add14f..cb2066ab590b 100644 --- a/audio/zynaddsubfx/pkg-plist +++ b/audio/zynaddsubfx/pkg-plist @@ -451,6 +451,52 @@ bin/zynaddsubfx %%DATADIR%%/banks/SynthPiano/0069-Synth Piano 3 det.xiz %%DATADIR%%/banks/SynthPiano/0070-Synth Piano 4.xiz %%DATADIR%%/banks/SynthPiano/0071-Synth Piano 5.xiz +%%PORTDOCS%%%%DOCSDIR%%/AUTHORS.txt +%%PORTDOCS%%%%DOCSDIR%%/FAQ.txt +%%PORTDOCS%%%%DOCSDIR%%/HISTORY.txt +%%PORTDOCS%%%%DOCSDIR%%/README.txt +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/0km.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Arpeggio 1.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Arpeggio 2.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Arpeggio 3.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Arpeggio 4.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Arpeggio 5.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Arpeggio 6.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Arpeggio Dist 1.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Arpeggio Dist 2.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Arpeggio Flange 1.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Arpeggio Flange 2.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Choir Reeds.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Choir Strings SynthBrass.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Dist Guitar Strings 1.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Dist Guitar Strings 2.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Drop.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Fantasy 1.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Fantasy 2.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Glass Choir.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/HighPass Saw Strings.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Ice Rhodes Strings.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/JI12.xsz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Legatto 1.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Legatto 2.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Legatto Strings.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Octave Strings.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Organ Choir Strings.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Saw.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Space 1.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Space 2.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Split_keyboard.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/String Reverb.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Strings Reeds 1.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Strings Reeds 2.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Struck String Big Reverb 1.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Struck String Big Reverb 2.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Supersaw.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Synth Bells Choir Reverb.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Synth Piano Reverb.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Synth.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bent_synth.xmz +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/photons.xmz @dirrm %%DATADIR%%/banks/SynthPiano @dirrm %%DATADIR%%/banks/Synth @dirrm %%DATADIR%%/banks/Strings @@ -473,3 +519,5 @@ bin/zynaddsubfx @dirrm %%DATADIR%%/banks/Arpeggios @dirrm %%DATADIR%%/banks @dirrm %%DATADIR%% +%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%% +%%PORTDOCS%%@dirrm %%DOCSDIR%% |