diff options
author | Jonas Rabenstein <jonas.rabenstein@studium.uni-erlangen.de> | 2016-03-06 14:54:56 +0100 |
---|---|---|
committer | Patrice Clement <monsieurp@gentoo.org> | 2016-03-11 15:59:23 +0000 |
commit | 2083a93615b0b4baa8b0e4c11cd244ed6ddf9296 (patch) | |
tree | 30c4fe42401eb5022c18662c6aa346d4ef7f501c /dev-tex | |
parent | toolchain-binutils.eclass: use versioned SLOT all the time (diff) | |
download | gentoo-2083a93615b0b4baa8b0e4c11cd244ed6ddf9296.tar.gz gentoo-2083a93615b0b4baa8b0e4c11cd244ed6ddf9296.tar.bz2 gentoo-2083a93615b0b4baa8b0e4c11cd244ed6ddf9296.zip |
dev-tex/minted: fix compilation of documentation
Compiling of documentation currently failed, as -shell-escape was not
passed to pdflatex. With recent change in latex-package.eclass
(f6082c5) it is now possible to add this flag and therefore compile the
documentation.
Moreover in minted-2.1 there is an extra curly brace in minted.dtx which
leads to a compile failure also with -shell-escape specified. Until it
is fixed upstream, I added a patch to remove this extra curly brace.
Closes: https://github.com/gentoo/gentoo/pull/986
Acked-by: Alexis Ballier <aballier@gentoo.org>
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Diffstat (limited to 'dev-tex')
-rw-r--r-- | dev-tex/minted/files/minted-2.1-remove-extra-curly-brace.patch | 15 | ||||
-rw-r--r-- | dev-tex/minted/minted-1.7.ebuild | 1 | ||||
-rw-r--r-- | dev-tex/minted/minted-2.0.ebuild | 1 | ||||
-rw-r--r-- | dev-tex/minted/minted-2.1.ebuild | 7 |
4 files changed, 23 insertions, 1 deletions
diff --git a/dev-tex/minted/files/minted-2.1-remove-extra-curly-brace.patch b/dev-tex/minted/files/minted-2.1-remove-extra-curly-brace.patch new file mode 100644 index 000000000000..d27c309916c5 --- /dev/null +++ b/dev-tex/minted/files/minted-2.1-remove-extra-curly-brace.patch @@ -0,0 +1,15 @@ +# compilation of minted.dtx fails as there is an extra curly brace at line +# 1390. While passing -interaction=batchmode (what latex-package.eclass does) +# it compiles without warning but a return value of -1 and therefore is assumed +# as failed by latex-package.eclass. +--- minted.dtx 2015-09-09 22:40:04.000000000 +0200 ++++ minted.dtx 2016-03-06 14:20:46.544180149 +0100 +@@ -1387,7 +1387,7 @@ + % + % + % \begin{macro}{\minted@jobname} +-% At various points, temporary files and directories will need to be named after the main |.tex| file. The typical way to do this is to use |\jobname|. However, if the file name contains spaces, then |\jobname| will contain the name wrapped in quotes (older versions of MiKTeX replace spaces with asterisks instead, and \texttt{XeTeX} apparently \href{http://tex.stackexchange.com/a/93829/10742}{allows double quotes within file names}, in which case names are wrapped in single quotes}). While that is perfectly fine for working with \LaTeX\ internally, it causes problems with |\write18|, since quotes will end up in unwanted locations in shell commands. It would be possible to strip the wrapping quotation marks when they are present, and maintain any spaces in the file name. But it is simplest to create a ``sanitized'' version of |\jobname| in which spaces and asterisks are replaced by underscores, and double quotes are stripped. ++% At various points, temporary files and directories will need to be named after the main |.tex| file. The typical way to do this is to use |\jobname|. However, if the file name contains spaces, then |\jobname| will contain the name wrapped in quotes (older versions of MiKTeX replace spaces with asterisks instead, and \texttt{XeTeX} apparently \href{http://tex.stackexchange.com/a/93829/10742}{allows double quotes within file names}, in which case names are wrapped in single quotes). While that is perfectly fine for working with \LaTeX\ internally, it causes problems with |\write18|, since quotes will end up in unwanted locations in shell commands. It would be possible to strip the wrapping quotation marks when they are present, and maintain any spaces in the file name. But it is simplest to create a ``sanitized'' version of |\jobname| in which spaces and asterisks are replaced by underscores, and double quotes are stripped. + % \begin{macrocode} + \StrSubstitute{\jobname}{ }{_}[\minted@jobname] + \StrSubstitute{\minted@jobname}{*}{_}[\minted@jobname] diff --git a/dev-tex/minted/minted-1.7.ebuild b/dev-tex/minted/minted-1.7.ebuild index 0331cbaed825..ca24b9444881 100644 --- a/dev-tex/minted/minted-1.7.ebuild +++ b/dev-tex/minted/minted-1.7.ebuild @@ -23,6 +23,7 @@ RDEPEND=" S="${WORKDIR}"/ src_install() { + LATEX_DOC_ARGUMENTS='-shell-escape' latex-package_src_install dodoc README } diff --git a/dev-tex/minted/minted-2.0.ebuild b/dev-tex/minted/minted-2.0.ebuild index 07ed452c0c3b..3cb17e243343 100644 --- a/dev-tex/minted/minted-2.0.ebuild +++ b/dev-tex/minted/minted-2.0.ebuild @@ -23,6 +23,7 @@ RDEPEND=" S="${WORKDIR}"/${P}/source src_install() { + LATEX_DOC_ARGUMENTS='-shell-escape' latex-package_src_install dodoc "${S}"/../*md } diff --git a/dev-tex/minted/minted-2.1.ebuild b/dev-tex/minted/minted-2.1.ebuild index 07ed452c0c3b..99db1e44e441 100644 --- a/dev-tex/minted/minted-2.1.ebuild +++ b/dev-tex/minted/minted-2.1.ebuild @@ -4,7 +4,7 @@ EAPI=5 -inherit latex-package +inherit latex-package eutils DESCRIPTION="LaTeX package for source code syntax highlighting" HOMEPAGE="https://github.com/gpoore/minted" @@ -22,7 +22,12 @@ RDEPEND=" S="${WORKDIR}"/${P}/source +src_prepare() { + epatch "${FILESDIR}/minted-2.1-remove-extra-curly-brace.patch" +} + src_install() { + LATEX_DOC_ARGUMENTS='-shell-escape' latex-package_src_install dodoc "${S}"/../*md } |