Making freecad install; it still does not find all shared objects though.

Either eigen changed the hash of the tarball, or I did not commit its latest hash.
I add boost 1.46 apart, because 1.44 does not work easily for freecad.

svn path=/nixpkgs/trunk/; revision=26151
This commit is contained in:
Lluís Batlle i Rossell 2011-03-04 09:48:24 +00:00
parent 5c5170ae88
commit a76b0fb6fa
5 changed files with 132 additions and 2 deletions

View File

@ -0,0 +1,44 @@
Index: src/3rdParty/salomesmesh/CMakeLists.txt
===================================================================
--- a/src/3rdParty/salomesmesh/CMakeLists.txt (revision 4193)
+++ a/src/3rdParty/salomesmesh/CMakeLists.txt (working copy)
@@ -206,21 +206,3 @@
IF(MINGW)
SET_TARGET_PROPERTIES(StdMeshers PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
ENDIF(MINGW)
-
-###########
-# INSTALL #
-###########
-
-# Path name install: for instance, SMESH-5.1.2.7
-SET(INSTALL_PATH_NAME SMESH-${SMESH_VERSION_MAJOR}.${SMESH_VERSION_MINOR}.${SMESH_VERSION_PATCH}.${SMESH_VERSION_TWEAK})
-
-IF(UNIX)
- # Libraries are installed by default in /usr/local/lib/SMESH-5.1.2.7
- INSTALL(TARGETS SMDS Driver DriverSTL DriverDAT DriverUNV
- SMESHDS SMESH StdMeshers
- DESTINATION /usr/local/lib/${INSTALL_PATH_NAME})
- # Headers are installed by default in /usr/local/include/SMESH-5.1.2.7
- INSTALL(DIRECTORY inc/
- DESTINATION /usr/local/include/${INSTALL_PATH_NAME}
- FILES_MATCHING PATTERN "*.h*")
-ENDIF(UNIX)
Index: CMakeLists.txt
===================================================================
--- a/CMakeLists.txt (revision 4193)
+++ a/CMakeLists.txt (working copy)
@@ -57,13 +57,6 @@
# ================================================================================
-
-if(WIN32)
- SET(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR})
-else(WIN32)
- SET(CMAKE_INSTALL_PREFIX "/usr/lib/freecad")
-endif(WIN32)
-
# ================================================================================
# == Win32 is default behaviour use the LibPack copied in Source tree ============
if(MSVC)

View File

@ -23,6 +23,8 @@ stdenv.mkDerivation rec {
# this for freecad to build
NIX_CFLAGS_COMPILE = "-DBOOST_FILESYSTEM_VERSION=2";
patches = [ ./cmakeinstall.patch ];
meta = {
homepage = http://free-cad.sourceforge.net/;
license = [ "GPLv2+" "LGPLv2+" ];

View File

@ -0,0 +1,80 @@
{ stdenv, fetchurl, icu, expat, zlib, bzip2, python
, enableRelease ? true
, enableDebug ? false
, enableSingleThreaded ? false
, enableMultiThreaded ? true
, enableShared ? true
, enableStatic ? false
, enablePIC ? false
}:
let
variant = stdenv.lib.concatStringsSep ","
(stdenv.lib.optional enableRelease "release" ++
stdenv.lib.optional enableDebug "debug");
threading = stdenv.lib.concatStringsSep ","
(stdenv.lib.optional enableSingleThreaded "single" ++
stdenv.lib.optional enableMultiThreaded "multi");
link = stdenv.lib.concatStringsSep ","
(stdenv.lib.optional enableShared "shared" ++
stdenv.lib.optional enableStatic "static");
# To avoid library name collisions
finalLayout = if ((enableRelease && enableDebug) ||
(enableSingleThreaded && enableMultiThreaded) ||
(enableShared && enableStatic)) then
"tagged" else "system";
cflags = if (enablePIC) then "cflags=-fPIC cxxflags=-fPIC linkflags=-fPIC" else "";
in
stdenv.mkDerivation {
name = "boost-1.46.0";
meta = {
homepage = "http://boost.org/";
description = "Boost C++ Library Collection";
license = "boost-license";
maintainers = [ stdenv.lib.maintainers.simons ];
};
src = fetchurl {
url = "mirror://sourceforge/boost/boost_1_46_0.tar.bz2";
sha256 = "0ndsiv06332gbh6wj68pcnci3l5qrc5pm1ca9dkmxhpxj83zd41g";
};
enableParallelBuilding = true;
buildInputs = [icu expat zlib bzip2 python];
configureScript = "./bootstrap.sh";
configureFlags = "--with-icu=${icu} --with-python=${python}/bin/python";
buildPhase = "./bjam -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat}/include -sEXPAT_LIBPATH=${expat}/lib --layout=${finalLayout} variant=${variant} threading=${threading} link=${link} ${cflags} install";
installPhase = ":";
crossAttrs = rec {
buildInputs = [ expat.hostDrv zlib.hostDrv bzip2.hostDrv ];
# all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to
# override them.
propagatedBuildInputs = buildInputs;
# We want to substitute the contents of configureFlags, removing thus the
# usual --build and --host added on cross building.
preConfigure = ''
export configureFlags="--prefix=$out --without-icu"
'';
buildPhase = ''
set -x
cat << EOF > user-config.jam
using gcc : cross : $crossConfig-g++ ;
EOF
./bjam -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.hostDrv}/include -sEXPAT_LIBPATH=${expat.hostDrv}/lib --layout=${finalLayout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
'';
};
}

View File

@ -8,7 +8,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "http://bitbucket.org/eigen/eigen/get/${v}.tar.bz2";
name = "eigen-${v}.tar.bz2";
sha256 = "1a00hqyig4rc7nkz97xv23q7k0vdkzvgd0jkayk61fn9aqcrky79";
sha256 = "0frgmkwsgmqaw88qpgvfalisq0wjpcbgqbj6jhpk39nbrs3zcq83";
};
buildNativeInputs = [ cmake ];
meta = with stdenv.lib; {

View File

@ -2803,6 +2803,8 @@ let
boost = callPackage ../development/libraries/boost { };
boost146 = callPackage ../development/libraries/boost/1.46.nix { };
# A Boost build with all library variants enabled. Very large (about 250 MB).
boostFull = appendToName "full" (boost.override {
enableDebug = true;
@ -6028,7 +6030,9 @@ let
flite = callPackage ../applications/misc/flite { };
freecad = callPackage ../applications/graphics/freecad { };
freecad = callPackage ../applications/graphics/freecad {
boost = boost146;
};
freemind = callPackage ../applications/misc/freemind {
jdk = jdk;