forked from Mirrors/wine-wine
widl: use 'SOURCE_DATA_EPOCH' besides 'WIDL_TIME_OVERRIDE'
Helps to support reproducible builds. Signed-off-by: Marko Semet <marko@marko10-000.de>feature/deterministic_pub1
parent
f2d9cae0f1
commit
89ccf6055d
|
@ -609,7 +609,17 @@ int main(int argc,char *argv[])
|
|||
#endif
|
||||
init_argv0_dir( argv[0] );
|
||||
|
||||
now = time(NULL);
|
||||
{
|
||||
const char* source_time = getenv("SOURCE_DATE_EPOCH");
|
||||
if (source_time == NULL)
|
||||
{
|
||||
now = time(NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
now = atol(source_time);
|
||||
}
|
||||
}
|
||||
|
||||
while((optc = getopt_long_only(argc, argv, short_options, long_options, &opti)) != EOF) {
|
||||
switch(optc) {
|
||||
|
|
|
@ -2747,8 +2747,10 @@ int create_msft_typelib(typelib_t *typelib)
|
|||
|
||||
/* midl adds two sets of custom data to the library: the current unix time
|
||||
and midl's version number */
|
||||
time_override = getenv( "WIDL_TIME_OVERRIDE");
|
||||
time_override = getenv("SOURCE_DATE_EPOCH");
|
||||
cur_time = time_override ? atol( time_override) : time(NULL);
|
||||
time_override = getenv( "WIDL_TIME_OVERRIDE");
|
||||
cur_time = time_override ? atol( time_override) : cur_time;
|
||||
sprintf(info_string, "Created by WIDL version %s at %s\n", PACKAGE_VERSION, ctime(&cur_time));
|
||||
set_custdata(msft, &midl_info_guid, VT_BSTR, info_string, &msft->typelib_header.CustomDataOffset);
|
||||
set_custdata(msft, &midl_time_guid, VT_UI4, &cur_time, &msft->typelib_header.CustomDataOffset);
|
||||
|
|
Loading…
Reference in New Issue