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,29 @@
diff -ubr mpack-1.6-orig/unixos.c mpack-1.6/unixos.c
--- mpack-1.6-orig/unixos.c 2013-08-17 14:32:38.102772775 +0200
+++ mpack-1.6/unixos.c 2013-08-17 14:32:43.180792505 +0200
@@ -38,10 +38,6 @@
#define MAXHOSTNAMELEN 64
#endif
-extern int errno;
-extern char *malloc();
-extern char *getenv();
-
int overwrite_files = 0;
int didchat;
Only in mpack-1.6: unixos.o
Only in mpack-1.6: unixunpk.o
Only in mpack-1.6: uudecode.o
diff -ubr mpack-1.6-orig/xmalloc.c mpack-1.6/xmalloc.c
--- mpack-1.6-orig/xmalloc.c 2013-08-17 14:32:38.102772775 +0200
+++ mpack-1.6/xmalloc.c 2013-08-17 14:33:08.900892319 +0200
@@ -24,7 +24,6 @@
*/
#include <stdio.h>
#include <string.h>
-extern char *malloc(), *realloc();
char *xmalloc (int size)
{
Only in mpack-1.6: xmalloc.o

View file

@ -0,0 +1,36 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "mpack";
version = "1.6";
src = fetchurl {
url = "http://ftp.andrew.cmu.edu/pub/mpack/mpack-${version}.tar.gz";
sha256 = "0k590z96509k96zxmhv72gkwhrlf55jkmyqlzi72m61r7axhhh97";
};
patches = [ ./build-fix.patch ./sendmail-via-execvp.diff ];
postPatch = ''
for f in *.{c,man,pl,unix} ; do
substituteInPlace $f --replace /usr/tmp /tmp
done
# this just shuts up some warnings
for f in {decode,encode,part,unixos,unixpk,unixunpk,xmalloc}.c ; do
sed -i 'i#include <stdlib.h>' $f
done
'';
postInstall = ''
install -Dm644 -t $out/share/doc/mpack INSTALL README.*
'';
enableParallelBuilding = true;
meta = with lib; {
description = "Utilities for encoding and decoding binary files in MIME";
license = licenses.free;
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,12 @@
--- mpack-1.6/unixpk.c 2003-07-21 22:50:41.000000000 +0200
+++ mpack-1.6/unixpk.c 2018-09-16 12:57:14.104026964 +0200
@@ -254,8 +254,9 @@
#ifdef SCO
execv("/usr/lib/mail/execmail", addr+start);
#else
+ execvp("sendmail", addr+start);
execv("/usr/lib/sendmail", addr+start);
execv("/usr/sbin/sendmail", addr+start);
#endif
perror("execv");
_exit(1);