summaryrefslogtreecommitdiff
path: root/debian/patches/0008-Set-fixed-date-when-calling-pdflatex-for-presentatio.patch
blob: 231b837aac71a7d337872e39cf091a51b97360fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From: Ruben Undheim <ruben.undheim@gmail.com>
Date: Thu, 12 Jul 2018 10:41:21 +0000
Subject: Set fixed date when calling pdflatex for presentation.tex. Remove ID
 fields

---
 Makefile                | 2 +-
 manual/presentation.sh  | 5 ++++-
 manual/presentation.tex | 1 +
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 8979641..53bab9b 100644
--- a/Makefile
+++ b/Makefile
@@ -464,7 +464,7 @@ update-manual: $(TARGETS) $(EXTRA_TARGETS)
 
 manual: $(TARGETS) $(EXTRA_TARGETS)
 	cd manual && bash appnotes.sh
-	cd manual && bash presentation.sh
+	cd manual && PDF_DATE=$(PDF_DATE) bash presentation.sh
 	cd manual && bash manual.sh
 
 clean:
diff --git a/manual/presentation.sh b/manual/presentation.sh
index ca8a6c9..a152484 100755
--- a/manual/presentation.sh
+++ b/manual/presentation.sh
@@ -37,7 +37,10 @@ fi
 
 set -ex
 
-pdflatex $PDFTEX_OPT presentation.tex
+echo ${PDF_DATE}
+pdflatex $PDFTEX_OPT '\pdfinfo{/CreationDate('${PDF_DATE}')/ModDate('${PDF_DATE}')}\input{presentation.tex}'
+grep -av '^/ID \[\(<[0-9A-F]\{32\}>\) \1]$$' presentation.pdf > presentation.pdf.without_pdf_id
+mv -f presentation.pdf.without_pdf_id presentation.pdf
 
 if ! $fast_mode; then
 	while
diff --git a/manual/presentation.tex b/manual/presentation.tex
index 8060998..a42648c 100644
--- a/manual/presentation.tex
+++ b/manual/presentation.tex
@@ -81,6 +81,7 @@
 
 \title{Yosys Open SYnthesis Suite}
 \author{Clifford Wolf}
+\date{REPLACEWITHDATE}
 \institute{http://www.clifford.at/yosys/}
 
 \usetheme{Madrid}