Unverified Commit cf5ed781 authored by kuflierl's avatar kuflierl
Browse files

fceux: fix for qt6, update to unstable-2026-04-13, adopt

parent 86a7eb48
Loading
Loading
Loading
Loading
+37 −0
Original line number Diff line number Diff line
From 3635c26d6d5ec08b197c4903ed46a3221e574899 Mon Sep 17 00:00:00 2001
From: Lukas Sabota <lukas@lwsabota.com>
Date: Sun, 19 Apr 2026 13:05:51 -0400
Subject: [PATCH] cmake: fix qt6 build on linux

---
 src/CMakeLists.txt | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7a432669..16386a70 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -47,8 +47,6 @@ if ( ${QT} EQUAL 6 )
 	find_package( Qt6 COMPONENTS Help QUIET)
 	find_package( Qt6 COMPONENTS Qml)
 	find_package( Qt6 COMPONENTS UiTools)
-	add_definitions( ${Qt6Widgets_DEFINITIONS} ${Qt6Qml_DEFINITIONS} ${Qt6Network_DEFINITIONS} ${Qt6Help_DEFINITIONS} ${Qt6OpenGLWidgets_DEFINITIONS} )
-	# add_definitions(${Qt6UiTools_DEFINITIONS}) # Leave ${Qt6UiTools_DEFINITIONS} out as this is causing a build error
 	include_directories( ${Qt6Widgets_INCLUDE_DIRS} ${Qt6Qml_INCLUDE_DIRS} ${Qt6UiTools_INCLUDE_DIRS} ${Qt6Network_INCLUDE_DIRS} ${Qt6Help_INCLUDE_DIRS} ${Qt6OpenGLWidgets_INCLUDE_DIRS} )
 
 	if (${Qt6Help_FOUND})
@@ -757,6 +755,11 @@ target_link_libraries( ${APP_NAME}
  	${SYS_LIBS}
 )
 
+if(NOT MSVC)
+	# Add minizip subdirectory so #include<unzip.h> works without the "minizip" subdirectory in the directive
+	target_include_directories(${APP_NAME} PRIVATE ${MINIZIP_INCLUDE_DIRS}/minizip)
+endif()
+
 if (WIN32)
 	#   target_link_libraries( ${APP_NAME} wsock32 ws2_32 )
 
-- 
2.51.2
+0 −39
Original line number Diff line number Diff line
From 8c648b4a68e5ebadb4d0f08728e44078954cebae Mon Sep 17 00:00:00 2001
From: kuflierl <41301536+kuflierl@users.noreply.github.com>
Date: Fri, 27 Mar 2026 01:28:17 +0100
Subject: [PATCH] fix: build with minizip 1.3.2

---
 src/drivers/Qt/AboutWindow.cpp | 2 +-
 src/drivers/Qt/fceuWrapper.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/drivers/Qt/AboutWindow.cpp b/src/drivers/Qt/AboutWindow.cpp
index 025cf360..5638a3c1 100644
--- a/src/drivers/Qt/AboutWindow.cpp
+++ b/src/drivers/Qt/AboutWindow.cpp
@@ -23,7 +23,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <string>
-#include <unzip.h>
+#include <minizip/unzip.h>
 
 #ifdef _S9XLUA_H
 #include <lua.h>
diff --git a/src/drivers/Qt/fceuWrapper.cpp b/src/drivers/Qt/fceuWrapper.cpp
index 8d241258..5e48eaf7 100644
--- a/src/drivers/Qt/fceuWrapper.cpp
+++ b/src/drivers/Qt/fceuWrapper.cpp
@@ -23,7 +23,7 @@
 #include <stdlib.h>
 #include <stdint.h>
 #include <limits.h>
-#include <unzip.h>
+#include <minizip/unzip.h>
 
 #include <QFileInfo>
 #include <QStyleFactory>
-- 
2.51.2
+6 −5
Original line number Diff line number Diff line
@@ -31,17 +31,18 @@ assert lib.elem ___qtVersion [
];
stdenv.mkDerivation (finalAttrs: {
  pname = "fceux";
  version = "2.6.6-unstable-2025-01-20";
  version = "2.6.6-unstable-2026-04-13";

  src = fetchFromGitHub {
    owner = "TASEmulators";
    repo = "fceux";
    rev = "2b8f6e76271341616920bb7e0c54ee48570783d3";
    hash = "sha256-2QDiAk2HO9oQ1gNvc7QFZSCbWkCDYW5OJWT8f4bmXyg=";
    rev = "1e1168db6662ce86848460b5d078e17c6dc6e2ce";
    hash = "sha256-FHNMDvEMgKnZjpm0DEN2rj0aI3T244zfcS+NEYWytaU=";
  };

  patches = [
    ./0001-fix-build-with-minizip-1.3.2.patch
    # https://github.com/TASEmulators/fceux/pull/834
    ./0001-cmake-fix-qt6-build-on-linux.patch
  ];

  nativeBuildInputs = [
@@ -76,7 +77,7 @@ stdenv.mkDerivation (finalAttrs: {
    changelog = "https://github.com/TASEmulators/fceux/blob/${finalAttrs.src.rev}/changelog.txt";
    license = with lib.licenses; [ gpl2Plus ];
    mainProgram = "fceux";
    maintainers = [ ];
    maintainers = with lib.maintainers; [ kuflierl ];
    platforms = lib.platforms.linux;
  };
})