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.

svn path=/nixpkgs/trunk/; revision=26153
This commit is contained in:
Lluís Batlle i Rossell 2011-03-04 09:48:33 +00:00
parent 31c38d7dd2
commit f6ea68b2ee
2 changed files with 40 additions and 22 deletions

View file

@ -2,28 +2,39 @@ 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
@@ -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)

View file

@ -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 @@ stdenv.mkDerivation rec {
};
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 @@ stdenv.mkDerivation rec {
# 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;
};
}