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
12
pkgs/development/tools/tradcpp/aarch64.patch
Normal file
12
pkgs/development/tools/tradcpp/aarch64.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff a/config.h b/config.h
|
||||
--- a/config.h
|
||||
+++ b/config.h
|
||||
@@ -124,6 +124,8 @@
|
||||
#define CONFIG_CPU "__ppc64__"
|
||||
#elif defined(__ARM__)
|
||||
#define CONFIG_CPU "__ARM__"
|
||||
+#elif defined(__aarch64__)
|
||||
+#define CONFIG_CPU "__aarch64__"
|
||||
#else
|
||||
/* let it go */
|
||||
#endif
|
||||
26
pkgs/development/tools/tradcpp/default.nix
Normal file
26
pkgs/development/tools/tradcpp/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, fetchurl, autoconf }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tradcpp";
|
||||
version = "0.5.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://ftp.netbsd.org/pub/NetBSD/misc/dholland/${pname}-${version}.tar.gz";
|
||||
sha256 = "1h2bwxwc13rz3g2236l89hm47f72hn3m4h7wjir3j532kq0m68bc";
|
||||
};
|
||||
|
||||
# tradcpp only comes with BSD-make Makefile; the patch adds configure support
|
||||
buildInputs = [ autoconf ];
|
||||
preConfigure = "autoconf";
|
||||
patches = [
|
||||
./tradcpp-configure.patch
|
||||
./aarch64.patch
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A traditional (K&R-style) C macro preprocessor";
|
||||
platforms = platforms.all;
|
||||
license = licenses.bsd2;
|
||||
};
|
||||
|
||||
}
|
||||
84
pkgs/development/tools/tradcpp/tradcpp-configure.patch
Normal file
84
pkgs/development/tools/tradcpp/tradcpp-configure.patch
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
*** /dev/null Wed Jan 7 11:47:26 2015
|
||||
--- tradcpp-0.4/Makefile.in Wed Jan 7 11:43:15 2015
|
||||
***************
|
||||
*** 0 ****
|
||||
--- 1,64 ----
|
||||
+ SHELL = /bin/sh
|
||||
+
|
||||
+ ### Filled in by `configure' ###
|
||||
+ srcdir = @srcdir@
|
||||
+ VPATH = @srcdir@
|
||||
+ CC = @CC@
|
||||
+ CFLAGS = @CFLAGS@
|
||||
+ CPPFLAGS = @CPPFLAGS@
|
||||
+
|
||||
+ LDFLAGS = @LDFLAGS@
|
||||
+
|
||||
+ prefix = @prefix@
|
||||
+ exec_prefix = @exec_prefix@
|
||||
+
|
||||
+ bindir = @bindir@
|
||||
+ libdir = @libdir@
|
||||
+ incdir = @includedir@
|
||||
+ manext = 1
|
||||
+ mandir = @mandir@/man$(manext)
|
||||
+ docdir = @docdir@
|
||||
+ datarootdir = @datarootdir@
|
||||
+ datadir = @datadir@
|
||||
+
|
||||
+ OBJS= main.o \
|
||||
+ files.o directive.o eval.o macro.o output.o \
|
||||
+ place.o array.o utils.o
|
||||
+
|
||||
+ .PHONY: all clean install man doc dist
|
||||
+
|
||||
+ default: all
|
||||
+
|
||||
+ all: tradcpp
|
||||
+
|
||||
+ tradcpp: $(OBJS)
|
||||
+ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -o $@ $(OBJS)
|
||||
+
|
||||
+ clean:
|
||||
+ rm -f *.o
|
||||
+
|
||||
+ distclean: clean
|
||||
+ rm -f Makefile config.log config.status config-cache
|
||||
+
|
||||
+ install: tradcpp
|
||||
+ mkdir -p $(DESTDIR)$(mandir)
|
||||
+ install tradcpp.1 $(DESTDIR)$(mandir)
|
||||
+ mkdir -p $(DESTDIR)$(bindir)
|
||||
+ install tradcpp $(DESTDIR)$(bindir)
|
||||
+
|
||||
+ .c.o:
|
||||
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||
+
|
||||
+ array.o: array.c array.h inlinedefs.h utils.h
|
||||
+ directive.o: directive.c utils.h mode.h place.h files.h directive.h \
|
||||
+ macro.h eval.h output.h
|
||||
+ eval.o: eval.c utils.h array.h inlinedefs.h mode.h place.h eval.h
|
||||
+ files.o: files.c array.h inlinedefs.h utils.h mode.h place.h files.h \
|
||||
+ directive.h
|
||||
+ macro.o: macro.c array.h inlinedefs.h utils.h mode.h place.h macro.h \
|
||||
+ output.h
|
||||
+ main.o: main.c version.h config.h utils.h array.h inlinedefs.h mode.h \
|
||||
+ place.h files.h directive.h macro.h
|
||||
+ output.o: output.c utils.h mode.h place.h output.h
|
||||
+ place.o: place.c utils.h array.h inlinedefs.h place.h
|
||||
+ utils.o: utils.c utils.h
|
||||
*** /dev/null Wed Jan 7 11:47:26 2015
|
||||
--- tradcpp-0.4/configure.ac Wed Jan 7 11:22:18 2015
|
||||
***************
|
||||
*** 0 ****
|
||||
--- 1,10 ----
|
||||
+ AC_PREREQ([2.60])dnl
|
||||
+ AC_INIT(main.c)
|
||||
+ AC_PROG_CC
|
||||
+ AC_LANG(C)
|
||||
+ AC_SUBST(CC)
|
||||
+ AC_SUBST(CFLAGS)
|
||||
+ AC_SUBST(CPPFLAGS)
|
||||
+ AC_SUBST(LDFLAGS)
|
||||
+ AC_SUBST(LD)
|
||||
+ AC_OUTPUT(Makefile)
|
||||
Loading…
Add table
Add a link
Reference in a new issue