Setting opencascade 6.5 to freecad for it to build.

This commit is contained in:
Lluís Batlle i Rossell 2013-05-30 19:25:01 +02:00
parent 94d83c8953
commit 270f861dde
3 changed files with 64 additions and 9 deletions

View File

@ -0,0 +1,41 @@
{stdenv, fetchurl, mesa, tcl, tk, file, libXmu, automake, autoconf, libtool, qt4,
ftgl, freetype}:
stdenv.mkDerivation rec {
name = "opencascade-6.5.4";
src = fetchurl {
url = http://files.opencascade.com/OCCT/OCC_6.5.4_release/OpenCASCADE654.tar.gz;
sha256 = "1di08mc0wly4cdi3rh9kj52bk0bfpyk6dy03c9yfnv04i7z03kmy";
};
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 = "-fpermissive";
configureFlags = [ "--with-tcl=${tcl}/lib" "--with-tk=${tk}/lib" "--with-qt=${qt4}" "--with-ftgl=${ftgl}" "--with-freetype=${freetype}" ];
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;
};
}

View File

@ -1,23 +1,33 @@
{stdenv, fetchurl, mesa, tcl, tk, file, libXmu, cmake, qt4, freetype}:
{stdenv, fetchurl, mesa, tcl, tk, file, libXmu, automake, autoconf, libtool, qt4,
ftgl, freetype}:
stdenv.mkDerivation rec {
name = "opencascade-6.6.0";
name = "opencascade-6.5.4";
src = fetchurl {
url = http://files.opencascade.com/OCCT/OCC_6.6.0_release/OpenCASCADE660.tgz;
sha256 = "0q2xn915w9skv9sj74lxnyv9g3b0yi1j04majyzxk6sv4nra97z3";
url = http://files.opencascade.com/OCCT/OCC_6.5.4_release/OpenCASCADE654.tar.gz;
sha256 = "1di08mc0wly4cdi3rh9kj52bk0bfpyk6dy03c9yfnv04i7z03kmy";
};
buildInputs = [ cmake mesa tcl tk file libXmu qt4 freetype ];
buildInputs = [ mesa tcl tk file libXmu automake autoconf libtool qt4 ftgl freetype ];
preUnpack = ''
sourceRoot=`pwd`/ros/adm/cmake
cmakeFlags="$cmakeFlags -DINSTALL_DIR=$out -D3RDPARTY_TCL_DIR=${tcl} -D3RDPARTY_FREETYPE_DIR=${freetype}"
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 = "-fpermissive";
configureFlags = [ "--with-tcl=${tcl}/lib" "--with-tk=${tk}/lib" "--with-qt=${qt4}" "--with-ftgl=${ftgl}" "--with-freetype=${freetype}" ];
postInstall = ''
mv $out/inc $out/include
mkdir -p $out/share/doc/${name}
cp -R ../../../doc $out/share/doc/${name}
cp -R ../doc $out/share/doc/${name}
'';
enableParallelBuilding = true;

View File

@ -4820,6 +4820,8 @@ let
opencascade = callPackage ../development/libraries/opencascade { };
opencascade_6_5 = callPackage ../development/libraries/opencascade/6.5.nix { };
opencascade_oce = callPackage ../development/libraries/opencascade/oce.nix { };
opencsg = callPackage ../development/libraries/opencsg { };
@ -7221,7 +7223,9 @@ let
# !!! Fix the dependency on two different builds of nss.
};
freecad = callPackage ../applications/graphics/freecad { };
freecad = callPackage ../applications/graphics/freecad {
opencascade = opencascade_6_5;
};
freemind = callPackage ../applications/misc/freemind {
jdk = jdk;