From 5cb86e081fee9ee516320f0e4b5c5db38699a26e Mon Sep 17 00:00:00 2001 From: ajs124 Date: Thu, 31 Mar 2022 22:04:04 +0200 Subject: [PATCH] fakenes: remove after being marked broken for over two years It was marked in commit 9aae605fe78cd6cf7d5e33e4adfa11509508ab19 by Yegor Timoshenko on 2017-09-28 (commited on 2017-09-28) --- .../emulators/fakenes/build.patch | 84 ------------------- .../emulators/fakenes/default.nix | 34 -------- pkgs/top-level/all-packages.nix | 2 - 3 files changed, 120 deletions(-) delete mode 100644 pkgs/applications/emulators/fakenes/build.patch delete mode 100644 pkgs/applications/emulators/fakenes/default.nix diff --git a/pkgs/applications/emulators/fakenes/build.patch b/pkgs/applications/emulators/fakenes/build.patch deleted file mode 100644 index 90799d977a14..000000000000 --- a/pkgs/applications/emulators/fakenes/build.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff --git a/build/openal.cbd b/build/openal.cbd -index d18e62d..74af061 100644 ---- a/build/openal.cbd -+++ b/build/openal.cbd -@@ -23,7 +23,7 @@ CFLAGS += ' -DUSE_OPENAL' - # -- - - do ifplat unix -- LDFLAGS += ' `openal-config --libs`' -+ LDFLAGS += ' -lopenal' - else - LDFLAGS += ' -lOpenAL32' - done -diff --git a/build/alleggl.cbd b/build/alleggl.cbd -index e2708ff..e826371 100644 ---- a/build/alleggl.cbd -+++ b/build/alleggl.cbd -@@ -22,7 +22,7 @@ CFLAGS += ' -DUSE_ALLEGROGL' - - # -- - --LIBAGL = agl -+LIBAGL = alleggl - - ifopt debug LIBAGL = 'agld' - -diff --git a/src/apu.cpp b/src/apu.cpp -index af59f1c..893a798 100644 ---- a/src/apu.cpp -+++ b/src/apu.cpp -@@ -1930,7 +1930,7 @@ static void amplify(real& sample) - gain -= releaseRate; - } - -- real output = (1.0 / max(gain, EPSILON)); -+ real output = (1.0 / MAX(gain, EPSILON)); - output = fixf(output, apu_agc_gain_floor, apu_agc_gain_ceiling); - sample *= output; - } -diff --git a/src/audio.cpp b/src/audio.cpp -index b9650dc..c21c05e 100644 ---- a/src/audio.cpp -+++ b/src/audio.cpp -@@ -7,6 +7,7 @@ - You must read and accept the license prior to use. */ - - #include -+#include - #include - #include - #include -@@ -234,7 +235,7 @@ void audio_update(void) - const unsigned queuedFrames = (audioQueue.size() / audio_channels); - if(queuedFrames > 0) { - // Determine how many frames we want to make room for. -- const unsigned framesToAdd = min(queuedFrames, audio_buffer_size_frames); -+ const unsigned framesToAdd = MIN(queuedFrames, audio_buffer_size_frames); - // Make room for the frames in the buffer. - const unsigned framesToMove = (audioBufferedFrames - framesToAdd); - if(framesToMove > 0) { -@@ -258,7 +259,7 @@ void audio_update(void) - // Determine how many frames are available in the buffer. - const unsigned bufferableFrames = (audio_buffer_size_frames - audioBufferedFrames); - // Determine the number of frames to copy to the buffer. -- const unsigned framesToCopy = min(queuedFrames, bufferableFrames); -+ const unsigned framesToCopy = MIN(queuedFrames, bufferableFrames); - - // Copy frames to the buffer. - for(unsigned frame = 0; frame < framesToCopy; frame++) { -diff --git a/src/include/common.h b/src/include/common.h -index be28795..e2d21d1 100644 ---- a/src/include/common.h -+++ b/src/include/common.h -@@ -41,8 +41,10 @@ extern "C" { - #define true TRUE - #define false FALSE - -+/* - #define min(x,y) MIN((x),(y)) - #define max(x,y) MAX((x),(y)) -+*/ - - #define true_or_false(x) ((x) ? true : false) - diff --git a/pkgs/applications/emulators/fakenes/default.nix b/pkgs/applications/emulators/fakenes/default.nix deleted file mode 100644 index 6bc4b1480ffc..000000000000 --- a/pkgs/applications/emulators/fakenes/default.nix +++ /dev/null @@ -1,34 +0,0 @@ -{lib, stdenv, fetchurl, allegro, openal, libGLU, libGL, zlib, hawknl, freeglut, libX11, - libXxf86vm, libXcursor, libXpm }: - -stdenv.mkDerivation rec { - pname = "fakenes"; - version = "0.5.9-beta3"; - - src = fetchurl { - url = "mirror://sourceforge/fakenes/fakenes-${version}.tar.gz"; - sha256 = "026h67s4pzc1vma59pmzk02iy379255qbai2q74wln9bxqcpniy4"; - }; - - buildInputs = [ allegro openal libGLU libGL zlib hawknl freeglut libX11 - libXxf86vm libXcursor libXpm ]; - - hardeningDisable = [ "format" ]; - - installPhase = '' - mkdir -p $out/bin - cp fakenes $out/bin - ''; - - NIX_LDFLAGS = "-lX11 -lXxf86vm -lXcursor -lXpm"; - - patches = [ ./build.patch ]; - - meta = { - homepage = "http://fakenes.sourceforge.net/"; - license = lib.licenses.gpl2Plus; - description = "Portable Open Source NES Emulator"; - platforms = lib.platforms.linux; - broken = true; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f4293f8c9a8e..87b41e1956d5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33454,8 +33454,6 @@ with pkgs; glee = callPackage ../tools/graphics/glee { }; - fakenes = callPackage ../applications/emulators/fakenes { }; - faust = res.faust2; faust1 = callPackage ../applications/audio/faust/faust1.nix { };