From 4dd0aff9a979bc3521358ad666f0cd52dbbdce59 Mon Sep 17 00:00:00 2001 From: Richard M. Shaw Date: May 27 2014 14:10:50 +0000 Subject: Initial import (#459125). --- diff --git a/.gitignore b/.gitignore index e69de29..00345e8 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/freecad-0.13.1830.tar.gz diff --git a/freecad-0.13-OCE_0.13.patch b/freecad-0.13-OCE_0.13.patch new file mode 100644 index 0000000..97eaacd --- /dev/null +++ b/freecad-0.13-OCE_0.13.patch @@ -0,0 +1,20 @@ +diff -Naur freecad-0.13.1830.orig/src/Mod/Part/App/TopoShapeSolidPyImp.cpp freecad-0.13.1830/src/Mod/Part/App/TopoShapeSolidPyImp.cpp +--- freecad-0.13.1830.orig/src/Mod/Part/App/TopoShapeSolidPyImp.cpp 2013-02-02 11:09:17.000000000 -0600 ++++ freecad-0.13.1830/src/Mod/Part/App/TopoShapeSolidPyImp.cpp 2013-09-23 09:33:05.009740932 -0500 +@@ -25,6 +25,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -178,7 +179,7 @@ + TopoDS_Shell shell; + const TopoDS_Shape& shape = getTopoShapePtr()->_Shape; + if (!shape.IsNull() && shape.ShapeType() == TopAbs_SOLID) +- shell = BRepTools::OuterShell(TopoDS::Solid(shape)); ++ shell = BRepClass3d::OuterShell(TopoDS::Solid(shape)); + return Py::Object(new TopoShapeShellPy(new TopoShape(shell)),true); + } + diff --git a/freecad-0.13-OCE_0.15.patch b/freecad-0.13-OCE_0.15.patch new file mode 100644 index 0000000..ae8ddb2 --- /dev/null +++ b/freecad-0.13-OCE_0.15.patch @@ -0,0 +1,69 @@ +From c1d14eab3c3f9f1141dc0b7fca7cc4441431b50b Mon Sep 17 00:00:00 2001 +From: wmayer +Date: Sat, 28 Dec 2013 12:22:31 +0100 +Subject: [PATCH] + Fix OCC 6.7 build failure + +--- + .../Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp | 32 ++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + +diff --git a/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp b/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp +index 578f5be..bdc91c3 100644 +--- a/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp ++++ b/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp +@@ -29,6 +29,7 @@ + # include + # include + # include ++# include + # include + #endif + +@@ -111,6 +112,36 @@ PyObject* BRepOffsetAPI_MakePipeShellPy::setSpineSupport(PyObject *args) + + PyObject* BRepOffsetAPI_MakePipeShellPy::setAuxiliarySpine(PyObject *args) + { ++#if OCC_VERSION_HEX >= 0x060700 ++ PyObject *spine, *curv, *keep; ++ if (!PyArg_ParseTuple(args, "O!O!O!",&Part::TopoShapePy::Type,&spine ++ ,&PyBool_Type,&curv ++ ,&PyInt_Type,&keep)) ++ return 0; ++ const TopoDS_Shape& s = static_cast(spine)->getTopoShapePtr()->_Shape; ++ if (s.IsNull() || s.ShapeType() != TopAbs_WIRE) { ++ PyErr_SetString(PyExc_TypeError, "spine is not a wire"); ++ return 0; ++ } ++ ++ BRepFill_TypeOfContact typeOfCantact; ++ switch (PyLong_AsLong(keep)) { ++ case 1: ++ typeOfCantact = BRepFill_Contact; ++ break; ++ case 2: ++ typeOfCantact = BRepFill_ContactOnBorder; ++ break; ++ default: ++ typeOfCantact = BRepFill_NoContact; ++ break; ++ } ++ this->getBRepOffsetAPI_MakePipeShellPtr()->SetMode( ++ TopoDS::Wire(s), ++ PyObject_IsTrue(curv) ? Standard_True : Standard_False, ++ typeOfCantact); ++ Py_Return; ++#else + PyObject *spine, *curv, *keep; + if (!PyArg_ParseTuple(args, "O!O!O!",&Part::TopoShapePy::Type,&spine + ,&PyBool_Type,&curv +@@ -135,6 +166,7 @@ + const TopoDS_Shape& s = static_cast(prof)->getTopoShapePtr()->_Shape; + this->getBRepOffsetAPI_MakePipeShellPtr()->Add(s, PyObject_IsTrue(curv), PyObject_IsTrue(keep)); + Py_Return; ++#endif + } + + PyObject* BRepOffsetAPI_MakePipeShellPy::remove(PyObject *args) +-- +1.8.5.1 + diff --git a/freecad-0.13-pycxx.patch b/freecad-0.13-pycxx.patch new file mode 100644 index 0000000..25e5197 --- /dev/null +++ b/freecad-0.13-pycxx.patch @@ -0,0 +1,189 @@ +diff -Naur freecad-0.13.a057590.orig/CMakeLists.txt freecad-0.13.a057590/CMakeLists.txt +--- freecad-0.13.a057590.orig/CMakeLists.txt 2013-01-12 08:10:36.000000000 -0600 ++++ freecad-0.13.a057590/CMakeLists.txt 2013-01-17 16:04:52.117940071 -0600 +@@ -73,6 +73,13 @@ + SET(CMAKE_INSTALL_INCLUDEDIR include CACHE PATH "Output directory for header files") + SET(CMAKE_INSTALL_DOCDIR doc CACHE PATH "Output directory for documentation and license files") + ++SET(PYCXX_INCLUDE_DIR ++ "${CMAKE_CURRENT_LIST_DIR}/src" CACHE PATH ++ "Path to the directory containing PyCXX's CXX/Config.hxx include file") ++SET(PYCXX_SOURCE_DIR ++ "${CMAKE_CURRENT_LIST_DIR}/src/CXX" CACHE PATH ++ "Path to the directory containing PyCXX's cxxextensions.c source file") ++ + # used as compiler defines + SET(RESOURCEDIR "${CMAKE_INSTALL_DATADIR}") + SET(DOCDIR "${CMAKE_INSTALL_DOCDIR}") +@@ -201,6 +208,10 @@ + + find_package(ZLIB REQUIRED) + ++# -------------------------------- PyCXX -------------------------------- ++ ++ find_package(PyCXX REQUIRED) ++ + # -------------------------------- OpenCasCade -------------------------------- + + #first, look for OpenCASCADE Community Edition (OCE) +diff -Naur freecad-0.13.a057590.orig/src/Base/CMakeLists.txt freecad-0.13.a057590/src/Base/CMakeLists.txt +--- freecad-0.13.a057590.orig/src/Base/CMakeLists.txt 2013-01-12 08:10:36.000000000 -0600 ++++ freecad-0.13.a057590/src/Base/CMakeLists.txt 2013-01-17 16:06:36.985515701 -0600 +@@ -124,20 +124,6 @@ + SOURCE_GROUP("zipios" FILES ${zipios_SRCS}) + endif () + +-SET(pycxx_SRCS +- ../CXX/Config.hxx +- ../CXX/cxxextensions.c +- ../CXX/cxx_extensions.cxx +- ../CXX/cxxsupport.cxx +- ../CXX/Exception.hxx +- ../CXX/Extensions.hxx +- ../CXX/IndirectPythonInterface.cxx +- ../CXX/IndirectPythonInterface.hxx +- ../CXX/Objects.hxx +- ../CXX/Version.hxx +- ../CXX/WrapPython.h +-) +-SOURCE_GROUP("pycxx" FILES ${pycxx_SRCS}) + + SET(FreeCADBase_XML_SRCS + AxisPy.xml +@@ -279,7 +265,6 @@ + ) + + SET(FreeCADBase_SRCS +- ${pycxx_SRCS} + ${FreeCADBase_CPP_SRCS} + ${FreeCADBase_HPP_SRCS} + ${FreeCADBase_XML_SRCS} +@@ -310,6 +295,9 @@ + list(APPEND FreeCADBase_SRCS ${zipios_SRCS}) + endif(FREECAD_USE_EXTERNAL_ZIPIOS) + ++include_directories(${PYCXX_INCLUDE_DIR}) ++list(APPEND FreeCADBase_SRCS ${PYCXX_SOURCES}) ++SOURCE_GROUP("pycxx" FILES ${PYCXX_SOURCES}) + + if(MSVC) + add_definitions(-D_PreComp_) +This patch adds an option to FreeCAD's cmake to specify an external +PyCXX. PyCXX doesn't really have a standard location, so this will try +to guess a couple of places, but best is to specify on the cmake command +line: + +cmake -DPYCXX_INCLUDE_DIR=/usr/include/python2.7 \ + -DPYCXX_SOURCE_DIR=/usr/share/python2.7/CXX + +diff -ruN FreeCAD-0.12.5284.orig/cMake/FindPyCXX.cmake FreeCAD-0.12.5284/cMake/FindPyCXX.cmake +--- FreeCAD-0.12.5284.orig/cMake/FindPyCXX.cmake 1969-12-31 18:00:00.000000000 -0600 ++++ FreeCAD-0.12.5284/cMake/FindPyCXX.cmake 2012-06-25 01:30:25.000000000 -0500 +@@ -0,0 +1,107 @@ ++# Locate PyCXX headers and source files ++ ++# This module defines ++# PYCXX_INCLUDE_DIR ++# PYCXX_SOURCE_DIR ++# PYCXX_FOUND ++# PYCXX_SOURCES ++# ++# The PYCXX_*_DIR variables can be set to tell this module where ++# the files are. ++ ++ ++# There's no standard location for PyCXX. ++# ++# The authors' example is to put it in "~\" [sic]. ++# ++# Ubuntu puts the includes into /usr/include/python2.7/CXX and sources into ++# /usr/share/python2.7/CXX. ++# ++# The Zultron Fedora RPM does the same as Ubuntu. ++ ++set(PYCXX_FOUND "YES") ++ ++# find the header directory ++if(PYCXX_INCLUDE_DIR) ++ # headers better be in there ++ if(NOT EXISTS "${PYCXX_INCLUDE_DIR}/CXX/Config.hxx") ++ if(PYCXX_FIND_REQUIRED) ++ MESSAGE(FATAL_ERROR ++ "PyCXX: could not find CXX/Config.hxx in PYCXX_INCLUDE_DIR " ++ "${PYCXX_INCLUDE_DIR}") ++ else(PYCXX_FIND_REQUIRED) ++ MESSAGE(WARNING ++ "PyCXX: could not find CXX/Config.hxx in PYCXX_INCLUDE_DIR " ++ "${PYCXX_INCLUDE_DIR}") ++ unset(PYCXX_FOUND) ++ endif(PYCXX_FIND_REQUIRED) ++ endif(NOT EXISTS "${PYCXX_INCLUDE_DIR}/CXX/Config.hxx") ++else(PYCXX_INCLUDE_DIR) ++ # check in 'standard' places ++ find_path(PYCXX_INCLUDE_DIR CXX/Config.hxx ++ ${PYTHON_INCLUDE_DIR} ++ "${CMAKE_CURRENT_LIST_DIR}/..") ++ if(NOT PYCXX_INCLUDE_DIR) ++ if(PYCXX_FIND_REQUIRED) ++ MESSAGE(FATAL_ERROR ++ "PyCXX not found; please set PYCXX_INCLUDE_DIR to " ++ "the location of CXX/Config.hxx") ++ else(PYCXX_FIND_REQUIRED) ++ MESSAGE(STATUS "PyCXX not found") ++ unset(PYCXX_FOUND) ++ endif(PYCXX_FIND_REQUIRED) ++ endif(NOT PYCXX_INCLUDE_DIR) ++endif(PYCXX_INCLUDE_DIR) ++ ++# find the sources directory ++if(PYCXX_SOURCE_DIR) ++ # source directory specified, they'd better be there ++ if(NOT EXISTS "${PYCXX_SOURCE_DIR}/cxxextensions.c") ++ if(PYCXX_FIND_REQUIRED) ++ MESSAGE(FATAL_ERROR ++ "PyCXX: cxxextensions.c not found in PYCXX_INCLUDE_DIR " ++ "${PYCXX_INCLUDE_DIR}") ++ else(PYCXX_FIND_REQUIRED) ++ MESSAGE(WARNING ++ "PyCXX: cxxextensions.c not found in PYCXX_INCLUDE_DIR " ++ "${PYCXX_INCLUDE_DIR}") ++ unset(PYCXX_FOUND) ++ endif(PYCXX_FIND_REQUIRED) ++ endif(NOT EXISTS "${PYCXX_SOURCE_DIR}/cxxextensions.c") ++else(PYCXX_SOURCE_DIR) ++ # check in 'standard' places ++ find_path(PYCXX_SOURCE_DIR cxxextensions.c ++ "${PYCXX_INCLUDE_DIR}/CXX" ++ "${PYCXX_INCLUDE_DIR}/Src" ++ "${PYTHON_INCLUDE_DIR}/CXX" ++ "${PYTHON_INCLUDE_DIR}/Src" ++ "${CMAKE_CURRENT_LIST_DIR}/../Src" ++ "${CMAKE_CURRENT_LIST_DIR}/../CXX") ++ if(NOT PYCXX_SOURCE_DIR) ++ if(PYCXX_FIND_REQUIRED) ++ MESSAGE(FATAL_ERROR ++ "PyCXX not found; please set PYCXX_SOURCE_DIR to " ++ "the location of cxxextensions.c") ++ else(PYCXX_FIND_REQUIRED) ++ MESSAGE(STATUS "PyCXX not found") ++ unset(PYCXX_FOUND) ++ endif(PYCXX_FIND_REQUIRED) ++ endif(NOT PYCXX_SOURCE_DIR) ++endif(PYCXX_SOURCE_DIR) ++ ++# see what we've got ++if(PYCXX_FOUND) ++ MESSAGE(STATUS "PyCXX found:") ++ MESSAGE(STATUS " Headers: ${PYCXX_INCLUDE_DIR}") ++ MESSAGE(STATUS " Sources: ${PYCXX_SOURCE_DIR}") ++ ++ # Build the list of sources for convenience ++ set(PYCXX_SOURCES ++ ${PYCXX_SOURCE_DIR}/cxxextensions.c ++ ${PYCXX_SOURCE_DIR}/cxx_extensions.cxx ++ ${PYCXX_SOURCE_DIR}/cxxsupport.cxx ++ ${PYCXX_SOURCE_DIR}/IndirectPythonInterface.cxx ++ ) ++else(PYCXX_FOUND) ++ MESSAGE(STATUS "PyCXX not found") ++endif(PYCXX_FOUND) diff --git a/freecad-0.13-qt4_cmake.patch b/freecad-0.13-qt4_cmake.patch new file mode 100644 index 0000000..0b0f139 --- /dev/null +++ b/freecad-0.13-qt4_cmake.patch @@ -0,0 +1,130 @@ +diff -Naur freecad-0.13.1830.orig/cMake/FreeCadMacros.cmake freecad-0.13.1830.qt4/cMake/FreeCadMacros.cmake +--- freecad-0.13.1830.orig/cMake/FreeCadMacros.cmake 2013-02-02 11:09:17.000000000 -0600 ++++ freecad-0.13.1830.qt4/cMake/FreeCadMacros.cmake 2014-01-13 18:32:47.637368958 -0600 +@@ -167,67 +167,48 @@ + # + #endmacro(qt4_wrap_ui) + +- +-# This is a special version of the built in macro qt4_add_resources that generates .cpp files +-# +-#macro(fc_add_resources outfiles ) +-# #QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN}) +-# set(ARGN ) +-# foreach (it ${rcc_files}) +-# get_filename_component(outfilename ${it} NAME_WE) +-# get_filename_component(infile ${it} ABSOLUTE) +-# get_filename_component(rc_path ${infile} PATH) +-# set(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cpp) +-# # parse file for dependencies +-# # all files are absolute paths or relative to the location of the qrc file +-# file(READ "${infile}" _RC_FILE_CONTENTS) +-# string(REGEX MATCHALL "]*>" "" _RC_FILE "${_RC_FILE}") +-# string(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}") +-# if(NOT _ABS_PATH_INDICATOR) +-# set(_RC_FILE "${rc_path}/${_RC_FILE}") +-# endif(NOT _ABS_PATH_INDICATOR) +-# set(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}") +-# endforeach(_RC_FILE) +-# add_custom_command(OUTPUT ${outfile} +-# COMMAND ${QT_RCC_EXECUTABLE} +-# ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile} +-# MAIN_DEPENDENCY ${infile} +-# DEPENDS ${_RC_DEPENDS}) +-# set(${outfiles} ${${outfiles}} ${outfile}) +-# endforeach (it) +-#endmacro(fc_add_resources) +- + MACRO (fc_add_resources outfiles ) +- QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN}) ++ QT4_EXTRACT_OPTIONS(rcc_files rcc_options rcc_target ${ARGN}) ++ ++ foreach (it ${rcc_files}) ++ get_filename_component(outfilename ${it} NAME_WE) ++ get_filename_component(infile ${it} ABSOLUTE) ++ get_filename_component(rc_path ${infile} PATH) ++ set(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cpp) ++ ++ set(_RC_DEPENDS) ++ if(EXISTS "${infile}") ++ # parse file for dependencies ++ # all files are absolute paths or relative to the location of the qrc file ++ file(READ "${infile}" _RC_FILE_CONTENTS) ++ string(REGEX MATCHALL "]*>" "" _RC_FILE "${_RC_FILE}") ++ if(NOT IS_ABSOLUTE "${_RC_FILE}") ++ set(_RC_FILE "${rc_path}/${_RC_FILE}") ++ endif() ++ set(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}") ++ endforeach() ++ unset(_RC_FILES) ++ unset(_RC_FILE_CONTENTS) ++ # Since this cmake macro is doing the dependency scanning for these files, ++ # let's make a configured file and add it as a dependency so cmake is run ++ # again when dependencies need to be recomputed. ++ QT4_MAKE_OUTPUT_FILE("${infile}" "" "qrc.depends" out_depends) ++ configure_file("${infile}" "${out_depends}" COPY_ONLY) ++ else() ++ # The .qrc file does not exist (yet). Let's add a dependency and hope ++ # that it will be generated later ++ set(out_depends) ++ endif() + +- FOREACH (it ${rcc_files}) +- GET_FILENAME_COMPONENT(outfilename ${it} NAME_WE) +- GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE) +- GET_FILENAME_COMPONENT(rc_path ${infile} PATH) +- SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cpp) +- # parse file for dependencies +- # all files are absolute paths or relative to the location of the qrc file +- FILE(READ "${infile}" _RC_FILE_CONTENTS) +- STRING(REGEX MATCHALL "]*>" "" _RC_FILE "${_RC_FILE}") +- STRING(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}") +- IF(NOT _ABS_PATH_INDICATOR) +- SET(_RC_FILE "${rc_path}/${_RC_FILE}") +- ENDIF(NOT _ABS_PATH_INDICATOR) +- SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}") +- ENDFOREACH(_RC_FILE) +- ADD_CUSTOM_COMMAND(OUTPUT ${outfile} ++ add_custom_command(OUTPUT ${outfile} + COMMAND ${QT_RCC_EXECUTABLE} + ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile} + MAIN_DEPENDENCY ${infile} +- DEPENDS ${_RC_DEPENDS}) +- SET(${outfiles} ${${outfiles}} ${outfile}) +- ENDFOREACH (it) ++ DEPENDS ${_RC_DEPENDS} "${out_depends}" VERBATIM) ++ set(${outfiles} ${${outfiles}} ${outfile}) ++ endforeach () + + ENDMACRO (fc_add_resources) + +diff -Naur freecad-0.13.1830.orig/CMakeLists.txt freecad-0.13.1830.qt4/CMakeLists.txt +--- freecad-0.13.1830.orig/CMakeLists.txt 2014-01-10 10:56:16.648269370 -0600 ++++ freecad-0.13.1830.qt4/CMakeLists.txt 2014-01-13 18:27:18.895600935 -0600 +@@ -325,15 +325,15 @@ + macro(fc_wrap_cpp outfiles ) + # get include dirs + QT4_GET_MOC_FLAGS(moc_flags) +- QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN}) ++ QT4_EXTRACT_OPTIONS(moc_files moc_options moc_target ${ARGN}) + # fixes bug 0000585: bug with boost 1.48 + SET(moc_options ${moc_options} -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED) + + foreach(it ${moc_files}) + get_filename_component(it ${it} ABSOLUTE) + QT4_MAKE_OUTPUT_FILE(${it} moc_ cpp outfile) +- QT4_CREATE_MOC_COMMAND(${it} ${outfile} "${moc_flags}" "${moc_options}") +- set(${outfiles} ${${outfiles}} ${outfile}) ++ QT4_CREATE_MOC_COMMAND(${it} ${outfile} "${moc_flags}" "${moc_options}" "${moc_target}") ++ list(APPEND outfiles ${outfile}) + add_file_dependencies(${it} ${outfile}) + endforeach(it) + endmacro(fc_wrap_cpp) diff --git a/freecad-3rdParty.patch b/freecad-3rdParty.patch new file mode 100644 index 0000000..ce12641 --- /dev/null +++ b/freecad-3rdParty.patch @@ -0,0 +1,10 @@ +diff -Naur freecad-0.12-svn5325.orig/src/CMakeLists.txt freecad-0.12-svn5325/src/CMakeLists.txt +--- freecad-0.12-svn5325.orig/src/CMakeLists.txt 2011-03-03 09:57:25.000000000 -0600 ++++ freecad-0.12-svn5325/src/CMakeLists.txt 2011-12-21 10:58:18.396896819 -0600 +@@ -1,6 +1,5 @@ + + add_subdirectory(Build) +-add_subdirectory(3rdParty) + add_subdirectory(Base) + add_subdirectory(App) + add_subdirectory(Main) diff --git a/freecad.1 b/freecad.1 new file mode 100644 index 0000000..191f221 --- /dev/null +++ b/freecad.1 @@ -0,0 +1,73 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH FREECAD 1 "July 25, 2007" freecad "Linux User's Manual" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +freecad \- An extensible Open Source CAx program for Unix/X11 +.SH SYNOPSIS +.B freecad +.RI [ options ] " files" +.br +.B freecadcmd +.RI [ options ] " files" +.SH DESCRIPTION +.B FreeCAD +is an Open Source CAx RAD based on OpenCasCade, Qt and Python. It features +some key concepts like macro recording, workbenches, ability to run as a +server and dynamically loadable application extensions and it is designed +to be platform independent. +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invode bold face and italics, +.\" respectively. +.SH USAGE +\fBfreecad\fR starts with a GUI while \fBfreecadcmd\fR is only a pure command line version that starts a Python interpreter. +.SH OPTIONS +These programs follow the usual GNU command line syntax, with long +options starting with two dashes (`-'). +A summary of the options supported by \fBfreecad\fR is included below. +.SS "Generic options" +.TP +\fB\-h, \-\-help\fR +Show summary of options. +.TP +\fB\-v, \-\-version\fR +Show version of program. +.TP +\fB\-c, \-\-console\fR +Start in console mode. +.TP +\fB\-\-response\-file\fR \fIarg\fR +Can be specified with '@name', too. + +.SS "Configuration" +.TP +\fB\-l, \-\-write\-log\fR +Write a log file. +.TP +\fB\-t, \-\-run\-test\fR \fIarg\fR +Test level. +.TP +\fB\-M, \-\-module\-path\fR \fIarg\fR +Additional module path. +.TP +\fB\-P, \-\-python\-path\fR \fIarg\fR +Additional Python path. +.SH SEE ALSO +To get more information about \fBFreeCAD\fR, please visit \fIhttp://juergen\-riegel.net/FreeCAD/Docu/index.php/Main_Page\fR +.SH BUGS +To report a bug, please visit \fIhttp://free-cad.sf.net/\fR +.SH AUTHOR +This manual page was written by Werner Mayer. diff --git a/freecad.desktop b/freecad.desktop new file mode 100644 index 0000000..d45e539 --- /dev/null +++ b/freecad.desktop @@ -0,0 +1,17 @@ +[Desktop Entry] +Version=1.0 +Name=FreeCAD +Name[de]=FreeCAD +Comment=Feature based Parametric Modeler +Comment[de]=Feature-basierter parametrischer Modellierer +GenericName=CAD Application +GenericName[de]=CAD-Anwendung +Exec=/usr/bin/FreeCAD %F +Path=/usr/@lib@/freecad +Terminal=false +Type=Application +Icon=freecad +Categories=Graphics;Science;Education;Engineering; +StartupNotify=true +GenericName[de_DE]=Feature-basierter parametrischer Modellierer +MimeType=application/x-extension-fcstd; diff --git a/freecad.spec b/freecad.spec new file mode 100644 index 0000000..6249035 --- /dev/null +++ b/freecad.spec @@ -0,0 +1,357 @@ +# Maintainers: keep this list of plugins up to date +# List plugins in %%{_libdir}/freecad/lib, less '.so' and 'Gui.so', here +%global plugins Assembly Complete Drawing Fem FreeCAD Image Import Inspection Mesh MeshPart Part Points QtUnit Raytracing ReverseEngineering Robot Sketcher Start Web + +# Some plugins go in the Mod folder instead of lib. Deal with those here: +%global mod_plugins Mod/PartDesign + +# This revision is 0.13 final. +%global rev 1830 + +# Use updated cmake package on EL builds. +# Temporary workaround for cmake/boost bug: +# http://public.kitware.com/Bug/view.php?id=13446 +%if 0%{?rhel} && 0%{?rhel} <= 6 +%global cmake %cmake28 -DBoost_NO_BOOST_CMAKE=ON +%endif + +# Some configuration options for other environments +# rpmbuild --with=occ: Compile using OpenCASCADE instead of OCE +%global occ %{?_with_occ: 1} %{?!_with_occ: 0} +# rpmbuild --with=bundled_zipios: use bundled version of zipios++ +%global bundled_zipios %{?_with_bundled_zipios: 1} %{?!_with_bundled_zipios: 0} +# rpmbuild --with=bundled_pycxx: use bundled version of pycxx +%global bundled_pycxx %{?_with_bundled_pycxx: 1} %{?!_with_bundled_pycxx: 0} +# rpmbuild --with=bundled_smesh: use bundled version of Salome's Mesh +%global bundled_smesh %{?_with_bundled_smesh: 1} %{?!_with_bundled_smesh: 0} + + +Name: freecad +Version: 0.13 +Release: 6%{?dist} +Summary: A general purpose 3D CAD modeler +Group: Applications/Engineering + +License: GPLv2+ +URL: http://sourceforge.net/apps/mediawiki/free-cad/ +Source0: http://downloads.sourceforge.net/free-cad/%{name}-%{version}.%{rev}.tar.gz +Source101: freecad.desktop +Source102: freecad.1 + +Patch0: freecad-3rdParty.patch +Patch1: freecad-0.13-pycxx.patch +# Patch to build against OCE 0.13 +Patch2: freecad-0.13-OCE_0.13.patch +# Patch to build with non-backward compatible change in QT4. +Patch3: freecad-0.13-qt4_cmake.patch +# Patch to build against OCE 0.15. +Patch4: freecad-0.13-OCE_0.15.patch + + +# Utilities +%if 0%{?rhel} && 0%{?rhel} <= 6 +BuildRequires: cmake28 +%else +BuildRequires: cmake +%endif +BuildRequires: doxygen swig graphviz +BuildRequires: gcc-gfortran +BuildRequires: gettext +BuildRequires: dos2unix +BuildRequires: desktop-file-utils +BuildRequires: tbb-devel +# Development Libraries +BuildRequires: freeimage-devel +BuildRequires: libXmu-devel +BuildRequires: mesa-libGLU-devel +%if %{occ} +BuildRequires: OpenCASCADE-devel +%else +BuildRequires: OCE-devel +%endif +# Not yet in Fedora +# https://bugzilla.redhat.com/show_bug.cgi?id=665733 +#BuildRequires: Coin3-devel +BuildRequires: Coin2-devel +BuildRequires: python2-devel +BuildRequires: boost-devel +BuildRequires: eigen3-devel +BuildRequires: qt-devel qt-webkit-devel +BuildRequires: SoQt-devel +# Not used yet. +#BuildRequires: ode-devel +BuildRequires: xerces-c xerces-c-devel +BuildRequires: libspnav-devel +#BuildRequires: opencv-devel +%if ! %{bundled_smesh} +BuildRequires: smesh-devel +%endif +%if ! %{bundled_zipios} +BuildRequires: zipios++-devel +%endif +%if ! %{bundled_pycxx} +BuildRequires: python-pycxx-devel +%endif +BuildRequires: libicu-devel +BuildRequires: python-matplotlib + +# Packages separated because they are noarch, but not optional so require them +# here. +Requires: %{name}-data = %{version}-%{release} +# Obsolete old doc package since it's required for functionality. +Obsoletes: %{name}-%{doc} < 0.13-5 + +# Needed for plugin support and is not a soname dependency. +Requires: python-pivy +Requires: PyQt4 +Requires: hicolor-icon-theme +Requires: python-matplotlib +Requires: python-collada + +# plugins and private shared libs in %%{_libdir}/freecad/lib are private; +# prevent private capabilities being advertised in Provides/Requires +%define plugin_regexp /^\\\(libFreeCAD.*%(for i in %{plugins}; do echo -n "\\\|$i\\\|$iGui"; done)\\\)\\\(\\\|Gui\\\)\\.so/d +%{?filter_setup: +%filter_provides_in %{_libdir}/%{name}/lib +%filter_from_requires %{plugin_regexp} +%filter_from_provides %{plugin_regexp} +%filter_provides_in %{_libdir}/%{name}/Mod +%filter_requires_in %{_libdir}/%{name}/Mod +%filter_setup +} + + +%description +FreeCAD is a general purpose Open Source 3D CAD/MCAD/CAx/CAE/PLM modeler, aimed +directly at mechanical engineering and product design but also fits a wider +range of uses in engineering, such as architecture or other engineering +specialties. It is a feature-based parametric modeler with a modular software +architecture which makes it easy to provide additional functionality without +modifying the core system. + + +%package data +Summary: Data files for FreeCAD +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description data +Data files for FreeCAD + + +%prep +%setup -q -n freecad-%{version}.%{rev} +%patch0 -p1 -b .3rdparty +# Remove bundled pycxx if we're not using it +%if ! %{bundled_pycxx} +%patch1 -p1 -b .pycxx +rm -rf src/CXX +%endif +%patch2 -p1 -b .port_oce +%patch3 -p1 -b .qt4_moc +%patch4 -p1 -b .oce_015 + +%if ! %{bundled_zipios} +rm -rf src/zipios++ +%endif + +# Fix encodings +dos2unix -k src/Mod/Test/unittestgui.py \ + ChangeLog.txt \ + copying.lib \ + data/License.txt + +# Removed bundled libraries +rm -rf src/3rdParty + + +%build +rm -rf build && mkdir build && pushd build + +# Deal with cmake projects that tend to link excessively. +LDFLAGS='-Wl,--as-needed'; export LDFLAGS + +%cmake -DCMAKE_INSTALL_PREFIX=%{_libdir}/%{name} \ + -DCMAKE_INSTALL_DATADIR=%{_datadir}/%{name} \ + -DCMAKE_INSTALL_DOCDIR=%{_docdir}/%{name} \ + -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \ + -DRESOURCEDIR=%{_libdir}/freecad \ + -DCOIN3D_INCLUDE_DIR=%{_includedir}/Coin2 \ + -DCOIN3D_DOC_PATH=%{_datadir}/Coin2/Coin \ + -DFREECAD_USE_EXTERNAL_PIVY=TRUE \ +%if %{occ} + -DUSE_OCC=TRUE \ +%endif +%if ! %{bundled_smesh} + -DSMESH_INCLUDE_DIR=%{_includedir} \ +%endif +%if ! %{bundled_zipios} + -DFREECAD_USE_EXTERNAL_ZIPIOS=TRUE \ +%endif +%if ! %{bundled_pycxx} + -DPYCXX_INCLUDE_DIR=$(pkg-config --variable=includedir PyCXX) \ + -DPYCXX_SOURCE_DIR=$(pkg-config --variable=srcdir PyCXX) \ +%endif + ../ + +make %{?_smp_mflags} + +make doc + + +%install +pushd build +%make_install +popd + +# Symlink binaries to /usr/bin +mkdir -p %{buildroot}%{_bindir} +pushd %{buildroot}%{_bindir} +ln -s ../%{_lib}/freecad/bin/FreeCAD . +ln -s ../%{_lib}/freecad/bin/FreeCADCmd . +popd + +# Fix problems with unittestgui.py +#chmod +x %{buildroot}%{_libdir}/%{name}/Mod/Test/unittestgui.py + +# Install desktop file +desktop-file-install \ + --dir=%{buildroot}%{_datadir}/applications \ + %{SOURCE101} +sed -i 's,@lib@,%{_lib},g' %{buildroot}%{_datadir}/applications/%{name}.desktop + +# Install desktop icon +install -pD -m 0644 src/Gui/Icons/%{name}.svg \ + %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg + +# Install man page +install -pD -m 0644 %{SOURCE102} \ + %{buildroot}%{_mandir}/man1/%{name}.1 + +# Symlink manpage to other binary names +pushd %{buildroot}%{_mandir}/man1 +ln -sf %{name}.1.gz FreeCAD.1.gz +ln -sf %{name}.1.gz FreeCADCmd.1.gz +popd + +# Install QT Assistant documentation +#mkdir -p %{buildroot}%{_docdir}/%{name} +#install -pm 0644 build/doc/freecad.* %{buildroot}%{_docdir}/%{name}/ + +# Bug maintainers to keep %%{plugins} macro up to date. +# +# Make sure there are no plugins that need to be added to plugins macro +new_plugins=`ls %{buildroot}%{_libdir}/freecad/lib | sed -e '%{plugin_regexp}'` +if [ -n "$new_plugins" ]; then + echo -e "\n\n\n**** ERROR:\n" \ + "\nPlugins not caught by regexp: " $new_plugins \ + "\n\nPlugins in %{_libdir}/freecad/lib do not exist in" \ + "\nspecfile %%{plugins} macro. Please add these to" \ + "\n%%{plugins} macro at top of specfile and rebuild.\n****\n" 1>&2 + exit 1 +fi +# Make sure there are no entries in the plugins macro that don't match plugins +for p in %{plugins}; do + if [ -z "`ls %{buildroot}%{_libdir}/freecad/lib/$p*.so`" ]; then + set +x + echo -e "\n\n\n**** ERROR:\n" \ + "\nExtra entry in %%{plugins} macro with no matching plugin:" \ + "'$p'.\n\nPlease remove from %%{plugins} macro at top of" \ + "\nspecfile and rebuild.\n****\n" 1>&2 + exit 1 + fi +done + + +%post +/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : +/usr/bin/update-desktop-database &> /dev/null || : + +%postun +if [ $1 -eq 0 ] ; then + /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null + /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi +/usr/bin/update-desktop-database &> /dev/null || : + +%posttrans +/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + + +%files +%doc ChangeLog.txt copying.lib data/License.txt +%exclude %{_docdir}/freecad/freecad.* +%{_bindir}/* +%{_datadir}/applications/%{name}.desktop +%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg +%dir %{_libdir}/%{name} +%{_libdir}/%{name}/bin/ +%{_libdir}/%{name}/lib/ +%{_libdir}/%{name}/Mod/ +%{_mandir}/man1/*.1.gz + +%files data +%{_datadir}/%{name}/ +%{_docdir}/%{name}/freecad.q* + + +%changelog +* Fri May 23 2014 Richard Shaw - 0.13-6 +- Fix duplicate documentation. +- Correct license tag to GPLv2+. + +* Mon May 19 2014 Richard Shaw - 0.13-5 +- Move noarch data into it's own subpackage. +- Fix cmake conditionals to work for epel7. + +* Thu Oct 10 2013 Richard Shaw - 0.13-4 +- Rebuild for OCE 0.13. + +* Mon Jul 15 2013 Richard Shaw - 0.13-3 +- Rebuild for updated OCE. + +* Mon Apr 29 2013 Nicolas Chauvet - 0.13-2 +- https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Mon Feb 18 2013 Richard Shaw - 0.13-1 +- Update to latest upstream release. + +* Sat Oct 20 2012 John Morris - 0.12-9 +- Use cmake28 package on el6 +- Remove COIN3D_DOC_PATH cmake def (one less warning during build) +- Add PyQt as requirement. +- Add libicu-devel as build requirement. + +* Wed Sep 26 2012 Richard Shaw - 0.12-8 +- Rebuild for boost 1.50. + +* Thu Jul 05 2012 Richard Shaw - 0.12-7 +- Remove BuildRequires: tbb-devel and gts-devel +- Add missing license files to %%doc. +- Add missing requirement for hicolor-icon-theme. +- Fix excessive linking issue. +- Other minor spec updates. + +* Mon Jun 25 2012 - 0.12-6 +- Filter out automatically generated Provides/Requires of private libraries +- freecad.desktop not passing 'desktop-file-validate'; fixed +- Remove BuildRequires: tbb-devel and gts-devel +- Update license tag to GPLv3+ only. +- Add missing license files to %%doc. +- Add missing build requirement for hicolor-icon-theme. +- Fix excessive linking issue. +- Other minor spec updates. + +* Mon Jun 25 2012 - 0.12-5 +- New patch to unbundle PyCXX +- Add conditional build options for OpenCASCADE, bundled Zipios++, + bundled PyCXX, bundled smesh + +* Tue Jun 19 2012 Richard Shaw - 0.12-4 +- Add linker flag to stop excessive linking. + +* Thu May 31 2012 Richard Shaw - 0.12-3 +- Add patch for GCC 4.7 on Fedora 17. + +* Thu Nov 10 2011 Richard Shaw - 0.12-2 +- Initial release. diff --git a/sources b/sources index e69de29..b5f546f 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +13b8fddef12f5f8419dcf4adbab596eb freecad-0.13.1830.tar.gz