--- a/debian/patches/reproducible_build 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/reproducible_build 2021-02-18 14:52:49.165246604 +0000 @@ -0,0 +1,49 @@ +Description: Make the build reproducible +Author: Chris Lamb +Last-Update: 2021-02-18 + +--- kjs-5.78.0.orig/src/kjs/bytecode/generator/filetemplate.h ++++ kjs-5.78.0/src/kjs/bytecode/generator/filetemplate.h +@@ -46,6 +46,7 @@ struct FileTemplate { + { + isOK = true; + lines = 0; ++ inFileBaseName = inFileName.substr(inFileName.find_last_of("/") + 1); + + in.open(inFileName.c_str()); + if (in.fail()) { +@@ -60,7 +61,7 @@ struct FileTemplate { + } + + if (isOK) { +- out << "// WARNING: Portions of this file are autogenerated from codes.def and " << inFileName << ".\n"; ++ out << "// WARNING: Portions of this file are autogenerated from codes.def and " << inFileBaseName << ".\n"; + out << "// (which is what the licensing terms apply to)\n"; + out << "// Any changes you make here may be lost!\n"; + handleUntilGenerate(); +@@ -77,7 +78,7 @@ struct FileTemplate { + // Goes until @generate.. + void handleUntilGenerate() + { +- out << "#line " << (lines + 1) << " \"" << inFileName << "\"\n"; ++ out << "#line " << (lines + 1) << " \"" << inFileBaseName << "\"\n"; + while (!in.eof()) { + string line; + getline(in, line); +@@ -92,7 +93,7 @@ struct FileTemplate { + + void handleSuffix() + { +- out << "#line " << (lines + 1) << " \"" << inFileName << "\"\n"; ++ out << "#line " << (lines + 1) << " \"" << inFileBaseName << "\"\n"; + while (!in.eof()) { + string line; + getline(in, line); +@@ -101,6 +102,7 @@ struct FileTemplate { + } + + string inFileName; ++ string inFileBaseName; + string outFileName; + ifstream in; + ofstream out; --- a/debian/patches/series 2021-02-18 12:56:03.551163060 +0000 --- b/debian/patches/series 2021-02-18 13:00:06.669560158 +0000 @@ -1 +1,2 @@ install_missing_headers +reproducible_build