git.iko.soy/typeable/nixpkgs
on master help sign in
gargoyle: 2017-08-27 -> 2018-10-06
commitbad54d8704bca25085afe66fb22a3b03a53894e4 authorOrivej Desh <orivej@gmx.fr> dateSun 11 Nov 2018, 03:42 (8 years ago) parent59ddb14
3 files changed+11−147
pkgs/games/gargoyle/darwin.patch+1−132 pkgs/games/gargoyle/default.nix+9−14 pkgs/top-level/all-packages.nix+1−1
pkgs/games/gargoyle/darwin.patch+1−132
@@ -1,33 +1,3 @@
1−diff --git a/Jamshared b/Jamshared
2−index 13db835..fd42928 100644
3−--- a/Jamshared
4−+++ b/Jamshared
5−@@ -79,7 +79,7 @@ if $(OS) = MACOSX
6− {
7− actions together SharedLink bind NEEDLIBS
8− {
9−- $(LINK) -headerpad_max_install_names $(FRAMEWORKS) $(MAINARCH) $(ALTARCH) -dynamiclib $(SHRLINKFLAGS) -install_name @executable_path/$(<:D=) -o $(<) $(>) $(NEEDLIBS) $(SHRLINKLIBS)
10−+ $(LINK) $(FRAMEWORKS) $(MAINARCH) $(ALTARCH) -dynamiclib $(SHRLINKFLAGS) -install_name @executable_path/$(<:D=) -o $(<) $(>) $(NEEDLIBS) $(SHRLINKLIBS)
11− }
12− }
13− else
14−diff --git a/tads/Jamfile b/tads/Jamfile
15−index 1f8829d..d8455eb 100644
16−--- a/tads/Jamfile
17−+++ b/tads/Jamfile
18−@@ -33,8 +33,8 @@ if $(OS) = LINUX || $(OS) = SOLARIS
19−
20− if $(OS) = MACOSX
21− {
22−- SubDirCcFlags -headerpad_max_install_names $(MAINARCH) $(ALTARCH) ;
23−- LINKFLAGS = -headerpad_max_install_names $(MAINARCH) $(ALTARCH) ;
24−+ SubDirCcFlags $(MAINARCH) $(ALTARCH) ;
25−+ LINKFLAGS = $(MAINARCH) $(ALTARCH) ;
26− }
27−
28− SEARCH_SOURCE =
29−diff --git a/garglk/fontmac.m b/garglk/fontmac.m
30−index d6e1426..72304a3 100644
311--- a/garglk/fontmac.m
322+++ b/garglk/fontmac.m
333@@ -167,7 +167,7 @@ static void propfont(char *file, int style)
@@ -48,15 +18,6 @@ index d6e1426..72304a3 100644
4818 [fontFamilyDescriptor matchingFontDescriptorsWithMandatoryKeys: nil];
4919
5020 for (NSFontDescriptor * sysfont in fontMatches)
51−@@ -197,7 +197,7 @@ void fontreplace(char *font, int type)
52−
53− else if ([sysfont symbolicTraits] & NSFontItalicTrait)
54− style = FONTI;
55−-
56−+
57− /* find path for font */
58− CFURLRef urlRef = CTFontDescriptorCopyAttribute((CTFontDescriptorRef)sysfont, kCTFontURLAttribute);
59− if (!urlRef)
6021@@ -259,7 +259,7 @@ void fontload(void)
6122
6223 // obtain a list of all files in the Fonts directory
@@ -66,47 +27,9 @@ index d6e1426..72304a3 100644
6627
6728 // create a collection to hold the registered font URLs
6829 gli_registered_fonts = [NSMutableArray new];
69−diff --git a/garglk/launchmac.m b/garglk/launchmac.m
70−index 68deca5..9f752ac 100644
7130--- a/garglk/launchmac.m
7231+++ b/garglk/launchmac.m
73−@@ -72,14 +72,14 @@ char *winfilters[] =
74− height: (unsigned int) height
75− {
76− [[self openGLContext] makeCurrentContext];
77−-
78−+
79− /* allocate new texture */
80− glDeleteTextures(1, &output);
81− glGenTextures(1, &output);
82−
83− /* bind target to texture */
84−- glEnable(GL_TEXTURE_RECTANGLE_ARB);
85−- glBindTexture(GL_TEXTURE_RECTANGLE_ARB, output);
86−+ glEnable(GL_TEXTURE_RECTANGLE_ARB);
87−+ glBindTexture(GL_TEXTURE_RECTANGLE_ARB, output);
88−
89− /* set target parameters */
90− glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_STORAGE_HINT_APPLE, GL_STORAGE_CACHED_APPLE);
91−@@ -460,7 +460,7 @@ static BOOL isTextbufferEvent(NSEvent * evt)
92− if (filter != FILTER_ALL)
93− {
94− NSArray * filterTypes = [NSArray arrayWithObject: [NSString stringWithCString: winfilters[filter]
95−- encoding: NSUTF8StringEncoding]];
96−+ encoding: NSUTF8StringEncoding]];
97− [openDlg setAllowedFileTypes: filterTypes];
98− [openDlg setAllowsOtherFileTypes: NO];
99− }
100−@@ -485,7 +485,7 @@ static BOOL isTextbufferEvent(NSEvent * evt)
101− if (filter != FILTER_ALL)
102− {
103− NSArray * filterTypes = [NSArray arrayWithObject: [NSString stringWithCString: winfilters[filter]
104−- encoding: NSUTF8StringEncoding]];
105−+ encoding: NSUTF8StringEncoding]];
106− [saveDlg setAllowedFileTypes: filterTypes];
107− [saveDlg setAllowsOtherFileTypes: NO];
108− }
109−@@ -518,7 +518,7 @@ static BOOL isTextbufferEvent(NSEvent * evt)
32+@@ -556,7 +556,7 @@ static BOOL isTextbufferEvent(NSEvent * evt)
11033 <GargoyleApp, NSApplicationDelegate, NSWindowDelegate>
11134 {
11235 BOOL openedFirstGame;
@@ -115,34 +38,6 @@ index 68deca5..9f752ac 100644
11538 NSConnection * link;
11639 }
11740 - (BOOL) launchFile: (NSString *) file;
118−@@ -760,20 +760,20 @@ static BOOL isTextbufferEvent(NSEvent * evt)
119− - (BOOL) launchFileDialog
120− {
121− int result;
122−-
123−+
124− NSOpenPanel * openDlg = [NSOpenPanel openPanel];
125−
126− [openDlg setCanChooseFiles: YES];
127− [openDlg setCanChooseDirectories: NO];
128− [openDlg setAllowsMultipleSelection: NO];
129− [openDlg setTitle: [NSString stringWithCString: AppName encoding: NSUTF8StringEncoding]];
130−-
131−+
132− NSMutableArray *filterTypes = [NSMutableArray arrayWithCapacity:100];
133−-
134−- NSEnumerator *docTypeEnum = [[[[NSBundle mainBundle] infoDictionary]
135−+
136−+ NSEnumerator *docTypeEnum = [[[[NSBundle mainBundle] infoDictionary]
137− objectForKey:@"CFBundleDocumentTypes"] objectEnumerator];
138− NSDictionary *docType;
139−-
140−+
141− while (docType = [docTypeEnum nextObject])
142− {
143− [filterTypes addObjectsFromArray:[docType objectForKey: @"CFBundleTypeExtensions"]];
144−diff --git a/garglk/ttsmac.m b/garglk/ttsmac.m
145−index 9f6ab0e..de3d6fe 100644
14641--- a/garglk/ttsmac.m
14742+++ b/garglk/ttsmac.m
14843@@ -30,7 +30,7 @@
@@ -167,29 +62,3 @@ index 9f6ab0e..de3d6fe 100644
16762 if ([lang isEqualToString: [attr objectForKey: NSVoiceLocaleIdentifier]])
16863 {
16964 [synth setVoice: voice];
170−diff --git a/tads/tads3/vmtz.cpp b/tads/tads3/vmtz.cpp
171−index 5e193a1..dce46f7 100644
172−--- a/tads/tads3/vmtz.cpp
173−+++ b/tads/tads3/vmtz.cpp
174−@@ -1985,5 +1985,5 @@ void CVmTimeZone::query(vmtzquery *result, int32_t dayno, int32_t daytime,
175− * up until that moment
176− */
177−- result->set(tcur > 0 ? tcur - 1 : tcur);
178−+ result->set(tcur != 0 ? tcur - 1 : tcur);
179− return;
180− }
181−diff --git a/terps/Jamfile b/terps/Jamfile
182−index b5f6d52..2d1ccdb 100644
183−--- a/terps/Jamfile
184−+++ b/terps/Jamfile
185−@@ -185,8 +185,8 @@ if $(MAKE_GEAS) = yes
186−
187− if $(OS) = MACOSX
188− {
189−- SubDirCcFlags -headerpad_max_install_names $(MAINARCH) $(ALTARCH) ;
190−- LINKFLAGS = -headerpad_max_install_names $(MAINARCH) $(ALTARCH) ;
191−+ SubDirCcFlags $(MAINARCH) $(ALTARCH) ;
192−+ LINKFLAGS = $(MAINARCH) $(ALTARCH) ;
193− }
194−
195− SUBDIRC++FLAGS = $(SUBDIRCCFLAGS) ;
pkgs/games/gargoyle/default.nix+9−14
@@ -1,4 +1,5 @@
1−{ stdenv, fetchFromGitHub, jam, libtool, pkgconfig, gtk2, SDL, SDL_mixer, SDL_sound, smpeg, libvorbis }:
1+{ stdenv, lib, fetchFromGitHub, jam, cctools, pkgconfig
2+, SDL, SDL_mixer, SDL_sound, cf-private, gtk2, libvorbis, smpeg }:
23
34let
45
@@ -19,28 +20,22 @@ let
1920in
2021
2122stdenv.mkDerivation {
22− name = "gargoyle-2017-08-27";
23+ name = "gargoyle-2018-10-06";
2324
2425 src = fetchFromGitHub {
2526 owner = "garglk";
2627 repo = "garglk";
27− rev = "65c95166f53adaa2e5e1a5e0d8a34e9219d06de6";
28− sha256 = "1agnap38qdf2n1v37ka3ky44j56yhvln4lzf13diyqhjmh9lvfq5";
28+ rev = "d03391563fa75942fbf8f8deeeacf3a8be9fc3b0";
29+ sha256 = "0icwgc25gp7krq6zf66hljydc6vps6bb4knywnrfgnfcmcalqqx9";
2930 };
3031
31− nativeBuildInputs = [ jam pkgconfig ] ++ stdenv.lib.optional stdenv.isDarwin libtool;
32+ nativeBuildInputs = [ jam pkgconfig ] ++ lib.optional stdenv.isDarwin cctools;
3233
33− buildInputs = [ gtk2 SDL SDL_mixer ] ++ (
34− if stdenv.isDarwin then [ smpeg libvorbis ] else [ SDL_sound ]
35− );
34+ buildInputs = [ SDL SDL_mixer SDL_sound gtk2 ]
35+ ++ lib.optionals stdenv.isDarwin [ cf-private smpeg libvorbis ];
3636
3737 patches = [ ./darwin.patch ];
3838
39− postPatch = ''
40− substituteInPlace Jamrules \
41− --replace -mmacosx-version-min=10.7 -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET
42− '';
43−
4439 buildPhase = jamenv + "jam -j$NIX_BUILD_CORES";
4540
4641 installPhase = if stdenv.isDarwin then (builtins.readFile ./darwin.sh) else jamenv + ''
@@ -57,7 +52,7 @@ stdenv.mkDerivation {
5752
5853 enableParallelBuilding = true;
5954
60− meta = with stdenv.lib; {
55+ meta = with lib; {
6156 homepage = http://ccxvii.net/gargoyle/;
6257 license = licenses.gpl2Plus;
6358 description = "Interactive fiction interpreter GUI";
pkgs/top-level/all-packages.nix+1−1
@@ -20362,7 +20362,7 @@ with pkgs;
2036220362 garden-of-coloured-lights = callPackage ../games/garden-of-coloured-lights { allegro = allegro4; };
2036320363
2036420364 gargoyle = callPackage ../games/gargoyle {
20365− libtool = darwin.cctools;
20365+ inherit (darwin) cctools cf-private;
2036620366 };
2036720367
2036820368 gav = callPackage ../games/gav { };