lib3mf: fix building tests on aarch64-darwin

This commit is contained in:
Theodore Ni 2023-07-02 15:17:14 -07:00
parent 366c42ffb0
commit 45170fdb53
No known key found for this signature in database
GPG key ID: 48B67583BDDD4474

View file

@ -29,10 +29,13 @@ stdenv.mkDerivation rec {
] ++ (if stdenv.isDarwin then [ libossp_uuid ] else [ libuuid ]);
postPatch = ''
# This lets us build the tests properly on aarch64-darwin.
substituteInPlace CMakeLists.txt \
--replace 'SET(CMAKE_OSX_ARCHITECTURES "x86_64")' ""
# fix libdir=''${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
sed -i 's,libdir=''${\(exec_\)\?prefix}/,libdir=,' lib3mf.pc.in
# replace bundled binaries
for i in AutomaticComponentToolkit/bin/act.*; do
ln -sf ${automaticcomponenttoolkit}/bin/act $i