tix: fix build on darwin

+58 -1
+9 -1
pkgs/development/libraries/tix/default.nix
··· 1 - { lib, stdenv, fetchurl, tcl, tk, fetchpatch } : 2 3 tcl.mkTclDerivation { 4 version = "8.4.3"; ··· 13 url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-tcltk/tix/files/tix-8.4.3-tcl8.5.patch?id=56bd759df1d0c750a065b8c845e93d5dfa6b549d"; 14 sha256 = "0wzqmcxxq0rqpnjgxz10spw92yhfygnlwv0h8pcx2ycnqiljz6vj"; 15 }) 16 ] ++ lib.optional (tcl.release == "8.6") 17 (fetchpatch { 18 name = "tix-8.4.3-tcl8.6.patch";
··· 1 + { lib 2 + , stdenv 3 + , fetchurl 4 + , fetchpatch 5 + , tcl 6 + , tk 7 + }: 8 9 tcl.mkTclDerivation { 10 version = "8.4.3"; ··· 19 url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-tcltk/tix/files/tix-8.4.3-tcl8.5.patch?id=56bd759df1d0c750a065b8c845e93d5dfa6b549d"; 20 sha256 = "0wzqmcxxq0rqpnjgxz10spw92yhfygnlwv0h8pcx2ycnqiljz6vj"; 21 }) 22 + # Remove duplicated definition of XLowerWindow 23 + ./duplicated-xlowerwindow.patch 24 ] ++ lib.optional (tcl.release == "8.6") 25 (fetchpatch { 26 name = "tix-8.4.3-tcl8.6.patch";
+49
pkgs/development/libraries/tix/duplicated-xlowerwindow.patch
···
··· 1 + This is duplicated code from Tk. 2 + It causes errors during build since XLowerWindow is not only a function but also "defined" in tkIntXlibDecls.h. 3 + 4 + See 5 + https://github.com/tcltk/tk/blob/71dcaddc69769cbd3e2c4b5edb5810f974579527/generic/tkIntXlibDecls.h#L396 6 + and 7 + https://github.com/tcltk/tk/blob/71dcaddc69769cbd3e2c4b5edb5810f974579527/generic/tkIntXlibDecls.h#L1487 8 + 9 + --- a/unix/tixUnixWm.c 2005-03-25 13:15:53.000000000 -0700 10 + +++ b/unix/tixUnixWm.c 2021-03-20 07:31:52.000000000 -0700 11 + @@ -24,38 +24,3 @@ 12 + { 13 + return TCL_OK; 14 + } 15 + - 16 + -#ifdef MAC_OSX_TK 17 + -#include "tkInt.h" 18 + -/* 19 + - *---------------------------------------------------------------------- 20 + - * 21 + - * XLowerWindow -- 22 + - * 23 + - * Change the stacking order of a window. 24 + - * 25 + - * Results: 26 + - * None. 27 + - * 28 + - * Side effects: 29 + - * Changes the stacking order of the specified window. 30 + - * 31 + - *---------------------------------------------------------------------- 32 + - */ 33 + - 34 + -int 35 + -XLowerWindow( 36 + - Display* display, /* Display. */ 37 + - Window window) /* Window. */ 38 + -{ 39 + - TkWindow *winPtr = *((TkWindow **) window); 40 + - 41 + - display->request++; 42 + - if (Tk_IsTopLevel(winPtr) && !Tk_IsEmbedded(winPtr)) { 43 + - TkWmRestackToplevel(winPtr, Below, NULL); 44 + - } else { 45 + - /* TODO: this should generate damage */ 46 + - } 47 + - return 0; 48 + -} 49 + -#endif