summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wright <gienah@gentoo.org>2012-11-18 13:40:00 +0000
committerMark Wright <gienah@gentoo.org>2012-11-18 13:40:00 +0000
commitc93f249699eaff41b570c6822d127e29d75b03da (patch)
tree30947bce3f1b43512011628ef23f27760e996274 /dev-haskell/hscolour
parentStable for amd64, wrt bug #443592 (diff)
downloadgentoo-2-c93f249699eaff41b570c6822d127e29d75b03da.tar.gz
gentoo-2-c93f249699eaff41b570c6822d127e29d75b03da.tar.bz2
gentoo-2-c93f249699eaff41b570c6822d127e29d75b03da.zip
Patch hscolour 1.19 for ghc 7.6.1
(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key 618E971F)
Diffstat (limited to 'dev-haskell/hscolour')
-rw-r--r--dev-haskell/hscolour/ChangeLog7
-rw-r--r--dev-haskell/hscolour/files/hscolour-1.19-ghc-7.5.patch45
-rw-r--r--dev-haskell/hscolour/hscolour-1.19.ebuild6
3 files changed, 55 insertions, 3 deletions
diff --git a/dev-haskell/hscolour/ChangeLog b/dev-haskell/hscolour/ChangeLog
index fb4413260951..05b4c26b2f90 100644
--- a/dev-haskell/hscolour/ChangeLog
+++ b/dev-haskell/hscolour/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-haskell/hscolour
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-haskell/hscolour/ChangeLog,v 1.19 2012/09/12 16:01:51 qnikst Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-haskell/hscolour/ChangeLog,v 1.20 2012/11/18 13:40:00 gienah Exp $
+
+ 18 Nov 2012; Mark Wright <gienah@gentoo.org>
+ +files/hscolour-1.19-ghc-7.5.patch, +hscolour-1.19-ghc-7.5.patch,
+ hscolour-1.19.ebuild:
+ Patch hscolour 1.19 for ghc 7.6.1
12 Sep 2012; Alexander Vershilov <qnikst@gentoo.org> hscolour-1.17.ebuild,
hscolour-1.19.ebuild:
diff --git a/dev-haskell/hscolour/files/hscolour-1.19-ghc-7.5.patch b/dev-haskell/hscolour/files/hscolour-1.19-ghc-7.5.patch
new file mode 100644
index 000000000000..25e29728ca3a
--- /dev/null
+++ b/dev-haskell/hscolour/files/hscolour-1.19-ghc-7.5.patch
@@ -0,0 +1,45 @@
+--- hscolour-1.19-orig/Language/Haskell/HsColour/Colourise.hs 2011-06-06 03:05:04.000000000 +1000
++++ hscolour-1.19/Language/Haskell/HsColour/Colourise.hs 2012-06-24 10:29:57.990963394 +1000
+@@ -1,3 +1,7 @@
++{-# LANGUAGE CPP #-}
++#if (__GLASGOW_HASKELL__>=705)
++{-# LANGUAGE ScopedTypeVariables #-}
++#endif
+ module Language.Haskell.HsColour.Colourise
+ ( module Language.Haskell.HsColour.ColourHighlight
+ , ColourPrefs(..)
+@@ -9,6 +13,9 @@
+ import Language.Haskell.HsColour.ColourHighlight
+ import Language.Haskell.HsColour.Classify (TokenType(..))
+
++#if (__GLASGOW_HASKELL__>=705)
++import Control.Exception (catch, SomeException)
++#endif
+ import System.IO (hPutStrLn,stderr)
+ import System.Environment (getEnv)
+ import Data.List
+@@ -51,6 +58,16 @@
+ -- | Read colour preferences from .hscolour file in the current directory, or failing that,
+ -- from \$HOME\/.hscolour, and failing that, returns a default set of prefs.
+ readColourPrefs :: IO ColourPrefs
++#if (__GLASGOW_HASKELL__>=705)
++readColourPrefs = catch
++ (do val <- readFile ".hscolour"
++ parseColourPrefs ".hscolour" val)
++ (\(_ :: SomeException) -> catch
++ (do home <- getEnv "HOME"
++ val <- readFile (home++"/.hscolour")
++ parseColourPrefs (home++"/.hscolour") val)
++ (\(_ :: SomeException) -> return defaultColourPrefs))
++#else
+ readColourPrefs = catch
+ (do val <- readFile ".hscolour"
+ parseColourPrefs ".hscolour" val)
+@@ -59,6 +76,7 @@
+ val <- readFile (home++"/.hscolour")
+ parseColourPrefs (home++"/.hscolour") val)
+ (\_-> return defaultColourPrefs))
++#endif
+
+ -- | Convert token classification to colour highlights.
+ colourise :: ColourPrefs -> TokenType -> [Highlight]
diff --git a/dev-haskell/hscolour/hscolour-1.19.ebuild b/dev-haskell/hscolour/hscolour-1.19.ebuild
index 6c1d84c1fe9c..781d3d2b550c 100644
--- a/dev-haskell/hscolour/hscolour-1.19.ebuild
+++ b/dev-haskell/hscolour/hscolour-1.19.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-haskell/hscolour/hscolour-1.19.ebuild,v 1.6 2012/09/12 16:01:51 qnikst Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-haskell/hscolour/hscolour-1.19.ebuild,v 1.7 2012/11/18 13:40:00 gienah Exp $
-EAPI="3"
+EAPI=4
CABAL_FEATURES="bin lib profile haddock"
inherit base haskell-cabal
@@ -20,6 +20,8 @@ RDEPEND=">=dev-lang/ghc-6.6.1"
DEPEND="${RDEPEND}
>=dev-haskell/cabal-1.6"
+PATCHES=("${FILESDIR}/${PN}-1.19-ghc-7.5.patch")
+
src_install() {
cabal_src_install
if use doc; then