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,73 @@
{ lib, stdenv, fetchurl, bison, flex, makeWrapper, texinfo4, getopt, readline, texlive }:
lib.fix (eukleides: stdenv.mkDerivation rec {
pname = "eukleides";
version = "1.5.4";
src = fetchurl {
url = "http://www.eukleides.org/files/${pname}-${version}.tar.bz2";
sha256 = "0s8cyh75hdj89v6kpm3z24i48yzpkr8qf0cwxbs9ijxj1i38ki0q";
};
patches = [
# use $CC instead of hardcoded gcc
./use-CC.patch
# allow PostScript transparency in epstopdf call
./gs-allowpstransparency.patch
];
nativeBuildInputs = [ bison flex texinfo4 makeWrapper ];
buildInputs = [ getopt readline ];
preConfigure = ''
substituteInPlace Makefile \
--replace mktexlsr true
substituteInPlace doc/Makefile \
--replace ginstall-info install-info
substituteInPlace Config \
--replace '/usr/local' "$out" \
--replace '$(SHARE_DIR)/texmf' "$tex"
'';
# Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: eukleides_build/triangle.o:(.bss+0x28): multiple definition of `A';
# eukleides_build/quadrilateral.o:(.bss+0x18): first defined here
NIX_CFLAGS_COMPILE = "-fcommon";
preInstall = ''
mkdir -p $out/bin
'';
postInstall = ''
wrapProgram $out/bin/euktoeps \
--prefix PATH : ${lib.makeBinPath [ getopt ]}
'';
outputs = [ "out" "doc" "tex" ];
passthru.tlType = "run";
passthru.pkgs = [ eukleides.tex ]
# packages needed by euktoeps, euktopdf and eukleides.sty
++ (with texlive; collection-pstricks.pkgs ++ epstopdf.pkgs ++ iftex.pkgs ++ moreverb.pkgs);
meta = {
description = "Geometry Drawing Language";
homepage = "http://www.eukleides.org/";
license = lib.licenses.gpl3Plus;
longDescription = ''
Eukleides is a computer language devoted to elementary plane
geometry. It aims to be a fairly comprehensive system to create
geometric figures, either static or dynamic. Eukleides allows to
handle basic types of data: numbers and strings, as well as
geometric types of data: points, vectors, sets (of points), lines,
circles and conics.
'';
platforms = lib.platforms.unix;
};
})

View file

@ -0,0 +1,10 @@
--- a/bash/euktopdf
+++ b/bash/euktopdf
@@ -55,6 +55,6 @@ do
exit 1
fi
dvips -q -E -o $base.eps $base.dvi &&
- epstopdf $base.eps &&
+ epstopdf --gsopt=-dALLOWPSTRANSPARENCY $base.eps &&
rm -f $base.{tex,log,dvi,eps}
done

View file

@ -0,0 +1,11 @@
--- a/build/Makefile
+++ b/build/Makefile
@@ -11,7 +11,7 @@ LEX = flex
LFLAGS = -8
YACC = bison
YFLAGS = -d
-CC = gcc
+CC ?= gcc
IFLAGS = -I$(COMMON_DIR) -I$(MAIN_DIR) -I$(BUILD_DIR)
ifneq ($(strip $(LOCALES)),)
MOFLAGS = -DMO_DIR=\"$(MO_DIR)\"