diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2012-05-05 17:43:19 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2012-05-05 17:43:19 +0000 |
commit | 689966e55631a73e055784683c191719c1879086 (patch) | |
tree | bad7f16466dde53fe9187779dcb26627f02fa88c /dev-util/bnfc | |
parent | alpha/ia64/sparc stable wrt #400351 (diff) | |
download | historical-689966e55631a73e055784683c191719c1879086.tar.gz historical-689966e55631a73e055784683c191719c1879086.tar.bz2 historical-689966e55631a73e055784683c191719c1879086.zip |
Fix build failure against ghc-7.4
Package-Manager: portage-2.2.0_alpha101_p6/cvs/Linux x86_64
Diffstat (limited to 'dev-util/bnfc')
-rw-r--r-- | dev-util/bnfc/ChangeLog | 8 | ||||
-rw-r--r-- | dev-util/bnfc/bnfc-2.4.2.0.ebuild | 28 | ||||
-rw-r--r-- | dev-util/bnfc/files/bnfc-2.4.2.0-mangle-errors.patch | 38 |
3 files changed, 68 insertions, 6 deletions
diff --git a/dev-util/bnfc/ChangeLog b/dev-util/bnfc/ChangeLog index a504f4d9a4bb..853ea33ecfa0 100644 --- a/dev-util/bnfc/ChangeLog +++ b/dev-util/bnfc/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-util/bnfc -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/bnfc/ChangeLog,v 1.15 2011/03/01 20:02:18 slyfox Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/bnfc/ChangeLog,v 1.16 2012/05/05 17:43:19 slyfox Exp $ + + 05 May 2012; Sergei Trofimovich <slyfox@gentoo.org> + +files/bnfc-2.4.2.0-mangle-errors.patch, bnfc-2.4.2.0.ebuild: + Fix build failure against ghc-7.4 01 Mar 2011; Sergei Trofimovich <slyfox@gentoo.org> -bnfc-2.1.2.ebuild, -bnfc-2.2.ebuild, -files/bnfc-2.2-ghc66-utf8.patch, -bnfc-2.4_beta.ebuild: diff --git a/dev-util/bnfc/bnfc-2.4.2.0.ebuild b/dev-util/bnfc/bnfc-2.4.2.0.ebuild index 76d815112f0e..0b43dc484133 100644 --- a/dev-util/bnfc/bnfc-2.4.2.0.ebuild +++ b/dev-util/bnfc/bnfc-2.4.2.0.ebuild @@ -1,13 +1,13 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/bnfc/bnfc-2.4.2.0.ebuild,v 1.1 2011/03/01 20:01:06 slyfox Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/bnfc/bnfc-2.4.2.0.ebuild,v 1.2 2012/05/05 17:43:19 slyfox Exp $ # ebuild generated by hackport 0.2.11 -EAPI="2" +EAPI=4 CABAL_FEATURES="bin" -inherit haskell-cabal +inherit eutils haskell-cabal MY_PN="BNFC" MY_P="${MY_PN}-${PV}" @@ -28,3 +28,23 @@ DEPEND="${RDEPEND} >=dev-lang/ghc-6.10.1" S="${WORKDIR}/${MY_P}" + +src_prepare() { + # get rid of haskell98 to be ghc-7.4 compatible + sed -i ${MY_PN}.cabal -e 's/haskell98,//' || die + local hs + find . -type f -name '*.hs' | while read hs; do + einfo "Mangling $hs" + sed -i "$hs"\ + -e 's/^import \<Array\>/import Data.Array/g' \ + -e 's/^import \<Directory\>/import System.Directory/g' \ + -e 's/^import \<IO\>/import System.IO/g' \ + -e 's/^import \<Maybe\>/import Data.Maybe/g' \ + -e 's/^import \<Monad\>/import Control.Monad/g' \ + -e 's/^import \<List\>/import Data.List/g' \ + -e 's/^import \<Char\>/import Data.Char/g' \ + -e 's/^import \<System\>\s*$/import System.Exit\nimport System.Environment\n/g' \ + || die + done + epatch "${FILESDIR}"/${P}-mangle-errors.patch # yes, built on top of mangled sources above +} diff --git a/dev-util/bnfc/files/bnfc-2.4.2.0-mangle-errors.patch b/dev-util/bnfc/files/bnfc-2.4.2.0-mangle-errors.patch new file mode 100644 index 000000000000..e5c584093aa0 --- /dev/null +++ b/dev-util/bnfc/files/bnfc-2.4.2.0-mangle-errors.patch @@ -0,0 +1,38 @@ +diff --git a/Main.hs b/Main.hs +index 3497fcf..ec62e5e 100644 +--- a/Main.hs ++++ b/Main.hs +@@ -43,6 +43,7 @@ import MultiView (preprocessMCF, mkTestMulti, mkMakefileMulti) + + import System.Exit + import System.Environment ++import System.Process + + import System.Exit + import Data.Char +diff --git a/formats/java/JavaTop.hs b/formats/java/JavaTop.hs +index 3cdaab2..c866bf6 100644 +--- a/formats/java/JavaTop.hs ++++ b/formats/java/JavaTop.hs +@@ -38,7 +38,7 @@ module JavaTop ( makeJava ) where + -- Dependencies. + ------------------------------------------------------------------- + import System.Directory ( createDirectory ) +-import System.IO ( try, isAlreadyExistsError ) ++import System.IO.Error ( try, isAlreadyExistsError ) + + import Utils + import CF +diff --git a/formats/java1.5/JavaTop15.hs b/formats/java1.5/JavaTop15.hs +index c96bb8c..6d6b3eb 100644 +--- a/formats/java1.5/JavaTop15.hs ++++ b/formats/java1.5/JavaTop15.hs +@@ -39,7 +39,7 @@ module JavaTop15 ( makeJava15 ) where + -- Dependencies. + ------------------------------------------------------------------- + import System.Directory ( createDirectory ) +-import System.IO ( try, isAlreadyExistsError ) ++import System.IO.Error ( try, isAlreadyExistsError ) + + import Utils + import CF |