From aa0e8072a57e879073cee969a780e586dbe57997 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Fri, 12 Nov 2021 23:52:43 +0000 Subject: [PATCH 1/3] ogre: fix for aarch64 --- pkgs/development/libraries/ogre/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/libraries/ogre/default.nix b/pkgs/development/libraries/ogre/default.nix index d097dc623e76..26bab3799c89 100644 --- a/pkgs/development/libraries/ogre/default.nix +++ b/pkgs/development/libraries/ogre/default.nix @@ -19,6 +19,14 @@ stdenv.mkDerivation rec { sha256 = "1iv6k0dwdzg5nnzw2mcgcl663q4f7p2kj7nhs8afnsikrzxxgsi4"; }; + # fix for ARM. sys/sysctl.h has moved in later glibcs, and + # https://github.com/OGRECave/ogre-next/issues/132 suggests it isn't + # needed anyway. + postPatch = '' + substituteInPlace OgreMain/src/OgrePlatformInformation.cpp \ + --replace '#include ' "" + ''; + cmakeFlags = [ "-DOGRE_BUILD_DEPENDENCIES=OFF" "-DOGRE_BUILD_SAMPLES=${toString withSamples}" ] ++ map (x: "-DOGRE_BUILD_PLUGIN_${x}=on") ([ "BSP" "OCTREE" "PCZ" "PFX" ] ++ lib.optional withNvidiaCg "CG") From 7a1b0adc2c8dbc36f9da6e19e6fa0bc8cea5965b Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 13 Nov 2021 00:32:27 +0000 Subject: [PATCH 2/3] ogre1_9: fix for aarch64 --- pkgs/development/libraries/ogre/1.9.x.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/libraries/ogre/1.9.x.nix b/pkgs/development/libraries/ogre/1.9.x.nix index 30d1dd185547..7548ed48e7ae 100644 --- a/pkgs/development/libraries/ogre/1.9.x.nix +++ b/pkgs/development/libraries/ogre/1.9.x.nix @@ -19,6 +19,14 @@ stdenv.mkDerivation rec { sha256 = "11lfgzqaps3728dswrq3cbwk7aicigyz08q4hfyy6ikc6m35r4wg"; }; + # fix for ARM. sys/sysctl.h has moved in later glibcs, and + # https://github.com/OGRECave/ogre-next/issues/132 suggests it isn't + # needed anyway. + postPatch = '' + substituteInPlace OgreMain/src/OgrePlatformInformation.cpp \ + --replace '#include ' "" + ''; + cmakeFlags = [ "-DOGRE_BUILD_SAMPLES=${toString withSamples}" ] ++ map (x: "-DOGRE_BUILD_PLUGIN_${x}=on") ([ "BSP" "OCTREE" "PCZ" "PFX" ] ++ lib.optional withNvidiaCg "CG") From 59bdbbfa1700896e892a4e00b0652f014e5261c6 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 13 Nov 2021 00:32:48 +0000 Subject: [PATCH 3/3] ogre1_10: fix for aarch64 --- pkgs/development/libraries/ogre/1.10.x.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/libraries/ogre/1.10.x.nix b/pkgs/development/libraries/ogre/1.10.x.nix index 849db216b921..616792787818 100644 --- a/pkgs/development/libraries/ogre/1.10.x.nix +++ b/pkgs/development/libraries/ogre/1.10.x.nix @@ -16,6 +16,14 @@ stdenv.mkDerivation { sha256 = "1zwvlx5dz9nwjazhnrhzb0w8ilpa84r0hrxrmmy69pgr1p1yif5a"; }; + # fix for ARM. sys/sysctl.h has moved in later glibcs, and + # https://github.com/OGRECave/ogre-next/issues/132 suggests it isn't + # needed anyway. + postPatch = '' + substituteInPlace OgreMain/src/OgrePlatformInformation.cpp \ + --replace '#include ' "" + ''; + cmakeFlags = [ "-DOGRE_BUILD_SAMPLES=${toString withSamples}" ] ++ map (x: "-DOGRE_BUILD_PLUGIN_${x}=on") ([ "BSP" "OCTREE" "PCZ" "PFX" ] ++ lib.optional withNvidiaCg "CG")