Index: Mk/bsd.port.mk =================================================================== --- Mk/bsd.port.mk +++ Mk/bsd.port.mk @@ -1982,6 +1982,11 @@ CHECKSUM_ALGORITHMS?= sha256 DISTINFO_FILE?= ${MASTERDIR}/distinfo +TIMESTAMP= 1461268100 + +.if exists(${DISTINFO_FILE}) +TIMESTAMP!= ${AWK} -F' = ' -v ts=${TIMESTAMP} '/^TIMESTAMP/ { ts=$$2 } END { print ts}' ${DISTINFO_FILE} +.endif MAKE_FLAGS?= -f MAKEFILE?= Makefile @@ -1993,7 +1998,9 @@ CPP="${CPP}" CPPFLAGS="${CPPFLAGS}" \ LDFLAGS="${LDFLAGS}" LIBS="${LIBS}" \ CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \ - MANPREFIX="${MANPREFIX}" + MANPREFIX="${MANPREFIX}" \ + SOURCE_DATE_EPOCH=${TIMESTAMP} +PKG_ENV+= SOURCE_DATE_EPOCH=${TIMESTAMP} # Add -fno-strict-aliasing to CFLAGS with optimization level -O2 or higher. # gcc 4.x enable strict aliasing optimization with -O2 which is known to break