From 7f3aa94399c155de5b6a026f9b9b26f461ea1e5c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?=
 <viric@vicerveza.homeunix.net>
Date: Wed, 7 Mar 2012 13:49:51 +0000
Subject: [PATCH] Fixing the build of opencascade on linux.

The new gcc sees a code flaw that I can 'overcome' (make the build go on) with -fpermissive.


svn path=/nixpkgs/trunk/; revision=32852
---
 pkgs/development/libraries/opencascade/default.nix | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pkgs/development/libraries/opencascade/default.nix b/pkgs/development/libraries/opencascade/default.nix
index 87bbd112758b..375aa4f2d58f 100644
--- a/pkgs/development/libraries/opencascade/default.nix
+++ b/pkgs/development/libraries/opencascade/default.nix
@@ -18,7 +18,9 @@ stdenv.mkDerivation rec {
     sh ./build_configure
   '';
 
-  NIX_CFLAGS_COMPILE = "-I${ftgl}/include/FTGL -I${freetype}/include/freetype2";
+  # -fpermissive helps building opencascade, although gcc detects a flaw in the code
+  # and reports an error otherwise. Further versions may fix that.
+  NIX_CFLAGS_COMPILE = "-I${ftgl}/include/FTGL -I${freetype}/include/freetype2 -fpermissive";
 
   configureFlags = [ "--with-tcl=${tcl}/lib" "--with-tk=${tk}/lib" ];