summary refs log tree commit diff
path: root/pkgs/applications/graphics/freecad
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2011-03-04 09:48:33 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2011-03-04 09:48:33 +0000
commitf6ea68b2ee1f81f20121e5602dd0c056de996a0b (patch)
treef64c2d34fcb52d52b4dd4aafa66c60efacf466b4 /pkgs/applications/graphics/freecad
parent31c38d7dd2c5b3683687ad172b0fd3ada4a887f9 (diff)
downloadnixpkgs-f6ea68b2ee1f81f20121e5602dd0c056de996a0b.tar
nixpkgs-f6ea68b2ee1f81f20121e5602dd0c056de996a0b.tar.gz
nixpkgs-f6ea68b2ee1f81f20121e5602dd0c056de996a0b.tar.bz2
nixpkgs-f6ea68b2ee1f81f20121e5602dd0c056de996a0b.tar.lz
nixpkgs-f6ea68b2ee1f81f20121e5602dd0c056de996a0b.tar.xz
nixpkgs-f6ea68b2ee1f81f20121e5602dd0c056de996a0b.tar.zst
nixpkgs-f6ea68b2ee1f81f20121e5602dd0c056de996a0b.zip
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
Diffstat (limited to 'pkgs/applications/graphics/freecad')
-rw-r--r--pkgs/applications/graphics/freecad/cmakeinstall.patch51
-rw-r--r--pkgs/applications/graphics/freecad/default.nix11
2 files changed, 40 insertions, 22 deletions
diff --git a/pkgs/applications/graphics/freecad/cmakeinstall.patch b/pkgs/applications/graphics/freecad/cmakeinstall.patch
index 10d8196169d..6b8f9fb1a60 100644
--- a/pkgs/applications/graphics/freecad/cmakeinstall.patch
+++ b/pkgs/applications/graphics/freecad/cmakeinstall.patch
@@ -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)
diff --git a/pkgs/applications/graphics/freecad/default.nix b/pkgs/applications/graphics/freecad/default.nix
index 58e36369f04..5cb0a21627e 100644
--- a/pkgs/applications/graphics/freecad/default.nix
+++ b/pkgs/applications/graphics/freecad/default.nix
@@ -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;
   };
 }