Package: doxygen
Version: 1.8.8-5
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: timestamps toolchain

Hello,

While working on the “reproducible builds” effort [1], we have noticed that
pymilter could not be built reproducibly because doxygen embeds timestamps in
its latex output.

The attached patch fixes the issue.

Cheers, akira

[1]: https://wiki.debian.org/ReproducibleBuilds
diff -Nru doxygen-1.8.8/debian/changelog doxygen-1.8.8/debian/changelog
--- doxygen-1.8.8/debian/changelog	2014-11-02 15:08:03.000000000 +0100
+++ doxygen-1.8.8/debian/changelog	2015-02-15 21:19:43.000000000 +0100
@@ -1,3 +1,9 @@
+doxygen (1.8.8-6) UNRELEASED; urgency=medium
+
+  * Added possibility to remove timestamp for latex output using add-latex-timestamp-option.patch.
+
+ -- marivalen <marivalen@fenix>  Sun, 15 Feb 2015 21:17:14 +0100
+
 doxygen (1.8.8-5) unstable; urgency=medium
 
   * Cherry pick c83db38ea83499be19d9ff242bfa22ae534ee80c. (Closes: #762272)
diff -Nru doxygen-1.8.8/debian/patches/add-latex-timestamp-option.patch doxygen-1.8.8/debian/patches/add-latex-timestamp-option.patch
--- doxygen-1.8.8/debian/patches/add-latex-timestamp-option.patch	1970-01-01 01:00:00.000000000 +0100
+++ doxygen-1.8.8/debian/patches/add-latex-timestamp-option.patch	2015-02-15 21:15:57.000000000 +0100
@@ -0,0 +1,64 @@
+diff --git a/src/config.xml b/src/config.xml
+index 438b885..0cd9520 100644
+--- a/src/config.xml
++++ b/src/config.xml
+@@ -2623,6 +2623,16 @@ EXTRA_PACKAGES=times
+ ]]>
+       </docs>
+     </option>
++    <option type='bool' id='LATEX_TIMESTAMP' defval='1' depends='GENERATE_LATEX'>
++      <docs>
++<![CDATA[
++ If the \c LATEX_TIMESTAMP tag is set to \c YES then the footer of 
++ each generated page will contain the date and time when the page 
++ was generated. Setting this to \c NO can help when comparing the output of 
++ multiple runs.
++]]>
++      </docs>
++    </option>
+   </group>
+   <group name='RTF' docs='Configuration options related to the RTF output'>
+     <option type='bool' id='GENERATE_RTF' defval='0'>
+diff --git a/src/latexgen.cpp b/src/latexgen.cpp
+index de2ed22..9ec4fdb 100644
+--- a/src/latexgen.cpp
++++ b/src/latexgen.cpp
+@@ -373,11 +373,18 @@ static void writeDefaultHeaderPart1(FTextStream &t)
+ 
+   // Headers & footers
+   QGString genString;
++  QCString generatedBy;
++  static bool timeStamp = Config_getBool("LATEX_TIMESTAMP");
+   FTextStream tg(&genString);
+-  filterLatexString(tg,
+-                    theTranslator->trGeneratedAt(dateToString(TRUE),
+-                       Config_getString("PROJECT_NAME")),
+-                    FALSE,FALSE,FALSE);
++  if (timeStamp)
++  {
++    generatedBy = theTranslator->trGeneratedAt(dateToString(TRUE), Config_getString("PROJECT_NAME"));
++  }
++  else
++  {
++    generatedBy = theTranslator->trGeneratedBy();
++  }
++  filterLatexString(tg, generatedBy, FALSE,FALSE,FALSE);
+   t << "% Headers & footers\n"
+        "\\usepackage{fancyhdr}\n"
+        "\\pagestyle{fancyplain}\n"
+@@ -496,10 +503,11 @@ static void writeDefaultHeaderPart3(FTextStream &t)
+ {
+   // part 3
+   // Finalize project number
+-  t << " Doxygen " << versionString << "}\\\\\n"
+-       "\\vspace*{0.5cm}\n"
+-       "{\\small " << dateToString(TRUE) << "}\\\\\n"
+-       "\\end{center}\n"
++  t << " Doxygen " << versionString << "}\\\\\n";
++  if (Config_getBool("LATEX_TIMESTAMP"))
++    t << "\\vspace*{0.5cm}\n"
++         "{\\small " << dateToString(TRUE) << "}\\\\\n";
++  t << "\\end{center}\n"
+        "\\end{titlepage}\n";
+   bool compactLatex = Config_getBool("COMPACT_LATEX");
+   if (!compactLatex)
diff -Nru doxygen-1.8.8/debian/patches/series doxygen-1.8.8/debian/patches/series
--- doxygen-1.8.8/debian/patches/series	2014-10-31 23:28:33.000000000 +0100
+++ doxygen-1.8.8/debian/patches/series	2015-02-15 21:15:14.000000000 +0100
@@ -11,3 +11,4 @@
 sqlite3-configure.diff
 fix-760700.diff
 fix-762272.diff
+add-latex-timestamp-option.patch

Reply via email to