summaryrefslogtreecommitdiff
path: root/debian/patches/0008-Set-fixed-date-when-calling-pdflatex-for-presentatio.patch
blob: f461d14f8a20a090d95e87090f1ebb64b4f562c3 (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
53
54
55
56
57
58
59
60
61
62
63
64
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  | 7 +++++--
 manual/presentation.tex | 1 +
 3 files changed, 7 insertions(+), 3 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..d1e71d8 100755
--- a/manual/presentation.sh
+++ b/manual/presentation.sh
@@ -37,7 +37,8 @@ fi
 
 set -ex
 
-pdflatex $PDFTEX_OPT presentation.tex
+echo ${PDF_DATE}
+pdflatex $PDFTEX_OPT '\pdfinfo{/CreationDate('${PDF_DATE}')/ModDate('${PDF_DATE}')}\input{presentation.tex}'
 
 if ! $fast_mode; then
 	while
@@ -45,10 +46,12 @@ if ! $fast_mode; then
 		! cmp autoloop.old autoloop.new
 	do
 		cp autoloop.new autoloop.old
-		pdflatex $PDFTEX_OPT presentation.tex
+        pdflatex $PDFTEX_OPT '\pdfinfo{/CreationDate('${PDF_DATE}')/ModDate('${PDF_DATE}')}\input{presentation.tex}'
 	done
 
 	rm -f autoloop.old
 	rm -f autoloop.new
 fi
 
+grep -av '^/ID \[\(<[0-9A-F]\{32\}>\) \1]$' presentation.pdf > presentation.pdf.without_pdf_id
+mv -f presentation.pdf.without_pdf_id presentation.pdf
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}