aboutsummaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authoradridg <adridg@FreeBSD.org>2019-10-13 02:57:15 +0800
committeradridg <adridg@FreeBSD.org>2019-10-13 02:57:15 +0800
commit529d62b01bbc77953d9f76e5d73a0478624cdb58 (patch)
tree3fc9e6be1ff1640bc4ffc7e7d506bf98824780dd /audio
parentcec33dc027eb60add01cb72f73fc80ff14aa7f25 (diff)
downloadfreebsd-ports-gnome-529d62b01bbc77953d9f76e5d73a0478624cdb58.tar.gz
freebsd-ports-gnome-529d62b01bbc77953d9f76e5d73a0478624cdb58.tar.zst
freebsd-ports-gnome-529d62b01bbc77953d9f76e5d73a0478624cdb58.zip
Fix build of audio/kwave on -CURRENT (or with clang 9 in general).
There's a long description in the patch just added, but the error looks something like this: /tmp/v.cpp:1:27: note: constrained by private inheritance here class foo {}; class bar : private foo {}; class baz : public bar { publi... No PORTREVISION because it's no change for everyone except clang 9 users, who couldn't compile it previously. Reported by: fallout
Diffstat (limited to 'audio')
-rw-r--r--audio/kwave/files/patch-private127
1 files changed, 127 insertions, 0 deletions
diff --git a/audio/kwave/files/patch-private b/audio/kwave/files/patch-private
new file mode 100644
index 000000000000..715094f18db0
--- /dev/null
+++ b/audio/kwave/files/patch-private
@@ -0,0 +1,127 @@
+commit cb13b7153452060d919603d31ad4db94b3056f35
+Author: Adriaan de Groot <groot@kde.org>
+Date: Sat Oct 12 20:41:30 2019 +0200
+
+ Private inheritance hides base-class names.
+
+ Summary:
+ Kwave fails to compile with clang 9.0, with this kind of error message:
+
+ ===
+ In file included from /wrkdirs/usr/ports/audio/kwave/work/kwave-19.08.1/libkwave/undo/UndoDeleteAction.cpp:24:
+ /wrkdirs/usr/ports/audio/kwave/work/kwave-19.08.1/libkwave/MultiTrackReader.h:61:24: error: 'QList' is a private member of 'QList<Kwave::SampleReader *>'
+ const QList<unsigned int> &track_list,
+ ^
+ /wrkdirs/usr/ports/audio/kwave/work/kwave-19.08.1/libkwave/MultiTrackSource.h:41:36: note: constrained by private inheritance here
+ private QList<SOURCE *>
+ ^~~~~~~~~~~~~~~~~~~~~~~
+ /usr/local/include/qt5/QtCore/qlist.h:127:7: note: member is declared here
+ class QList
+ ^
+ 1 error generated.
+ ===
+
+ This can be demonstrated much more shortly with this code:
+
+ ===
+ class foo {};
+ class bar : private foo {};
+ class baz : public bar
+ {
+ public:
+ foo m_foo;
+ };
+ ===
+
+ Within baz, foo is looked up in bar, and then (because it's *private*
+ inheritance) afterwards access-control kicks in and disallows its use.
+ By fully-qualifying foo (or, in Kwave's case, QList) the name-lookup
+ happens differently, and the public (global) name is found.
+
+ There is also a description of the problem on StackOverflow,
+ https://stackoverflow.com/questions/41595208/accessing-the-name-of-a-private-inherited-class-from-a-subclass
+
+ Test Plan:
+ - still compiles
+ - packaging on FreeBSD-CURRENT, with clang 9, works again
+
+ Differential Revision: https://reviews.freebsd.org/D22002
+diff --git libkwave/MultiTrackReader.cpp libkwave/MultiTrackReader.cpp
+index aedce6bb..0053d980 100644
+--- libkwave/MultiTrackReader.cpp
++++ libkwave/MultiTrackReader.cpp
+@@ -32,7 +32,7 @@ Kwave::MultiTrackReader::MultiTrackReader()
+ //***************************************************************************
+ Kwave::MultiTrackReader::MultiTrackReader(Kwave::ReaderMode mode,
+ Kwave::SignalManager &signal_manager,
+- const QList<unsigned int> &track_list,
++ const ::QList<unsigned int> &track_list,
+ sample_index_t first,
+ sample_index_t last)
+ :Kwave::MultiTrackSource<Kwave::SampleReader, false>(0),
+diff --git libkwave/MultiTrackReader.h libkwave/MultiTrackReader.h
+index 5de02956..1d08c296 100644
+--- libkwave/MultiTrackReader.h
++++ libkwave/MultiTrackReader.h
+@@ -58,7 +58,7 @@ namespace Kwave
+ */
+ MultiTrackReader(Kwave::ReaderMode mode,
+ Kwave::SignalManager &signal_manager,
+- const QList<unsigned int> &track_list,
++ const ::QList<unsigned int> &track_list,
+ sample_index_t first, sample_index_t last);
+
+ /** Destructor */
+diff --git libkwave/MultiTrackWriter.cpp libkwave/MultiTrackWriter.cpp
+index e875f445..6c6b662a 100644
+--- libkwave/MultiTrackWriter.cpp
++++ libkwave/MultiTrackWriter.cpp
+@@ -35,7 +35,7 @@ Kwave::MultiTrackWriter::MultiTrackWriter()
+
+ //***************************************************************************
+ Kwave::MultiTrackWriter::MultiTrackWriter(Kwave::SignalManager &signal_manager,
+- const QList<unsigned int> &track_list,
++ const ::QList<unsigned int> &track_list,
+ Kwave::InsertMode mode,
+ sample_index_t left,
+ sample_index_t right)
+@@ -52,7 +52,7 @@ Kwave::MultiTrackWriter::MultiTrackWriter(Kwave::SignalManager &signal_manager,
+ Kwave::InsertMode mode)
+ :Kwave::MultiWriter()
+ {
+- QList<unsigned int> track_list = signal_manager.selectedTracks();
++ ::QList<unsigned int> track_list = signal_manager.selectedTracks();
+ sample_index_t left = 0;
+ sample_index_t right = 0;
+
+@@ -82,7 +82,7 @@ Kwave::MultiTrackWriter::~MultiTrackWriter()
+
+ //***************************************************************************
+ bool Kwave::MultiTrackWriter::init(Kwave::SignalManager &signal_manager,
+- const QList<unsigned int> &track_list,
++ const ::QList<unsigned int> &track_list,
+ Kwave::InsertMode mode,
+ sample_index_t left,
+ sample_index_t right)
+diff --git libkwave/MultiTrackWriter.h libkwave/MultiTrackWriter.h
+index df3c3086..d809680e 100644
+--- libkwave/MultiTrackWriter.h
++++ libkwave/MultiTrackWriter.h
+@@ -55,7 +55,7 @@ namespace Kwave
+ * @param right index of the last sample
+ */
+ MultiTrackWriter(Kwave::SignalManager &signal_manager,
+- const QList<unsigned int> &track_list,
++ const ::QList<unsigned int> &track_list,
+ Kwave::InsertMode mode,
+ sample_index_t left, sample_index_t right);
+
+@@ -86,7 +86,7 @@ namespace Kwave
+ * @internal
+ */
+ bool init(Kwave::SignalManager &signal_manager,
+- const QList<unsigned int> &track_list,
++ const ::QList<unsigned int> &track_list,
+ Kwave::InsertMode mode,
+ sample_index_t left, sample_index_t right);
+