git: ad4545da1094 - main - audio/mixxx: Fix Qt5 build

From: Jose Alonso Cardenas Marquez <acm_at_FreeBSD.org>
Date: Fri, 04 Jul 2025 17:29:20 UTC
The branch main has been updated by acm:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ad4545da109419160b5c8d35db1753ae4e52637e

commit ad4545da109419160b5c8d35db1753ae4e52637e
Author:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
AuthorDate: 2025-07-04 17:28:32 +0000
Commit:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
CommitDate: 2025-07-04 17:28:32 +0000

    audio/mixxx: Fix Qt5 build
    
    Reported by:    pkg-fallout
---
 audio/mixxx/Makefile                               |  1 +
 .../files/patch-src_widget_wcoverartlabel.cpp      | 25 ++++++++++++++++++++++
 2 files changed, 26 insertions(+)

diff --git a/audio/mixxx/Makefile b/audio/mixxx/Makefile
index 547b2fbee038..84997214e63b 100644
--- a/audio/mixxx/Makefile
+++ b/audio/mixxx/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	mixxx
 DISTVERSION=	2.5.2
+PORTREVISION=	1
 CATEGORIES=	audio
 
 MAINTAINER=	acm@FreeBSD.org
diff --git a/audio/mixxx/files/patch-src_widget_wcoverartlabel.cpp b/audio/mixxx/files/patch-src_widget_wcoverartlabel.cpp
new file mode 100644
index 000000000000..79b076cc427b
--- /dev/null
+++ b/audio/mixxx/files/patch-src_widget_wcoverartlabel.cpp
@@ -0,0 +1,25 @@
+--- src/widget/wcoverartlabel.cpp.orig	2025-07-04 17:25:50 UTC
++++ src/widget/wcoverartlabel.cpp
+@@ -70,11 +70,9 @@ void WCoverArtLabel::setPixmapAndResize(const QPixmap&
+         m_fullSizeCover = px;
+         setPixmap(m_loadedCover);
+     }
+-#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
+-    QSize newSize = pixmap().size() / devicePixelRatioF();
+-#else
++
+     QSize newSize = pixmap()->size() / devicePixelRatioF();
+-#endif
++
+     // add the frame so the entire pixmap is visible
+     newSize += QSize(frameWidth() * 2, frameWidth() * 2);
+     if (size() != newSize) {
+@@ -92,7 +90,7 @@ void WCoverArtLabel::setMaxSize(const QSize newSize) {
+     // Skip resizing the pixmap and label if the pixmap already fits.
+     // Check if we got more space in one dimension and don't need it
+     // for the other.
+-    const QSize pixmapSize = pixmap().size() / devicePixelRatioF();
++    const QSize pixmapSize = pixmap()->size() / devicePixelRatioF();
+     if (m_pixmapSizeMax == pixmapSize ||
+             (m_pixmapSizeMax.height() == pixmapSize.height() &&
+                     m_pixmapSizeMax.width() > pixmapSize.width()) ||