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
11
pkgs/development/libraries/irrlicht/common.nix
Normal file
11
pkgs/development/libraries/irrlicht/common.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ fetchzip }:
|
||||
|
||||
rec {
|
||||
pname = "irrlicht";
|
||||
version = "1.8.4";
|
||||
|
||||
src = fetchzip {
|
||||
url = "mirror://sourceforge/irrlicht/${pname}-${version}.zip";
|
||||
sha256 = "02sq067fn4xpf0lcyb4vqxmm43qg2nxx770bgrl799yymqbvih5f";
|
||||
};
|
||||
}
|
||||
45
pkgs/development/libraries/irrlicht/default.nix
Normal file
45
pkgs/development/libraries/irrlicht/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ lib, stdenv, fetchzip, libGLU, libGL, libXrandr, libX11, libXxf86vm, zlib }:
|
||||
|
||||
let
|
||||
common = import ./common.nix { inherit fetchzip; };
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = common.pname;
|
||||
version = common.version;
|
||||
|
||||
src = common.src;
|
||||
|
||||
postPatch = ''
|
||||
sed -ie '/sys\/sysctl.h/d' source/Irrlicht/COSOperator.cpp
|
||||
'' + lib.optionalString stdenv.isAarch64 ''
|
||||
substituteInPlace source/Irrlicht/Makefile \
|
||||
--replace "-DIRRLICHT_EXPORTS=1" "-DIRRLICHT_EXPORTS=1 -DPNG_ARM_NEON_OPT=0"
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
cd source/Irrlicht
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
makeFlagsArray+=(sharedlib NDEBUG=1 LDFLAGS="-lX11 -lGL -lXxf86vm")
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
preInstall = ''
|
||||
sed -i s,/usr/local/lib,$out/lib, Makefile
|
||||
mkdir -p $out/lib
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
libGLU libGL libXrandr libX11 libXxf86vm
|
||||
] ++ lib.optional stdenv.isAarch64 zlib;
|
||||
|
||||
meta = {
|
||||
homepage = "http://irrlicht.sourceforge.net/";
|
||||
license = lib.licenses.zlib;
|
||||
description = "Open source high performance realtime 3D engine written in C++";
|
||||
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
||||
};
|
||||
}
|
||||
43
pkgs/development/libraries/irrlicht/mac.nix
Normal file
43
pkgs/development/libraries/irrlicht/mac.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ lib, stdenv, fetchzip, libGLU, libGL, fetchFromGitHub, cmake, Cocoa, OpenGL, IOKit }:
|
||||
|
||||
let
|
||||
common = import ./common.nix { inherit fetchzip; };
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "irrlicht-mac";
|
||||
version = common.version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "quiark";
|
||||
repo = "IrrlichtCMake";
|
||||
rev = "523a5e6ef84be67c3014f7b822b97acfced536ce";
|
||||
sha256 = "10ahnry2zl64wphs233gxhvs6c0345pyf5nwa29mc6yn49x7bidi";
|
||||
};
|
||||
|
||||
postUnpack = ''
|
||||
cp -r ${common.src}/* $sourceRoot/
|
||||
chmod -R 777 $sourceRoot
|
||||
'';
|
||||
|
||||
patches = [ ./mac_device.patch ];
|
||||
dontFixCmake = true;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DIRRLICHT_STATIC_LIBRARY=ON"
|
||||
"-DIRRLICHT_BUILD_EXAMPLES=OFF"
|
||||
"-DIRRLICHT_INSTALL_MEDIA_FILES=OFF"
|
||||
"-DIRRLICHT_ENABLE_X11_SUPPORT=OFF"
|
||||
"-DIRRLICHT_BUILD_TOOLS=OFF"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ OpenGL Cocoa IOKit ];
|
||||
|
||||
meta = {
|
||||
homepage = "http://irrlicht.sourceforge.net/";
|
||||
license = lib.licenses.zlib;
|
||||
description = "Open source high performance realtime 3D engine written in C++";
|
||||
platforms = lib.platforms.darwin;
|
||||
};
|
||||
}
|
||||
38
pkgs/development/libraries/irrlicht/mac_device.patch
Normal file
38
pkgs/development/libraries/irrlicht/mac_device.patch
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
--- a/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm
|
||||
+++ b/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <IOKit/hidsystem/IOHIDUsageTables.h>
|
||||
#else
|
||||
/* The header was moved here in Mac OS X 10.1 */
|
||||
-#include <Kernel/IOKit/hidsystem/IOHIDUsageTables.h>
|
||||
+#include <IOKit/hid/IOHIDUsageTables.h>
|
||||
#endif
|
||||
#include <IOKit/hid/IOHIDLib.h>
|
||||
#include <IOKit/hid/IOHIDKeys.h>
|
||||
@@ -496,7 +496,7 @@
|
||||
{
|
||||
[[NSAutoreleasePool alloc] init];
|
||||
[NSApplication sharedApplication];
|
||||
- [NSApp setDelegate:(id<NSFileManagerDelegate>)[[[AppDelegate alloc] initWithDevice:this] autorelease]];
|
||||
+ [NSApp setDelegate:(id<NSApplicationDelegate>)[[[AppDelegate alloc] initWithDevice:this] autorelease]];
|
||||
[NSBundle loadNibNamed:@"MainMenu" owner:[NSApp delegate]];
|
||||
[NSApp finishLaunching];
|
||||
}
|
||||
@@ -642,7 +642,7 @@
|
||||
NSOpenGLPFASamples, (NSOpenGLPixelFormatAttribute)CreationParams.AntiAlias,
|
||||
NSOpenGLPFAStencilSize, (NSOpenGLPixelFormatAttribute)(CreationParams.Stencilbuffer?1:0),
|
||||
NSOpenGLPFADoubleBuffer,
|
||||
- (NSOpenGLPixelFormatAttribute)nil
|
||||
+ (NSOpenGLPixelFormatAttribute)0
|
||||
};
|
||||
|
||||
if (CreationParams.AntiAlias<2)
|
||||
@@ -668,7 +668,7 @@
|
||||
{
|
||||
// Third try without Doublebuffer
|
||||
os::Printer::log("No doublebuffering available.", ELL_WARNING);
|
||||
- windowattribs[14]=(NSOpenGLPixelFormatAttribute)nil;
|
||||
+ windowattribs[14]=(NSOpenGLPixelFormatAttribute)0;
|
||||
}
|
||||
|
||||
format = [[NSOpenGLPixelFormat alloc] initWithAttributes:windowattribs];
|
||||
Loading…
Add table
Add a link
Reference in a new issue