git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #94879 from elohmeier/otfcc-aarch64

otfcc: fix aarch64 compatibility

commitd005e987a31e0fcad6c7fda8d9f11cbf0bf9c240 authorThomas Tuegel <ttuegel@mailbox.org> dateSat 8 Aug 2020, 20:29 (6 years ago) parent3f19239a10a9a7
3 files changed+43−8
pkgs/tools/misc/otfcc/default.nix+8−8 pkgs/tools/misc/otfcc/fix-aarch64.patch+22 pkgs/tools/misc/otfcc/move-makefiles.patch+13
pkgs/tools/misc/otfcc/default.nix+8−8
@@ -13,16 +13,16 @@ stdenv.mkDerivation rec {
1313
1414 nativeBuildInputs = [ premake5 ];
1515
16− # Don’t guess where our makefiles will end up. Just use current
17− # directory.
18− patchPhase = ''
19− substituteInPlace premake5.lua \
20− --replace 'location "build/gmake"' 'location "."'
21− '';
16+ patches = [
17+ ./fix-aarch64.patch
18+ ./move-makefiles.patch
19+ ];
20+
21+ buildFlags = stdenv.lib.optional stdenv.isAarch64 [ "config=release_arm" ];
2222
2323 installPhase = ''
2424 mkdir -p $out/bin
25− cp bin/release-x*/otfcc* $out/bin/
25+ cp bin/release-*/otfcc* $out/bin/
2626 '';
2727
2828 enableParallelBuilding = true;
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
3131 description = "Optimized OpenType builder and inspector";
3232 homepage = "https://github.com/caryll/otfcc";
3333 license = licenses.asl20;
34− platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
34+ platforms = [ "aarch64-linux" "i686-linux" "x86_64-linux" "x86_64-darwin" ];
3535 maintainers = with maintainers; [ jfrankenau ttuegel ];
3636 };
3737
pkgs/tools/misc/otfcc/fix-aarch64.patchnew file+22
@@ -0,0 +1,22 @@
1+diff --git a/premake5.lua b/premake5.lua
2+index 997fd79..54a20a0 100644
3+--- a/premake5.lua
4++++ b/premake5.lua
5+@@ -49,7 +49,7 @@ end
6+ workspace "otfcc"
7+ configurations { "release", "debug" }
8+
9+- platforms { "x64", "x86" }
10++ platforms { "x64", "x86", "arm" }
11+ filter "action:xcode4"
12+ platforms { "x64" }
13+ filter {}
14+@@ -67,6 +67,8 @@ workspace "otfcc"
15+ architecture "x86"
16+ filter "platforms:x64"
17+ architecture "x64"
18++ filter "platforms:arm"
19++ architecture "arm"
20+ filter {}
21+
22+ filter "action:vs2017"
pkgs/tools/misc/otfcc/move-makefiles.patchnew file+13
@@ -0,0 +1,13 @@
1+diff --git a/premake5.lua b/premake5.lua
2+index 997fd79..54a20a0 100644
3+--- a/premake5.lua
4++++ b/premake5.lua
5+@@ -88,7 +90,7 @@ workspace "otfcc"
6+ flags { "StaticRuntime" }
7+ includedirs { "dep/polyfill-msvc" }
8+ filter "action:gmake"
9+- location "build/gmake"
10++ location "."
11+ filter "action:xcode4"
12+ location "build/xcode"
13+ filter {}