From f56aa4037b966b768e06d157d95da0c8213d9793 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 10 Jun 2012 21:48:47 +0900 Subject: [PATCH] update pandoc-default.latex-no-luatex.patch remove a couple of old unused 1.8 patches --- ....8.2.1-texlive2007-xelatex-outputdir.patch | 17 ----- pandoc-default.latex-no-luatex.patch | 72 +++++-------------- pandoc-enable-highlighting-flag.patch | 11 --- pandoc.spec | 4 +- 4 files changed, 19 insertions(+), 85 deletions(-) delete mode 100644 pandoc-1.8.2.1-texlive2007-xelatex-outputdir.patch delete mode 100644 pandoc-enable-highlighting-flag.patch diff --git a/pandoc-1.8.2.1-texlive2007-xelatex-outputdir.patch b/pandoc-1.8.2.1-texlive2007-xelatex-outputdir.patch deleted file mode 100644 index 151c576..0000000 --- a/pandoc-1.8.2.1-texlive2007-xelatex-outputdir.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- 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-default.latex-no-luatex.patch b/pandoc-default.latex-no-luatex.patch index a299375..b72c6c8 100644 --- a/pandoc-default.latex-no-luatex.patch +++ b/pandoc-default.latex-no-luatex.patch @@ -1,59 +1,23 @@ -diff -u pandoc-1.9.2/templates/default.latex\~ pandoc-1.9.2/templates/default.latex ---- pandoc-1.9.2/templates/default.latex~ 2012-04-06 05:13:56.000000000 +0900 -+++ pandoc-1.9.2/templates/default.latex 2012-04-25 13:20:25.024947625 +0900 -@@ -1,6 +1,7 @@ - \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$lang$,$endif$]{$documentclass$} +diff -u pandoc-1.9.4.1/templates/default.latex\~ pandoc-1.9.4.1/templates/default.latex +--- pandoc-1.9.4.1/templates/default.latex~ 2012-06-09 05:53:31.000000000 +0900 ++++ pandoc-1.9.4.1/templates/default.latex 2012-06-10 21:43:32.321646301 +0900 +@@ -2,16 +2,16 @@ + \usepackage[T1]{fontenc} + \usepackage{lmodern} \usepackage{amssymb,amsmath} -\usepackage{ifxetex,ifluatex} -+%\usepackage{ifxetex,ifluatex} +\usepackage{ifxetex} - \ifxetex - \usepackage{fontspec,xltxtra,xunicode} - \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} -@@ -18,28 +19,28 @@ - \setmathfont{$mathfont$} - $endif$ - \else -- \ifluatex -- \usepackage{fontspec} -- \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} -- \newcommand{\euro}{€} --$if(mainfont)$ -- \setmainfont{$mainfont$} --$endif$ --$if(sansfont)$ -- \setsansfont{$sansfont$} --$endif$ --$if(monofont)$ -- \setmonofont{$monofont$} --$endif$ --$if(mathfont)$ -- \setmathfont{$mathfont$} --$endif$ -- \else -+% \ifluatex -+% \usepackage{fontspec} -+% \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} -+% \newcommand{\euro}{€} -+%$if(mainfont)$ -+% \setmainfont{$mainfont$} -+%$endif$ -+%$if(sansfont)$ -+% \setsansfont{$sansfont$} -+%$endif$ -+%$if(monofont)$ -+% \setmonofont{$monofont$} -+%$endif$ -+%$if(mathfont)$ -+% \setmathfont{$mathfont$} -+%$endif$ -+% \else - \usepackage[utf8]{inputenc} + \usepackage{fixltx2e} % provides \textsubscript + % use microtype if available + \IfFileExists{microtype.sty}{\usepackage{microtype}}{} +-\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex ++\ifnum 0\ifxetex 1\fi=0 % if pdftex + \usepackage[utf8]{inputenc} $if(euro)$ - \usepackage{eurosym} + \usepackage{eurosym} $endif$ -- \fi -+% \fi - \fi - $if(geometry)$ - \usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} +-\else % if luatex or xelatex ++\else % if xelatex + \usepackage{fontspec} + \ifxetex + \usepackage{xltxtra,xunicode} diff --git a/pandoc-enable-highlighting-flag.patch b/pandoc-enable-highlighting-flag.patch deleted file mode 100644 index e152ee7..0000000 --- a/pandoc-enable-highlighting-flag.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- pandoc-1.8.2.1/pandoc.cabal~ 2011-08-02 03:02:52.000000000 +0900 -+++ pandoc-1.8.2.1/pandoc.cabal 2012-01-26 11:44:45.097493599 +0900 -@@ -168,7 +168,7 @@ - Default: True - Flag highlighting - Description: Compile in support for syntax highlighting of code blocks. -- Default: False -+ Default: True - Flag executable - Description: Build the pandoc executable. - Default: True diff --git a/pandoc.spec b/pandoc.spec index 1de7428..181c1e6 100644 --- a/pandoc.spec +++ b/pandoc.spec @@ -47,9 +47,8 @@ BuildRequires: ghc-xml-prof BuildRequires: ghc-zip-archive-prof BuildRequires: ghc-zlib-prof Obsoletes: pandoc-markdown2pdf < %{version}-%{release} -# these two patches should be removed when texlive gets updated +# this patch should be removed when texlive gets updated Patch1: pandoc-default.latex-no-luatex.patch -#Patch2: pandoc-1.8.2.1-texlive2007-xelatex-outputdir.patch %description %{common_description} @@ -58,7 +57,6 @@ Patch1: pandoc-default.latex-no-luatex.patch %prep %setup -q %patch1 -p1 -b .orig -#%%patch2 -p1 -b .orig %build