From 6dc47662e775d5b001ccf4df68484a5059edc6fd Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 30 Mar 2012 03:39:30 +0000 Subject: Fix build failure against ghc-7.4 (reported by Christian Lask). (Portage version: 2.2.0_alpha91/cvs/Linux x86_64) --- dev-haskell/opengl/ChangeLog | 8 ++++-- .../opengl/files/opengl-2.2.1.1-ghc-7.4.patch | 29 ++++++++++++++++++++++ dev-haskell/opengl/opengl-2.2.1.1.ebuild | 8 +++--- 3 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 dev-haskell/opengl/files/opengl-2.2.1.1-ghc-7.4.patch (limited to 'dev-haskell/opengl') diff --git a/dev-haskell/opengl/ChangeLog b/dev-haskell/opengl/ChangeLog index bd05ba51017f..9e54f4df7d1b 100644 --- a/dev-haskell/opengl/ChangeLog +++ b/dev-haskell/opengl/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-haskell/opengl -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-haskell/opengl/ChangeLog,v 1.11 2010/09/16 16:36:07 scarabeus Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/opengl/ChangeLog,v 1.12 2012/03/30 03:39:30 slyfox Exp $ + + 30 Mar 2012; Sergei Trofimovich + +files/opengl-2.2.1.1-ghc-7.4.patch, opengl-2.2.1.1.ebuild: + Fix build failure against ghc-7.4 (reported by Christian Lask). 16 Sep 2010; Tomáš Chvátal opengl-2.2.1.1.ebuild: diff --git a/dev-haskell/opengl/files/opengl-2.2.1.1-ghc-7.4.patch b/dev-haskell/opengl/files/opengl-2.2.1.1-ghc-7.4.patch new file mode 100644 index 000000000000..772b17539523 --- /dev/null +++ b/dev-haskell/opengl/files/opengl-2.2.1.1-ghc-7.4.patch @@ -0,0 +1,29 @@ +Fix build failure against ghc-7.4 + +[ 4 of 84] Compiling Graphics.Rendering.OpenGL.GL.GLboolean ( Graphics/Rendering/OpenGL/GL/GLboolean.hs, dist/build/Graphics/Rendering/OpenGL/GL/GLboolean.o ) + +Graphics/Rendering/OpenGL/GL/GLboolean.hs:27:23: + Could not deduce (Eq a) arising from a use of `/=' + from the context (Num a) + bound by the type signature for + unmarshalGLboolean :: Num a => a -> Bool + at Graphics/Rendering/OpenGL/GL/GLboolean.hs:27:1-27 + Possible fix: + add (Eq a) to the context of + the type signature for unmarshalGLboolean :: Num a => a -> Bool + In the expression: (/= 0) + In an equation for `unmarshalGLboolean': + unmarshalGLboolean = (/= 0) + +Reported-by: Christian Lask +diff --git a/Graphics/Rendering/OpenGL/GL/GLboolean.hs b/Graphics/Rendering/OpenGL/GL/GLboolean.hs +index cab7356..cc4faa8 100644 +--- a/Graphics/Rendering/OpenGL/GL/GLboolean.hs ++++ b/Graphics/Rendering/OpenGL/GL/GLboolean.hs +@@ -23,5 +23,5 @@ marshalGLboolean :: Num a => Bool -> a + marshalGLboolean False = 0 + marshalGLboolean True = 1 + +-unmarshalGLboolean :: Num a => a -> Bool ++unmarshalGLboolean :: (Eq a, Num a) => a -> Bool + unmarshalGLboolean = (/= 0) diff --git a/dev-haskell/opengl/opengl-2.2.1.1.ebuild b/dev-haskell/opengl/opengl-2.2.1.1.ebuild index 2762a2e3fd30..aee3835df1af 100644 --- a/dev-haskell/opengl/opengl-2.2.1.1.ebuild +++ b/dev-haskell/opengl/opengl-2.2.1.1.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-haskell/opengl/opengl-2.2.1.1.ebuild,v 1.5 2010/09/16 16:36:07 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/opengl/opengl-2.2.1.1.ebuild,v 1.6 2012/03/30 03:39:30 slyfox Exp $ CABAL_FEATURES="lib profile haddock" -inherit haskell-cabal +inherit base haskell-cabal MY_PN=OpenGL MY_P="${MY_PN}-${PV}" @@ -23,3 +23,5 @@ DEPEND=">=dev-lang/ghc-6.4 media-libs/freeglut" S="${WORKDIR}/${MY_P}" + +PATCHES=("${FILESDIR}/${P}-ghc-7.4.patch") -- cgit v1.2.3-65-gdbad