commit:     1b0ef9a0800b86559169cab3e236dbb0c32d1db0
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 24 09:00:27 2016 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Feb 24 09:00:44 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b0ef9a0

dev-haskell/pandoc-citeproc: fix USE=-bibutils build, #516640

Reported-by: Thomas Beutin
Bug: https://bugs.gentoo.org/516640

Package-Manager: portage-2.2.27

 .../files/pandoc-citeproc-0.9-no-binutils.patch    | 26 ++++++++++++++++++++++
 .../pandoc-citeproc/pandoc-citeproc-0.7.2.ebuild   |  4 ++++
 .../pandoc-citeproc/pandoc-citeproc-0.8.1.3.ebuild |  4 ++++
 3 files changed, 34 insertions(+)

diff --git 
a/dev-haskell/pandoc-citeproc/files/pandoc-citeproc-0.9-no-binutils.patch 
b/dev-haskell/pandoc-citeproc/files/pandoc-citeproc-0.9-no-binutils.patch
new file mode 100644
index 0000000..c7c8655
--- /dev/null
+++ b/dev-haskell/pandoc-citeproc/files/pandoc-citeproc-0.9-no-binutils.patch
@@ -0,0 +1,26 @@
+Fails to build with -f-bibutils:
+https://bugs.gentoo.org/516640
+diff --git a/pandoc-citeproc.hs b/pandoc-citeproc.hs
+index 7006e02..f72fa41 100644
+--- a/pandoc-citeproc.hs
++++ b/pandoc-citeproc.hs
+@@ -1 +1,2 @@
++{-# LANGUAGE CPP #-}
+ module Main where
+@@ -75,2 +76,3 @@ readFormat = go . map toLower
+         go "bibtex"   = Just Bibtex
++#ifdef USE_BIBUTILS
+         go "ris"      = Just Ris
+@@ -87,2 +89,3 @@ readFormat = go . map toLower
+         go "yaml"     = Just Yaml
++#endif
+         go _          = Nothing
+diff --git a/src/Text/CSL/Input/Bibutils.hs b/src/Text/CSL/Input/Bibutils.hs
+index 081fa91..49ddbd0 100644
+--- a/src/Text/CSL/Input/Bibutils.hs
++++ b/src/Text/CSL/Input/Bibutils.hs
+@@ -64,3 +64,3 @@ readBiblioFile f
+ #else
+-        _           -> error $ "citeproc: Bibliography format not 
supported.\n" ++
++        _           -> error $ "citeproc: Bibliography format not 
supported.\n"
+ #endif

diff --git a/dev-haskell/pandoc-citeproc/pandoc-citeproc-0.7.2.ebuild 
b/dev-haskell/pandoc-citeproc/pandoc-citeproc-0.7.2.ebuild
index 7a9af87..d018636 100644
--- a/dev-haskell/pandoc-citeproc/pandoc-citeproc-0.7.2.ebuild
+++ b/dev-haskell/pandoc-citeproc/pandoc-citeproc-0.7.2.ebuild
@@ -49,6 +49,10 @@ DEPEND="${RDEPEND}
        >=dev-haskell/cabal-1.12
 "
 
+src_prepare() {
+       epatch "${FILESDIR}"/${PN}-0.9-no-binutils.patch
+}
+
 src_configure() {
        haskell-cabal_src_configure \
                $(cabal_flag bibutils bibutils) \

diff --git a/dev-haskell/pandoc-citeproc/pandoc-citeproc-0.8.1.3.ebuild 
b/dev-haskell/pandoc-citeproc/pandoc-citeproc-0.8.1.3.ebuild
index 3299e18..1bfee4c 100644
--- a/dev-haskell/pandoc-citeproc/pandoc-citeproc-0.8.1.3.ebuild
+++ b/dev-haskell/pandoc-citeproc/pandoc-citeproc-0.8.1.3.ebuild
@@ -51,6 +51,10 @@ DEPEND="${RDEPEND}
        embed_data_files? ( dev-haskell/hsb2hs )
 "
 
+src_prepare() {
+       epatch "${FILESDIR}"/${PN}-0.9-no-binutils.patch
+}
+
 src_configure() {
        haskell-cabal_src_configure \
                $(cabal_flag bibutils bibutils) \

Reply via email to