From 8dc06ce8e9c092b3ceeec9865afac68ae54e54cb Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sat, 8 Jul 2023 17:14:34 -0300 Subject: ares: 131 -> 132 --- .../bsnes/ares/000-dont-rebuild-on-install.patch | 22 ---------- .../bsnes/ares/001-dont-rebuild-on-install.patch | 22 ++++++++++ .../emulators/bsnes/ares/001-fix-ruby.patch | 24 ----------- .../emulators/bsnes/ares/002-fix-ruby.diff | 24 +++++++++++ .../bsnes/ares/002-sips-to-png2icns.patch | 39 ------------------ .../emulators/bsnes/ares/003-darwin-specific.patch | 48 ++++++++++++++++++++++ .../bsnes/ares/003-fix-darwin-install.patch | 23 ----------- pkgs/applications/emulators/bsnes/ares/default.nix | 37 ++++++++--------- 8 files changed, 110 insertions(+), 129 deletions(-) delete mode 100644 pkgs/applications/emulators/bsnes/ares/000-dont-rebuild-on-install.patch create mode 100644 pkgs/applications/emulators/bsnes/ares/001-dont-rebuild-on-install.patch delete mode 100644 pkgs/applications/emulators/bsnes/ares/001-fix-ruby.patch create mode 100644 pkgs/applications/emulators/bsnes/ares/002-fix-ruby.diff delete mode 100644 pkgs/applications/emulators/bsnes/ares/002-sips-to-png2icns.patch create mode 100644 pkgs/applications/emulators/bsnes/ares/003-darwin-specific.patch delete mode 100644 pkgs/applications/emulators/bsnes/ares/003-fix-darwin-install.patch (limited to 'pkgs/applications/emulators/bsnes') diff --git a/pkgs/applications/emulators/bsnes/ares/000-dont-rebuild-on-install.patch b/pkgs/applications/emulators/bsnes/ares/000-dont-rebuild-on-install.patch deleted file mode 100644 index 7b6bbfc21bdc2..0000000000000 --- a/pkgs/applications/emulators/bsnes/ares/000-dont-rebuild-on-install.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 65cc7647110edd768e7baa7991143014316e655a Mon Sep 17 00:00:00 2001 -From: Madoura <93990818+Madouura@users.noreply.github.com> -Date: Mon, 9 May 2022 10:17:06 -0500 -Subject: [PATCH] Update GNUmakefile - ---- - desktop-ui/GNUmakefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/desktop-ui/GNUmakefile b/desktop-ui/GNUmakefile -index 8e27b11d3..0bee561fb 100644 ---- a/desktop-ui/GNUmakefile -+++ b/desktop-ui/GNUmakefile -@@ -106,7 +106,7 @@ endif - $(call rdelete,$(object.path)) - $(call rdelete,$(output.path)) - --install: all -+install: - ifeq ($(platform),windows) - $(call mkdir,$(prefix)/$(name)/) - else ifeq ($(shell id -un),root) diff --git a/pkgs/applications/emulators/bsnes/ares/001-dont-rebuild-on-install.patch b/pkgs/applications/emulators/bsnes/ares/001-dont-rebuild-on-install.patch new file mode 100644 index 0000000000000..7b6bbfc21bdc2 --- /dev/null +++ b/pkgs/applications/emulators/bsnes/ares/001-dont-rebuild-on-install.patch @@ -0,0 +1,22 @@ +From 65cc7647110edd768e7baa7991143014316e655a Mon Sep 17 00:00:00 2001 +From: Madoura <93990818+Madouura@users.noreply.github.com> +Date: Mon, 9 May 2022 10:17:06 -0500 +Subject: [PATCH] Update GNUmakefile + +--- + desktop-ui/GNUmakefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/desktop-ui/GNUmakefile b/desktop-ui/GNUmakefile +index 8e27b11d3..0bee561fb 100644 +--- a/desktop-ui/GNUmakefile ++++ b/desktop-ui/GNUmakefile +@@ -106,7 +106,7 @@ endif + $(call rdelete,$(object.path)) + $(call rdelete,$(output.path)) + +-install: all ++install: + ifeq ($(platform),windows) + $(call mkdir,$(prefix)/$(name)/) + else ifeq ($(shell id -un),root) diff --git a/pkgs/applications/emulators/bsnes/ares/001-fix-ruby.patch b/pkgs/applications/emulators/bsnes/ares/001-fix-ruby.patch deleted file mode 100644 index 86f548389259c..0000000000000 --- a/pkgs/applications/emulators/bsnes/ares/001-fix-ruby.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -Naur source-old/ruby/GNUmakefile source-new/ruby/GNUmakefile ---- source-old/ruby/GNUmakefile 1969-12-31 21:00:01.000000000 -0300 -+++ source-new/ruby/GNUmakefile 2022-11-13 22:43:09.700197748 -0300 -@@ -11,17 +11,9 @@ - ruby += audio.openal - ruby += input.quartz #input.carbon - else ifeq ($(platform),linux) -- pkg_check = $(if $(shell pkg-config $1 && echo 1),$2) -- ruby += video.glx video.glx2 video.xshm -- ruby += $(call pkg_check,xv,video.xvideo) -- ruby += audio.oss audio.alsa -- ruby += $(call pkg_check,openal,audio.openal) -- ruby += $(call pkg_check,libpulse,audio.pulseaudio) -- ruby += $(call pkg_check,libpulse-simple,audio.pulseaudiosimple) -- ruby += $(call pkg_check,ao,audio.ao) -- ruby += input.xlib -- ruby += $(call pkg_check,libudev,input.udev) -- ruby += $(call pkg_check,sdl2,input.sdl) -+ ruby += video.glx video.glx2 video.xshm video.xvideo -+ ruby += audio.oss audio.alsa audio.openal audio.pulseaudio audio.pulseaudiosimple audio.ao -+ ruby += input.xlib input.udev input.sdl - else ifeq ($(platform),bsd) - pkg_check = $(if $(shell pkg-config $1 && echo 1),$2) - ruby += video.glx video.glx2 video.xshm diff --git a/pkgs/applications/emulators/bsnes/ares/002-fix-ruby.diff b/pkgs/applications/emulators/bsnes/ares/002-fix-ruby.diff new file mode 100644 index 0000000000000..86f548389259c --- /dev/null +++ b/pkgs/applications/emulators/bsnes/ares/002-fix-ruby.diff @@ -0,0 +1,24 @@ +diff -Naur source-old/ruby/GNUmakefile source-new/ruby/GNUmakefile +--- source-old/ruby/GNUmakefile 1969-12-31 21:00:01.000000000 -0300 ++++ source-new/ruby/GNUmakefile 2022-11-13 22:43:09.700197748 -0300 +@@ -11,17 +11,9 @@ + ruby += audio.openal + ruby += input.quartz #input.carbon + else ifeq ($(platform),linux) +- pkg_check = $(if $(shell pkg-config $1 && echo 1),$2) +- ruby += video.glx video.glx2 video.xshm +- ruby += $(call pkg_check,xv,video.xvideo) +- ruby += audio.oss audio.alsa +- ruby += $(call pkg_check,openal,audio.openal) +- ruby += $(call pkg_check,libpulse,audio.pulseaudio) +- ruby += $(call pkg_check,libpulse-simple,audio.pulseaudiosimple) +- ruby += $(call pkg_check,ao,audio.ao) +- ruby += input.xlib +- ruby += $(call pkg_check,libudev,input.udev) +- ruby += $(call pkg_check,sdl2,input.sdl) ++ ruby += video.glx video.glx2 video.xshm video.xvideo ++ ruby += audio.oss audio.alsa audio.openal audio.pulseaudio audio.pulseaudiosimple audio.ao ++ ruby += input.xlib input.udev input.sdl + else ifeq ($(platform),bsd) + pkg_check = $(if $(shell pkg-config $1 && echo 1),$2) + ruby += video.glx video.glx2 video.xshm diff --git a/pkgs/applications/emulators/bsnes/ares/002-sips-to-png2icns.patch b/pkgs/applications/emulators/bsnes/ares/002-sips-to-png2icns.patch deleted file mode 100644 index 4c2259d63a335..0000000000000 --- a/pkgs/applications/emulators/bsnes/ares/002-sips-to-png2icns.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/desktop-ui/GNUmakefile b/desktop-ui/GNUmakefile -index 4515610d3..916c8fcd8 100644 ---- a/desktop-ui/GNUmakefile -+++ b/desktop-ui/GNUmakefile -@@ -91,7 +91,7 @@ endif - cp resource/$(name).plist $(output.path)/$(name).app/Contents/Info.plist - cp -R $(ares.path)/Shaders $(output.path)/$(name).app/Contents/Resources/ - cp -R $(mia.path)/Database $(output.path)/$(name).app/Contents/Resources/ -- sips -s format icns resource/$(name).png --out $(output.path)/$(name).app/Contents/Resources/$(name).icns -+ png2icns $(output.path)/$(name).app/Contents/Resources/$(name).icns resource/$(name).png - codesign --force --deep --options runtime --entitlements resource/$(name).selfsigned.entitlements --sign - $(output.path)/$(name).app - else ifeq ($(platform),windows) - $(call mkdir,$(output.path)/Shaders/) -diff --git a/genius/GNUmakefile b/genius/GNUmakefile -index 5287309a8..8d80f9306 100644 ---- a/genius/GNUmakefile -+++ b/genius/GNUmakefile -@@ -24,7 +24,7 @@ ifeq ($(platform),macos) - mkdir -p $(output.path)/$(name).app/Contents/Resources/ - mv $(output.path)/$(name) $(output.path)/$(name).app/Contents/MacOS/$(name) - cp data/$(name).plist $(output.path)/$(name).app/Contents/Info.plist -- sips -s format icns data/$(name).png --$(output.path) $(output.path)/$(name).app/Contents/Resources/$(name).icns -+ png2icns $(output.path)/$(name).app/Contents/Resources/$(name).icns data/$(name).png - endif - - verbose: hiro.verbose nall.verbose all; -diff --git a/mia/GNUmakefile b/mia/GNUmakefile -index b6930b6df..7a51b5028 100644 ---- a/mia/GNUmakefile -+++ b/mia/GNUmakefile -@@ -32,7 +32,7 @@ ifeq ($(platform),macos) - mkdir -p $(output.path)/$(name).app/Contents/Resources/ - mv $(output.path)/$(name) $(output.path)/$(name).app/Contents/MacOS/$(name) - cp resource/$(name).plist $(output.path)/$(name).app/Contents/Info.plist -- sips -s format icns resource/$(name).png --out $(output.path)/$(name).app/Contents/Resources/$(name).icns -+ png2icns $(output.path)/$(name).app/Contents/Resources/$(name).icns resource/$(name).png - endif - - verbose: hiro.verbose nall.verbose all; diff --git a/pkgs/applications/emulators/bsnes/ares/003-darwin-specific.patch b/pkgs/applications/emulators/bsnes/ares/003-darwin-specific.patch new file mode 100644 index 0000000000000..a1cd47f9c34da --- /dev/null +++ b/pkgs/applications/emulators/bsnes/ares/003-darwin-specific.patch @@ -0,0 +1,48 @@ +diff -Naur source-old/desktop-ui/GNUmakefile source-new/desktop-ui/GNUmakefile +--- source-old/desktop-ui/GNUmakefile 1969-12-31 21:00:01.000000000 -0300 ++++ source-new/desktop-ui/GNUmakefile 2023-07-08 12:20:08.206582916 -0300 +@@ -91,8 +91,7 @@ + cp resource/$(name).plist $(output.path)/$(name).app/Contents/Info.plist + cp -R $(ares.path)/Shaders $(output.path)/$(name).app/Contents/Resources/ + cp -R $(mia.path)/Database $(output.path)/$(name).app/Contents/Resources/ +- sips -s format icns resource/$(name).png --out $(output.path)/$(name).app/Contents/Resources/$(name).icns +- codesign --force --deep --options runtime --entitlements resource/$(name).selfsigned.entitlements --sign - $(output.path)/$(name).app ++ png2icns $(output.path)/$(name).app/Contents/Resources/$(name).icns resource/$(name).png + else ifeq ($(platform),windows) + $(call mkdir,$(output.path)/Shaders/) + $(call mkdir,$(output.path)/Database/) +@@ -115,8 +114,8 @@ + else ifeq ($(shell id -un),root) + $(error "make install should not be run as root") + else ifeq ($(platform),macos) +- mkdir -p ~/Library/Application\ Support/$(name)/ +- cp -R $(output.path)/$(name).app /Applications/$(name).app ++ mkdir -p $(prefix)/Applications/ ++ cp -R $(output.path)/$(name).app $(prefix)/Applications/$(name).app + else ifneq ($(filter $(platform),linux bsd),) + mkdir -p $(prefix)/bin/ + mkdir -p $(prefix)/share/applications/ +diff -Naur source-old/mia/GNUmakefile source-new/mia/GNUmakefile +--- source-old/mia/GNUmakefile 1969-12-31 21:00:01.000000000 -0300 ++++ source-new/mia/GNUmakefile 2023-07-08 12:16:55.991517276 -0300 +@@ -39,7 +39,7 @@ + mkdir -p $(output.path)/$(name).app/Contents/Resources/ + mv $(output.path)/$(name) $(output.path)/$(name).app/Contents/MacOS/$(name) + cp resource/$(name).plist $(output.path)/$(name).app/Contents/Info.plist +- sips -s format icns resource/$(name).png --out $(output.path)/$(name).app/Contents/Resources/$(name).icns ++ png2icns $(output.path)/$(name).app/Contents/Resources/$(name).icns resource/$(name).png + endif + + verbose: hiro.verbose nall.verbose all; +diff -Naur source-old/tools/genius/GNUmakefile source-new/tools/genius/GNUmakefile +--- source-old/tools/genius/GNUmakefile 1969-12-31 21:00:01.000000000 -0300 ++++ source-new/tools/genius/GNUmakefile 2023-07-08 12:16:16.273503940 -0300 +@@ -26,7 +26,7 @@ + mkdir -p $(output.path)/$(name).app/Contents/Resources/ + mv $(output.path)/$(name) $(output.path)/$(name).app/Contents/MacOS/$(name) + cp data/$(name).plist $(output.path)/$(name).app/Contents/Info.plist +- sips -s format icns data/$(name).png --$(output.path) $(output.path)/$(name).app/Contents/Resources/$(name).icns ++ png2icns $(output.path)/$(name).app/Contents/Resources/$(name).icns data/$(name).png + endif + + verbose: hiro.verbose nall.verbose all; diff --git a/pkgs/applications/emulators/bsnes/ares/003-fix-darwin-install.patch b/pkgs/applications/emulators/bsnes/ares/003-fix-darwin-install.patch deleted file mode 100644 index 5b216ac267e20..0000000000000 --- a/pkgs/applications/emulators/bsnes/ares/003-fix-darwin-install.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/desktop-ui/GNUmakefile b/desktop-ui/GNUmakefile -index 916c8fcd8..b767c1335 100644 ---- a/desktop-ui/GNUmakefile -+++ b/desktop-ui/GNUmakefile -@@ -92,7 +92,6 @@ endif - cp -R $(ares.path)/Shaders $(output.path)/$(name).app/Contents/Resources/ - cp -R $(mia.path)/Database $(output.path)/$(name).app/Contents/Resources/ - png2icns $(output.path)/$(name).app/Contents/Resources/$(name).icns resource/$(name).png -- codesign --force --deep --options runtime --entitlements resource/$(name).selfsigned.entitlements --sign - $(output.path)/$(name).app - else ifeq ($(platform),windows) - $(call mkdir,$(output.path)/Shaders/) - $(call mkdir,$(output.path)/Database/) -@@ -115,8 +114,8 @@ ifeq ($(platform),windows) - else ifeq ($(shell id -un),root) - $(error "make install should not be run as root") - else ifeq ($(platform),macos) -- mkdir -p ~/Library/Application\ Support/$(name)/ -- cp -R $(output.path)/$(name).app /Applications/$(name).app -+ mkdir -p $(prefix)/Applications/ -+ cp -R $(output.path)/$(name).app $(prefix)/Applications/$(name).app - else ifneq ($(filter $(platform),linux bsd),) - mkdir -p $(prefix)/bin/ - mkdir -p $(prefix)/share/applications/ diff --git a/pkgs/applications/emulators/bsnes/ares/default.nix b/pkgs/applications/emulators/bsnes/ares/default.nix index 9914e6e691c3d..bd2311283c9eb 100644 --- a/pkgs/applications/emulators/bsnes/ares/default.nix +++ b/pkgs/applications/emulators/bsnes/ares/default.nix @@ -1,10 +1,6 @@ { lib , stdenv , fetchFromGitHub -, pkg-config -, which -, wrapGAppsHook -, libicns , SDL2 , alsa-lib , gtk3 @@ -14,31 +10,31 @@ , libX11 , libXv , libao +, libicns , libpulseaudio , openal +, pkg-config , udev +, which +, wrapGAppsHook , darwin }: -let - inherit (darwin.apple_sdk_11_0.frameworks) Cocoa OpenAL; -in stdenv.mkDerivation (finalAttrs: { pname = "ares"; - version = "131"; + version = "132"; src = fetchFromGitHub { owner = "ares-emulator"; repo = "ares"; rev = "v${finalAttrs.version}"; - hash = "sha256-gex53bh/175/i0cMimcPO26C6cxqQGPo4sp2bxh1sAw="; + hash = "sha256-0D7bOv934k1cuP6qNxo0uLp5tSEstI8wm0FEwu6TuUw="; }; patches = [ - ./000-dont-rebuild-on-install.patch - ./001-fix-ruby.patch - ./002-sips-to-png2icns.patch - ./003-fix-darwin-install.patch + ./001-dont-rebuild-on-install.patch + ./002-fix-ruby.diff + ./003-darwin-specific.patch ]; nativeBuildInputs = [ @@ -64,8 +60,8 @@ stdenv.mkDerivation (finalAttrs: { openal udev ] ++ lib.optionals stdenv.isDarwin [ - Cocoa - OpenAL + darwin.apple_sdk_11_0.frameworks.Cocoa + darwin.apple_sdk_11_0.frameworks.OpenAL ]; enableParallelBuilding = true; @@ -80,17 +76,16 @@ stdenv.mkDerivation (finalAttrs: { "local=false" "openmp=true" "prefix=$(out)" - "-C desktop-ui" ]; env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-mmacosx-version-min=10.14"; - meta = with lib; { + meta = { homepage = "https://ares-emu.net"; description = "Open-source multi-system emulator with a focus on accuracy and preservation"; - license = licenses.isc; - maintainers = with maintainers; [ Madouura AndersonTorres ]; - platforms = platforms.unix; + license = lib.licenses.isc; + maintainers = with lib.maintainers; [ Madouura AndersonTorres ]; + platforms = lib.platforms.unix; }; }) -# TODO: select between Qt, GTK2 and GTK3 +# TODO: select between Qt and GTK3 -- cgit 1.4.1