Date: Sun, 4 Jun 2023 16:21:57 GMT From: Dimitry Andric <dim@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: c7753b07bba7 - main - audio/espeak-ng: fix build with clang 16 Message-ID: <202306041621.354GLvSL024971@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=c7753b07bba7d1a4d1b60c8e83758ef25d909cc5 commit c7753b07bba7d1a4d1b60c8e83758ef25d909cc5 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2023-05-18 12:09:48 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2023-06-04 16:21:24 +0000 audio/espeak-ng: fix build with clang 16 Since clang 16 (and gcc 11) the default C++ standard is now gnu++17. Because audio/espeak-ng's Makefile does not explicitly set its C++ standard, this leads to an error: src/speechPlayer/src/speechWaveGenerator.cpp:197:56: error: reference to 'sample' is ambiguous unsigned int generate(const unsigned int sampleCount, sample* sampleBuf) { ^ src/speechPlayer/src/sample.h:23:3: note: candidate found by name lookup is 'sample' } sample; ^ /usr/include/c++/v1/__algorithm/sample.h:95:17: note: candidate found by name lookup is 'std::sample' _SampleIterator sample(_PopulationIterator __first, ^ This is because speechWaveGenerator.cpp has "using namespace std;" at the top, so "sample" can match both "std::sample" (from <algorithm>) and "struct sample" (from sample.h). Qualify "sample" as "::sample" to work around the problem. PR: 271486 Approved by: maintainer timeout (2 weeks) MFH: 2023Q2 --- audio/espeak-ng/Makefile | 2 +- .../files/patch-src_speechPlayer_src_speechWaveGenerator.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/audio/espeak-ng/Makefile b/audio/espeak-ng/Makefile index 1b5c28c6a07b..a51c5f5045b1 100644 --- a/audio/espeak-ng/Makefile +++ b/audio/espeak-ng/Makefile @@ -1,6 +1,6 @@ PORTNAME= espeak-ng PORTVERSION= 1.51.1 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= audio #MASTER_SITES= https://github.com/espeak-ng/${PORTNAME}/releases/download/${PORTVERSION}/ diff --git a/audio/espeak-ng/files/patch-src_speechPlayer_src_speechWaveGenerator.cpp b/audio/espeak-ng/files/patch-src_speechPlayer_src_speechWaveGenerator.cpp new file mode 100644 index 000000000000..19f1081e6c02 --- /dev/null +++ b/audio/espeak-ng/files/patch-src_speechPlayer_src_speechWaveGenerator.cpp @@ -0,0 +1,11 @@ +--- src/speechPlayer/src/speechWaveGenerator.cpp.orig 2022-06-21 14:53:53 UTC ++++ src/speechPlayer/src/speechWaveGenerator.cpp +@@ -194,7 +194,7 @@ class SpeechWaveGeneratorImpl: public SpeechWaveGenera + SpeechWaveGeneratorImpl(int sr): sampleRate(sr), voiceGenerator(sr), fricGenerator(), cascade(sr), parallel(sr), frameManager(NULL) { + } + +- unsigned int generate(const unsigned int sampleCount, sample* sampleBuf) { ++ unsigned int generate(const unsigned int sampleCount, ::sample* sampleBuf) { + if(!frameManager) return 0; + double val=0; + for(unsigned int i=0;i<sampleCount;++i) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202306041621.354GLvSL024971>