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:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
|
|
@ -0,0 +1,37 @@
|
|||
{ lib, appleDerivation, xcbuildHook, llvmPackages, makeWrapper }:
|
||||
|
||||
appleDerivation {
|
||||
nativeBuildInputs = [ xcbuildHook makeWrapper ];
|
||||
|
||||
patches = [
|
||||
# The following copied from
|
||||
# https://github.com/Homebrew/homebrew-core/commit/712ed3e948868e17f96b7e59972b5f45d4faf688
|
||||
# is needed to build libvirt.
|
||||
./rpcgen-support-hyper-and-quad-types.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
makeWrapper ${llvmPackages.clang}/bin/clang $out/bin/clang-cpp --add-flags "--driver-mode=cpp"
|
||||
substituteInPlace rpcgen/rpc_main.c \
|
||||
--replace "/usr/bin/cpp" "$out/bin/clang-cpp"
|
||||
'';
|
||||
|
||||
# temporary install phase until xcodebuild has "install" support
|
||||
installPhase = ''
|
||||
for f in Products/Release/*; do
|
||||
if [ -f $f ]; then
|
||||
install -D $f $out/bin/$(basename $f)
|
||||
fi
|
||||
done
|
||||
|
||||
for n in 1; do
|
||||
mkdir -p $out/share/man/man$n
|
||||
install */*.$n $out/share/man/man$n
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
platforms = lib.platforms.darwin;
|
||||
maintainers = with lib.maintainers; [ matthewbauer ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
diff --git a/rpcgen/rpc_parse.c b/rpcgen/rpc_parse.c
|
||||
index 52edc9f..db0c1f1 100644
|
||||
--- a/rpcgen/rpc_parse.c
|
||||
+++ b/rpcgen/rpc_parse.c
|
||||
@@ -580,6 +580,10 @@ get_type(prefixp, typep, dkind)
|
||||
*typep = "long";
|
||||
(void) peekscan(TOK_INT, &tok);
|
||||
break;
|
||||
+ case TOK_HYPER:
|
||||
+ *typep = "int64_t";
|
||||
+ (void) peekscan(TOK_INT, &tok);
|
||||
+ break;
|
||||
case TOK_VOID:
|
||||
if (dkind != DEF_UNION && dkind != DEF_PROGRAM) {
|
||||
error("voids allowed only inside union and program definitions with one argument");
|
||||
@@ -592,6 +596,7 @@ get_type(prefixp, typep, dkind)
|
||||
case TOK_INT:
|
||||
case TOK_FLOAT:
|
||||
case TOK_DOUBLE:
|
||||
+ case TOK_QUAD:
|
||||
case TOK_BOOL:
|
||||
*typep = tok.str;
|
||||
break;
|
||||
@@ -622,6 +627,11 @@ unsigned_dec(typep)
|
||||
*typep = "u_long";
|
||||
(void) peekscan(TOK_INT, &tok);
|
||||
break;
|
||||
+ case TOK_HYPER:
|
||||
+ get_token(&tok);
|
||||
+ *typep = "u_int64_t";
|
||||
+ (void) peekscan(TOK_INT, &tok);
|
||||
+ break;
|
||||
case TOK_INT:
|
||||
get_token(&tok);
|
||||
*typep = "u_int";
|
||||
diff --git a/rpcgen/rpc_scan.c b/rpcgen/rpc_scan.c
|
||||
index a8df441..4130107 100644
|
||||
--- a/rpcgen/rpc_scan.c
|
||||
+++ b/rpcgen/rpc_scan.c
|
||||
@@ -419,8 +419,10 @@ static token symbols[] = {
|
||||
{TOK_UNSIGNED, "unsigned"},
|
||||
{TOK_SHORT, "short"},
|
||||
{TOK_LONG, "long"},
|
||||
+ {TOK_HYPER, "hyper"},
|
||||
{TOK_FLOAT, "float"},
|
||||
{TOK_DOUBLE, "double"},
|
||||
+ {TOK_QUAD, "quadruple"},
|
||||
{TOK_STRING, "string"},
|
||||
{TOK_PROGRAM, "program"},
|
||||
{TOK_VERSION, "version"},
|
||||
diff --git a/rpcgen/rpc_scan.h b/rpcgen/rpc_scan.h
|
||||
index bac2be4..e4c57c8 100644
|
||||
--- a/rpcgen/rpc_scan.h
|
||||
+++ b/rpcgen/rpc_scan.h
|
||||
@@ -66,9 +66,11 @@ enum tok_kind {
|
||||
TOK_INT,
|
||||
TOK_SHORT,
|
||||
TOK_LONG,
|
||||
+ TOK_HYPER,
|
||||
TOK_UNSIGNED,
|
||||
TOK_FLOAT,
|
||||
TOK_DOUBLE,
|
||||
+ TOK_QUAD,
|
||||
TOK_OPAQUE,
|
||||
TOK_CHAR,
|
||||
TOK_STRING,
|
||||
Loading…
Add table
Add a link
Reference in a new issue