commit: 8dc4c36d3c72ea61db29ba394a555be801893603 Author: Z. Liu <zhixu.liu <AT> gmail <DOT> com> AuthorDate: Tue Jan 21 06:13:09 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Mon Mar 24 07:34:12 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8dc4c36d
media-sound/audacity: fixed build w/ clang Closes: https://bugs.gentoo.org/915041 Signed-off-by: Z. Liu <zhixu.liu <AT> gmail.com> Closes: https://github.com/gentoo/gentoo/pull/40244 Signed-off-by: Sam James <sam <AT> gentoo.org> media-sound/audacity/audacity-3.4.2-r1.ebuild | 5 ++++- ...o-not-include-template-for-clang-compiler.patch | 24 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/media-sound/audacity/audacity-3.4.2-r1.ebuild b/media-sound/audacity/audacity-3.4.2-r1.ebuild index 5e345770b011..2d182f4586b8 100644 --- a/media-sound/audacity/audacity-3.4.2-r1.ebuild +++ b/media-sound/audacity/audacity-3.4.2-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -138,6 +138,9 @@ PATCHES=( # Fix build with USE="-lv2" "${FILESDIR}/audacity-3.4.2-fix-build-with-use-lv2-off.patch" + + # Fix build with clang, undefined reference to `typeinfo for wxNavigationEnabled<wxWindow>' + "${FILESDIR}/audacity-3.4.2-do-not-include-template-for-clang-compiler.patch" ) src_prepare() { diff --git a/media-sound/audacity/files/audacity-3.4.2-do-not-include-template-for-clang-compiler.patch b/media-sound/audacity/files/audacity-3.4.2-do-not-include-template-for-clang-compiler.patch new file mode 100644 index 000000000000..c0dc7ecf3a8d --- /dev/null +++ b/media-sound/audacity/files/audacity-3.4.2-do-not-include-template-for-clang-compiler.patch @@ -0,0 +1,24 @@ +https://github.com/audacity/audacity/issues/4614 + +When compile w/ clang, link failed with: + + ld.lld: error: undefined symbol: typeinfo for wxNavigationEnabled<wxWindow> + +so disable "extern ..." if compiler is clang + +see also gentoo bug: https://bugs.gentoo.org/915041 + +diff --git a/src/ListNavigationPanel.h b/src/ListNavigationPanel.h +index 1618d78..e04cc23 100644 +--- a/src/ListNavigationPanel.h ++++ b/src/ListNavigationPanel.h +@@ -13,7 +13,9 @@ + #include <wx/window.h> + #include <wx/containr.h> + ++#if !defined(__clang__) + extern template class WXDLLIMPEXP_CORE wxNavigationEnabled<wxWindow>; ++#endif + + #include "ListNavigationEnabled.h" +