[pandoc] markdown2pdf: require texlive-latex instead of xetex; workaround xelatex writing to cwd

Jens Petersen petersen at fedoraproject.org
Thu Dec 22 08:08:09 UTC 2011


commit d98536feb93d1404d5b6e5a395eabe3086a18446
Author: Jens Petersen <petersen at redhat.com>
Date:   Thu Dec 22 17:08:01 2011 +0900

    markdown2pdf: require texlive-latex instead of xetex; workaround xelatex writing to cwd

 pandoc-1.8.2.1-texlive2007-xelatex-outputdir.patch |   17 +++++++++++++++++
 pandoc.spec                                        |   12 +++++++++---
 2 files changed, 26 insertions(+), 3 deletions(-)
---
diff --git a/pandoc-1.8.2.1-texlive2007-xelatex-outputdir.patch b/pandoc-1.8.2.1-texlive2007-xelatex-outputdir.patch
new file mode 100644
index 0000000..151c576
--- /dev/null
+++ b/pandoc-1.8.2.1-texlive2007-xelatex-outputdir.patch
@@ -0,0 +1,17 @@
+--- pandoc-1.8.2.1/src/markdown2pdf.hs~	2011-08-02 03:02:52.000000000 +0900
++++ pandoc-1.8.2.1/src/markdown2pdf.hs	2011-12-22 12:08:02.528735085 +0900
+@@ -173,8 +173,12 @@
+ 
+ saveOutput :: FilePath -> FilePath -> IO ()
+ saveOutput input output = do
+-  copyFile (encodeString input) (encodeString output)
+-  UTF8.hPutStrLn stderr $! "Created " ++ output
++  inExists <- doesFileExist (encodeString input)
++  when inExists $
++    copyFile (encodeString input) (encodeString output)
++  outExists <- doesFileExist (encodeString input)
++  when outExists $
++    UTF8.hPutStrLn stderr $! "Created " ++ output
+ 
+ main :: IO ()
+ main = bracket
diff --git a/pandoc.spec b/pandoc.spec
index 35eab3f..8632f8c 100644
--- a/pandoc.spec
+++ b/pandoc.spec
@@ -10,7 +10,7 @@ MediaWiki, groff man pages, EPUB, and S5 and Slidy HTML slide shows.
 
 Name:           %{pkg_name}
 Version:        1.8.2.1
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Markup conversion tool for markdown
 
 Group:          Applications/Publishing
@@ -42,6 +42,7 @@ BuildRequires:  ghc-zip-archive-prof
 BuildRequires:  ghc-extensible-exceptions-prof
 BuildRequires:  ghc-random-prof
 Patch1:         pandoc-1.8.2.1-use-iftex.patch
+Patch2:         pandoc-1.8.2.1-texlive2007-xelatex-outputdir.patch
 
 %description
 %{common_description}
@@ -53,8 +54,8 @@ The pandoc-markdown2pdf subpackage provides markdown2pdf.
 Summary:        Convert markdown to PDF via LaTeX
 Group:          Applications/Publishing
 Requires:       pandoc = %{version}-%{release}
-# for pdflatex and xelatex
-Requires:       texlive-latex, texlive-xetex
+# for pdflatex
+Requires:       texlive-latex
 
 %description markdown2pdf
 %{common_description}
@@ -65,6 +66,7 @@ This package provides pandoc's markdown2pdf convertion tool.
 %prep
 %setup -q
 %patch1 -p1 -b .orig
+%patch2 -p1 -b .orig
 
 
 %build
@@ -95,6 +97,10 @@ rm %{buildroot}%{_datadir}/%{name}-%{version}/{BUGS,COPYRIGHT,INSTALL,README,cha
 
 
 %changelog
+* Thu Dec 22 2011 Jens Petersen <petersen at redhat.com> - 1.8.2.1-5
+- only require pdflatex not xelatex by default
+- workaround texlive-2007 xelatex outputting to current dir
+
 * Wed Nov 30 2011 Jens Petersen <petersen at redhat.com> - 1.8.2.1-4
 - add missing requires for pdflatex
 


More information about the scm-commits mailing list