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,54 @@
{lib, stdenv, fetchurl, libGLU, libGL, freeglut, glew, libXmu, libXext, libX11
, qmake, GLUT, fixDarwinDylibNames }:
stdenv.mkDerivation rec {
version = "1.4.2";
pname = "opencsg";
src = fetchurl {
url = "http://www.opencsg.org/OpenCSG-${version}.tar.gz";
sha256 = "1ysazynm759gnw1rdhn9xw9nixnzrlzrc462340a6iif79fyqlnr";
};
nativeBuildInputs = [ qmake ]
++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
buildInputs = [ glew ]
++ lib.optionals stdenv.isLinux [ libGLU libGL freeglut libXmu libXext libX11 ]
++ lib.optional stdenv.isDarwin GLUT;
doCheck = false;
patches = [ ./fix-pro-files.patch ];
preConfigure = ''
rm example/Makefile src/Makefile
qmakeFlags=("''${qmakeFlags[@]}" "INSTALLDIR=$out")
'';
postInstall = ''
install -D license.txt "$out/share/doc/opencsg/license.txt"
'' + lib.optionalString stdenv.isDarwin ''
mkdir -p $out/Applications
mv $out/bin/*.app $out/Applications
rmdir $out/bin || true
'';
dontWrapQtApps = true;
postFixup = lib.optionalString stdenv.isDarwin ''
app=$out/Applications/opencsgexample.app/Contents/MacOS/opencsgexample
install_name_tool -change \
$(otool -L $app | awk '/opencsg.+dylib/ { print $1 }') \
$(otool -D $out/lib/libopencsg.dylib | tail -n 1) \
$app
'';
meta = with lib; {
description = "Constructive Solid Geometry library";
homepage = "http://www.opencsg.org/";
platforms = platforms.unix;
maintainers = [ maintainers.raskin ];
license = licenses.gpl2;
};
}

View file

@ -0,0 +1,21 @@
diff -ur OpenCSG-1.4.2-pristine/example/example.pro OpenCSG-1.4.2/example/example.pro
--- OpenCSG-1.4.2-pristine/example/example.pro 2016-09-27 06:11:16.000000000 +0900
+++ OpenCSG-1.4.2/example/example.pro 2019-05-07 10:45:18.785251737 +0900
@@ -6,7 +6,9 @@
INCLUDEPATH += ../include
LIBS += -L../lib -lopencsg -lGLEW
-INSTALLDIR = /usr/local
+isEmpty(INSTALLDIR) {
+ INSTALLDIR = /usr/local
+}
INSTALLS += target
target.path = $$INSTALLDIR/bin
diff -ur OpenCSG-1.4.2-pristine/opencsg.pro OpenCSG-1.4.2/opencsg.pro
--- OpenCSG-1.4.2-pristine/opencsg.pro 2016-09-27 06:11:16.000000000 +0900
+++ OpenCSG-1.4.2/opencsg.pro 2019-05-07 10:44:50.578698165 +0900
@@ -1,2 +1,3 @@
TEMPLATE = subdirs
SUBDIRS = src example
+CONFIG += ordered