Author: viric
Date: Fri Mar 4 09:48:33 2011
New Revision: 26153
URL: https://svn.nixos.org/websvn/nix/?rev=26153&sc=1
Log:
Freecad builds, installs and runs, (although still not with PyQt for its draft
workbench).
On virtualgl, it needs a variable set about the GL context set; freecad
suggests that upon failing to run in that environment.
Modified:
nixpkgs/trunk/pkgs/applications/graphics/freecad/cmakeinstall.patch
nixpkgs/trunk/pkgs/applications/graphics/freecad/default.nix
Modified: nixpkgs/trunk/pkgs/applications/graphics/freecad/cmakeinstall.patch
==============================================================================
--- nixpkgs/trunk/pkgs/applications/graphics/freecad/cmakeinstall.patch Fri Mar
4 09:48:29 2011 (r26152)
+++ nixpkgs/trunk/pkgs/applications/graphics/freecad/cmakeinstall.patch Fri Mar
4 09:48:33 2011 (r26153)
@@ -2,28 +2,39 @@
===================================================================
--- 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
+@@ -191,7 +191,7 @@
+ INCLUDE_DIRECTORIES(src/StdMeshers)
+
+ ADD_LIBRARY(StdMeshers SHARED ${StdMeshers_source_files})
+-TARGET_LINK_LIBRARIES(StdMeshers SMESH TKernel TKMath TKAdvTools f2c)
++TARGET_LINK_LIBRARIES(StdMeshers SMESH TKernel TKMath TKAdvTools f2c gfortran)
+ SET(StdMeshers_CFLAGS "")
+ IF(WIN32)
+ SET(StdMeshers_CFLAGS "-DSTDMESHERS_EXPORTS -DMEFISTO2D_EXPORTS")
+@@ -218,9 +218,9 @@
+ # 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 lib)
+ # 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)
++ DESTINATION include
+ FILES_MATCHING PATTERN "*.h*")
+ ENDIF(UNIX)
+Index: src/3rdParty/Pivy-0.5/CMakeLists.txt
+===================================================================
+--- a/src/3rdParty/Pivy-0.5/CMakeLists.txt (revision 4193)
++++ a/src/3rdParty/Pivy-0.5/CMakeLists.txt (working copy)
+@@ -56,6 +56,7 @@
+ set_target_properties(coin PROPERTIES OUTPUT_NAME "_coin")
+ set_target_properties(coin PROPERTIES LIBRARY_OUTPUT_DIRECTORY
${CMAKE_BINARY_DIR}/bin/pivy)
+ set_target_properties(coin PROPERTIES PREFIX "")
++ install(TARGETS coin DESTINATION bin/pivy)
+ endif(MSVC)
+
+ fc_copy_sources_outpath("bin/pivy" "coin"
Index: CMakeLists.txt
===================================================================
--- a/CMakeLists.txt (revision 4193)
Modified: nixpkgs/trunk/pkgs/applications/graphics/freecad/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/applications/graphics/freecad/default.nix Fri Mar
4 09:48:29 2011 (r26152)
+++ nixpkgs/trunk/pkgs/applications/graphics/freecad/default.nix Fri Mar
4 09:48:33 2011 (r26153)
@@ -1,6 +1,6 @@
{ fetchsvn, stdenv, cmake, coin3d, xercesc, ode, eigen, qt4, opencascade, gts,
boost, zlib,
-python, swig, gfortran, soqt, libf2c }:
+python, swig, gfortran, soqt, libf2c, pyqt4 }:
# It builds but fails to install
@@ -15,7 +15,7 @@
};
buildInputs = [ cmake coin3d xercesc ode eigen qt4 opencascade gts boost
- zlib python swig gfortran soqt libf2c ];
+ zlib python swig gfortran soqt libf2c pyqt ];
enableParallelBuilding = true;
@@ -23,11 +23,18 @@
# this for freecad to build
NIX_CFLAGS_COMPILE = "-DBOOST_FILESYSTEM_VERSION=2";
+ # This will help only x86_64, but will not hurt on others.
+ preBuild = ''
+ export NIX_LDFLAGS="-L${gfortran.gcc}/lib64 $NIX_LDFLAGS";
+ '';
+
patches = [ ./cmakeinstall.patch ];
meta = {
homepage = http://free-cad.sourceforge.net/;
license = [ "GPLv2+" "LGPLv2+" ];
description = "General purpose Open Source 3D CAD/MCAD/CAx/CAE/PLM
modeler";
+ maintainers = with stdenv.lib.maintainers; [viric];
+ platforms = with stdenv.lib.platforms; linux;
};
}
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits