common: replace XBPS_COMMIT_TIMESTAMP by SOURCE_DATE_EPOCH
This way we are compatible to the Debians proposal. See [1]. [1] https://gcc.gnu.org/ml/gcc-patches/2015-06/msg02210.html
This commit is contained in:
parent
69cb0beb58
commit
b5e49c48e7
4 changed files with 10 additions and 10 deletions
|
@ -1,9 +1,9 @@
|
|||
if [ -n "$XBPS_COMMIT_TIMESTAMP" ]; then
|
||||
if [ -n "$SOURCE_DATE_EPOCH" ]; then
|
||||
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%%,*}
|
||||
val=$(LC_ALL=C date --date "$XBPS_COMMIT_TIMESTAMP" +"${i#*,}")
|
||||
val=$(LC_ALL=C date --date "@$SOURCE_DATE_EPOCH" +"${i#*,}")
|
||||
cat >> $XBPS_STATEDIR/timestamp-macros.h <<EOF
|
||||
#undef __${mcr}__
|
||||
#define __${mcr}__ "${val}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue