While working on the “reproducible builds” effort , we have noticed
that elastix could not be built reproducibly  because it is using the
current date to replace the @ELASTIX_DOXYGEN_DATE@ variable .
It seems an unsuccessful attempt has been made to use SOURCE_DATE_EPOCH
. The patch has two problems:
- The if statement instead of checking for the environment variable
SOURCE_DATE_EPOCH it is checking for the cmake variable
SOURCE_DATE_EPOCH. To check for the environment variable use
- Instead of directly saving the content of the environment variable
SOURCE_DATE_EPOCH into ELASTIX_DOXYGEN_DATE, the value of the
environment variable should be formated into a datetime string.
Formating can be done as follows using GNU date:
date -u -d $SOURCE_DATE_EPOCH '+%d-%m-%Y'
A different approach to fixing the reproducibility problem is to instead
of using the DoxygenFooter.html.in you could just have a
DoxygenFooter.html and use the placeholder $datetime which is processed
by Doxygen instead of using the @ELASTIX_DOXYGEN_DATE@ placeholder.
Reproducible-builds mailing list