Author: viric
Date: Fri Mar 4 09:48:24 2011
New Revision: 26151
URL: https://svn.nixos.org/websvn/nix/?rev=26151&sc=1
Log:
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.
Added:
nixpkgs/trunk/pkgs/applications/graphics/freecad/cmakeinstall.patch
nixpkgs/trunk/pkgs/development/libraries/boost/1.46.nix
Modified:
nixpkgs/trunk/pkgs/applications/graphics/freecad/default.nix
nixpkgs/trunk/pkgs/development/libraries/eigen/default.nix
nixpkgs/trunk/pkgs/top-level/all-packages.nix
Added: nixpkgs/trunk/pkgs/applications/graphics/freecad/cmakeinstall.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/applications/graphics/freecad/cmakeinstall.patch Fri Mar
4 09:48:24 2011 (r26151)
@@ -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)
Modified: nixpkgs/trunk/pkgs/applications/graphics/freecad/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/applications/graphics/freecad/default.nix Thu Mar
3 16:23:59 2011 (r26150)
+++ nixpkgs/trunk/pkgs/applications/graphics/freecad/default.nix Fri Mar
4 09:48:24 2011 (r26151)
@@ -23,6 +23,8 @@
# 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+" ];
Added: nixpkgs/trunk/pkgs/development/libraries/boost/1.46.nix
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/development/libraries/boost/1.46.nix Fri Mar 4
09:48:24 2011 (r26151)
@@ -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
+ '';
+ };
+}
Modified: nixpkgs/trunk/pkgs/development/libraries/eigen/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/development/libraries/eigen/default.nix Thu Mar 3
16:23:59 2011 (r26150)
+++ nixpkgs/trunk/pkgs/development/libraries/eigen/default.nix Fri Mar 4
09:48:24 2011 (r26151)
@@ -8,7 +8,7 @@
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; {
Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/trunk/pkgs/top-level/all-packages.nix Thu Mar 3 16:23:59
2011 (r26150)
+++ nixpkgs/trunk/pkgs/top-level/all-packages.nix Fri Mar 4 09:48:24
2011 (r26151)
@@ -2803,6 +2803,8 @@
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 @@
flite = callPackage ../applications/misc/flite { };
- freecad = callPackage ../applications/graphics/freecad { };
+ freecad = callPackage ../applications/graphics/freecad {
+ boost = boost146;
+ };
freemind = callPackage ../applications/misc/freemind {
jdk = jdk;
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits