summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wright <gienah@gentoo.org>2012-06-02 03:36:51 +0000
committerMark Wright <gienah@gentoo.org>2012-06-02 03:36:51 +0000
commit3dc2eea087b34328ec8c86f7e8ff2a99ed86f7c3 (patch)
tree0452b23687e94c46c9b54512bcf40034d077c544 /dev-haskell
parentBump xhtml to 3000.2.1 (diff)
downloadhistorical-3dc2eea087b34328ec8c86f7e8ff2a99ed86f7c3.tar.gz
historical-3dc2eea087b34328ec8c86f7e8ff2a99ed86f7c3.tar.bz2
historical-3dc2eea087b34328ec8c86f7e8ff2a99ed86f7c3.zip
Apply patch from upstream: Don't crash on unicode strings in doc comments.
Package-Manager: portage-2.1.10.63/cvs/Linux x86_64
Diffstat (limited to 'dev-haskell')
-rw-r--r--dev-haskell/haddock/ChangeLog9
-rw-r--r--dev-haskell/haddock/files/haddock-2.10.0-dont-crash-on-unicode-strings-in-doc-comments.patch22
-rw-r--r--dev-haskell/haddock/haddock-2.10.0-r1.ebuild67
3 files changed, 97 insertions, 1 deletions
diff --git a/dev-haskell/haddock/ChangeLog b/dev-haskell/haddock/ChangeLog
index 0e3731dbfc42..493241ab8e9c 100644
--- a/dev-haskell/haddock/ChangeLog
+++ b/dev-haskell/haddock/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-haskell/haddock
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haddock/ChangeLog,v 1.90 2012/03/25 14:25:09 slyfox Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haddock/ChangeLog,v 1.91 2012/06/02 03:36:51 gienah Exp $
+
+*haddock-2.10.0-r1 (02 Jun 2012)
+
+ 02 Jun 2012; Mark Wright <gienah@gentoo.org>
+ +files/haddock-2.10.0-dont-crash-on-unicode-strings-in-doc-comments.patch,
+ +haddock-2.10.0-r1.ebuild:
+ Apply patch from upstream: Don't crash on unicode strings in doc comments.
25 Mar 2012; Sergei Trofimovich <slyfox@gentoo.org>
+files/haddock-2.10.0-drop-tools.patch, haddock-2.10.0.ebuild:
diff --git a/dev-haskell/haddock/files/haddock-2.10.0-dont-crash-on-unicode-strings-in-doc-comments.patch b/dev-haskell/haddock/files/haddock-2.10.0-dont-crash-on-unicode-strings-in-doc-comments.patch
new file mode 100644
index 000000000000..254266d20e26
--- /dev/null
+++ b/dev-haskell/haddock/files/haddock-2.10.0-dont-crash-on-unicode-strings-in-doc-comments.patch
@@ -0,0 +1,22 @@
+--- haddock-2.10.0-orig/src/Haddock/Lex.x 2012-03-04 03:21:18.000000000 +1100
++++ haddock-2.10.0/src/Haddock/Lex.x 2012-05-30 22:19:31.858259148 +1000
+@@ -181,7 +181,7 @@
+ go inp@(pos, _, str) sc =
+ case alexScan inp sc of
+ AlexEOF -> []
+- AlexError _ -> error "lexical error"
++ AlexError _ -> []
+ AlexSkip inp' _ -> go inp' sc
+ AlexToken inp'@(pos',_,_) len act -> act pos (take len str) sc (\sc -> go inp' sc) dflags
+
+--- haddock-2.10.0-orig/dist/build/haddock/haddock-tmp/Haddock/Lex.hs 2012-03-04 03:21:21.000000000 +1100
++++ haddock-2.10.0/dist/build/haddock/haddock-tmp/Haddock/Lex.hs 2012-05-30 22:23:40.209770708 +1000
+@@ -131,7 +131,7 @@
+ go inp@(pos, _, str) sc =
+ case alexScan inp sc of
+ AlexEOF -> []
+- AlexError _ -> error "lexical error"
++ AlexError _ -> []
+ AlexSkip inp' _ -> go inp' sc
+ AlexToken inp'@(pos',_,_) len act -> act pos (take len str) sc (\sc -> go inp' sc) dflags
+
diff --git a/dev-haskell/haddock/haddock-2.10.0-r1.ebuild b/dev-haskell/haddock/haddock-2.10.0-r1.ebuild
new file mode 100644
index 000000000000..a8c57d42ac0d
--- /dev/null
+++ b/dev-haskell/haddock/haddock-2.10.0-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haddock/haddock-2.10.0-r1.ebuild,v 1.1 2012/06/02 03:36:51 gienah Exp $
+
+EAPI="4"
+
+CABAL_FEATURES="bin lib profile haddock hscolour"
+inherit eutils haskell-cabal pax-utils
+
+DESCRIPTION="A documentation-generation tool for Haskell libraries"
+HOMEPAGE="http://www.haskell.org/haddock/"
+SRC_URI="http://hackage.haskell.org/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+# ia64 lost as we don't have ghc-7 there yet
+# ppc64 needs to be rekeyworded due to xhtml not being keyworded
+KEYWORDS="~alpha ~amd64 -ia64 ~ppc ~sparc ~x86 ~x86-fbsd"
+IUSE=""
+
+RDEPEND="dev-haskell/ghc-paths[profile?]
+ =dev-haskell/xhtml-3000.2*[profile?]
+ >=dev-lang/ghc-7.4"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.14"
+
+RESTRICT="test" # avoid depends on QC
+
+CABAL_EXTRA_BUILD_FLAGS="--ghc-options=-rtsopts"
+
+src_prepare() {
+ # we would like to avoid happy and alex depends
+ epatch "${FILESDIR}"/${P}-drop-tools.patch
+ # http://www.mail-archive.com/cvs-ghc@haskell.org/msg37186.html
+ epatch "${FILESDIR}"/${P}-dont-crash-on-unicode-strings-in-doc-comments.patch
+
+ for f in Lex Parse; do
+ rm "src/Haddock/$f."*
+ mv "dist/build/haddock/haddock-tmp/Haddock/$f.hs" src/Haddock/
+ done
+}
+
+src_configure() {
+ # create a fake haddock executable. it'll set the right version to cabal
+ # configure, but will eventually get overwritten in src_compile by
+ # the real executable.
+ local exe="${S}/dist/build/haddock/haddock"
+ mkdir -p $(dirname "${exe}")
+ echo -e "#!/bin/sh\necho Haddock version ${PV}" > "${exe}"
+ chmod +x "${exe}"
+
+ haskell-cabal_src_configure --with-haddock="${exe}"
+}
+
+src_compile() {
+ # when building the (recursive..) haddock docs, change the datadir to the
+ # current directory, as we're using haddock inplace even if it's built to be
+ # installed into the system first.
+ haddock_datadir="${S}" haskell-cabal_src_compile
+}
+
+src_install() {
+ cabal_src_install
+ # haddock uses GHC-api to process TH source.
+ # TH requires GHCi which needs mmap('rwx') (bug #299709)
+ pax-mark -m "${D}/usr/bin/${PN}"
+}