git: 73b6e876a9d3 - main - multimedia/phonon: Switch to upstream's fix for clang 16 build issues
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 05 Aug 2023 15:03:36 UTC
The branch main has been updated by rakuco: URL: https://cgit.FreeBSD.org/ports/commit/?id=73b6e876a9d3bb44fb7560c5efd99f9fe5f334b7 commit 73b6e876a9d3bb44fb7560c5efd99f9fe5f334b7 Author: Raphael Kubo da Costa <rakuco@FreeBSD.org> AuthorDate: 2023-08-05 15:01:50 +0000 Commit: Raphael Kubo da Costa <rakuco@FreeBSD.org> CommitDate: 2023-08-05 15:03:07 +0000 multimedia/phonon: Switch to upstream's fix for clang 16 build issues Instead of passing a compiler flag to work around a clang 16 build issue, adopt the fix that dim@ landed upstream that fixes the code in question. PR: 272029 Approved by: kde (arrowd) Differential Revision: https://reviews.freebsd.org/D41307 --- multimedia/phonon/Makefile | 9 ++---- ...-069d5a3eb81bcbc730e44c27a0d060a85cf9213d.patch | 36 ++++++++++++++++++++++ 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/multimedia/phonon/Makefile b/multimedia/phonon/Makefile index d055f723c397..6c7421ffbb64 100644 --- a/multimedia/phonon/Makefile +++ b/multimedia/phonon/Makefile @@ -1,5 +1,6 @@ PORTNAME= phonon DISTVERSION= 4.11.1 +PORTREVISION= 1 CATEGORIES= multimedia kde MASTER_SITES= KDE/stable/${PORTNAME}/${DISTVERSION} DIST_SUBDIR= KDE/phonon @@ -32,10 +33,4 @@ PULSEAUDIO_USES= gnome PULSEAUDIO_USE= GNOME=glib20 PULSEAUDIO_CMAKE_BOOL= WITH_PulseAudio -.include <bsd.port.pre.mk> - -.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 160 -CXXFLAGS+= -Wno-error=enum-constexpr-conversion -.endif - -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/multimedia/phonon/files/patch-069d5a3eb81bcbc730e44c27a0d060a85cf9213d.patch b/multimedia/phonon/files/patch-069d5a3eb81bcbc730e44c27a0d060a85cf9213d.patch new file mode 100644 index 000000000000..59cb1412f32c --- /dev/null +++ b/multimedia/phonon/files/patch-069d5a3eb81bcbc730e44c27a0d060a85cf9213d.patch @@ -0,0 +1,36 @@ +From 069d5a3eb81bcbc730e44c27a0d060a85cf9213d Mon Sep 17 00:00:00 2001 +From: Dimitry Andric <dimitry@andric.com> +Date: Sun, 16 Jul 2023 15:17:39 +0200 +Subject: [PATCH] Future-proof build fix for clang > 16 + +Clang is intending to remove the `-Wno-enum-constexpr-conversion` flag +in the future, because it can invoke undefined behavior. + +To avoid the "integer value NNNN is outside the valid range of values +[0, 7] for the enumeration type 'ObjectDescriptionType'" warnings, +explicitly specify that the `ObjectDescriptionType` enum uses `unsigned` +as the underlying type. + +This also allows to remove the CMake patch that added the +`-Wno-enum-constexpr-conversion` flag. +--- + phonon/experimental/CMakeLists.txt | 4 ---- + phonon/objectdescription.h | 2 +- + 2 files changed, 1 insertion(+), 5 deletions(-) + +diff --git a/phonon/objectdescription.h b/phonon/objectdescription.h +index 97fec2e79..6ce92de54 100644 +--- phonon/objectdescription.h ++++ phonon/objectdescription.h +@@ -43,7 +43,7 @@ namespace Phonon + * + * \ingroup Backend + */ +- enum ObjectDescriptionType ++ enum ObjectDescriptionType : unsigned + { + /** + * Audio output devices. This can be soundcards (with different drivers), soundservers or +-- +GitLab +