commit:     c287c4d651277884ca128ff4b68eddbe67625668
Author:     Sean Vig <sean.v.775 <AT> gmail <DOT> com>
AuthorDate: Wed Sep  2 20:25:38 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Thu Sep  3 13:18:00 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=c287c4d6

dev-python/nbconvert: Use upstream patch for new pandoc versions

 dev-python/nbconvert/ChangeLog                     |  4 +++
 .../nbconvert-4.0.0-pandoc-highlighting.patch      | 37 ++++++++++++++++++++++
 dev-python/nbconvert/nbconvert-9999.ebuild         |  1 +
 3 files changed, 42 insertions(+)

diff --git a/dev-python/nbconvert/ChangeLog b/dev-python/nbconvert/ChangeLog
index a3ec671..796004b 100644
--- a/dev-python/nbconvert/ChangeLog
+++ b/dev-python/nbconvert/ChangeLog
@@ -2,6 +2,10 @@
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
 # $Id$
 
+  02 Sep 2015; Sean Vig <[email protected]>
+  +files/nbconvert-4.0.0-pandoc-highlighting.patch nbconvert-9999.ebuild:
+  dev-python/nbconvert: Use upstream patch for new pandoc versions
+
   02 Sep 2015; Sean Vig <[email protected]> nbconvert-9999.ebuild:
   dev-python/nbconvert: Add note about pandoc
 

diff --git 
a/dev-python/nbconvert/files/nbconvert-4.0.0-pandoc-highlighting.patch 
b/dev-python/nbconvert/files/nbconvert-4.0.0-pandoc-highlighting.patch
new file mode 100644
index 0000000..793856a
--- /dev/null
+++ b/dev-python/nbconvert/files/nbconvert-4.0.0-pandoc-highlighting.patch
@@ -0,0 +1,37 @@
+commit 983473d2e5f71ebef07dab51ae497596af5bc9ac
+Author: James Hetherington <[email protected]>
+Date:   Mon Aug 31 18:06:46 2015 +0100
+
+    Add highlighting commands from more recent pandoc
+
+diff --git a/nbconvert/templates/latex/base.tplx 
b/nbconvert/templates/latex/base.tplx
+index 7d45c5d..a1568c5 100644
+--- a/nbconvert/templates/latex/base.tplx
++++ b/nbconvert/templates/latex/base.tplx
+@@ -84,6 +84,26 @@ This template does not define a docclass, the inheriting 
class must define this.
+     \newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}}
+     \newcommand{\NormalTok}[1]{{#1}}
+     
++    % Additional commands for more recent versions of Pandoc
++    \newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.53,0.00,0.00}{{#1}}}
++    \newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
++    \newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
++    \newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.73,0.40,0.53}{{#1}}}
++    \newcommand{\ImportTok}[1]{{#1}}
++    
\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.73,0.13,0.13}{\textit{{#1}}}}
++    
\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{{#1}}}}}
++    
\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{{#1}}}}}
++    \newcommand{\VariableTok}[1]{\textcolor[rgb]{0.10,0.09,0.49}{{#1}}}
++    
\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{{#1}}}}
++    \newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.40,0.40,0.40}{{#1}}}
++    \newcommand{\BuiltInTok}[1]{{#1}}
++    \newcommand{\ExtensionTok}[1]{{#1}}
++    \newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.74,0.48,0.00}{{#1}}}
++    \newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.49,0.56,0.16}{{#1}}}
++    
\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{{#1}}}}}
++    
\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{{#1}}}}}
++    
++    
+     % Define a nice break command that doesn't care if a line doesn't already
+     % exist.
+     \def\br{\hspace*{\fill} \\* }

diff --git a/dev-python/nbconvert/nbconvert-9999.ebuild 
b/dev-python/nbconvert/nbconvert-9999.ebuild
index 79299b1..d775d3e 100644
--- a/dev-python/nbconvert/nbconvert-9999.ebuild
+++ b/dev-python/nbconvert/nbconvert-9999.ebuild
@@ -18,6 +18,7 @@ if [ ${PV} == "9999" ] ; then
 else
        SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
        KEYWORDS="~amd64"
+       PATCHES=( "${FILESDIR}"/${P}-pandoc-highlighting.patch )
 fi
 
 LICENSE="BSD"

Reply via email to