diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2013-12-25 11:27:31 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2013-12-25 11:27:31 +0000 |
commit | ba425b79d1a328a1bd071e468f6b703e124da945 (patch) | |
tree | 9cfac80c57a753f37f7e73e04cf89fc1a7b66dd8 /audio | |
parent | - Respect CC/CFLAGS (diff) |
Fix compilation problems with Clang (inaccurate usage of type qualifiers,
lack of this->, some missing #include's) that could be patched via simple
sed(1) calls and one trivial patch. Linking still fails, and so does the
build with GCC 4.6+; this would be fixed in a separate commit, along with
other issues with the port (dependency on restricted LAME codec, usage of
somewhat old FOX v1.4).
While here, convert large number of optional LIB_DEPENDS conditionals to
helper knobs, reword LARGEFILE_DESC, do not bogusly augment CONFIGURE_ENV,
and stagify.
For users that have ReZound package installed, this commit does not bring
any visible changes, and should not be merged to any "stable" or quarterly
branches alone.
Notes
Notes:
svn path=/head/; revision=337406
Diffstat (limited to 'audio')
-rw-r--r-- | audio/rezound/Makefile | 78 | ||||
-rw-r--r-- | audio/rezound/files/patch-missing-includes | 42 | ||||
-rw-r--r-- | audio/rezound/files/patch-src-PoolFile-TStaticPoolAccesser.h | 20 |
3 files changed, 87 insertions, 53 deletions
diff --git a/audio/rezound/Makefile b/audio/rezound/Makefile index ce779b0bb76b..eb3c7c8a35bd 100644 --- a/audio/rezound/Makefile +++ b/audio/rezound/Makefile @@ -15,75 +15,38 @@ LICENSE= GPLv2 LIB_DEPENDS= libFOX-1.4.so:${PORTSDIR}/x11-toolkits/fox14 USES= bison -NO_STAGE= yes GNU_CONFIGURE= yes CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib CONFIGURE_ARGS= --disable-alsa -CONFIGURE_ENV+= ac_cv_path_RESWRAP=${LOCALBASE}/bin/fox-1.4/reswrap MAKE_JOBS_UNSAFE= yes +CONFIGURE_ENV= ac_cv_path_RESWRAP=${LOCALBASE}/bin/fox-1.4/reswrap OPTIONS_DEFINE= LARGEFILE JACK AUDIOFILE PORTAUDIO OGG VORBIS FLAC FFTW \ SOUNDTOUCH LADSPA LAME CDRDAO DOCS BROKEN_NLS OPTIONS_DEFAULT= AUDIOFILE PORTAUDIO OGG VORBIS FLAC SOUNDTOUCH \ LADSPA LAME -LARGEFILE_DESC= 64-bit file I/O support +LARGEFILE_DESC= Use 64-bit file I/O FFTW_DESC= Use fast Fourier transform routines CDRDAO_DESC= Burning audio files to CD support BROKEN_NLS_DESC= ${NLS_DESC} (broken!) -.include <bsd.port.options.mk> - -.if ${PORT_OPTIONS:MLARGEFILE} -CONFIGURE_ARGS+= --enable-largefile -.endif - -.if ${PORT_OPTIONS:MJACK} -LIB_DEPENDS+= libjack.so:${PORTSDIR}/audio/jack -.endif - -.if ${PORT_OPTIONS:MAUDIOFILE} -LIB_DEPENDS+= libaudiofile.so:${PORTSDIR}/audio/libaudiofile -.endif - -.if ${PORT_OPTIONS:MPORTAUDIO} -LIB_DEPENDS+= libportaudio.so:${PORTSDIR}/audio/portaudio -.endif - -.if ${PORT_OPTIONS:MOGG} -LIB_DEPENDS+= libogg.so:${PORTSDIR}/audio/libogg -.endif - -.if ${PORT_OPTIONS:MVORBIS} -LIB_DEPENDS+= libvorbis.so:${PORTSDIR}/audio/libvorbis -.endif +LARGEFILE_CONFIGURE_ON= --enable-largefile +JACK_LIB_DEPENDS= libjack.so:${PORTSDIR}/audio/jack +AUDIOFILE_LIB_DEPENDS= libaudiofile.so:${PORTSDIR}/audio/libaudiofile +PORTAUDIO_LIB_DEPENDS= libportaudio.so:${PORTSDIR}/audio/portaudio +OGG_LIB_DEPENDS= libogg.so:${PORTSDIR}/audio/libogg +VORBIS_LIB_DEPENDS= libvorbis.so:${PORTSDIR}/audio/libvorbis +FLAC_LIB_DEPENDS= libFLAC.so:${PORTSDIR}/audio/flac +FFTW_LIB_DEPENDS= libfftw.so:${PORTSDIR}/math/fftw +SOUNDTOUCH_LIB_DEPENDS= libSoundTouch.so:${PORTSDIR}/audio/soundtouch +LADSPA_RUN_DEPENDS= ${LOCALBASE}/lib/ladspa/amp.so:${PORTSDIR}/audio/ladspa +LADSPA_CONFIGURE_OFF= --disable-ladspa +LAME_RUN_DEPENDS= lame:${PORTSDIR}/audio/lame +CDRDAO_RUN_DEPENDS= cdrdao:${PORTSDIR}/sysutils/cdrdao -.if ${PORT_OPTIONS:MFLAC} -LIB_DEPENDS+= libFLAC.so:${PORTSDIR}/audio/flac -.endif - -.if ${PORT_OPTIONS:MFFTW} -LIB_DEPENDS+= libfftw.so:${PORTSDIR}/math/fftw -.endif - -.if ${PORT_OPTIONS:MSOUNDTOUCH} -LIB_DEPENDS+= libSoundTouch.so:${PORTSDIR}/audio/soundtouch -.endif - -.if ${PORT_OPTIONS:MLADSPA} -RUN_DEPENDS+= ${LOCALBASE}/lib/ladspa/amp.so:${PORTSDIR}/audio/ladspa -.else -CONFIGURE_ARGS+= --disable-ladspa -.endif - -.if ${PORT_OPTIONS:MLAME} -RUN_DEPENDS+= lame:${PORTSDIR}/audio/lame -.endif - -.if ${PORT_OPTIONS:MCDRDAO} -RUN_DEPENDS+= cdrdao:${PORTSDIR}/sysutils/cdrdao -.endif +.include <bsd.port.options.mk> # NLS support is broken as of recent versions of libstdc++; rezound dies at # startup with "locale::facet::_S_create_c_locale name not valid" exception @@ -120,6 +83,15 @@ post-patch: .SILENT ${WRKSRC}/src/backend/Remaster/Makefile.in \ ${WRKSRC}/src/backend/LADSPA/Makefile.in \ ${WRKSRC}/src/frontend_fox/Makefile.in +# Fix some sloppy C++ coding which upsets Clang + ${REINPLACE_CMD} -e '/&string_to_anytype/s,static ,,' \ + ${WRKSRC}/src/misc/CNestedDataFile/anytype.h + ${REINPLACE_CMD} -e 's,push_back((,this->&,' \ + ${WRKSRC}/src/misc/auto_array.h + ${REINPLACE_CMD} -e 's,overflowWrite(,this->&,' \ + ${WRKSRC}/src/PoolFile/TPoolAccesser.cpp + ${REINPLACE_CMD} -e 's,map<string,map<const string,' \ + ${WRKSRC}/src/PoolFile/TPoolFile.cpp .if ${PORT_OPTIONS:MDOCS} ${REINPLACE_CMD} -e '/AUTHORS/d; /COPYING/d' ${WRKSRC}/Makefile.in .else diff --git a/audio/rezound/files/patch-missing-includes b/audio/rezound/files/patch-missing-includes new file mode 100644 index 000000000000..6298f4c17af6 --- /dev/null +++ b/audio/rezound/files/patch-missing-includes @@ -0,0 +1,42 @@ +--- src/backend/CPortAudioSoundPlayer.cpp.orig ++++ src/backend/CPortAudioSoundPlayer.cpp +@@ -23,6 +23,7 @@ + #ifdef ENABLE_PORTAUDIO + + #include <stdio.h> ++#include <string.h> + + #include <stdexcept> + +--- src/backend/CPortAudioSoundRecorder.cpp.orig ++++ src/backend/CPortAudioSoundRecorder.cpp +@@ -22,6 +22,8 @@ + + #ifdef ENABLE_PORTAUDIO + ++#include <cstdio> ++ + #include <stdexcept> + + #include "settings.h" +--- src/backend/Generate/CGenerateNoiseAction.cpp.orig ++++ src/backend/Generate/CGenerateNoiseAction.cpp +@@ -23,6 +23,8 @@ + + #include "../CActionParameters.h" + ++#include <cstdlib> ++ + CGenerateNoiseAction::CGenerateNoiseAction(const AActionFactory *factory,const CActionSound *actionSound,const double _noiseLength,const double _volume,const NoiseTypes _noiseType,const StereoImage _stereoImage,const double _maxParticleVelocity): + AAction(factory,actionSound), + noiseLength(_noiseLength), // seconds +--- src/backend/Remaster/CAdaptiveNormalizeAction.cpp.orig ++++ src/backend/Remaster/CAdaptiveNormalizeAction.cpp +@@ -20,6 +20,7 @@ + + #include "CAdaptiveNormalizeAction.h" + ++#include <cstdio> + #include <utility> + + #include "../CActionParameters.h" diff --git a/audio/rezound/files/patch-src-PoolFile-TStaticPoolAccesser.h b/audio/rezound/files/patch-src-PoolFile-TStaticPoolAccesser.h new file mode 100644 index 000000000000..3d83569443c2 --- /dev/null +++ b/audio/rezound/files/patch-src-PoolFile-TStaticPoolAccesser.h @@ -0,0 +1,20 @@ +--- src/PoolFile/TStaticPoolAccesser.h.orig ++++ src/PoolFile/TStaticPoolAccesser.h +@@ -43,7 +43,7 @@ public: + + + // stream-like access methods +- void read(pool_element_t buffer[],const l_addr_t count) const; ++ void read(pool_element_t buffer[],l_addr_t count) const; + void write(const pool_element_t buffer[],const l_addr_t count); + + void seek(const l_addr_t where); +@@ -112,7 +112,7 @@ public: + mutable l_addr_t position; + + +- void overflowWrite(const pool_element_t buffer[],const l_addr_t count,const bool append); ++ void overflowWrite(const pool_element_t buffer[],l_addr_t count,const bool append); + + void cacheBlock(const l_addr_t where) const; + |