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
77
pkgs/development/libraries/tachyon/default.nix
Normal file
77
pkgs/development/libraries/tachyon/default.nix
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, Carbon
|
||||
, libjpeg
|
||||
, libpng
|
||||
, withJpegSupport ? true # support jpeg output
|
||||
, withPngSupport ? true # support png output
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tachyon";
|
||||
version = "0.99.4";
|
||||
src = fetchurl {
|
||||
url = "http://jedi.ks.uiuc.edu/~johns/tachyon/files/${version}/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-vJvDHhLDp5rpH9KhXUtQaqfjyai0e3NMKOEkbhYuaA0=";
|
||||
};
|
||||
buildInputs = lib.optionals stdenv.isDarwin [
|
||||
Carbon
|
||||
] ++ lib.optionals withJpegSupport [
|
||||
libjpeg
|
||||
] ++ lib.optionals withPngSupport [
|
||||
libpng
|
||||
];
|
||||
preBuild = ''
|
||||
cd unix
|
||||
'' + lib.optionalString withJpegSupport ''
|
||||
export USEJPEG=" -DUSEJPEG"
|
||||
export JPEGLIB=" -ljpeg"
|
||||
'' + lib.optionalString withPngSupport ''
|
||||
export USEPNG=" -DUSEPNG"
|
||||
export PNGLIB=" -lpng -lz"
|
||||
'';
|
||||
arch = if stdenv.hostPlatform.system == "x86_64-linux" then "linux-64-thr" else
|
||||
if stdenv.hostPlatform.system == "i686-linux" then "linux-thr" else
|
||||
# 2021-03-29: multithread (-DTHR -D_REENTRANT) was disabled on linux-arm
|
||||
# because it caused Sage's 3D plotting tests to hang indefinitely.
|
||||
# see https://github.com/NixOS/nixpkgs/pull/117465
|
||||
if stdenv.hostPlatform.system == "aarch64-linux" then "linux-arm" else
|
||||
if stdenv.hostPlatform.system == "armv7l-linux" then "linux-arm" else
|
||||
if stdenv.hostPlatform.system == "x86_64-darwin" then "macosx-thr" else
|
||||
if stdenv.hostPlatform.system == "i686-darwin" then "macosx-64-thr" else
|
||||
if stdenv.hostPlatform.system == "i686-cygwin" then "win32" else
|
||||
if stdenv.hostPlatform.system == "x86_64-freebsd" then "bsd" else
|
||||
if stdenv.hostPlatform.system == "x686-freebsd" then "bsd" else
|
||||
throw "Don't know what arch to select for tachyon build";
|
||||
makeFlags = [ arch ];
|
||||
|
||||
patches = [
|
||||
# Remove absolute paths in Make-config (and unset variables so they can be set in preBuild)
|
||||
./no-absolute-paths.patch
|
||||
# Include new targets (like arm)
|
||||
./make-archs.patch
|
||||
];
|
||||
postPatch = ''
|
||||
# Ensure looks for nix-provided Carbon, not system frameworks
|
||||
substituteInPlace unix/Make-arch \
|
||||
--replace '-F/System/Library/Frameworks' ""
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
cd ../compile/${arch}
|
||||
mkdir -p "$out"/{bin,lib,include,share/doc/tachyon,share/tachyon}
|
||||
cp tachyon "$out"/bin
|
||||
cp libtachyon.* "$out/lib"
|
||||
cd ../..
|
||||
cp src/*.h "$out/include/"
|
||||
cp Changes Copyright README "$out/share/doc/tachyon"
|
||||
cp -r scenes "$out/share/tachyon/scenes"
|
||||
'';
|
||||
meta = {
|
||||
description = "A Parallel / Multiprocessor Ray Tracing System";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = [lib.maintainers.raskin];
|
||||
platforms = with lib.platforms; linux ++ cygwin ++ darwin;
|
||||
homepage = "http://jedi.ks.uiuc.edu/~johns/tachyon/";
|
||||
};
|
||||
}
|
||||
37
pkgs/development/libraries/tachyon/make-archs.patch
Normal file
37
pkgs/development/libraries/tachyon/make-archs.patch
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
diff --git a/unix/Make-arch b/unix/Make-arch
|
||||
index 08afb85..dbeb691 100644
|
||||
--- a/unix/Make-arch
|
||||
+++ b/unix/Make-arch
|
||||
@@ -920,6 +920,15 @@ macosx:
|
||||
"RANLIB = ranlib" \
|
||||
"LIBS = -L. -ltachyon $(MISCLIB)"
|
||||
|
||||
+macosx-64:
|
||||
+ $(MAKE) all \
|
||||
+ "ARCH = macosx" \
|
||||
+ "CFLAGS = -Os -m64 -ffast-math -DBsd $(MISCFLAGS)" \
|
||||
+ "ARFLAGS = r" \
|
||||
+ "STRIP = strip" \
|
||||
+ "RANLIB = ranlib" \
|
||||
+ "LIBS = -L. -ltachyon $(MISCLIB)"
|
||||
+
|
||||
macosx-thr:
|
||||
$(MAKE) all \
|
||||
"ARCH = macosx-thr" \
|
||||
@@ -1209,6 +1218,16 @@ linux-thr:
|
||||
"RANLIB = ranlib" \
|
||||
"LIBS = -L. -ltachyon $(MISCLIB) -lm -lpthread"
|
||||
|
||||
+# Linux Arm using gcc
|
||||
+linux-arm:
|
||||
+ $(MAKE) all \
|
||||
+ "ARCH = linux-arm" \
|
||||
+ "CFLAGS = -Wall -O3 -fomit-frame-pointer -ffast-math -DLinux $(MISCFLAGS)" \
|
||||
+ "ARFLAGS = r" \
|
||||
+ "STRIP = strip" \
|
||||
+ "RANLIB = ranlib" \
|
||||
+ "LIBS = -L. -ltachyon $(MISCLIB) -lm -lpthread"
|
||||
+
|
||||
# Linux x86 using gcc, threads, and OpenGL
|
||||
linux-thr-ogl:
|
||||
$(MAKE) all \
|
||||
60
pkgs/development/libraries/tachyon/no-absolute-paths.patch
Normal file
60
pkgs/development/libraries/tachyon/no-absolute-paths.patch
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
diff --git a/unix/Make-config b/unix/Make-config
|
||||
--- a/unix/Make-config
|
||||
+++ b/unix/Make-config
|
||||
@@ -18,7 +18,7 @@
|
||||
# Bourne Shell Configuration:
|
||||
# set SHELL=/bin/sh or wherever your bourne shell is
|
||||
##########################################################################
|
||||
-SHELL=/bin/sh
|
||||
+# SHELL=/bin/sh
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
# The following line should be set to -Ixxx where xxx is your X11 include path
|
||||
# Sun puts X11 in /usr/openwin/xxx
|
||||
-X11INC= -I/usr/openwin/include
|
||||
+# X11INC= -I/usr/openwin/include
|
||||
|
||||
# Others typically use /usr/X11 or /usr/X11R6
|
||||
#X11INC= -I/usr/X11
|
||||
@@ -105,9 +105,9 @@
|
||||
##########################################################################
|
||||
# Customize MPI directories and includes as-needed.
|
||||
# A typical MPICH installation location:
|
||||
-MPIDIR=/usr/local/mpi
|
||||
-MPIINC=$(MPIDIR)/include
|
||||
-MPILIB=$(MPIDIR)/lib
|
||||
+# MPIDIR=/usr/local/mpi
|
||||
+# MPIINC=$(MPIDIR)/include
|
||||
+# MPILIB=$(MPIDIR)/lib
|
||||
|
||||
# MPI defines and any flags needed by the local installation.
|
||||
# Always list -DMPI at a minimum.
|
||||
@@ -166,9 +166,9 @@
|
||||
# http://www.ijg.org/files/
|
||||
##########################################################################
|
||||
# Uncomment the following lines to disable JPEG support
|
||||
-USEJPEG=
|
||||
-JPEGINC=
|
||||
-JPEGLIB=
|
||||
+# USEJPEG=
|
||||
+# JPEGINC=
|
||||
+# JPEGLIB=
|
||||
|
||||
# Uncomment the following lines to enable JPEG support
|
||||
#USEJPEG= -DUSEJPEG
|
||||
@@ -186,9 +186,9 @@
|
||||
# http://www.libpng.org/
|
||||
##########################################################################
|
||||
# Uncomment the following lines to disable PNG support
|
||||
-USEPNG=
|
||||
-PNGINC=
|
||||
-PNGLIB=
|
||||
+# USEPNG=
|
||||
+# PNGINC=
|
||||
+# PNGLIB=
|
||||
|
||||
# Uncomment the following lines to enable PNG support
|
||||
#USEPNG= -DUSEPNG
|
||||
Loading…
Add table
Add a link
Reference in a new issue