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,47 @@
{ lib, stdenv, fetchurl, which, gfortran, libGLU, xorg } :
stdenv.mkDerivation rec {
version = "6.3";
pname = "molden";
src = fetchurl {
url = "https://ftp.science.ru.nl/Molden//molden${version}.tar.gz";
sha256 = "02qi16pz2wffn3cc47dpjqhfafzwfmb79waw4nnhfyir8a4h3cq1";
};
nativeBuildInputs = [ which ];
buildInputs = [ gfortran libGLU xorg.libX11 xorg.libXmu ];
patches = [ ./dont_register_file_types.patch ];
postPatch = ''
substituteInPlace ./makefile --replace '-L/usr/X11R6/lib' "" \
--replace '-I/usr/X11R6/include' "" \
--replace '/usr/local/' $out/ \
--replace 'sudo' "" \
--replace '-C surf depend' '-C surf' \
--replace 'FFLAGS =' 'FFLAGS = -fallow-argument-mismatch'
substituteInPlace ambfor/makefile --replace 'FFLAGS =' 'FFLAGS = -fallow-argument-mismatch'
sed -in '/^# DO NOT DELETE THIS LINE/q;' surf/Makefile
'';
preInstall = ''
mkdir -p $out/bin
'';
enableParallelBuilding = true;
meta = with lib; {
description = "Display and manipulate molecular structures";
homepage = "http://www3.cmbi.umcn.nl/molden/";
license = {
fullName = "Free for academic/non-profit use";
url = "http://www3.cmbi.umcn.nl/molden/CopyRight.html";
free = false;
};
platforms = platforms.linux;
maintainers = with maintainers; [ markuskowa ];
};
}

View file

@ -0,0 +1,29 @@
diff --git a/makefile b/makefile
index 58a9e74..64615b6 100644
--- a/makefile
+++ b/makefile
@@ -32,8 +32,6 @@ os :=
ifeq ($(uname), Linux)
os := $(shell head -n 1 /etc/issue | cut -d" " -f1)
ifeq ($(os), Ubuntu)
- EXTEN = exten
- EXTENZ = exten2
LIBSG = -L/usr/X11R6/lib -lGLU -lGL -lX11 -lm
endif
ifeq ($(os), Debian)
@@ -278,7 +276,7 @@ LIBSOGL = -lglut -lGLU -lGL -lXmu -lX11 -lm
#
#LIBSG = -L/usr/X11R6/lib -Wl,-framework -Wl,GLUT -Wl,-framework -Wl,OpenGL -Wl,-framework -Wl,Cocoa -lGLU -lGL -lXmu -lX11 -lm
-all: molden gmolden ambfor/ambfor ambfor/ambmd surf/surf $(EXTEN)
+all: molden gmolden ambfor/ambfor ambfor/ambmd surf/surf
xwin.o: xwin.c rots.h
xwingl.o: xwin.c rots.h
@@ -344,5 +342,5 @@ exten:
exten2:
./register_extension.sh /usr/local/bin
-install: $(EXTENZ)
+install:
sudo install -t /usr/local/bin -m 755 molden gmolden ambfor/ambfor ambfor/ambmd surf/surf