{titanion,torus-trooper,tumiki-fighters}: use LDC

GDC is going to be dropped in #435019.

I used LDC instead of DMD because it claims better platform support and
faster binaries.
This commit is contained in:
Francesco Gazzetta
2025-08-20 14:36:06 +02:00
parent f124addcee
commit 8983a983a0
3 changed files with 33 additions and 9 deletions
+11 -3
View File
@@ -4,7 +4,7 @@
fetchpatch,
fetchurl,
unzip,
gdc,
ldc,
libGL,
libGLU,
SDL,
@@ -17,7 +17,7 @@ let
patchname: hash:
fetchpatch {
name = "${patchname}.patch";
url = "https://sources.debian.org/data/main/t/titanion/0.3.dfsg1-7/debian/patches/${patchname}";
url = "https://sources.debian.org/data/main/t/titanion/0.3.dfsg1-8/debian/patches/${patchname}";
inherit hash;
};
@@ -43,6 +43,7 @@ stdenv.mkDerivation (finalAttrs: {
(debianPatch "makefile.patch" "sha256-g0jDPmc0SWXkTLhiczeTse/WGCtgMUsbyPNZzwK3U+o=")
(debianPatch "dlang_v2.patch" "sha256-tfTAAKlPFSjbfAK1EjeB3unj9tbMlNaajJ+VVSMMiYw=")
(debianPatch "gdc-8.patch" "sha256-BxkPfSEymq7TDA+yjJHaYsjtGr0Tuu1/sWLwRBAMga4=")
(debianPatch "gcc12.patch" "sha256-Kqmb6hRn6lAHLJMoZ5nGCmHcqfbTUIDq5ahALI2f4a4=")
];
postPatch = ''
@@ -52,11 +53,16 @@ stdenv.mkDerivation (finalAttrs: {
substituteInPlace $f \
--replace "/usr/" "$out/"
done
# GDC DMD/LDC flag compatibility
substituteInPlace Makefile \
--replace-fail "-o " -of= \
--replace-fail -Wdeprecated "" \
--replace-fail -l -L-l
'';
nativeBuildInputs = [
unzip
gdc
ldc
];
buildInputs = [
@@ -67,6 +73,8 @@ stdenv.mkDerivation (finalAttrs: {
bulletml
];
makeFlags = [ "GDC=ldc2" ];
installPhase = ''
runHook preInstall
install -Dm755 titanion $out/bin/titanion
+11 -3
View File
@@ -4,7 +4,7 @@
fetchpatch,
fetchurl,
unzip,
gdc,
ldc,
libGL,
libGLU,
SDL,
@@ -17,7 +17,7 @@ let
patchname: hash:
fetchpatch {
name = "${patchname}.patch";
url = "https://sources.debian.org/data/main/t/torus-trooper/0.22.dfsg1-12/debian/patches/${patchname}.patch";
url = "https://sources.debian.org/data/main/t/torus-trooper/0.22.dfsg1-14/debian/patches/${patchname}.patch";
sha256 = hash;
};
@@ -48,6 +48,7 @@ stdenv.mkDerivation (finalAttrs: {
(debianPatch "libbulletml0v5-segfault" "0pad2daz60hswkhkdpssxaqc9p9ca0sw1nraqzr453x0zdwwq0hn")
(debianPatch "std.math.fabs" "18xnnqlj20bxv2h9fa8dn4rmxwi3k6y3g50kwvh8i8p3b4hgag3r")
(debianPatch "gdc-8" "10z702y75c48hjcnvv8m7f3ka52cj3r3jqafdbby85nb0p2lbssx")
(debianPatch "gcc12" "sha256-8zNwhteRW3xWFsdoTOLIPPZn2cqCE1mS7UDYP1DzSQQ=")
];
postPatch = ''
@@ -55,11 +56,16 @@ stdenv.mkDerivation (finalAttrs: {
substituteInPlace $f \
--replace "/usr/" "$out/"
done
# GDC DMD/LDC flag compatibility
substituteInPlace Makefile \
--replace-fail "-o " -of= \
--replace-fail -Wno-deprecated "" \
--replace-fail -l -L-l
'';
nativeBuildInputs = [
unzip
gdc
ldc
];
buildInputs = [
@@ -70,6 +76,8 @@ stdenv.mkDerivation (finalAttrs: {
bulletml
];
makeFlags = [ "GDC=ldc2" ];
installPhase = ''
install -Dm755 torus-trooper $out/bin/torus-trooper
mkdir -p $out/share/games/torus-trooper
+11 -3
View File
@@ -4,7 +4,7 @@
fetchpatch,
fetchurl,
unzip,
gdc,
ldc,
libGL,
SDL,
SDL_mixer,
@@ -16,7 +16,7 @@ let
patchname: hash:
fetchpatch {
name = "${patchname}.patch";
url = "https://sources.debian.org/data/main/t/tumiki-fighters/0.2.dfsg1-9/debian/patches/${patchname}.patch";
url = "https://sources.debian.org/data/main/t/tumiki-fighters/0.2.dfsg1-10/debian/patches/${patchname}.patch";
sha256 = hash;
};
@@ -42,6 +42,7 @@ stdenv.mkDerivation (finalAttrs: {
(debianPatch "window-resizing" "1dm79d0yisa8zs5fr89y3wq2kzd3khcaxs0la8lhncvkqbd4smx8")
(debianPatch "dlang_v2" "1isnvbl3bjnpyphji8k3fl0yd1z4869h0lai143vpwgj6518lpg4")
(debianPatch "gdc-8" "1md0zwmv50jnak5g9d93bglv9v4z41blinjii6kv3vmgjnajapzj")
(debianPatch "gcc12" "sha256-3ZFsI2Q4zCT591qCOu2iT2edE52DfO2pUySnMMBhNIQ=")
];
postPatch = ''
@@ -57,11 +58,16 @@ stdenv.mkDerivation (finalAttrs: {
substituteInPlace $f \
--replace "/usr/" "$out/"
done
# GDC DMD/LDC flag compatibility
substituteInPlace Makefile \
--replace-fail "-o " -of= \
--replace-fail -Wno-deprecated "" \
--replace-fail -l -L-l
'';
nativeBuildInputs = [
unzip
gdc
ldc
];
buildInputs = [
@@ -71,6 +77,8 @@ stdenv.mkDerivation (finalAttrs: {
bulletml
];
makeFlags = [ "GDC=ldc2" ];
installPhase = ''
install -Dm755 tumiki-fighters $out/bin/tumiki-fighters
mkdir -p $out/share/games/tumiki-fighters