uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,62 @@
{ lib
, stdenv
, fetchurl
, fetchpatch
, tcl
, tk
}:
tcl.mkTclDerivation {
version = "8.4.3";
pname = "tix";
src = fetchurl {
url = "mirror://sourceforge/tix/tix/8.4.3/Tix8.4.3-src.tar.gz";
sha256 = "1jq3dkyk9mqkj4cg7mdk5r0cclqsby9l2b7wrysi0zk5yw7h8bsn";
};
patches = [
(fetchpatch {
name = "tix-8.4.3-tcl8.5.patch";
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-tcltk/tix/files/tix-8.4.3-tcl8.5.patch?id=56bd759df1d0c750a065b8c845e93d5dfa6b549d";
sha256 = "0wzqmcxxq0rqpnjgxz10spw92yhfygnlwv0h8pcx2ycnqiljz6vj";
})
# Remove duplicated definition of XLowerWindow
./duplicated-xlowerwindow.patch
] ++ lib.optional (tcl.release == "8.6")
(fetchpatch {
name = "tix-8.4.3-tcl8.6.patch";
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-tcltk/tix/files/tix-8.4.3-tcl8.6.patch?id=56bd759df1d0c750a065b8c845e93d5dfa6b549d";
sha256 = "1jaz0l22xj7x1k4rb9ia6i1psnbwk4pblgq4gfvya7gg7fbb7r36";
})
;
buildInputs = [ tk ];
# the configure script expects to find the location of the sources of
# tcl and tk in {tcl,tk}Config.sh
# In fact, it only needs some private headers. We copy them in
# the private_headers folders and trick the configure script into believing
# the sources are here.
preConfigure = ''
mkdir -p private_headers/generic
< ${tcl}/lib/tclConfig.sh sed "s@TCL_SRC_DIR=.*@TCL_SRC_DIR=private_headers@" > tclConfig.sh
< ${tk}/lib/tkConfig.sh sed "s@TK_SRC_DIR=.*@TK_SRC_DIR=private_headers@" > tkConfig.sh
for i in ${tcl}/include/* ${tk.dev}/include/*; do
ln -s $i private_headers/generic;
done;
'';
addTclConfigureFlags = false;
configureFlags = [
"--with-tclconfig=."
"--with-tkinclude=${tk.dev}/include"
"--with-tkconfig=."
"--libdir=\${prefix}/lib"
];
meta = with lib; {
description = "A widget library for Tcl/Tk";
homepage = "http://tix.sourceforge.net/";
platforms = platforms.all;
license = with licenses; [
bsd2 # tix
gpl2 # patches from portage
];
};
}

View file

@ -0,0 +1,49 @@
This is duplicated code from Tk.
It causes errors during build since XLowerWindow is not only a function but also "defined" in tkIntXlibDecls.h.
See
https://github.com/tcltk/tk/blob/71dcaddc69769cbd3e2c4b5edb5810f974579527/generic/tkIntXlibDecls.h#L396
and
https://github.com/tcltk/tk/blob/71dcaddc69769cbd3e2c4b5edb5810f974579527/generic/tkIntXlibDecls.h#L1487
--- a/unix/tixUnixWm.c 2005-03-25 13:15:53.000000000 -0700
+++ b/unix/tixUnixWm.c 2021-03-20 07:31:52.000000000 -0700
@@ -24,38 +24,3 @@
{
return TCL_OK;
}
-
-#ifdef MAC_OSX_TK
-#include "tkInt.h"
-/*
- *----------------------------------------------------------------------
- *
- * XLowerWindow --
- *
- * Change the stacking order of a window.
- *
- * Results:
- * None.
- *
- * Side effects:
- * Changes the stacking order of the specified window.
- *
- *----------------------------------------------------------------------
- */
-
-int
-XLowerWindow(
- Display* display, /* Display. */
- Window window) /* Window. */
-{
- TkWindow *winPtr = *((TkWindow **) window);
-
- display->request++;
- if (Tk_IsTopLevel(winPtr) && !Tk_IsEmbedded(winPtr)) {
- TkWmRestackToplevel(winPtr, Below, NULL);
- } else {
- /* TODO: this should generate damage */
- }
- return 0;
-}
-#endif