commit:     71e601ce9f753d4f83793e7b299e52beb5c69a30
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Mon Sep  2 18:09:00 2024 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Thu Sep  5 04:07:46 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71e601ce

app-emulation/punes: fix compilation with qt 6.7

Apply upstream patch. Drop support for qt5.

Closes: https://bugs.gentoo.org/938933
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/38386
Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>

 .../punes/files/punes-0.111-qt6.7_Q_OBJECT.patch   | 17 +++++++
 app-emulation/punes/punes-0.111-r1.ebuild          | 56 ++++++++++++++++++++++
 2 files changed, 73 insertions(+)

diff --git a/app-emulation/punes/files/punes-0.111-qt6.7_Q_OBJECT.patch 
b/app-emulation/punes/files/punes-0.111-qt6.7_Q_OBJECT.patch
new file mode 100644
index 000000000000..4b368c980112
--- /dev/null
+++ b/app-emulation/punes/files/punes-0.111-qt6.7_Q_OBJECT.patch
@@ -0,0 +1,17 @@
+https://github.com/punesemu/puNES/commit/6e51b1a6107ad3de97edd40ae4ec2d41b32d804f.patch
+From: Cosima Neidahl <[email protected]>
+Date: Fri, 31 May 2024 14:48:50 +0200
+Subject: [PATCH] Fix compatibility with Qt 6.7.1 (#403)
+
+Upstream QTBUG-105023 fix made it mandatory that arguments to 
QObject::findChild[ren] calls must be Q_OBJECTs.
+--- a/src/gui/dlgStdPad.hpp
++++ b/src/gui/dlgStdPad.hpp
+@@ -47,6 +47,8 @@ typedef struct _joy_list {
+ extern _joy_list joy_list;
+ 
+ class pixmapButton: public QPushButton {
++      Q_OBJECT
++
+       private:
+               QPixmap pixmap;
+ 

diff --git a/app-emulation/punes/punes-0.111-r1.ebuild 
b/app-emulation/punes/punes-0.111-r1.ebuild
new file mode 100644
index 000000000000..8396e9844c88
--- /dev/null
+++ b/app-emulation/punes/punes-0.111-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake xdg
+
+DESCRIPTION="Nintendo Entertainment System (NES) emulator"
+HOMEPAGE="https://github.com/punesemu/puNES";
+SRC_URI="https://github.com/punesemu/puNES/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+S="${WORKDIR}/puNES-${PV}"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X cg ffmpeg"
+
+RDEPEND="
+       dev-qt/qtbase:6[gui,network,opengl,widgets]
+       dev-qt/qtsvg:6
+       media-libs/alsa-lib
+       media-libs/libglvnd[X?]
+       virtual/glu
+       virtual/udev
+       X? (
+               x11-libs/libX11
+               x11-libs/libXrandr
+       )
+       cg? ( media-gfx/nvidia-cg-toolkit )
+       ffmpeg? ( media-video/ffmpeg:= )
+"
+
+DEPEND="
+       ${RDEPEND}
+       X? ( x11-base/xorg-proto )"
+BDEPEND="
+       virtual/pkgconfig
+       dev-qt/qttools[linguist]
+"
+
+PATCHES=(
+       "${FILESDIR}/punes-0.111-FULLSCREEN_RESFREQ-fix.patch"
+       "${FILESDIR}/punes-0.111-qt6.7_Q_OBJECT.patch"
+)
+
+src_configure() {
+       local mycmakeargs=(
+               -DENABLE_GIT_INFO=OFF
+               -DENABLE_QT6_LIBS=ON
+               -DDISABLE_PORTABLE_MODE=OFF
+               -DENABLE_FFMPEG=$(usex ffmpeg)
+               -DENABLE_FULLSCREEN_RESFREQ=$(usex X)
+               -DENABLE_OPENGL_CG=$(usex cg)
+       )
+       cmake_src_configure
+}

Reply via email to