Unverified Commit 36f9b49c authored by Philip Taron's avatar Philip Taron Committed by GitHub
Browse files

brogue: remove; libtcod: remove (#448603)

parents e6de9bc8 c9ca6573
Loading
Loading
Loading
Loading
+0 −38
Original line number Diff line number Diff line
diff --git a/src/brogue/Architect.c b/src/brogue/Architect.c
index abe5acf..b38291d 100755
--- a/src/brogue/Architect.c
+++ b/src/brogue/Architect.c
@@ -1676,7 +1676,7 @@ void addMachines() {
     // Add the amulet holder if it's depth 26:
     if (rogue.depthLevel == AMULET_LEVEL) {
         for (failsafe = 50; failsafe; failsafe--) {
-            if (buildAMachine(MT_AMULET_AREA, -1, -1, NULL, NULL, NULL, NULL)) {
+            if (buildAMachine(MT_AMULET_AREA, -1, -1, 0L, NULL, NULL, NULL)) {
                 break;
             }
         }
diff --git a/src/brogue/RogueMain.c b/src/brogue/RogueMain.c
index 49b08b9..3666963 100755
--- a/src/brogue/RogueMain.c
+++ b/src/brogue/RogueMain.c
@@ -880,7 +880,7 @@ void startLevel(short oldLevelNumber, short stairDirection) {
             getQualifyingPathLocNear(&loc[0], &loc[1],
                                      player.xLoc, player.yLoc,
                                      true,
-                                     T_DIVIDES_LEVEL, NULL,
+                                     T_DIVIDES_LEVEL, 0L,
                                      T_PATHING_BLOCKER, (HAS_MONSTER | HAS_ITEM | HAS_STAIRS | IS_IN_MACHINE),
                                      false);
         }
diff --git a/src/platform/platformdependent.c b/src/platform/platformdependent.c
index 635a738..e725513 100644
--- a/src/platform/platformdependent.c
+++ b/src/platform/platformdependent.c
@@ -21,6 +21,7 @@
  *  along with Brogue.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <ctype.h>
 #include <stdio.h>
 #include <string.h>
 #include <time.h>
+0 −85
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchurl,
  fetchpatch,
  SDL,
  ncurses,
  libtcod,
  makeDesktopItem,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "brogue";
  version = "1.7.5";

  src = fetchurl {
    url = "https://drive.google.com/uc?export=download&id=1ED_2nPubP-P0e_PHKYVzZF42M1Y9pUb4";
    hash = "sha256-p0/xgTlWTFl9BHz7Fn90qxlj3YYItvsuA052NdYXBEQ=";
    name = "brogue.tbz2";
  };

  patches = [
    # Pull upstream fix for -fno-common toolchains:
    #  https://github.com/tmewett/BrogueCE/pull/63
    (fetchpatch {
      name = "fno-common.patch";
      url = "https://github.com/tmewett/BrogueCE/commit/2c7ed0c48d9efd06bf0a2589ba967c0a22a8fa87.patch";
      sha256 = "19lr2fa25dh79klm4f4kqyyqq7w5xmw9z0fvylkcckqvcv7dwhp3";
    })
    # error: passing argument 4 of 'buildAMachine' makes integer from pointer without a cast []
    ./fix-compilation.diff
  ];

  prePatch = ''
    sed -i Makefile -e 's,LIBTCODDIR=.*,LIBTCODDIR=${libtcod},g' \
                    -e 's,sdl-config,${lib.getDev SDL}/bin/sdl-config,g'
    sed -i src/platform/tcod-platform.c -e "s,fonts/font,$out/share/brogue/fonts/font,g"
    make clean
    rm -rf src/libtcod*
  '';

  buildInputs = [
    SDL
    ncurses
    libtcod
  ];

  desktopItem = makeDesktopItem {
    name = "brogue";
    desktopName = "Brogue";
    genericName = "Roguelike";
    comment = "Brave the Dungeons of Doom!";
    icon = "brogue";
    exec = "brogue";
    categories = [
      "Game"
      "AdventureGame"
    ];
  };

  installPhase = ''
    install -m 555 -D bin/brogue $out/bin/brogue
    install -m 444 -D ${finalAttrs.desktopItem}/share/applications/brogue.desktop $out/share/applications/brogue.desktop
    install -m 444 -D bin/brogue-icon.png $out/share/icons/hicolor/256x256/apps/brogue.png
    mkdir -p $out/share/brogue
    cp -r bin/fonts $out/share/brogue/
  '';

  # fix crash; shouldn’t be a security risk because it’s an offline game
  hardeningDisable = [
    "stackprotector"
    "fortify"
  ];

  meta = with lib; {
    description = "Roguelike game";
    mainProgram = "brogue";
    homepage = "https://sites.google.com/site/broguegame/";
    license = licenses.agpl3Plus;
    maintainers = with maintainers; [
      fgaz
    ];
    platforms = [ "x86_64-linux" ];
  };
})
+0 −57
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromBitbucket,
  cmake,
  SDL,
  libGLU,
  libGL,
  libX11,
  upx,
  zlib,
}:

stdenv.mkDerivation {

  pname = "libtcod";
  version = "1.5.1";

  src = fetchFromBitbucket {
    owner = "libtcod";
    repo = "libtcod";
    rev = "1.5.1";
    sha256 = "1ibsnmnim712npxkqklc5ibnd32hgsx2yzyfzzc5fis5mhinbl63";
  };

  prePatch = ''
    sed -i CMakeLists.txt \
      -e "s,SET(ROOT_DIR.*,SET(ROOT_DIR $out),g" \
      -e "s,SET(INSTALL_DIR.*,SET(INSTALL_DIR $out),g"
    echo 'INSTALL(DIRECTORY include DESTINATION .)' >> CMakeLists.txt
  '';

  cmakeFlags = [ "-DLIBTCOD_SAMPLES=OFF" ];

  nativeBuildInputs = [ cmake ];
  buildInputs = [
    SDL
    libGLU
    libGL
    libX11
    upx
    zlib
  ];

  env.NIX_CFLAGS_COMPILE = lib.concatStringsSep " " [
    "-Wno-error=implicit-int"
    "-Wno-error=incompatible-pointer-types"
  ];

  meta = {
    description = "API for roguelike games";
    homepage = "http://roguecentral.org/doryen/libtcod/";
    license = lib.licenses.bsd3;
    platforms = lib.platforms.linux;
    maintainers = [ ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -555,6 +555,7 @@ mapAliases {
  brasero-original = lib.warnOnInstantiate "Use 'brasero-unwrapped' instead of 'brasero-original'" brasero-unwrapped; # Added 2024-09-29
  breath-theme = throw "'breath-theme' has been removed, as it is only compatible with Plasma 5, which is EOL"; # Added 2025-08-20
  bridgand = throw "'brigand' has been removed due to being unmaintained"; # Added 2025-04-30
  brogue = lib.warnOnInstantiate "Use 'brogue-ce' instead of 'brogue' for updated releases" brogue-ce; # Added 2025-10-04
  bs-platform = throw "'bs-platform' was removed as it was broken, development ended and 'melange' has superseded it"; # Added 2024-07-29
  buf-language-server = throw "'buf-language-server' was removed as its development has moved to the 'buf' package"; # Added 2024-11-15

@@ -1388,6 +1389,7 @@ mapAliases {
  libsoup = lib.warnOnInstantiate "'libsoup' has been renamed to 'libsoup_2_4'" libsoup_2_4; # Added 2024-12-02
  libstdcxx5 = throw "libstdcxx5 is severly outdated and has been removed"; # Added 2024-11-24
  libtap = throw "libtap has been removed, as it was unused and deprecated by its author in favour of cmocka"; # Added 2025-09-16
  libtcod = throw "'libtcod' has been removed due to being unused and having an incompatible build-system"; # Added 2025-10-04
  libtensorflow-bin = libtensorflow; # Added 2022-09-25
  libtorrent = throw "'libtorrent' has been renamed to 'libtorrent-rakshasa' for clearer distinction from 'libtorrent-rasterbar'"; # Added 2025-09-10
  libtorrentRasterbar = throw "'libtorrentRasterbar' has been renamed to/replaced by 'libtorrent-rasterbar'"; # Converted to throw 2024-10-17