diff options
author | Lennart Kolmodin <kolmodin@gentoo.org> | 2009-12-15 22:55:24 +0000 |
---|---|---|
committer | Lennart Kolmodin <kolmodin@gentoo.org> | 2009-12-15 22:55:24 +0000 |
commit | 1292afe70d4f600e3107dbb614906222d6e63139 (patch) | |
tree | 8698e7946a2f7541fd0ad7337864372e413b49bc /dev-haskell | |
parent | Version bump dev-haskell/hinotify. (diff) | |
download | historical-1292afe70d4f600e3107dbb614906222d6e63139.tar.gz historical-1292afe70d4f600e3107dbb614906222d6e63139.tar.bz2 historical-1292afe70d4f600e3107dbb614906222d6e63139.zip |
Version bump of dev-haskell/hscolour.
Package-Manager: portage-2.1.6.13/cvs/Linux x86_64
Diffstat (limited to 'dev-haskell')
-rw-r--r-- | dev-haskell/hscolour/ChangeLog | 8 | ||||
-rw-r--r-- | dev-haskell/hscolour/Manifest | 13 | ||||
-rw-r--r-- | dev-haskell/hscolour/files/hscolour-0.15-utf8-aware.diff | 121 | ||||
-rw-r--r-- | dev-haskell/hscolour/hscolour-1.15.ebuild | 29 |
4 files changed, 165 insertions, 6 deletions
diff --git a/dev-haskell/hscolour/ChangeLog b/dev-haskell/hscolour/ChangeLog index a60328ece405..a2dc4cf39689 100644 --- a/dev-haskell/hscolour/ChangeLog +++ b/dev-haskell/hscolour/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-haskell/hscolour # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-haskell/hscolour/ChangeLog,v 1.3 2009/02/07 12:26:13 kolmodin Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/hscolour/ChangeLog,v 1.4 2009/12/15 22:55:23 kolmodin Exp $ + +*hscolour-1.15 (15 Dec 2009) + + 15 Dec 2009; <kolmodin@gentoo.org> +files/hscolour-0.15-utf8-aware.diff, + +hscolour-1.15.ebuild: + Version bump. *hscolour-1.12 (07 Feb 2009) diff --git a/dev-haskell/hscolour/Manifest b/dev-haskell/hscolour/Manifest index 23625d9d8285..8e3b2a2fcea4 100644 --- a/dev-haskell/hscolour/Manifest +++ b/dev-haskell/hscolour/Manifest @@ -1,16 +1,19 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 +AUX hscolour-0.15-utf8-aware.diff 5001 RMD160 4c6dd93ee82d60655d332f2a786e53207690eedf SHA1 e87298ca140fde776ec4d7b4297e50a9ad36e674 SHA256 f19dbc09ac51cf81a7298fa8346d684f349f72f22ca82153f039917ee70e4a59 DIST hscolour-1.12.tar.gz 54116 RMD160 533b28677164b5fea163a29500126aacf2f83ff8 SHA1 2817c9cd4fafdb7302248e0192ffd7ad6f092562 SHA256 b80a446c0b27d1eaca172d07e7a5d814e4b3a63db0bc8689e60a3db2fc92cfc0 +DIST hscolour-1.15.tar.gz 56472 RMD160 b394d2ea64f25ae5e1b9b43ef4cee0977d625d4a SHA1 4ce008f77934f0d34549035468913cd78427c68d SHA256 762f07977d971939360e2a418dfad2a8e5f908b9a88f3a861fa13937cbcfef1e DIST hscolour-1.8.tar.gz 40862 RMD160 8e98e4839b410ac5a72c2dba472ff00b59b62ba7 SHA1 36c087460945ac17f1b81926618912177e64a40b SHA256 c4af51e6aafe8d4ad5736d6c27269809351a206aab5fea616b6112a48cddb933 EBUILD hscolour-1.12.ebuild 684 RMD160 a850d24d2b98df6dd6858c2de3876aa4b6bca619 SHA1 391bd64938c43e666868b55ad68087ed4b388fc3 SHA256 93a7e40d57562fdfb38090fdae8cef43f0dabb0e78a039b81496bb413165d83b +EBUILD hscolour-1.15.ebuild 771 RMD160 8321bce82d7b0ffaa935317333c037a11b1769c8 SHA1 b778da621cce6b3d510538930441597623c5f18c SHA256 61b1a12b16aed67a5c8c41df12f893b32a8ac64c6bd5c35676e93af710d23a37 EBUILD hscolour-1.8.ebuild 1019 RMD160 683cb12540422040241bba827d6f5cab9b738ccd SHA1 9e2e124bd6c3607f6462f2d9e3426d8227f7cec3 SHA256 e27bcda4ffcdb2548cf08ceb7b82ac6ee639513cc27a351710483e1775cea545 -MISC ChangeLog 573 RMD160 1802720f791b46d1b72ec4457d9bcf83e87589ee SHA1 90a637ef5104c8733557449b9b03e53f39d50c9f SHA256 822b57a6bde678c712ded495bb0bfa17141e3585e4e0dd131170c9b96eb5ebd1 +MISC ChangeLog 720 RMD160 eedf74fb59c70e3f30a057f51893065d46eb76e3 SHA1 17c82c15f4cd9994b64a573ed26dd74e69f1d289 SHA256 d7ad69c46ed9f72358b1864260af4ae26b4d4c1fa9599758687dd4cf7bbfc41b MISC metadata.xml 223 RMD160 7783e6057effb8b8f0b79cffe8b557b32c633839 SHA1 7b962c77f2e38479a9d1621ec8d307ca9f761753 SHA256 1d00c8be162a6cb87b3de440b3e63e10b39c12d56e8fbfe592e75aed872b2508 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.9 (GNU/Linux) +Version: GnuPG v2.0.11 (GNU/Linux) -iEYEARECAAYFAkmNfqYACgkQ1n/CYbXjntJt2gCcDeXJNeHyU039HC2MihByYPfN -56AAoJNmMkf7UamHWgMNLLiGMKOgtRkz -=XMfc +iEYEARECAAYFAksoE9AACgkQ1n/CYbXjntLP7ACeJehL9S6oYPabP4w/1flztH8v +mJgAnRgM0GdTyY7H62iSVKceI+QubrzT +=WbQV -----END PGP SIGNATURE----- diff --git a/dev-haskell/hscolour/files/hscolour-0.15-utf8-aware.diff b/dev-haskell/hscolour/files/hscolour-0.15-utf8-aware.diff new file mode 100644 index 000000000000..c0187e0aa6f1 --- /dev/null +++ b/dev-haskell/hscolour/files/hscolour-0.15-utf8-aware.diff @@ -0,0 +1,121 @@ +Tue Dec 1 19:30:23 EET 2009 Sergei Trofimovich <slyfox@inbox.ru> + * add UTF8 I/O when built against ghc6.12+ + + This patch fixes following usecase: + NONASCII-utf8-rich-project: LANG=C cabal hscolour + (realworld example!) + + By default ghc presumes locale I/O and breaks horribly. + This patch switches to explicit UTF8 when deals with files. +Mon Nov 30 13:47:23 EET 2009 Sergei Trofimovich <slyfox@inbox.ru> + * Print newline when output usage banner. +Mon Nov 30 12:35:39 EET 2009 Sergei Trofimovich <slyfox@inbox.ru> + * Use Cabal instead of hardcoding version info (stolen from highlighting-kate) +diff -rN -u old-hscolour/hscolour.cabal new-hscolour/hscolour.cabal +--- old-hscolour/hscolour.cabal 2009-12-01 19:41:01.145689639 +0200 ++++ new-hscolour/hscolour.cabal 2009-12-01 19:41:01.155689306 +0200 +@@ -6,6 +6,7 @@ + Homepage: http://www.cs.york.ac.uk/fp/darcs/hscolour/ + License: GPL + License-file: LICENCE-GPL ++Cabal-Version: >= 1.6 + Build-depends: haskell98, base < 10 + Extensions: + Synopsis: Colourise Haskell code. +@@ -35,6 +36,9 @@ + Language.Haskell.HsColour.Options + Language.Haskell.HsColour.Output + Language.Haskell.HsColour.TTY ++Other-Modules: ++ Paths_hscolour ++ Util + data-files: hscolour.css + --ghc-options: -O -W + Build-Type: Simple +diff -rN -u old-hscolour/HsColour.hs new-hscolour/HsColour.hs +--- old-hscolour/HsColour.hs 2009-12-01 19:41:01.145689639 +0200 ++++ new-hscolour/HsColour.hs 2009-12-01 19:41:01.148689183 +0200 +@@ -6,11 +6,17 @@ + import Language.Haskell.HsColour.Options + import System + import IO ++import System.IO (withFile) + import Monad (when) + import List (intersperse, isSuffixOf) + import Debug.Trace + +-version = "1.15" ++import Util (set_utf8_io_enc) ++ ++import Data.Version (showVersion) ++import qualified Paths_hscolour (version) ++ ++version = showVersion Paths_hscolour.version + + optionTable :: [(String,Option)] + optionTable = [ ("help", Help) +@@ -68,27 +74,43 @@ + ioWrapper (HSColour.hscolour output pref anchors partial title) + + where ++ -- ++ -- Implement follow such I/O codepage rules: ++ -- FILE I(unput) / O(utput) is in UTF8 ++ -- TTY I(unput) / O(utput) is in locale ++ -- (may have problems with HsColour IFILE >OFILE, as it differs from HsColour IFILE -oOFILE) ++ -- TTY stderr is alwais in locale (always used for user interaction) ++ -- ++ -- Some common use cases: ++ -- File I / FILE O (HsColour -css -anchor -oOFILE IFILE) : are both always done in UTF8 mode (cabal hscolour mode) ++ -- File I / TTY O (HsColour IFILE) : file is read in UTF-8 written in locale ++ -- TTY I / TTY O (HsColour) : stdin/stdout are both in locale ++ ++ -- fully mimic Prelude analogues ++ writeUTF8File f txt = withFile f WriteMode (\hdl -> set_utf8_io_enc hdl >> hPutStr hdl txt) ++ readUTF8File name = openFile name ReadMode >>= set_utf8_io_enc >>= hGetContents ++ + writeResult outF s = do if null outF then putStr s +- else writeFile (last outF) s ++ else writeUTF8File (last outF) s + exitSuccess + fileInteract out inFs u = do h <- case out of + [] -> return stdout +- [outF] -> openFile outF WriteMode ++ [outF] -> openFile outF WriteMode >>= set_utf8_io_enc + mapM_ (\ (f,lit)-> +- readFile f >>= hPutStr h . u lit) ++ readUTF8File f >>= hPutStr h . u lit) + inFs + hClose h + ttyInteract [] lit u = do hSetBuffering stdout NoBuffering + Prelude.interact (u lit) + ttyInteract [outF] lit u = do c <- hGetContents stdin +- writeFile outF (u lit c) ++ writeUTF8File outF (u lit c) + exitSuccess = exitWith ExitSuccess + errorOut s = hPutStrLn stderr s >> hFlush stderr >> exitFailure + usage prog = "Usage: "++prog + ++" options [file.hs]\n where\n options = [ " + ++ (indent 15 . unwords . width 58 58 . intersperse "|" + . ("-oOUTPUT":) +- . map (('-':) . fst)) optionTable ++ " ]" ++ . map (('-':) . fst)) optionTable ++ " ]\n" + useDefault d f list | null list = d + | otherwise = f (head list) + useDefaults d f list | null list = d +diff -rN -u old-hscolour/Util.hs new-hscolour/Util.hs +--- old-hscolour/Util.hs 1970-01-01 03:00:00.000000000 +0300 ++++ new-hscolour/Util.hs 2009-12-01 19:41:01.153688353 +0200 +@@ -0,0 +1,12 @@ ++{-# LANGUAGE CPP #-} ++ ++module Util where ++ ++import System.IO ++ ++set_utf8_io_enc :: Handle -> IO Handle ++set_utf8_io_enc h = ++#if MIN_VERSION_base(4,2,0) ++ hSetEncoding h utf8 >> ++#endif ++ return h diff --git a/dev-haskell/hscolour/hscolour-1.15.ebuild b/dev-haskell/hscolour/hscolour-1.15.ebuild new file mode 100644 index 000000000000..e1393f1baa4f --- /dev/null +++ b/dev-haskell/hscolour/hscolour-1.15.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/hscolour/hscolour-1.15.ebuild,v 1.1 2009/12/15 22:55:23 kolmodin Exp $ + +CABAL_FEATURES="bin lib profile haddock" +inherit base haskell-cabal + +DESCRIPTION="Colourise Haskell code." +HOMEPAGE="http://www.cs.york.ac.uk/fp/darcs/hscolour/" +SRC_URI="http://hackage.haskell.org/packages/archive/${PN}/${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~sparc ~x86" +IUSE="" + +RDEPEND=">=dev-lang/ghc-6.6.1" +DEPEND="${RDEPEND} + >=dev-haskell/cabal-1.6" + +PATCHES=("${FILESDIR}/hscolour-0.15-utf8-aware.diff") + +src_install() { + cabal_src_install + if use doc; then + dohtml index.html hscolour.css + dodoc README + fi +} |