Description: Make the build reproducible
Author: Chris Lamb <lamby@debian.org>
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;
