cheesecutter: unstable-2019-12-06 -> unstable-2020-04-03

gstqt5
Christoph Neidahl 2020-09-14 21:56:08 +02:00 committed by Jon
parent d3a22b4bb4
commit e782471d2b
3 changed files with 66 additions and 17 deletions

View File

@ -1,3 +1,13 @@
From eb21fd64a19a0e10c4c3826fc71610fd5850fa2f Mon Sep 17 00:00:00 2001
From: Christoph Neidahl <christoph.neidahl@gmail.com>
Date: Sun, 13 Sep 2020 23:18:51 +0200
Subject: [PATCH 1/2] Drop baked-in build date for r13y
---
src/ct2util.d | 2 +-
src/ui/ui.d | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/ct2util.d b/src/ct2util.d
index 523cadc..e462b09 100644
--- a/src/ct2util.d
@ -24,3 +34,6 @@ index e418dda..21af408 100644
screen.cprint(4, 0, 1, headerColor, hdr);
screen.cprint(screen.width - 14, 0, 1, headerColor, "F12 = Help");
int c1 = audio.player.isPlaying ? 13 : 12;
--
2.25.4

View File

@ -0,0 +1,25 @@
From abc5e8786d41803300b56ef40c08db0d867eb01a Mon Sep 17 00:00:00 2001
From: Christoph Neidahl <christoph.neidahl@gmail.com>
Date: Sun, 13 Sep 2020 23:22:33 +0200
Subject: [PATCH 2/2] Prepend libSDL.dylib to macOS SDL loader
---
src/derelict/sdl/sdl.d | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/derelict/sdl/sdl.d b/src/derelict/sdl/sdl.d
index e31a52f..f7915b1 100644
--- a/src/derelict/sdl/sdl.d
+++ b/src/derelict/sdl/sdl.d
@@ -54,7 +54,7 @@ public:
super(
"sdl.dll",
"libSDL.so, libSDL.so.0, libSDL-1.2.so, libSDL-1.2.so.0",
- "@executable_path/../Frameworks/SDL.framework/SDL, /Library/Frameworks/SDL.framework/SDL, /System/Library/Frameworks/SDL.framework/SDL"
+ "@rpath/libSDL.dylib, @executable_path/../Frameworks/SDL.framework/SDL, /Library/Frameworks/SDL.framework/SDL, /System/Library/Frameworks/SDL.framework/SDL"
);
}
--
2.25.4

View File

@ -1,27 +1,32 @@
{ stdenv, lib, fetchFromGitHub, fetchpatch
, acme, ldc, patchelf
{ stdenv
, lib
, fetchFromGitHub
, acme
, ldc
, patchelf
, SDL
}:
stdenv.mkDerivation rec {
pname = "cheesecutter";
version = "unstable-2019-12-06";
version = "unstable-2020-04-03";
src = fetchFromGitHub {
owner = "theyamo";
repo = "CheeseCutter";
rev = "6b433c5512d693262742a93c8bfdfb353d4be853";
sha256 = "1szlcg456b208w1237581sg21x69mqlh8cr6v8yvbhxdz9swxnwy";
rev = "68d6518f0e6249a2a5d122fc80201578337c1277";
sha256 = "0xspzjhc6cp3m0yd0mwxncg8n1wklizamxvidrnn21jgj3mnaq2q";
};
nativeBuildInputs = [ acme ldc patchelf ];
patches = [
./0001-Drop-baked-in-build-date-for-r13y.patch
]
++ lib.optional stdenv.hostPlatform.isDarwin ./0002-Prepend-libSDL.dylib-to-macOS-SDL-loader.patch;
nativeBuildInputs = [ acme ldc ]
++ lib.optional (!stdenv.hostPlatform.isDarwin) patchelf;
buildInputs = [ SDL ];
patches = [
./0001-fix-impure-build-date-display.patch
];
makefile = "Makefile.ldc";
installPhase = ''
@ -33,15 +38,21 @@ stdenv.mkDerivation rec {
cp -r tunes/* $out/share/cheesecutter/example_tunes
'';
postFixup = ''
rpath=$(patchelf --print-rpath $out/bin/ccutter)
patchelf --set-rpath "$rpath:${lib.makeLibraryPath buildInputs}" $out/bin/ccutter
'';
postFixup =
let
rpathSDL = lib.makeLibraryPath [ SDL ];
in
if stdenv.hostPlatform.isDarwin then ''
install_name_tool -add_rpath ${rpathSDL} $out/bin/ccutter
'' else ''
rpath=$(patchelf --print-rpath $out/bin/ccutter)
patchelf --set-rpath "$rpath:${rpathSDL}" $out/bin/ccutter
'';
meta = with lib; {
description = "A tracker program for composing music for the SID chip.";
description = "A tracker program for composing music for the SID chip";
homepage = "https://github.com/theyamo/CheeseCutter/";
license = licenses.gpl2;
license = licenses.gpl2Plus;
platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
maintainers = with maintainers; [ OPNA2608 ];
};