Source: mfem
Version: 4.5.2+ds-1
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: buildpath
X-Debbugs-Cc: [email protected]

Hi,

Whilst working on the Reproducible Builds effort [0] we noticed that
mfem could not be built reproducibly.

This was because it embedded the absolute build path in various .cmake
and C++ header/configuration files. As the paths these files reference
do not need to exist at runtime, it is safe to replace them with a
static alternative, which is what the attached patch does.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [email protected] / chris-lamb.co.uk
       `-
--- a/debian/rules      2023-05-17 08:25:54.810285060 -0700
--- b/debian/rules      2023-05-17 09:06:24.996983917 -0700
@@ -59,6 +59,7 @@
        sed -i 
"s,/.*/lib/.*/libmfem.so.4.5.2,/usr/lib/x86_64-linux-gnu/libmfem.so.4.5.2,g" 
debian/libmfem-dev/usr/lib/cmake/mfem/MFEMTargets-*.cmake
 # one day someone will fix the -ffile-prefix-map
        sed -i "s,/.*/lib/.*x86_64-linux-gnu,/usr/lib/x86_64-linux-gnu,g" 
debian/libmfem-dev/usr/lib/cmake/mfem/MFEMConfig.cmake
+       sed -i "s,$(CURDIR),/tmp/builddir/mfem,g" 
debian/libmfem-dev/usr/lib/cmake/mfem/MFEMConfig.cmake 
debian/libmfem-dev/usr/include/mfem/config/_config.hpp
 
 override_dh_auto_test:
        @echo skipping test

Reply via email to