3
0
Fork 0
forked from mirrors/nixpkgs

irrlicht: fix on aarch64

This commit is contained in:
Astro 2021-10-10 22:58:30 +02:00
parent a74daa0ec4
commit aec477db26

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchzip, libGLU, libGL, libXrandr, libX11, libXxf86vm }:
{ lib, stdenv, fetchzip, libGLU, libGL, libXrandr, libX11, libXxf86vm, zlib }:
let
common = import ./common.nix { inherit fetchzip; };
@ -12,6 +12,9 @@ stdenv.mkDerivation rec {
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 = ''
@ -27,7 +30,8 @@ stdenv.mkDerivation rec {
mkdir -p $out/lib
'';
buildInputs = [ libGLU libGL libXrandr libX11 libXxf86vm ];
buildInputs = [ libGLU libGL libXrandr libX11 libXxf86vm ]
++ lib.optional stdenv.isAarch64 zlib;
meta = {
homepage = "http://irrlicht.sourceforge.net/";