Merge pull request #241186 from tjni/lib3mf

lib3mf: fix building tests on aarch64-darwin
This commit is contained in:
Weijia Wang 2023-07-04 10:13:55 +03:00 committed by GitHub
commit 75769df6f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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