2016-03-01 17:27:16 +00:00
|
|
|
if [ -n "$SOURCE_DATE_EPOCH" ]; then
|
2016-03-01 17:08:52 +00:00
|
|
|
CFLAGS+=" -Wno-builtin-macro-redefined -include $XBPS_STATEDIR/timestamp-macros.h"
|
|
|
|
CXXFLAGS+=" -Wno-builtin-macro-redefined -include $XBPS_STATEDIR/timestamp-macros.h"
|
|
|
|
for i in "DATE,%b %d %Y" "TIME,%H:%M:%S" "DATETIME,%b %d %Y %H:%M:%S"; do
|
|
|
|
mcr=${i%%,*}
|
2016-03-01 17:27:16 +00:00
|
|
|
val=$(LC_ALL=C date --date "@$SOURCE_DATE_EPOCH" +"${i#*,}")
|
2016-03-01 17:08:52 +00:00
|
|
|
cat >> $XBPS_STATEDIR/timestamp-macros.h <<EOF
|
|
|
|
#undef __${mcr}__
|
|
|
|
#define __${mcr}__ "${val}"
|
|
|
|
EOF
|
2016-02-29 07:46:40 +00:00
|
|
|
done
|
|
|
|
fi
|