graphite2: fix cross-compilation

Cross compilation failed for me with the following message:
24/85 Test #48: charis7 ..........................   Passed    0.02 sec
      Start  1: nolib-stdc++-graphite2_core
Could not find executable readelf

In other words, the check failed because one of the tests uses readelf and when cross-compiling this tool has a prefix for the target architecture.
This commit is contained in:
Mathew Polzin 2023-11-29 12:19:18 -06:00 committed by Matt Polzin
parent c67a44307a
commit 249a6de703

View file

@ -28,6 +28,10 @@ stdenv.mkDerivation rec {
# https://github.com/silnrsi/graphite/pull/74
substituteInPlace tests/CMakeLists.txt \
--replace 'add_subdirectory(nametabletest)' '#add_subdirectory(nametabletest)'
# support cross-compilation by using target readelf binary:
substituteInPlace Graphite.cmake \
--replace 'readelf' "${stdenv.cc.targetPrefix}readelf"
'';
cmakeFlags = lib.optionals static [