commit:     cd66eef7231fccf3244372442da50e538fcf09fa
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sat Nov 30 16:37:23 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Dec  1 11:25:55 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd66eef7

games-emulation/nestopia-jg: fix C++ odr warnings

Closes: https://bugs.gentoo.org/945404
Upstream-Commit: 
https://gitlab.com/jgemu/nestopia/-/commit/7f6b5bf12e02011533c054d587dba6297defe868
Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/gentoo/pull/39533
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../nestopia-jg/files/nestopia-jg-1.52.1-odr.patch | 56 ++++++++++++++++++++++
 .../nestopia-jg/nestopia-jg-1.52.1-r1.ebuild       | 50 +++++++++++++++++++
 2 files changed, 106 insertions(+)

diff --git a/games-emulation/nestopia-jg/files/nestopia-jg-1.52.1-odr.patch 
b/games-emulation/nestopia-jg/files/nestopia-jg-1.52.1-odr.patch
new file mode 100644
index 000000000000..286dfb0394d8
--- /dev/null
+++ b/games-emulation/nestopia-jg/files/nestopia-jg-1.52.1-odr.patch
@@ -0,0 +1,56 @@
+https://bugs.gentoo.org/945404
+https://gitlab.com/jgemu/nestopia/-/commit/7f6b5bf12e02011533c054d587dba6297defe868
+
+From 7f6b5bf12e02011533c054d587dba6297defe868 Mon Sep 17 00:00:00 2001
+From: Rupert Carmichael <5050061-carmi...@users.noreply.gitlab.com>
+Date: Sat, 30 Nov 2024 11:24:58 -0500
+Subject: [PATCH] NstVideoRenderer: Move filter disable defines into the Video
+ API header
+
+---
+ src/NstVideoRenderer.cpp | 6 ------
+ src/api/NstApiVideo.hpp  | 5 +++++
+ 2 files changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/src/NstVideoRenderer.cpp b/src/NstVideoRenderer.cpp
+index 22ac092..e55d264 100644
+--- a/src/NstVideoRenderer.cpp
++++ b/src/NstVideoRenderer.cpp
+@@ -22,18 +22,12 @@
+ //
+ 
////////////////////////////////////////////////////////////////////////////////////////
+ 
+-#define NST_NO_SCALEX 1
+-#define NST_NO_HQ2X 1
+-#define NST_NO_2XSAI 1
+-#define NST_NO_XBR 1
+-
+ #include <cstring>
+ #include <cmath>
+ #include <new>
+ #include "NstCore.hpp"
+ #include "NstAssert.hpp"
+ #include "NstFpuPrecision.hpp"
+-#include "api/NstApiVideo.hpp"
+ #include "NstVideoRenderer.hpp"
+ #include "NstVideoFilterNone.hpp"
+ 
+diff --git a/src/api/NstApiVideo.hpp b/src/api/NstApiVideo.hpp
+index 4b137ae..30bd9fb 100644
+--- a/src/api/NstApiVideo.hpp
++++ b/src/api/NstApiVideo.hpp
+@@ -39,6 +39,11 @@
+ #pragma warning( disable : 4512 )
+ #endif
+ 
++#define NST_NO_SCALEX 1
++#define NST_NO_HQ2X 1
++#define NST_NO_2XSAI 1
++#define NST_NO_XBR 1
++
+ namespace Nes
+ {
+       namespace Core
+-- 
+GitLab
+

diff --git a/games-emulation/nestopia-jg/nestopia-jg-1.52.1-r1.ebuild 
b/games-emulation/nestopia-jg/nestopia-jg-1.52.1-r1.ebuild
new file mode 100644
index 000000000000..1ec464e48f55
--- /dev/null
+++ b/games-emulation/nestopia-jg/nestopia-jg-1.52.1-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+MY_PN=${PN%-*}
+MY_P=${MY_PN}-${PV}
+DESCRIPTION="Jolly Good Fork of Nestopia"
+HOMEPAGE="https://gitlab.com/jgemu/nestopia";
+if [[ "${PV}" == *9999 ]] ; then
+       inherit git-r3
+       EGIT_REPO_URI="https://gitlab.com/jgemu/${MY_PN}.git";
+else
+       
SRC_URI="https://gitlab.com/jgemu/${MY_PN}/-/archive/${PV}/${MY_P}.tar.bz2";
+       S="${WORKDIR}/${MY_P}"
+       KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+fi
+
+LICENSE="GPL-2+"
+SLOT="1"
+
+DEPEND="
+       media-libs/jg:1=
+"
+RDEPEND="
+       ${DEPEND}
+       games-emulation/jgrf
+"
+BDEPEND="
+       virtual/pkgconfig
+"
+
+PATCHES=(
+       # https://bugs.gentoo.org/945404
+       "${FILESDIR}"/${P}-odr.patch
+)
+
+src_compile() {
+       emake CXX="$(tc-getCXX)" PKG_CONFIG="$(tc-getPKG_CONFIG)"
+}
+
+src_install() {
+       emake install \
+               DESTDIR="${D}" \
+               PREFIX="${EPREFIX}"/usr \
+               DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
+               LIBDIR="${EPREFIX}/usr/$(get_libdir)"
+}

Reply via email to