nixpkgs/pkgs/development/libraries/opencascade/default.nix
Lluís Batlle i Rossell 7f3aa94399 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
2012-03-07 13:49:51 +00:00

41 lines
1.2 KiB
Nix

{stdenv, fetchurl, mesa, tcl, tk, file, libXmu, automake, autoconf, libtool, qt4,
ftgl, freetype}:
stdenv.mkDerivation rec {
name = "opencascade-6.5.2";
src = fetchurl {
url = http://files.opencascade.com/OCCT/OCC_6.5.2_release/OpenCASCADE652.tar.gz;
sha256 = "0nsfjhd6rv1fmq8jbyzcs0f13h4xfld487vqs9bwd4lbwcfqxwcy";
};
buildInputs = [ mesa tcl tk file libXmu automake autoconf libtool qt4 ftgl freetype ];
preUnpack = ''
sourceRoot=`pwd`/ros
'';
preConfigure = ''
sh ./build_configure
'';
# -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" ];
postInstall = ''
mv $out/inc $out/include
mkdir -p $out/share/doc/${name}
cp -R ../doc $out/share/doc/${name}
'';
enableParallelBuilding = true;
meta = {
description = "Open CASCADE Technology, libraries for 3D modeling and numerical simulation";
homepage = http://www.opencascade.org/;
maintainers = with stdenv.lib.maintainers; [viric];
platforms = with stdenv.lib.platforms; linux;
};
}