Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Dec 2013 11:27:31 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r337406 - in head/audio/rezound: . files
Message-ID:  <201312251127.rBPBRVfs091397@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Wed Dec 25 11:27:31 2013
New Revision: 337406
URL: http://svnweb.freebsd.org/changeset/ports/337406

Log:
  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.

Added:
  head/audio/rezound/files/patch-missing-includes   (contents, props changed)
  head/audio/rezound/files/patch-src-PoolFile-TStaticPoolAccesser.h   (contents, props changed)
Modified:
  head/audio/rezound/Makefile

Modified: head/audio/rezound/Makefile
==============================================================================
--- head/audio/rezound/Makefile	Wed Dec 25 11:24:39 2013	(r337405)
+++ head/audio/rezound/Makefile	Wed Dec 25 11:27:31 2013	(r337406)
@@ -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

Added: head/audio/rezound/files/patch-missing-includes
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/rezound/files/patch-missing-includes	Wed Dec 25 11:27:31 2013	(r337406)
@@ -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"

Added: head/audio/rezound/files/patch-src-PoolFile-TStaticPoolAccesser.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/rezound/files/patch-src-PoolFile-TStaticPoolAccesser.h	Wed Dec 25 11:27:31 2013	(r337406)
@@ -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;
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312251127.rBPBRVfs091397>