From bad54d8704bca25085afe66fb22a3b03a53894e4 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Sun, 11 Nov 2018 03:42:39 +0000 Subject: gargoyle: 2017-08-27 -> 2018-10-06 --- pkgs/games/gargoyle/darwin.patch | 133 +-------------------------------------- pkgs/games/gargoyle/default.nix | 23 +++---- 2 files changed, 10 insertions(+), 146 deletions(-) (limited to 'pkgs/games/gargoyle') diff --git a/pkgs/games/gargoyle/darwin.patch b/pkgs/games/gargoyle/darwin.patch index 230f453acad..6958fe495d2 100644 --- a/pkgs/games/gargoyle/darwin.patch +++ b/pkgs/games/gargoyle/darwin.patch @@ -1,33 +1,3 @@ -diff --git a/Jamshared b/Jamshared -index 13db835..fd42928 100644 ---- a/Jamshared -+++ b/Jamshared -@@ -79,7 +79,7 @@ if $(OS) = MACOSX - { - actions together SharedLink bind NEEDLIBS - { -- $(LINK) -headerpad_max_install_names $(FRAMEWORKS) $(MAINARCH) $(ALTARCH) -dynamiclib $(SHRLINKFLAGS) -install_name @executable_path/$(<:D=) -o $(<) $(>) $(NEEDLIBS) $(SHRLINKLIBS) -+ $(LINK) $(FRAMEWORKS) $(MAINARCH) $(ALTARCH) -dynamiclib $(SHRLINKFLAGS) -install_name @executable_path/$(<:D=) -o $(<) $(>) $(NEEDLIBS) $(SHRLINKLIBS) - } - } - else -diff --git a/tads/Jamfile b/tads/Jamfile -index 1f8829d..d8455eb 100644 ---- a/tads/Jamfile -+++ b/tads/Jamfile -@@ -33,8 +33,8 @@ if $(OS) = LINUX || $(OS) = SOLARIS - - if $(OS) = MACOSX - { -- SubDirCcFlags -headerpad_max_install_names $(MAINARCH) $(ALTARCH) ; -- LINKFLAGS = -headerpad_max_install_names $(MAINARCH) $(ALTARCH) ; -+ SubDirCcFlags $(MAINARCH) $(ALTARCH) ; -+ LINKFLAGS = $(MAINARCH) $(ALTARCH) ; - } - - SEARCH_SOURCE = -diff --git a/garglk/fontmac.m b/garglk/fontmac.m -index d6e1426..72304a3 100644 --- a/garglk/fontmac.m +++ b/garglk/fontmac.m @@ -167,7 +167,7 @@ static void propfont(char *file, int style) @@ -48,15 +18,6 @@ index d6e1426..72304a3 100644 [fontFamilyDescriptor matchingFontDescriptorsWithMandatoryKeys: nil]; for (NSFontDescriptor * sysfont in fontMatches) -@@ -197,7 +197,7 @@ void fontreplace(char *font, int type) - - else if ([sysfont symbolicTraits] & NSFontItalicTrait) - style = FONTI; -- -+ - /* find path for font */ - CFURLRef urlRef = CTFontDescriptorCopyAttribute((CTFontDescriptorRef)sysfont, kCTFontURLAttribute); - if (!urlRef) @@ -259,7 +259,7 @@ void fontload(void) // obtain a list of all files in the Fonts directory @@ -66,47 +27,9 @@ index d6e1426..72304a3 100644 // create a collection to hold the registered font URLs gli_registered_fonts = [NSMutableArray new]; -diff --git a/garglk/launchmac.m b/garglk/launchmac.m -index 68deca5..9f752ac 100644 --- a/garglk/launchmac.m +++ b/garglk/launchmac.m -@@ -72,14 +72,14 @@ char *winfilters[] = - height: (unsigned int) height - { - [[self openGLContext] makeCurrentContext]; -- -+ - /* allocate new texture */ - glDeleteTextures(1, &output); - glGenTextures(1, &output); - - /* bind target to texture */ -- glEnable(GL_TEXTURE_RECTANGLE_ARB); -- glBindTexture(GL_TEXTURE_RECTANGLE_ARB, output); -+ glEnable(GL_TEXTURE_RECTANGLE_ARB); -+ glBindTexture(GL_TEXTURE_RECTANGLE_ARB, output); - - /* set target parameters */ - glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_STORAGE_HINT_APPLE, GL_STORAGE_CACHED_APPLE); -@@ -460,7 +460,7 @@ static BOOL isTextbufferEvent(NSEvent * evt) - if (filter != FILTER_ALL) - { - NSArray * filterTypes = [NSArray arrayWithObject: [NSString stringWithCString: winfilters[filter] -- encoding: NSUTF8StringEncoding]]; -+ encoding: NSUTF8StringEncoding]]; - [openDlg setAllowedFileTypes: filterTypes]; - [openDlg setAllowsOtherFileTypes: NO]; - } -@@ -485,7 +485,7 @@ static BOOL isTextbufferEvent(NSEvent * evt) - if (filter != FILTER_ALL) - { - NSArray * filterTypes = [NSArray arrayWithObject: [NSString stringWithCString: winfilters[filter] -- encoding: NSUTF8StringEncoding]]; -+ encoding: NSUTF8StringEncoding]]; - [saveDlg setAllowedFileTypes: filterTypes]; - [saveDlg setAllowsOtherFileTypes: NO]; - } -@@ -518,7 +518,7 @@ static BOOL isTextbufferEvent(NSEvent * evt) +@@ -556,7 +556,7 @@ static BOOL isTextbufferEvent(NSEvent * evt) { BOOL openedFirstGame; @@ -115,34 +38,6 @@ index 68deca5..9f752ac 100644 NSConnection * link; } - (BOOL) launchFile: (NSString *) file; -@@ -760,20 +760,20 @@ static BOOL isTextbufferEvent(NSEvent * evt) - - (BOOL) launchFileDialog - { - int result; -- -+ - NSOpenPanel * openDlg = [NSOpenPanel openPanel]; - - [openDlg setCanChooseFiles: YES]; - [openDlg setCanChooseDirectories: NO]; - [openDlg setAllowsMultipleSelection: NO]; - [openDlg setTitle: [NSString stringWithCString: AppName encoding: NSUTF8StringEncoding]]; -- -+ - NSMutableArray *filterTypes = [NSMutableArray arrayWithCapacity:100]; -- -- NSEnumerator *docTypeEnum = [[[[NSBundle mainBundle] infoDictionary] -+ -+ NSEnumerator *docTypeEnum = [[[[NSBundle mainBundle] infoDictionary] - objectForKey:@"CFBundleDocumentTypes"] objectEnumerator]; - NSDictionary *docType; -- -+ - while (docType = [docTypeEnum nextObject]) - { - [filterTypes addObjectsFromArray:[docType objectForKey: @"CFBundleTypeExtensions"]]; -diff --git a/garglk/ttsmac.m b/garglk/ttsmac.m -index 9f6ab0e..de3d6fe 100644 --- a/garglk/ttsmac.m +++ b/garglk/ttsmac.m @@ -30,7 +30,7 @@ @@ -167,29 +62,3 @@ index 9f6ab0e..de3d6fe 100644 if ([lang isEqualToString: [attr objectForKey: NSVoiceLocaleIdentifier]]) { [synth setVoice: voice]; -diff --git a/tads/tads3/vmtz.cpp b/tads/tads3/vmtz.cpp -index 5e193a1..dce46f7 100644 ---- a/tads/tads3/vmtz.cpp -+++ b/tads/tads3/vmtz.cpp -@@ -1985,5 +1985,5 @@ void CVmTimeZone::query(vmtzquery *result, int32_t dayno, int32_t daytime, - * up until that moment - */ -- result->set(tcur > 0 ? tcur - 1 : tcur); -+ result->set(tcur != 0 ? tcur - 1 : tcur); - return; - } -diff --git a/terps/Jamfile b/terps/Jamfile -index b5f6d52..2d1ccdb 100644 ---- a/terps/Jamfile -+++ b/terps/Jamfile -@@ -185,8 +185,8 @@ if $(MAKE_GEAS) = yes - - if $(OS) = MACOSX - { -- SubDirCcFlags -headerpad_max_install_names $(MAINARCH) $(ALTARCH) ; -- LINKFLAGS = -headerpad_max_install_names $(MAINARCH) $(ALTARCH) ; -+ SubDirCcFlags $(MAINARCH) $(ALTARCH) ; -+ LINKFLAGS = $(MAINARCH) $(ALTARCH) ; - } - - SUBDIRC++FLAGS = $(SUBDIRCCFLAGS) ; diff --git a/pkgs/games/gargoyle/default.nix b/pkgs/games/gargoyle/default.nix index fc02bdffcad..5bf0ae1c814 100644 --- a/pkgs/games/gargoyle/default.nix +++ b/pkgs/games/gargoyle/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchFromGitHub, jam, libtool, pkgconfig, gtk2, SDL, SDL_mixer, SDL_sound, smpeg, libvorbis }: +{ stdenv, lib, fetchFromGitHub, jam, cctools, pkgconfig +, SDL, SDL_mixer, SDL_sound, cf-private, gtk2, libvorbis, smpeg }: let @@ -19,28 +20,22 @@ let in stdenv.mkDerivation { - name = "gargoyle-2017-08-27"; + name = "gargoyle-2018-10-06"; src = fetchFromGitHub { owner = "garglk"; repo = "garglk"; - rev = "65c95166f53adaa2e5e1a5e0d8a34e9219d06de6"; - sha256 = "1agnap38qdf2n1v37ka3ky44j56yhvln4lzf13diyqhjmh9lvfq5"; + rev = "d03391563fa75942fbf8f8deeeacf3a8be9fc3b0"; + sha256 = "0icwgc25gp7krq6zf66hljydc6vps6bb4knywnrfgnfcmcalqqx9"; }; - nativeBuildInputs = [ jam pkgconfig ] ++ stdenv.lib.optional stdenv.isDarwin libtool; + nativeBuildInputs = [ jam pkgconfig ] ++ lib.optional stdenv.isDarwin cctools; - buildInputs = [ gtk2 SDL SDL_mixer ] ++ ( - if stdenv.isDarwin then [ smpeg libvorbis ] else [ SDL_sound ] - ); + buildInputs = [ SDL SDL_mixer SDL_sound gtk2 ] + ++ lib.optionals stdenv.isDarwin [ cf-private smpeg libvorbis ]; patches = [ ./darwin.patch ]; - postPatch = '' - substituteInPlace Jamrules \ - --replace -mmacosx-version-min=10.7 -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET - ''; - buildPhase = jamenv + "jam -j$NIX_BUILD_CORES"; installPhase = if stdenv.isDarwin then (builtins.readFile ./darwin.sh) else jamenv + '' @@ -57,7 +52,7 @@ stdenv.mkDerivation { enableParallelBuilding = true; - meta = with stdenv.lib; { + meta = with lib; { homepage = http://ccxvii.net/gargoyle/; license = licenses.gpl2Plus; description = "Interactive fiction interpreter GUI"; -- cgit 1.4.1