summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-gfx/freecad/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-gfx/freecad/files')
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-boost148.patch25
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-cmake-2.8.12.patch294
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-gcc46.patch11
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-glu.patch12
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-no-3rdParty.patch9
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-no-permissive.patch40
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-nodir.patch21
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-nopivy.patch17
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-occ-6.5.5.patch224
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-occ-6.6.patch69
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-qt3support.patch36
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-removeoldswig.patch111
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-salomesmesh-occ-6.5.5.patch228
-rw-r--r--media-gfx/freecad/files/freecad-0.13.1830-CMakefile.patch21
-rw-r--r--media-gfx/freecad/files/freecad-0.13.1830-avoid-include-salome.patch11
-rw-r--r--media-gfx/freecad/files/freecad-0.13.1830-cmake-2.8.12.patch294
-rw-r--r--media-gfx/freecad/files/freecad-0.13.1830-no-machdist.patch11
-rw-r--r--media-gfx/freecad/files/freecad-0.13.1830-occ-6.7.patch63
-rw-r--r--media-gfx/freecad/files/freecad-0.13.1830-remove-qt3-support.patch33
-rw-r--r--media-gfx/freecad/files/freecad-0.13.1830-startpage-links.patch97
-rw-r--r--media-gfx/freecad/files/freecad-0.14.3702-install-paths.patch21
21 files changed, 1648 insertions, 0 deletions
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-boost148.patch b/media-gfx/freecad/files/freecad-0.12.5284-boost148.patch
new file mode 100644
index 000000000000..4c9c735598d8
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-boost148.patch
@@ -0,0 +1,25 @@
+From d6061d30a053617b8127c96e8c6a65e47589a182 Mon Sep 17 00:00:00 2001
+From: Werner Mayer <werner@werner-VirtualBox.(none)>
+Date: Sat, 31 Mar 2012 19:22:11 +0200
+Subject: [PATCH] #0000585: bug with boost 1.48
+
+---
+ CMakeLists.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 920aca7..9e3bbf5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -284,6 +284,8 @@ MARK_AS_ADVANCED(FORCE FREECAD_LIBPACK_CHECKFILE6X FREECAD_LIBPACK_CHECKFILE7X)
+ # get include dirs
+ QT4_GET_MOC_FLAGS(moc_flags)
+ QT4_EXTRACT_OPTIONS(moc_files moc_options ${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)
+--
+1.7.9.2
+
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-cmake-2.8.12.patch b/media-gfx/freecad/files/freecad-0.12.5284-cmake-2.8.12.patch
new file mode 100644
index 000000000000..b38a440a04d9
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-cmake-2.8.12.patch
@@ -0,0 +1,294 @@
+commit f061b6f7ea667e1d6944590d67b9b5b6659e4ba0
+Author: wmayer <wmayer@users.sourceforge.net>
+Date: Tue Oct 22 10:33:18 2013 +0200
+
+ 0001278: No build possible with current CMake version 2.8.12
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 862cd7b..11c9b43 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -270,14 +270,14 @@ MARK_AS_ADVANCED(FORCE FREECAD_LIBPACK_CHECKFILE6X FREECAD_LIBPACK_CHECKFILE7X)
+ macro(fc_wrap_cpp outfiles )
+ # get include dirs
+ QT4_GET_MOC_FLAGS(moc_includes)
+- 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_includes}" "${moc_options}")
++ QT4_CREATE_MOC_COMMAND(${it} ${outfile} "${moc_includes}" "${moc_options}" "${moc_target}")
+ set(${outfiles} ${${outfiles}} ${outfile})
+ add_file_dependencies(${it} ${outfile})
+ endforeach(it)
+diff --git a/cMake/FreeCadMacros.cmake b/cMake/FreeCadMacros.cmake
+index 5fa7680..78bc0b8 100644
+--- a/cMake/FreeCadMacros.cmake
++++ b/cMake/FreeCadMacros.cmake
+@@ -168,69 +168,6 @@ endmacro(generate_from_py)
+ #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 "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
+-# set(_RC_DEPENDS)
+-# foreach(_RC_FILE ${_RC_FILES})
+-# string(REGEX REPLACE "^<file[^>]*>" "" _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})
+-
+- 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 "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
+- SET(_RC_DEPENDS)
+- FOREACH(_RC_FILE ${_RC_FILES})
+- STRING(REGEX REPLACE "^<file[^>]*>" "" _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(ADD_MSVC_PRECOMPILED_HEADER PrecompiledHeader PrecompiledSource SourcesVar)
+ IF(MSVC)
+ GET_FILENAME_COMPONENT(PrecompiledBasename ${PrecompiledHeader} NAME_WE)
+diff --git a/src/Gui/CMakeLists.txt b/src/Gui/CMakeLists.txt
+index b9f1939..124c4f8 100644
+--- a/src/Gui/CMakeLists.txt
++++ b/src/Gui/CMakeLists.txt
+@@ -608,7 +608,7 @@ SOURCE_GROUP("Widget\\iisTaskPanel\\Mocs" FILES ${iis_MOC_SRCS})
+ #SET(Resource_RCS
+ # Icons/resource.qrc
+ # Language/translation.qrc)
+-#fc_add_resources(Resource_SRCS ${Resource_RCS})
++#qt4_add_resources(Resource_SRCS ${Resource_RCS})
+ #SET(Resource_SRCS
+ # ${Resource_SRCS}
+ # Icons/resource.qrc
+diff --git a/src/Mod/Image/Gui/AppImageGui.cpp b/src/Mod/Image/Gui/AppImageGui.cpp
+index c26129e..c817860 100644
+--- a/src/Mod/Image/Gui/AppImageGui.cpp
++++ b/src/Mod/Image/Gui/AppImageGui.cpp
+@@ -20,7 +20,6 @@
+ #include <Gui/Language/Translator.h>
+ #include "Workbench.h"
+ #include "ViewProviderImagePlane.h"
+-#include "qrc_Image.cpp"
+
+ // use a different name to CreateCommand()
+ void CreateImageCommands(void);
+diff --git a/src/Mod/Image/Gui/CMakeLists.txt b/src/Mod/Image/Gui/CMakeLists.txt
+index cc967ee..4edb462 100644
+--- a/src/Mod/Image/Gui/CMakeLists.txt
++++ b/src/Mod/Image/Gui/CMakeLists.txt
+@@ -30,8 +30,7 @@ SET(ImageGui_RES_SRCS
+ Resources/Image.qrc
+ )
+
+-fc_add_resources(ImageGui_QRC_SRCS ${ImageGui_RES_SRCS})
+-#QT4_ADD_RESOURCES(ImageGui_QRC_SRCS ${ImageGui_RES_SRCS})
++qt4_add_resources(ImageGui_QRC_SRCS ${ImageGui_RES_SRCS})
+
+ set(ImageGui_UIC_SRCS
+ ImageOrientationDialog.ui
+@@ -40,7 +39,7 @@ qt4_wrap_ui(ImageGui_UIC_HDRS ${ImageGui_UIC_SRCS})
+
+ SET(ImageGui_SRCS
+ # ${ImageGui_MOC_SRCS}
+-# ${ImageGui_QRC_SRCS}
++ ${ImageGui_QRC_SRCS}
+ AppImageGui.cpp
+ AppImageGuiPy.cpp
+ Command.cpp
+diff --git a/src/Mod/Mesh/Gui/AppMeshGui.cpp b/src/Mod/Mesh/Gui/AppMeshGui.cpp
+index 624d569..8fb68cf 100644
+--- a/src/Mod/Mesh/Gui/AppMeshGui.cpp
++++ b/src/Mod/Mesh/Gui/AppMeshGui.cpp
+@@ -50,7 +50,6 @@
+ #include "ViewProviderDefects.h"
+ #include "ViewProviderPython.h"
+ #include "Workbench.h"
+-#include "qrc_Mesh.cpp"
+
+
+ // use a different name to CreateCommand()
+diff --git a/src/Mod/Mesh/Gui/CMakeLists.txt b/src/Mod/Mesh/Gui/CMakeLists.txt
+index cafca6c..9ef1dae 100644
+--- a/src/Mod/Mesh/Gui/CMakeLists.txt
++++ b/src/Mod/Mesh/Gui/CMakeLists.txt
+@@ -75,9 +75,9 @@ SET(Inventor_SRCS
+ )
+ SOURCE_GROUP("Inventor" FILES ${Inventor_SRCS})
+
+-fc_add_resources(resource_SRCS Resources/Mesh.qrc)
++qt4_add_resources(resource_SRCS Resources/Mesh.qrc)
+ SET(resource_SRCS
+-# ${resource_SRCS}
++ ${resource_SRCS}
+ Resources/Mesh.qrc
+ )
+ SOURCE_GROUP("resource" FILES ${resource_SRCS})
+diff --git a/src/Mod/Part/Gui/AppPartGui.cpp b/src/Mod/Part/Gui/AppPartGui.cpp
+index 9c3ebb3..ae84470 100644
+--- a/src/Mod/Part/Gui/AppPartGui.cpp
++++ b/src/Mod/Part/Gui/AppPartGui.cpp
+@@ -57,7 +57,6 @@
+ #include "Workbench.h"
+
+ #include <Gui/Language/Translator.h>
+-#include "qrc_Part.cpp"
+
+ #include "Resources/icons/PartFeature.xpm"
+ #include "Resources/icons/PartFeatureImport.xpm"
+diff --git a/src/Mod/Part/Gui/CMakeLists.txt b/src/Mod/Part/Gui/CMakeLists.txt
+index 375f6e4..87c4c28 100644
+--- a/src/Mod/Part/Gui/CMakeLists.txt
++++ b/src/Mod/Part/Gui/CMakeLists.txt
+@@ -50,7 +50,7 @@ set(PartGui_MOC_HDRS
+ fc_wrap_cpp(PartGui_MOC_SRCS ${PartGui_MOC_HDRS})
+ SOURCE_GROUP("Moc" FILES ${PartGui_MOC_SRCS})
+
+-fc_add_resources(PartGui_QRC_SRCS Resources/Part.qrc)
++qt4_add_resources(PartGui_QRC_SRCS Resources/Part.qrc)
+
+ set(PartGui_UIC_SRCS
+ CrossSections.ui
+@@ -77,7 +77,7 @@ set(PartGui_UIC_SRCS
+ qt4_wrap_ui(PartGui_UIC_HDRS ${PartGui_UIC_SRCS})
+
+ SET(PartGui_SRCS
+-# ${PartGui_QRC_SRCS}
++ ${PartGui_QRC_SRCS}
+ ${PartGui_UIC_HDRS}
+ AppPartGui.cpp
+ Command.cpp
+diff --git a/src/Mod/Points/Gui/AppPointsGui.cpp b/src/Mod/Points/Gui/AppPointsGui.cpp
+index 9acd98e..953d3e2 100644
+--- a/src/Mod/Points/Gui/AppPointsGui.cpp
++++ b/src/Mod/Points/Gui/AppPointsGui.cpp
+@@ -33,7 +33,6 @@
+
+ #include "ViewProvider.h"
+ #include "Workbench.h"
+-#include "qrc_Points.cpp"
+
+ // use a different name to CreateCommand()
+ void CreatePointsCommands(void);
+diff --git a/src/Mod/Points/Gui/CMakeLists.txt b/src/Mod/Points/Gui/CMakeLists.txt
+index fab12ff..7e30f0d 100644
+--- a/src/Mod/Points/Gui/CMakeLists.txt
++++ b/src/Mod/Points/Gui/CMakeLists.txt
+@@ -32,9 +32,9 @@ SET(Dialogs_SRCS
+ )
+ SOURCE_GROUP("Dialogs" FILES ${Dialogs_SRCS})
+
+-fc_add_resources(Resource_SRCS Resources/Points.qrc)
++qt4_add_resources(Resource_SRCS Resources/Points.qrc)
+ SET(Resource_SRCS
+-# ${Resource_SRCS}
++ ${Resource_SRCS}
+ Resources/Points.qrc
+ )
+ SOURCE_GROUP("Resource" FILES ${Resource_SRCS})
+diff --git a/src/Mod/Raytracing/Gui/AppRaytracingGui.cpp b/src/Mod/Raytracing/Gui/AppRaytracingGui.cpp
+index 156bd90..c59369a 100644
+--- a/src/Mod/Raytracing/Gui/AppRaytracingGui.cpp
++++ b/src/Mod/Raytracing/Gui/AppRaytracingGui.cpp
+@@ -32,7 +32,6 @@
+ #include "DlgSettingsRayImp.h"
+ #include "ViewProvider.h"
+ #include "Workbench.h"
+-#include "qrc_Raytracing.cpp"
+
+
+ using namespace RaytracingGui;
+diff --git a/src/Mod/Raytracing/Gui/CMakeLists.txt b/src/Mod/Raytracing/Gui/CMakeLists.txt
+index 38aa739..1da30c9 100644
+--- a/src/Mod/Raytracing/Gui/CMakeLists.txt
++++ b/src/Mod/Raytracing/Gui/CMakeLists.txt
+@@ -43,8 +43,9 @@ set(RaytracingGui_MOC_HDRS
+ fc_wrap_cpp(RaytracingGui_MOC_SRCS ${RaytracingGui_MOC_HDRS})
+ SOURCE_GROUP("Moc" FILES ${RaytracingGui_MOC_SRCS})
+
+-fc_add_resources(Resource_SRCS Resources/Raytracing.qrc)
++qt4_add_resources(Resource_SRCS Resources/Raytracing.qrc)
+ SET(Resource_SRCS
++ ${Resource_SRCS}
+ Resources/Raytracing.qrc
+ )
+ SOURCE_GROUP("Resource" FILES ${Resource_SRCS})
+diff --git a/src/Mod/Test/Gui/AppTestGui.cpp b/src/Mod/Test/Gui/AppTestGui.cpp
+index a027d9d..7c2ef21 100644
+--- a/src/Mod/Test/Gui/AppTestGui.cpp
++++ b/src/Mod/Test/Gui/AppTestGui.cpp
+@@ -28,7 +28,6 @@
+
+ #include "UnitTestPy.h"
+ #include "UnitTestImp.h"
+-#include "qrc_Test.cpp"
+
+ #include <Gui/Language/Translator.h>
+ #include <Base/Console.h>
+diff --git a/src/Mod/Test/Gui/CMakeLists.txt b/src/Mod/Test/Gui/CMakeLists.txt
+index 9b8b672..eaa0dcd 100644
+--- a/src/Mod/Test/Gui/CMakeLists.txt
++++ b/src/Mod/Test/Gui/CMakeLists.txt
+@@ -30,9 +30,9 @@ SET(Dialogs_SRCS
+ )
+ SOURCE_GROUP("Dialogs" FILES ${Dialogs_SRCS})
+
+-fc_add_resources(Resource_SRCS Resources/Test.qrc)
++qt4_add_resources(Resource_SRCS Resources/Test.qrc)
+ SET(Resource_SRCS
+-# ${Resource_SRCS}
++ ${Resource_SRCS}
+ Resources/Test.qrc
+ )
+ SOURCE_GROUP("Resource" FILES ${Resource_SRCS})
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-gcc46.patch b/media-gfx/freecad/files/freecad-0.12.5284-gcc46.patch
new file mode 100644
index 000000000000..df2fb191a353
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-gcc46.patch
@@ -0,0 +1,11 @@
+diff -ruN FreeCAD-0.11.4422.orig/src/zipios++/directory.h FreeCAD-0.11.4422/src/zipios++/directory.h
+--- FreeCAD-0.11.4422.orig/src/zipios++/directory.h 2011-02-11 01:48:21.000000000 +0100
++++ FreeCAD-0.11.4422/src/zipios++/directory.h 2011-11-13 22:11:27.000000000 +0100
+@@ -31,6 +31,7 @@
+ #include <string>
+ #include <ctime>
+ #include <stdexcept>
++#include <cstddef>
+
+ // #include <boost.h> Contents of boost.h
+
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-glu.patch b/media-gfx/freecad/files/freecad-0.12.5284-glu.patch
new file mode 100644
index 000000000000..95672153022f
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-glu.patch
@@ -0,0 +1,12 @@
+diff -ruN FreeCAD-0.12.5284.orig/src/Mod/Image/Gui/GLImageBox.cpp FreeCAD-0.12.5284/src/Mod/Image/Gui/GLImageBox.cpp
+--- FreeCAD-0.12.5284.orig/src/Mod/Image/Gui/GLImageBox.cpp 2012-01-03 13:24:30.000000000 +0100
++++ FreeCAD-0.12.5284/src/Mod/Image/Gui/GLImageBox.cpp 2012-01-06 10:26:38.000000000 +0100
+@@ -27,6 +27,8 @@
+ # include <GL/glext.h>
+ #endif
+
++#include <GL/glu.h>
++
+ #include "GLImageBox.h"
+
+ using namespace ImageGui;
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-no-3rdParty.patch b/media-gfx/freecad/files/freecad-0.12.5284-no-3rdParty.patch
new file mode 100644
index 000000000000..d5797567b2c5
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-no-3rdParty.patch
@@ -0,0 +1,9 @@
+--- FreeCAD-0.12.5284/src/CMakeLists.txt
++++ FreeCAD-0.12.5284/src/CMakeLists.txt
+@@ -1,6 +1,5 @@
+
+ add_subdirectory(Build)
+-add_subdirectory(3rdParty)
+ add_subdirectory(Base)
+ add_subdirectory(App)
+ add_subdirectory(Main)
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-no-permissive.patch b/media-gfx/freecad/files/freecad-0.12.5284-no-permissive.patch
new file mode 100644
index 000000000000..d19a92f4d7bc
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-no-permissive.patch
@@ -0,0 +1,40 @@
+--- FreeCAD-0.12.5284/src/Mod/Mesh/App/WildMagic4/Wm4Query2Filtered.inl
++++ FreeCAD-0.12.5284/src/Mod/Mesh/App/WildMagic4/Wm4Query2Filtered.inl
+@@ -55,7 +55,7 @@
+ Real fLen1 = Math<Real>::Sqrt(fX1*fX1 + fY1*fY1);
+ Real fScaledUncertainty = m_fUncertainty*fLen0*fLen1;
+
+- Real fDet2 = Det2(fX0,fY0,fX1,fY1);
++ Real fDet2 = this->Det2(fX0,fY0,fX1,fY1);
+ if (Math<Real>::FAbs(fDet2) >= fScaledUncertainty)
+ {
+ return (fDet2 > (Real)0.0 ? +1 : (fDet2 < (Real)0.0 ? -1 : 0));
+@@ -93,7 +93,7 @@
+ Real fLen2 = Math<Real>::Sqrt(fD2x*fD2x + fD2y*fD2y + fZ2*fZ2);
+ Real fScaledUncertainty = m_fUncertainty*fLen0*fLen1*fLen2;
+
+- Real fDet3 = Det3(fD0x,fD0y,fZ0,fD1x,fD1y,fZ1,fD2x,fD2y,fZ2);
++ Real fDet3 = this->Det3(fD0x,fD0y,fZ0,fD1x,fD1y,fZ1,fD2x,fD2y,fZ2);
+ if (Math<Real>::FAbs(fDet3) >= fScaledUncertainty)
+ {
+ return (fDet3 < (Real)0.0 ? 1 : (fDet3 > (Real)0.0 ? -1 : 0));
+--- FreeCAD-0.12.5284/src/Mod/Mesh/App/WildMagic4/Wm4Query3Filtered.in
++++ FreeCAD-0.12.5284/src/Mod/Mesh/App/WildMagic4/Wm4Query3Filtered.inl
+@@ -62,7 +62,7 @@
+ Real fLen2 = Math<Real>::Sqrt(fX2*fX2 + fY2*fY2 + fZ2*fZ2);
+ Real fScaledUncertainty = m_fUncertainty*fLen0*fLen1*fLen2;
+
+- Real fDet3 = Det3(fX0,fY0,fZ0,fX1,fY1,fZ1,fX2,fY2,fZ2);
++ Real fDet3 = this->Det3(fX0,fY0,fZ0,fX1,fY1,fZ1,fX2,fY2,fZ2);
+ if (Math<Real>::FAbs(fDet3) >= fScaledUncertainty)
+ {
+ return (fDet3 > (Real)0.0 ? +1 : (fDet3 < (Real)0.0 ? -1 : 0));
+@@ -115,7 +115,7 @@
+ Real fLen3 = Math<Real>::Sqrt(fD3x*fD3x+fD3y*fD3y+fD3z*fD3z+fW3*fW3);
+ Real fScaledUncertainty = m_fUncertainty*fLen0*fLen1*fLen2*fLen3;
+
+- Real fDet4 = Det4(fD0x,fD0y,fD0z,fW0,fD1x,fD1y,fD1z,fW1,fD2x,
++ Real fDet4 = this->Det4(fD0x,fD0y,fD0z,fW0,fD1x,fD1y,fD1z,fW1,fD2x,
+ fD2y,fD2z,fW2,fD3x,fD3y,fD3z,fW3);
+
+ if (Math<Real>::FAbs(fDet4) >= fScaledUncertainty)
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-nodir.patch b/media-gfx/freecad/files/freecad-0.12.5284-nodir.patch
new file mode 100644
index 000000000000..3e9bbedb47ad
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-nodir.patch
@@ -0,0 +1,21 @@
+diff -ruN FreeCAD-0.12.5284.orig/src/Mod/CMakeLists.txt FreeCAD-0.12.5284/src/Mod/CMakeLists.txt
+--- FreeCAD-0.12.5284.orig/src/Mod/CMakeLists.txt 2012-01-03 13:26:12.000000000 +0100
++++ FreeCAD-0.12.5284/src/Mod/CMakeLists.txt 2012-01-06 12:19:06.000000000 +0100
+@@ -18,7 +18,7 @@
+ MESSAGE("Due to the missing Eigen3 library the Sketcher module won't be built")
+ MESSAGE("Due to the missing Eigen3 library the Robot module won't be built")
+ ENDIF(EIGEN3_FOUND)
+-add_subdirectory(Machining_Distortion)
++# add_subdirectory(Machining_Distortion)
+
+ add_subdirectory(ReverseEngineering)
+ add_subdirectory(MeshPart)
+@@ -32,7 +32,7 @@
+
+ add_subdirectory(Arch)
+
+-add_subdirectory(Assembly)
++# add_subdirectory(Assembly)
+
+ if(FREECAD_BUILD_CAM)
+ add_subdirectory(Cam)
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-nopivy.patch b/media-gfx/freecad/files/freecad-0.12.5284-nopivy.patch
new file mode 100644
index 000000000000..337348aa554c
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-nopivy.patch
@@ -0,0 +1,17 @@
+diff -ruN FreeCAD-0.12.5284.orig/src/3rdParty/CMakeLists.txt FreeCAD-0.12.5284/src/3rdParty/CMakeLists.txt
+--- FreeCAD-0.12.5284.orig/src/3rdParty/CMakeLists.txt 2012-01-03 13:30:19.000000000 +0100
++++ FreeCAD-0.12.5284/src/3rdParty/CMakeLists.txt 2012-01-07 15:57:52.000000000 +0100
+@@ -19,13 +19,6 @@
+ # add_subdirectory(Pivy)
+ #endif(MINGW)
+ # applies for Unix, MinGW and Windows with custom LibPack
+-elseif(FREECAD_BUILD_GUI)
+- find_path(COIN_VERSION3 Inventor/scxml/ScXML.h ${COIN3D_INCLUDE_DIR})
+- if (COIN_VERSION3)
+- add_subdirectory(Pivy-0.5)
+- else (COIN_VERSION3)
+- add_subdirectory(Pivy)
+- endif(COIN_VERSION3)
+ endif(FREECAD_BUILD_GUI AND FREECAD_LIBPACK_CHECKFILE6X)
+
+ # For Windows we have all stuff in the LibPack
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-occ-6.5.5.patch b/media-gfx/freecad/files/freecad-0.12.5284-occ-6.5.5.patch
new file mode 100644
index 000000000000..1886f8eca952
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-occ-6.5.5.patch
@@ -0,0 +1,224 @@
+--- FreeCAD-0.12.5284/src/Mod/Part/App/TopoShape.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/TopoShape.cpp
+@@ -1370,7 +1370,7 @@
+
+ //circular profile
+ Handle(Geom_Circle) aCirc = new Geom_Circle (gp::XOY(), 1.0);
+- aCirc->Rotate (gp::OZ(), Standard_PI/2.);
++ aCirc->Rotate (gp::OZ(), M_PI/2.);
+
+ //perpendicular section
+ Handle(BRepAdaptor_HCurve) myPath = new BRepAdaptor_HCurve(path_adapt);
+@@ -1469,12 +1469,12 @@
+ }
+
+ gp_Pnt2d aPnt(0, 0);
+- gp_Dir2d aDir(2. * PI, pitch);
++ gp_Dir2d aDir(2. * M_PI, pitch);
+ gp_Ax2d aAx2d(aPnt, aDir);
+
+ Handle(Geom2d_Line) line = new Geom2d_Line(aAx2d);
+ gp_Pnt2d beg = line->Value(0);
+- gp_Pnt2d end = line->Value(sqrt(4.0*PI*PI+pitch*pitch)*(height/pitch));
++ gp_Pnt2d end = line->Value(sqrt(4.0*M_PI*M_PI+pitch*pitch)*(height/pitch));
+ Handle(Geom2d_TrimmedCurve) segm = GCE2d_MakeSegment(beg , end);
+
+ TopoDS_Edge edgeOnSurf = BRepBuilderAPI_MakeEdge(segm , surf);
+@@ -1772,7 +1772,7 @@
+ Standard_Real x3, y3, z3;
+
+ Handle_StlMesh_Mesh aMesh = new StlMesh_Mesh();
+- StlTransfer::BuildIncrementalMesh(this->_Shape, accuracy, aMesh);
++ StlTransfer::BuildIncrementalMesh(this->_Shape, accuracy, false, aMesh);
+ StlMesh_MeshExplorer xp(aMesh);
+ for (Standard_Integer nbd=1;nbd<=aMesh->NbDomains();nbd++) {
+ for (xp.InitTriangle (nbd); xp.MoreTriangle (); xp.NextTriangle ()) {
+--- FreeCAD-0.12.5284/src/Mod/Part/App/FeatureRevolution.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/FeatureRevolution.cpp
+@@ -71,7 +71,7 @@
+ try {
+ // Now, let's get the TopoDS_Shape
+ TopoDS_Shape revolve = base->Shape.getShape().revolve(gp_Ax1(pnt, dir),
+- Angle.getValue()/180.0f*Standard_PI);
++ Angle.getValue()/180.0f*M_PI);
+ if (revolve.IsNull())
+ return new App::DocumentObjectExecReturn("Resulting shape is null");
+ this->Shape.setValue(revolve);
+--- FreeCAD-0.12.5284/src/Mod/Part/App/PrimitiveFeature.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/PrimitiveFeature.cpp
+@@ -263,9 +263,9 @@
+ return new App::DocumentObjectExecReturn("Radius of sphere too small");
+ try {
+ BRepPrimAPI_MakeSphere mkSphere(Radius.getValue(),
+- Angle1.getValue()/180.0f*Standard_PI,
+- Angle2.getValue()/180.0f*Standard_PI,
+- Angle3.getValue()/180.0f*Standard_PI);
++ Angle1.getValue()/180.0f*M_PI,
++ Angle2.getValue()/180.0f*M_PI,
++ Angle3.getValue()/180.0f*M_PI);
+ TopoDS_Shape ResultShape = mkSphere.Shape();
+ this->Shape.setValue(ResultShape);
+ }
+@@ -321,9 +321,9 @@
+ gp_Ax2 ax2(pnt,dir);
+ BRepPrimAPI_MakeSphere mkSphere(ax2,
+ Radius2.getValue(),
+- Angle1.getValue()/180.0f*Standard_PI,
+- Angle2.getValue()/180.0f*Standard_PI,
+- Angle3.getValue()/180.0f*Standard_PI);
++ Angle1.getValue()/180.0f*M_PI,
++ Angle2.getValue()/180.0f*M_PI,
++ Angle3.getValue()/180.0f*M_PI);
+ Standard_Real scale = Radius1.getValue()/Radius2.getValue();
+ gp_Dir xDir = ax2.XDirection();
+ gp_Dir yDir = ax2.YDirection();
+@@ -380,7 +380,7 @@
+ try {
+ BRepPrimAPI_MakeCylinder mkCylr(Radius.getValue(),
+ Height.getValue(),
+- Angle.getValue()/180.0f*Standard_PI);
++ Angle.getValue()/180.0f*M_PI);
+ TopoDS_Shape ResultShape = mkCylr.Shape();
+ this->Shape.setValue(ResultShape);
+ }
+@@ -429,7 +429,7 @@
+ BRepPrimAPI_MakeCone mkCone(Radius1.getValue(),
+ Radius2.getValue(),
+ Height.getValue(),
+- Angle.getValue()/180.0f*Standard_PI);
++ Angle.getValue()/180.0f*M_PI);
+ TopoDS_Shape ResultShape = mkCone.Shape();
+ this->Shape.setValue(ResultShape);
+ }
+@@ -498,9 +498,9 @@
+ #else
+ BRepPrimAPI_MakeTorus mkTorus(Radius1.getValue(),
+ Radius2.getValue(),
+- Angle1.getValue()/180.0f*Standard_PI,
+- Angle2.getValue()/180.0f*Standard_PI,
+- Angle3.getValue()/180.0f*Standard_PI);
++ Angle1.getValue()/180.0f*M_PI,
++ Angle2.getValue()/180.0f*M_PI,
++ Angle3.getValue()/180.0f*M_PI);
+ const TopoDS_Solid& ResultShape = mkTorus.Solid();
+ #endif
+ this->Shape.setValue(ResultShape);
+--- FreeCAD-0.12.5284/src/Mod/Part/App/AppPartPy.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/AppPartPy.cpp
+@@ -492,7 +492,7 @@
+ d.SetCoord(vec.x, vec.y, vec.z);
+ }
+ Handle_Geom_Plane aPlane = new Geom_Plane(p, d);
+- BRepBuilderAPI_MakeFace Face(aPlane, 0.0, length, 0.0, width);
++ BRepBuilderAPI_MakeFace Face(aPlane, 0.0, length, 0.0, width, Precision::Confusion());
+ return new TopoShapeFacePy(new TopoShape((Face.Face())));
+ }
+ catch (Standard_DomainError) {
+--- FreeCAD-0.12.5284/src/Mod/Part/App/GeometrySurfacePyImp.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/GeometrySurfacePyImp.cpp
+@@ -79,7 +79,7 @@
+ s->Bounds(u1,u2,v1,v2);
+ if (!PyArg_ParseTuple(args, "|dddd", &u1,&u2,&v1,&v2))
+ return 0;
+- BRepBuilderAPI_MakeFace mkBuilder(s, u1, u2, v1, v2);
++ BRepBuilderAPI_MakeFace mkBuilder(s, u1, u2, v1, v2, Precision::Confusion());
+ TopoDS_Shape sh = mkBuilder.Shape();
+ return new TopoShapeFacePy(new TopoShape(sh));
+ }
+--- FreeCAD-0.12.5284/src/Mod/Part/App/Geometry.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/Geometry.cpp
+@@ -1252,7 +1252,7 @@
+ Handle_Geom_Surface s = Handle_Geom_Surface::DownCast(handle());
+ Standard_Real u1,u2,v1,v2;
+ s->Bounds(u1,u2,v1,v2);
+- BRepBuilderAPI_MakeFace mkBuilder(s, u1, u2, v1, v2);
++ BRepBuilderAPI_MakeFace mkBuilder(s, u1, u2, v1, v2, Precision::Confusion());
+ return mkBuilder.Shape();
+ }
+
+--- FreeCAD-0.12.5284/src/Mod/Part/App/PrimitiveFeature.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/PrimitiveFeature.cpp
+@@ -191,7 +191,7 @@
+ gp_Pnt pnt(0.0,0.0,0.0);
+ gp_Dir dir(0.0,0.0,1.0);
+ Handle_Geom_Plane aPlane = new Geom_Plane(pnt, dir);
+- BRepBuilderAPI_MakeFace mkFace(aPlane, 0.0, L, 0.0, W);
++ BRepBuilderAPI_MakeFace mkFace(aPlane, 0.0, L, 0.0, W, Precision::Confusion());
+
+ const char *error=0;
+ switch (mkFace.Error())
+--- FreeCAD-0.12.5284/src/Mod/Part/App/TopoShape.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/TopoShape.cpp
+@@ -1338,7 +1338,7 @@
+ double u1,u2,v1,v2;
+ surf->Bounds(u1,u2,v1,v2);
+
+- BRepBuilderAPI_MakeFace mkBuilder(surf, umin, umax, v1, v2);
++ BRepBuilderAPI_MakeFace mkBuilder(surf, umin, umax, v1, v2, Precision::Confusion());
+ return mkBuilder.Face();
+ }
+
+@@ -1391,7 +1391,7 @@
+
+ Standard_Real u1,u2,v1,v2;
+ mySurface->Bounds(u1,u2,v1,v2);
+- BRepBuilderAPI_MakeFace mkBuilder(mySurface, u1, u2, v1, v2);
++ BRepBuilderAPI_MakeFace mkBuilder(mySurface, u1, u2, v1, v2, Precision::Confusion());
+ return mkBuilder.Shape();
+ }
+
+@@ -1443,7 +1443,7 @@
+ mkSweep.Perform(tol, Standard_False, GeomAbs_C1, BSplCLib::MaxDegree(), 1000);
+
+ const Handle_Geom_Surface& surf = mkSweep.Surface();
+- BRepBuilderAPI_MakeFace mkBuilder(surf, umin, umax, vmin, vmax);
++ BRepBuilderAPI_MakeFace mkBuilder(surf, umin, umax, vmin, vmax, Precision::Confusion());
+ return mkBuilder.Face();
+ }
+
+--- FreeCAD-0.12.5284/src/Mod/Part/App/TopoShapeFacePyImp.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/TopoShapeFacePyImp.cpp
+@@ -135,7 +135,7 @@
+ return -1;
+ }
+
+- BRepBuilderAPI_MakeFace mkFace(S);
++ BRepBuilderAPI_MakeFace mkFace(S, Precision::Confusion());
+ if (bound) {
+ Py::List list(bound);
+ for (Py::List::iterator it = list.begin(); it != list.end(); ++it) {
+--- FreeCAD-0.12.5284/src/Mod/Fem/App/AppFemPy.cpp
++++ FreeCAD-0.12.5284/src/Mod/Fem/App/AppFemPy.cpp
+@@ -498,12 +498,12 @@
+
+ //Do a Monte Carlo approach and start from the Principal Axis System
+ //and rotate +/- 60° around each axis in a first iteration
+- double angle_range_min_x=-PI/3.0,angle_range_max_x=PI/3.0,
+- angle_range_min_y=-PI/3.0,angle_range_max_y=PI/3.0,
+- angle_range_min_z=-PI/3.0,angle_range_max_z=PI/3.0;
++ double angle_range_min_x=-M_PI/3.0,angle_range_max_x=M_PI/3.0,
++ angle_range_min_y=-M_PI/3.0,angle_range_max_y=M_PI/3.0,
++ angle_range_min_z=-M_PI/3.0,angle_range_max_z=M_PI/3.0;
+
+ //We rotate until we are 0.1° sure to be in the right position
+- for (step_size = (2.0*PI/it_steps);step_size>(2.0*PI/3600.0);step_size=(2.0*PI/it_steps))
++ for (step_size = (2.0*M_PI/it_steps);step_size>(2.0*M_PI/3600.0);step_size=(2.0*M_PI/it_steps))
+ {
+ for(alpha_x=angle_range_min_x;alpha_x<angle_range_max_x;alpha_x=alpha_x+step_size)
+ {
+@@ -744,11 +744,11 @@
+
+ //Do a Monte Carlo approach and start from the Principal Axis System
+ //and rotate +/- 60° around each axis in a first iteration
+- double angle_range_min_x=-PI/3.0,angle_range_max_x=PI/3.0,
+- angle_range_min_y=-PI/3.0,angle_range_max_y=PI/3.0,
+- angle_range_min_z=-PI/3.0,angle_range_max_z=PI/3.0;
++ double angle_range_min_x=-M_PI/3.0,angle_range_max_x=M_PI/3.0,
++ angle_range_min_y=-M_PI/3.0,angle_range_max_y=M_PI/3.0,
++ angle_range_min_z=-M_PI/3.0,angle_range_max_z=M_PI/3.0;
+
+- for (step_size = (2.0*PI/it_steps);step_size>(2.0*PI/360.0);step_size=(2.0*PI/it_steps))
++ for (step_size = (2.0*M_PI/it_steps);step_size>(2.0*M_PI/360.0);step_size=(2.0*M_PI/it_steps))
+ {
+ for(alpha_x=angle_range_min_x;alpha_x<angle_range_max_x;alpha_x=alpha_x+step_size)
+ {
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-occ-6.6.patch b/media-gfx/freecad/files/freecad-0.12.5284-occ-6.6.patch
new file mode 100644
index 000000000000..e3722e8d6c75
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-occ-6.6.patch
@@ -0,0 +1,69 @@
+diff -Naur freecad-0.12.5284-r3-orig/work/FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_RadialPrism_3D.cpp freecad-0.12.5284-r3/work/FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_RadialPrism_3D.cpp
+--- freecad-0.12.5284-r3-orig/work/FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_RadialPrism_3D.cpp 2013-09-15 22:53:34.135326244 -0700
++++ freecad-0.12.5284-r3/work/FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_RadialPrism_3D.cpp 2013-09-15 22:54:04.493854451 -0700
+@@ -42,9 +42,13 @@
+
+ #include "utilities.h"
+
++#include <Standard_Version.hxx>
+ #include <BRepAdaptor_Curve.hxx>
+ #include <BRepBuilderAPI_MakeEdge.hxx>
+ #include <BRepTools.hxx>
++#if OCC_VERSION_HEX >= 0x060600
++#include <BRepClass3d.hxx>
++#endif
+ #include <BRep_Tool.hxx>
+ #include <TopExp_Explorer.hxx>
+ #include <TopoDS.hxx>
+@@ -161,7 +165,11 @@
+
+ // get 2 shells
+ TopoDS_Solid solid = TopoDS::Solid( aShape );
++#if OCC_VERSION_HEX >= 0x060600
++ TopoDS_Shell outerShell = BRepClass3d::OuterShell( solid );
++#else
+ TopoDS_Shell outerShell = BRepTools::OuterShell( solid );
++#endif
+ TopoDS_Shape innerShell;
+ int nbShells = 0;
+ for ( TopoDS_Iterator It (solid); It.More(); It.Next(), ++nbShells )
+@@ -401,7 +409,11 @@
+ {
+ // get 2 shells
+ TopoDS_Solid solid = TopoDS::Solid( aShape );
++#if OCC_VERSION_HEX >= 0x060600
++ TopoDS_Shell outerShell = BRepClass3d::OuterShell( solid );
++#else
+ TopoDS_Shell outerShell = BRepTools::OuterShell( solid );
++#endif
+ TopoDS_Shape innerShell;
+ int nbShells = 0;
+ for ( TopoDS_Iterator It (solid); It.More(); It.Next(), ++nbShells )
+diff -Naur freecad-0.12.5284-r3-orig/work/FreeCAD-0.12.5284/src/Mod/Part/App/TopoShapeSolidPyImp.cpp freecad-0.12.5284-r3/work/FreeCAD-0.12.5284/src/Mod/Part/App/TopoShapeSolidPyImp.cpp
+--- freecad-0.12.5284-r3-orig/work/FreeCAD-0.12.5284/src/Mod/Part/App/TopoShapeSolidPyImp.cpp 2013-09-15 22:53:34.094324180 -0700
++++ freecad-0.12.5284-r3/work/FreeCAD-0.12.5284/src/Mod/Part/App/TopoShapeSolidPyImp.cpp 2013-09-15 22:54:24.414857241 -0700
+@@ -23,8 +23,12 @@
+
+ #include "PreCompiled.h"
+
++#include <Standard_Version.hxx>
+ #include <BRepGProp.hxx>
+ #include <BRepTools.hxx>
++#if OCC_VERSION_HEX >= 0x060600
++#include <BRepClass3d.hxx>
++#endif
+ #include <GProp_GProps.hxx>
+ #include <BRepBuilderAPI_MakeSolid.hxx>
+ #include <TopExp_Explorer.hxx>
+@@ -104,7 +108,11 @@
+ TopoDS_Shell shell;
+ const TopoDS_Shape& shape = getTopoShapePtr()->_Shape;
+ if (!shape.IsNull() && shape.ShapeType() == TopAbs_SOLID)
++#if OCC_VERSION_HEX >= 0x060600
++ shell = BRepClass3d::OuterShell(TopoDS::Solid(shape));
++#else
+ shell = BRepTools::OuterShell(TopoDS::Solid(shape));
++#endif
+ return Py::Object(new TopoShapeShellPy(new TopoShape(shell)),true);
+ }
+
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-qt3support.patch b/media-gfx/freecad/files/freecad-0.12.5284-qt3support.patch
new file mode 100644
index 000000000000..1548c2f1f89d
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-qt3support.patch
@@ -0,0 +1,36 @@
+diff -ruN FreeCAD-0.12.5284.orig/src/Mod/Arch/Resources/ui/archprefs-base.ui FreeCAD-0.12.5284/src/Mod/Arch/Resources/ui/archprefs-base.ui
+--- FreeCAD-0.12.5284.orig/src/Mod/Arch/Resources/ui/archprefs-base.ui 2012-01-03 13:26:11.000000000 +0100
++++ FreeCAD-0.12.5284/src/Mod/Arch/Resources/ui/archprefs-base.ui 2012-01-07 17:15:29.000000000 +0100
+@@ -133,7 +133,7 @@
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
++ <pixmapfunction></pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>Gui::ColorButton</class>
+diff -ruN FreeCAD-0.12.5284.orig/src/Mod/Draft/Resources/ui/userprefs-base.ui FreeCAD-0.12.5284/src/Mod/Draft/Resources/ui/userprefs-base.ui
+--- FreeCAD-0.12.5284.orig/src/Mod/Draft/Resources/ui/userprefs-base.ui 2012-01-03 13:25:30.000000000 +0100
++++ FreeCAD-0.12.5284/src/Mod/Draft/Resources/ui/userprefs-base.ui 2012-01-07 17:15:11.000000000 +0100
+@@ -957,7 +957,7 @@
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
++ <pixmapfunction></pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>Gui::FileChooser</class>
+diff -ruN FreeCAD-0.12.5284.orig/src/Mod/Draft/Resources/ui/userprefs-import.ui FreeCAD-0.12.5284/src/Mod/Draft/Resources/ui/userprefs-import.ui
+--- FreeCAD-0.12.5284.orig/src/Mod/Draft/Resources/ui/userprefs-import.ui 2012-01-03 13:25:30.000000000 +0100
++++ FreeCAD-0.12.5284/src/Mod/Draft/Resources/ui/userprefs-import.ui 2012-01-07 17:14:50.000000000 +0100
+@@ -411,7 +411,7 @@
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
++ <pixmapfunction></pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>Gui::FileChooser</class>
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-removeoldswig.patch b/media-gfx/freecad/files/freecad-0.12.5284-removeoldswig.patch
new file mode 100644
index 000000000000..b768178ed78a
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-removeoldswig.patch
@@ -0,0 +1,111 @@
+--- src/Base/Interpreter.cpp.old 2010-08-27 16:24:16.000000000 +0200
++++ src/Base/Interpreter.cpp 2011-12-24 00:13:52.356641021 +0100
+@@ -503,11 +503,6 @@
+ #if (defined(HAVE_SWIG) && (HAVE_SWIG == 1))
+ namespace Swig_python { extern int createSWIGPointerObj_T(const char* TypeName, void* obj, PyObject** ptr, int own); }
+ #endif
+-namespace Swig_1_3_25 { extern int createSWIGPointerObj_T(const char* TypeName, void* obj, PyObject** ptr, int own); }
+-namespace Swig_1_3_33 { extern int createSWIGPointerObj_T(const char* TypeName, void* obj, PyObject** ptr, int own); }
+-namespace Swig_1_3_36 { extern int createSWIGPointerObj_T(const char* TypeName, void* obj, PyObject** ptr, int own); }
+-namespace Swig_1_3_38 { extern int createSWIGPointerObj_T(const char* TypeName, void* obj, PyObject** ptr, int own); }
+-namespace Swig_1_3_40 { extern int createSWIGPointerObj_T(const char* TypeName, void* obj, PyObject** ptr, int own); }
+
+ PyObject* InterpreterSingleton::createSWIGPointerObj(const char* Module, const char* TypeName, void* Pointer, int own)
+ {
+@@ -517,21 +512,6 @@
+ int version = getSWIGVersionFromModule(Module);
+ switch (version&0xff)
+ {
+- case 25:
+- result = Swig_1_3_25::createSWIGPointerObj_T(TypeName, Pointer, &proxy, own);
+- break;
+- case 33:
+- result = Swig_1_3_33::createSWIGPointerObj_T(TypeName, Pointer, &proxy, own);
+- break;
+- case 36:
+- result = Swig_1_3_36::createSWIGPointerObj_T(TypeName, Pointer, &proxy, own);
+- break;
+- case 38:
+- result = Swig_1_3_38::createSWIGPointerObj_T(TypeName, Pointer, &proxy, own);
+- break;
+- case 40:
+- result = Swig_1_3_40::createSWIGPointerObj_T(TypeName, Pointer, &proxy, own);
+- break;
+ default:
+ #if (defined(HAVE_SWIG) && (HAVE_SWIG == 1))
+ result = Swig_python::createSWIGPointerObj_T(TypeName, Pointer, &proxy, own);
+@@ -550,11 +530,6 @@
+ #if (defined(HAVE_SWIG) && (HAVE_SWIG == 1))
+ namespace Swig_python { extern int convertSWIGPointerObj_T(const char* TypeName, PyObject* obj, void** ptr, int flags); }
+ #endif
+-namespace Swig_1_3_25 { extern int convertSWIGPointerObj_T(const char* TypeName, PyObject* obj, void** ptr, int flags); }
+-namespace Swig_1_3_33 { extern int convertSWIGPointerObj_T(const char* TypeName, PyObject* obj, void** ptr, int flags); }
+-namespace Swig_1_3_36 { extern int convertSWIGPointerObj_T(const char* TypeName, PyObject* obj, void** ptr, int flags); }
+-namespace Swig_1_3_38 { extern int convertSWIGPointerObj_T(const char* TypeName, PyObject* obj, void** ptr, int flags); }
+-namespace Swig_1_3_40 { extern int convertSWIGPointerObj_T(const char* TypeName, PyObject* obj, void** ptr, int flags); }
+
+ bool InterpreterSingleton::convertSWIGPointerObj(const char* Module, const char* TypeName, PyObject* obj, void** ptr, int flags)
+ {
+@@ -563,21 +538,6 @@
+ int version = getSWIGVersionFromModule(Module);
+ switch (version&0xff)
+ {
+- case 25:
+- result = Swig_1_3_25::convertSWIGPointerObj_T(TypeName, obj, ptr, flags);
+- break;
+- case 33:
+- result = Swig_1_3_33::convertSWIGPointerObj_T(TypeName, obj, ptr, flags);
+- break;
+- case 36:
+- result = Swig_1_3_36::convertSWIGPointerObj_T(TypeName, obj, ptr, flags);
+- break;
+- case 38:
+- result = Swig_1_3_38::convertSWIGPointerObj_T(TypeName, obj, ptr, flags);
+- break;
+- case 40:
+- result = Swig_1_3_40::convertSWIGPointerObj_T(TypeName, obj, ptr, flags);
+- break;
+ default:
+ #if (defined(HAVE_SWIG) && (HAVE_SWIG == 1))
+ result = Swig_python::convertSWIGPointerObj_T(TypeName, obj, ptr, flags);
+@@ -596,11 +556,6 @@
+ #if (defined(HAVE_SWIG) && (HAVE_SWIG == 1))
+ namespace Swig_python { extern void cleanupSWIG_T(const char* TypeName); }
+ #endif
+-namespace Swig_1_3_25 { extern void cleanupSWIG_T(const char* TypeName); }
+-namespace Swig_1_3_33 { extern void cleanupSWIG_T(const char* TypeName); }
+-namespace Swig_1_3_36 { extern void cleanupSWIG_T(const char* TypeName); }
+-namespace Swig_1_3_38 { extern void cleanupSWIG_T(const char* TypeName); }
+-namespace Swig_1_3_40 { extern void cleanupSWIG_T(const char* TypeName); }
+
+ void InterpreterSingleton::cleanupSWIG(const char* TypeName)
+ {
+@@ -608,9 +563,4 @@
+ #if (defined(HAVE_SWIG) && (HAVE_SWIG == 1))
+ Swig_python::cleanupSWIG_T(TypeName);
+ #endif
+- Swig_1_3_25::cleanupSWIG_T(TypeName);
+- Swig_1_3_33::cleanupSWIG_T(TypeName);
+- Swig_1_3_36::cleanupSWIG_T(TypeName);
+- Swig_1_3_38::cleanupSWIG_T(TypeName);
+- Swig_1_3_40::cleanupSWIG_T(TypeName);
+ }
+--- src/Base/Makefile.am.old 2011-12-24 00:14:25.625540687 +0100
++++ src/Base/Makefile.am 2010-10-27 12:29:37.000000000 +0200
+@@ -65,16 +65,6 @@
+ Swap.cpp \
+ swigpyrun.inl \
+ swigpyrun.cpp \
+- swigpyrun_1.3.25.cpp \
+- swigpyrun_1.3.25.h \
+- swigpyrun_1.3.33.cpp \
+- swigpyrun_1.3.33.h \
+- swigpyrun_1.3.36.cpp \
+- swigpyrun_1.3.36.h \
+- swigpyrun_1.3.38.cpp \
+- swigpyrun_1.3.38.h \
+- swigpyrun_1.3.40.cpp \
+- swigpyrun_1.3.40.h \
+ TimeInfo.cpp \
+ Type.cpp \
+ Tools.cpp \
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-salomesmesh-occ-6.5.5.patch b/media-gfx/freecad/files/freecad-0.12.5284-salomesmesh-occ-6.5.5.patch
new file mode 100644
index 000000000000..50e30e6cfc09
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-salomesmesh-occ-6.5.5.patch
@@ -0,0 +1,228 @@
+--- FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
++++ FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
+@@ -1374,7 +1374,7 @@
+ const SMDS_MeshNode * n1,
+ const SMDS_MeshNode * n2)
+ {
+- double angle = 2*PI; // bad angle
++ double angle = 2*M_PI; // bad angle
+
+ // get normals
+ SMESH::Controls::TSequenceOfXYZ P1, P2;
+--- FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/SMESH/SMESH_Pattern.cpp
++++ FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/SMESH/SMESH_Pattern.cpp
+@@ -1234,7 +1234,7 @@
+ maxLen2 = Max( maxLen2, ( n[1]->myUV - n[2]->myUV ).SquareModulus() );
+ }
+ maxLen2 = Max( maxLen2, ( n[2]->myUV - node->myUV ).SquareModulus() );
+- minDiag = sqrt( maxLen2 ) * PI / 60.; // ~ maxLen * Sin( 3 deg )
++ minDiag = sqrt( maxLen2 ) * M_PI / 60.; // ~ maxLen * Sin( 3 deg )
+ }
+
+ // check if newUV is behind 3 dirs: n[0]-n[1], n[1]-n[2] and n[0]-n[2]
+@@ -1721,9 +1721,9 @@
+ if ( iDir == 1 )
+ aNorm[ iDir ].Reverse(); // along iDir isoline
+
+- double angle = tgt1.Angle( tgt2 ); // [-PI, PI]
++ double angle = tgt1.Angle( tgt2 ); // [-M_PI, M_PI]
+ // maybe angle is more than |PI|
+- if ( Abs( angle ) > PI / 2. ) {
++ if ( Abs( angle ) > M_PI / 2. ) {
+ // check direction of the last but one perpendicular isoline
+ TIsoNode* prevNode = bndNode2->GetNext( iDir, 0 );
+ bndNode1 = prevNode->GetBoundaryNode( 1 - iDir, 0 );
+@@ -1734,7 +1734,7 @@
+ double angle2 = tgt1.Angle( isoDir );
+ //cout << " isoDir: "<< isoDir.X() <<" "<<isoDir.Y() << " ANGLE: "<< angle << " "<<angle2<<endl;
+ if (angle2 * angle < 0 && // check the sign of an angle close to PI
+- Abs ( Abs ( angle ) - PI ) <= PI / 180. ) {
++ Abs ( Abs ( angle ) - M_PI ) <= M_PI / 180. ) {
+ //MESSAGE("REVERSE ANGLE");
+ angle = -angle;
+ }
+@@ -1746,7 +1746,7 @@
+ // cout << "bndNode1: " << bndNode1->myUV.X()<<" "<<bndNode1->myUV.Y()<< endl;
+ // cout << "bndNode2: " << bndNode2->myUV.X()<<" "<<bndNode2->myUV.Y()<<endl;
+ // cout <<" tgt: " << tgt1.X()<<" "<<tgt1.Y()<<" "<< tgt2.X()<<" "<<tgt2.Y()<<endl;
+- angle += ( angle < 0 ) ? 2. * PI : -2. * PI;
++ angle += ( angle < 0 ) ? 2. * M_PI : -2. * M_PI;
+ }
+ }
+ aTgt[ iDir ] = tgt1.Rotated( angle * ratio[ iDir ] ).XY();
+@@ -1785,7 +1785,7 @@
+ double initAngle = initTgt1.Angle( initTgt2 );
+ double angle = node->myDir[0].Angle( node->myDir[1] );
+ if ( reversed ) angle = -angle;
+- if ( initAngle > angle && initAngle - angle > PI / 2.1 ) {
++ if ( initAngle > angle && initAngle - angle > M_PI / 2.1 ) {
+ // find a close internal node
+ TIsoNode* nClose = 0;
+ list< TIsoNode* > testNodes;
+--- FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/Controls/SMESH_Controls.cpp
++++ FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/Controls/SMESH_Controls.cpp
+@@ -332,12 +332,12 @@
+ aMin = Min(aMin,A0);
+ }
+
+- return aMin * 180.0 / PI;
++ return aMin * 180.0 / M_PI;
+ }
+
+ double MinimumAngle::GetBadRate( double Value, int nbNodes ) const
+ {
+- //const double aBestAngle = PI / nbNodes;
++ //const double aBestAngle = M_PI / nbNodes;
+ const double aBestAngle = 180.0 - ( 360.0 / double(nbNodes) );
+ return ( fabs( aBestAngle - Value ));
+ }
+@@ -831,19 +831,19 @@
+ gp_XYZ N = GI.Crossed( GJ );
+
+ if ( N.Modulus() < gp::Resolution() )
+- return PI / 2;
++ return M_PI / 2;
+
+ N.Normalize();
+
+ double H = ( thePnt2 - theG ).Dot( N );
+- return asin( fabs( H / L ) ) * 180. / PI;
++ return asin( fabs( H / L ) ) * 180. / M_PI;
+ }
+
+ double Warping::GetBadRate( double Value, int /*nbNodes*/ ) const
+ {
+ // the warp is in the range [0.0,PI/2]
+ // 0.0 = good (no warp)
+- // PI/2 = bad (face pliee)
++ // M_PI/2 = bad (face pliee)
+ return Value;
+ }
+
+@@ -915,14 +915,14 @@
+ return 0.;
+
+ // Compute skew
+- static double PI2 = PI / 2.;
++ static double PI2 = M_PI / 2.;
+ if ( P.size() == 3 )
+ {
+ double A0 = fabs( PI2 - skewAngle( P( 3 ), P( 1 ), P( 2 ) ) );
+ double A1 = fabs( PI2 - skewAngle( P( 1 ), P( 2 ), P( 3 ) ) );
+ double A2 = fabs( PI2 - skewAngle( P( 2 ), P( 3 ), P( 1 ) ) );
+
+- return Max( A0, Max( A1, A2 ) ) * 180. / PI;
++ return Max( A0, Max( A1, A2 ) ) * 180. / M_PI;
+ }
+ else
+ {
+@@ -939,7 +939,7 @@
+ if ( A < Precision::Angular() )
+ return 0.;
+
+- return A * 180. / PI;
++ return A * 180. / M_PI;
+ }
+ }
+
+--- FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_CompositeHexa_3D.cpp
++++ FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_CompositeHexa_3D.cpp
+@@ -812,7 +812,7 @@
+ int iMyCommon;
+ if ( mySides.Contain( otherSide, &iMyCommon ) ) {
+ // check if normals of two faces are collinear at all vertices of a otherSide
+- const double angleTol = PI / 180 / 2;
++ const double angleTol = M_PI / 180 / 2;
+ int iV, nbV = otherSide.NbVertices(), nbCollinear = 0;
+ for ( iV = 0; iV < nbV; ++iV )
+ {
+--- FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cpp
++++ FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cpp
+@@ -355,8 +355,8 @@
+ for(; itn != theNodes.end(); itn++ ) {
+ CNodes.push_back( (*itn).second );
+ double ang = (*itn).first - fang;
+- if( ang>PI ) ang = ang - 2*PI;
+- if( ang<-PI ) ang = ang + 2*PI;
++ if( ang>M_PI ) ang = ang - 2*M_PI;
++ if( ang<-M_PI ) ang = ang + 2*M_PI;
+ Angles.Append( ang );
+ }
+ }
+@@ -404,7 +404,7 @@
+ // a segment of line
+ double fp, lp;
+ Handle(Geom_Circle) aCirc = Handle(Geom_Circle)::DownCast( getCurve( CircEdge, &fp, &lp ));
+- if( fabs(fabs(lp-fp)-PI) > Precision::Confusion() ) {
++ if( fabs(fabs(lp-fp)-M_PI) > Precision::Confusion() ) {
+ // not half of circle
+ return error(COMPERR_BAD_SHAPE);
+ }
+@@ -434,8 +434,8 @@
+ for(; itn != theNodes.end(); itn++ ) {
+ CNodes.push_back( (*itn).second );
+ double ang = (*itn).first - fang;
+- if( ang>PI ) ang = ang - 2*PI;
+- if( ang<-PI ) ang = ang + 2*PI;
++ if( ang>M_PI ) ang = ang - 2*M_PI;
++ if( ang<-M_PI ) ang = ang + 2*M_PI;
+ Angles.Append( ang );
+ }
+ const SMDS_MeshNode* NF = theNodes.begin()->second;
+@@ -587,8 +587,8 @@
+ for(; itn != theNodes.end(); itn++ ) {
+ CNodes.push_back( (*itn).second );
+ double ang = (*itn).first - fang;
+- if( ang>PI ) ang = ang - 2*PI;
+- if( ang<-PI ) ang = ang + 2*PI;
++ if( ang>M_PI ) ang = ang - 2*M_PI;
++ if( ang<-M_PI ) ang = ang + 2*M_PI;
+ Angles.Append( ang );
+ }
+ P1 = gp_Pnt( NF->X(), NF->Y(), NF->Z() );
+@@ -1055,7 +1055,7 @@
+ aLine = Handle(Geom_Line)::DownCast(C3);
+ }
+ bool ok = !aCirc.IsNull() && !aLine.IsNull();
+- if( fabs(fabs(lp-fp)-PI) > Precision::Confusion() ) {
++ if( fabs(fabs(lp-fp)-M_PI) > Precision::Confusion() ) {
+ // not half of circle
+ ok = false;
+ }
+--- FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cpp
++++ FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cpp
+@@ -1037,19 +1037,19 @@
+ double ang1 = fabs(VN1.Angle(VI1));
+ double ang2 = fabs(VN2.Angle(VI2));
+ double h1,h2;
+- if(ang1>PI/3.)
++ if(ang1>M_PI/3.)
+ h1 = VI1.Magnitude()/2;
+ else
+ h1 = VI1.Magnitude()*cos(ang1);
+- if(ang2>PI/3.)
++ if(ang2>M_PI/3.)
+ h2 = VI2.Magnitude()/2;
+ else
+ h2 = VI2.Magnitude()*cos(ang2);
+ double coef1 = 0.5;
+- if(ang1<PI/3)
++ if(ang1<M_PI/3)
+ coef1 -= cos(ang1)*0.25;
+ double coef2 = 0.5;
+- if(ang2<PI/3)
++ if(ang2<M_PI/3)
+ coef2 -= cos(ang1)*0.25;
+
+ SMDS_MeshNode* aNode1 = const_cast<SMDS_MeshNode*>(Ns1[4]);
+--- FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_AutomaticLength.cpp
++++ FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_AutomaticLength.cpp
+@@ -116,7 +116,7 @@
+ */
+ //================================================================================
+
+- const double a14divPI = 14. / PI;
++ const double a14divPI = 14. / M_PI;
+
+ inline double segLength(double S0, double edgeLen, double minLen )
+ {
diff --git a/media-gfx/freecad/files/freecad-0.13.1830-CMakefile.patch b/media-gfx/freecad/files/freecad-0.13.1830-CMakefile.patch
new file mode 100644
index 000000000000..58e99587f992
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.13.1830-CMakefile.patch
@@ -0,0 +1,21 @@
+--- CMakeLists.txt 2014-01-06 13:46:44.516313646 +0100
++++ CMakeLists.txt.new 2014-01-06 13:58:16.035280554 +0100
+@@ -69,9 +69,15 @@
+ SET(INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+ endif(WIN32)
+
+-SET(CMAKE_INSTALL_DATADIR data CACHE PATH "Output directory for data and resource files")
+-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")
++if(NOT CMAKE_INSTALL_DATADIR)
++ SET(CMAKE_INSTALL_DATADIR data CACHE PATH "Output directory for data and resource files")
++endif(NOT CMAKE_INSTALL_DATADIR)
++if(NOT CMAKE_INSTALL_INCLUDEDIR)
++ SET(CMAKE_INSTALL_INCLUDEDIR include CACHE PATH "Output directory for header files")
++endif(NOT CMAKE_INSTALL_INCLUDEDIR)
++if(NOT CMAKE_INSTALL_DOCDIR)
++ SET(CMAKE_INSTALL_DOCDIR doc CACHE PATH "Output directory for documentation and license files")
++endif(NOT CMAKE_INSTALL_DOCDIR)
+
+ # used as compiler defines
+ SET(RESOURCEDIR "${CMAKE_INSTALL_DATADIR}")
diff --git a/media-gfx/freecad/files/freecad-0.13.1830-avoid-include-salome.patch b/media-gfx/freecad/files/freecad-0.13.1830-avoid-include-salome.patch
new file mode 100644
index 000000000000..0db660948579
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.13.1830-avoid-include-salome.patch
@@ -0,0 +1,11 @@
+--- src/3rdParty/salomesmesh/CMakeLists.txt 2014-01-06 14:06:05.495258088 +0100
++++ src/3rdParty/salomesmesh/CMakeLists.txt.new 2014-01-06 15:05:53.316086394 +0100
+@@ -206,8 +206,4 @@
+ DESTINATION lib
+ )
+ # Headers are installed by default in /usr/local/include/SMESH-5.1.2.7
+- INSTALL(DIRECTORY inc/
+- DESTINATION include
+- FILES_MATCHING PATTERN "*.h*"
+- )
+ ENDIF(UNIX)
diff --git a/media-gfx/freecad/files/freecad-0.13.1830-cmake-2.8.12.patch b/media-gfx/freecad/files/freecad-0.13.1830-cmake-2.8.12.patch
new file mode 100644
index 000000000000..e0e0e9fc02a7
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.13.1830-cmake-2.8.12.patch
@@ -0,0 +1,294 @@
+commit f061b6f7ea667e1d6944590d67b9b5b6659e4ba0
+Author: wmayer <wmayer@users.sourceforge.net>
+Date: Tue Oct 22 10:33:18 2013 +0200
+
+ 0001278: No build possible with current CMake version 2.8.12
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 862cd7b..11c9b43 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -270,14 +270,14 @@ MARK_AS_ADVANCED(FORCE FREECAD_LIBPACK_CHECKFILE6X FREECAD_LIBPACK_CHECKFILE7X)
+ 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}")
++ QT4_CREATE_MOC_COMMAND(${it} ${outfile} "${moc_flags}" "${moc_options}" "${moc_target}")
+ set(${outfiles} ${${outfiles}} ${outfile})
+ add_file_dependencies(${it} ${outfile})
+ endforeach(it)
+diff --git a/cMake/FreeCadMacros.cmake b/cMake/FreeCadMacros.cmake
+index 5fa7680..78bc0b8 100644
+--- a/cMake/FreeCadMacros.cmake
++++ b/cMake/FreeCadMacros.cmake
+@@ -168,69 +168,6 @@ endmacro(generate_from_py)
+ #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 "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
+-# set(_RC_DEPENDS)
+-# foreach(_RC_FILE ${_RC_FILES})
+-# string(REGEX REPLACE "^<file[^>]*>" "" _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})
+-
+- 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 "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
+- SET(_RC_DEPENDS)
+- FOREACH(_RC_FILE ${_RC_FILES})
+- STRING(REGEX REPLACE "^<file[^>]*>" "" _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(ADD_MSVC_PRECOMPILED_HEADER PrecompiledHeader PrecompiledSource SourcesVar)
+ IF(MSVC)
+ GET_FILENAME_COMPONENT(PrecompiledBasename ${PrecompiledHeader} NAME_WE)
+diff --git a/src/Gui/CMakeLists.txt b/src/Gui/CMakeLists.txt
+index b9f1939..124c4f8 100644
+--- a/src/Gui/CMakeLists.txt
++++ b/src/Gui/CMakeLists.txt
+@@ -608,7 +608,7 @@ SOURCE_GROUP("Widget\\iisTaskPanel\\Mocs" FILES ${iis_MOC_SRCS})
+ #SET(Resource_RCS
+ # Icons/resource.qrc
+ # Language/translation.qrc)
+-#fc_add_resources(Resource_SRCS ${Resource_RCS})
++#qt4_add_resources(Resource_SRCS ${Resource_RCS})
+ #SET(Resource_SRCS
+ # ${Resource_SRCS}
+ # Icons/resource.qrc
+diff --git a/src/Mod/Image/Gui/AppImageGui.cpp b/src/Mod/Image/Gui/AppImageGui.cpp
+index c26129e..c817860 100644
+--- a/src/Mod/Image/Gui/AppImageGui.cpp
++++ b/src/Mod/Image/Gui/AppImageGui.cpp
+@@ -20,7 +20,6 @@
+ #include <Gui/Language/Translator.h>
+ #include "Workbench.h"
+ #include "ViewProviderImagePlane.h"
+-#include "qrc_Image.cpp"
+
+ // use a different name to CreateCommand()
+ void CreateImageCommands(void);
+diff --git a/src/Mod/Image/Gui/CMakeLists.txt b/src/Mod/Image/Gui/CMakeLists.txt
+index cc967ee..4edb462 100644
+--- a/src/Mod/Image/Gui/CMakeLists.txt
++++ b/src/Mod/Image/Gui/CMakeLists.txt
+@@ -30,8 +30,7 @@ SET(ImageGui_RES_SRCS
+ Resources/Image.qrc
+ )
+
+-fc_add_resources(ImageGui_QRC_SRCS ${ImageGui_RES_SRCS})
+-#QT4_ADD_RESOURCES(ImageGui_QRC_SRCS ${ImageGui_RES_SRCS})
++qt4_add_resources(ImageGui_QRC_SRCS ${ImageGui_RES_SRCS})
+
+ set(ImageGui_UIC_SRCS
+ ImageOrientationDialog.ui
+@@ -40,7 +39,7 @@ qt4_wrap_ui(ImageGui_UIC_HDRS ${ImageGui_UIC_SRCS})
+
+ SET(ImageGui_SRCS
+ # ${ImageGui_MOC_SRCS}
+-# ${ImageGui_QRC_SRCS}
++ ${ImageGui_QRC_SRCS}
+ AppImageGui.cpp
+ AppImageGuiPy.cpp
+ Command.cpp
+diff --git a/src/Mod/Mesh/Gui/AppMeshGui.cpp b/src/Mod/Mesh/Gui/AppMeshGui.cpp
+index 624d569..8fb68cf 100644
+--- a/src/Mod/Mesh/Gui/AppMeshGui.cpp
++++ b/src/Mod/Mesh/Gui/AppMeshGui.cpp
+@@ -50,7 +50,6 @@
+ #include "ViewProviderDefects.h"
+ #include "ViewProviderPython.h"
+ #include "Workbench.h"
+-#include "qrc_Mesh.cpp"
+
+
+ // use a different name to CreateCommand()
+diff --git a/src/Mod/Mesh/Gui/CMakeLists.txt b/src/Mod/Mesh/Gui/CMakeLists.txt
+index cafca6c..9ef1dae 100644
+--- a/src/Mod/Mesh/Gui/CMakeLists.txt
++++ b/src/Mod/Mesh/Gui/CMakeLists.txt
+@@ -75,9 +75,9 @@ SET(Inventor_SRCS
+ )
+ SOURCE_GROUP("Inventor" FILES ${Inventor_SRCS})
+
+-fc_add_resources(resource_SRCS Resources/Mesh.qrc)
++qt4_add_resources(resource_SRCS Resources/Mesh.qrc)
+ SET(resource_SRCS
+-# ${resource_SRCS}
++ ${resource_SRCS}
+ Resources/Mesh.qrc
+ )
+ SOURCE_GROUP("resource" FILES ${resource_SRCS})
+diff --git a/src/Mod/Part/Gui/AppPartGui.cpp b/src/Mod/Part/Gui/AppPartGui.cpp
+index 9c3ebb3..ae84470 100644
+--- a/src/Mod/Part/Gui/AppPartGui.cpp
++++ b/src/Mod/Part/Gui/AppPartGui.cpp
+@@ -57,7 +57,6 @@
+ #include "Workbench.h"
+
+ #include <Gui/Language/Translator.h>
+-#include "qrc_Part.cpp"
+
+ #include "Resources/icons/PartFeature.xpm"
+ #include "Resources/icons/PartFeatureImport.xpm"
+diff --git a/src/Mod/Part/Gui/CMakeLists.txt b/src/Mod/Part/Gui/CMakeLists.txt
+index 375f6e4..87c4c28 100644
+--- a/src/Mod/Part/Gui/CMakeLists.txt
++++ b/src/Mod/Part/Gui/CMakeLists.txt
+@@ -50,7 +50,7 @@ set(PartGui_MOC_HDRS
+ fc_wrap_cpp(PartGui_MOC_SRCS ${PartGui_MOC_HDRS})
+ SOURCE_GROUP("Moc" FILES ${PartGui_MOC_SRCS})
+
+-fc_add_resources(PartGui_QRC_SRCS Resources/Part.qrc)
++qt4_add_resources(PartGui_QRC_SRCS Resources/Part.qrc)
+
+ set(PartGui_UIC_SRCS
+ CrossSections.ui
+@@ -77,7 +77,7 @@ set(PartGui_UIC_SRCS
+ qt4_wrap_ui(PartGui_UIC_HDRS ${PartGui_UIC_SRCS})
+
+ SET(PartGui_SRCS
+-# ${PartGui_QRC_SRCS}
++ ${PartGui_QRC_SRCS}
+ ${PartGui_UIC_HDRS}
+ AppPartGui.cpp
+ Command.cpp
+diff --git a/src/Mod/Points/Gui/AppPointsGui.cpp b/src/Mod/Points/Gui/AppPointsGui.cpp
+index 9acd98e..953d3e2 100644
+--- a/src/Mod/Points/Gui/AppPointsGui.cpp
++++ b/src/Mod/Points/Gui/AppPointsGui.cpp
+@@ -33,7 +33,6 @@
+
+ #include "ViewProvider.h"
+ #include "Workbench.h"
+-#include "qrc_Points.cpp"
+
+ // use a different name to CreateCommand()
+ void CreatePointsCommands(void);
+diff --git a/src/Mod/Points/Gui/CMakeLists.txt b/src/Mod/Points/Gui/CMakeLists.txt
+index fab12ff..7e30f0d 100644
+--- a/src/Mod/Points/Gui/CMakeLists.txt
++++ b/src/Mod/Points/Gui/CMakeLists.txt
+@@ -32,9 +32,9 @@ SET(Dialogs_SRCS
+ )
+ SOURCE_GROUP("Dialogs" FILES ${Dialogs_SRCS})
+
+-fc_add_resources(Resource_SRCS Resources/Points.qrc)
++qt4_add_resources(Resource_SRCS Resources/Points.qrc)
+ SET(Resource_SRCS
+-# ${Resource_SRCS}
++ ${Resource_SRCS}
+ Resources/Points.qrc
+ )
+ SOURCE_GROUP("Resource" FILES ${Resource_SRCS})
+diff --git a/src/Mod/Raytracing/Gui/AppRaytracingGui.cpp b/src/Mod/Raytracing/Gui/AppRaytracingGui.cpp
+index 156bd90..c59369a 100644
+--- a/src/Mod/Raytracing/Gui/AppRaytracingGui.cpp
++++ b/src/Mod/Raytracing/Gui/AppRaytracingGui.cpp
+@@ -32,7 +32,6 @@
+ #include "DlgSettingsRayImp.h"
+ #include "ViewProvider.h"
+ #include "Workbench.h"
+-#include "qrc_Raytracing.cpp"
+
+
+ using namespace RaytracingGui;
+diff --git a/src/Mod/Raytracing/Gui/CMakeLists.txt b/src/Mod/Raytracing/Gui/CMakeLists.txt
+index 38aa739..1da30c9 100644
+--- a/src/Mod/Raytracing/Gui/CMakeLists.txt
++++ b/src/Mod/Raytracing/Gui/CMakeLists.txt
+@@ -43,8 +43,9 @@ set(RaytracingGui_MOC_HDRS
+ fc_wrap_cpp(RaytracingGui_MOC_SRCS ${RaytracingGui_MOC_HDRS})
+ SOURCE_GROUP("Moc" FILES ${RaytracingGui_MOC_SRCS})
+
+-fc_add_resources(Resource_SRCS Resources/Raytracing.qrc)
++qt4_add_resources(Resource_SRCS Resources/Raytracing.qrc)
+ SET(Resource_SRCS
++ ${Resource_SRCS}
+ Resources/Raytracing.qrc
+ )
+ SOURCE_GROUP("Resource" FILES ${Resource_SRCS})
+diff --git a/src/Mod/Test/Gui/AppTestGui.cpp b/src/Mod/Test/Gui/AppTestGui.cpp
+index a027d9d..7c2ef21 100644
+--- a/src/Mod/Test/Gui/AppTestGui.cpp
++++ b/src/Mod/Test/Gui/AppTestGui.cpp
+@@ -28,7 +28,6 @@
+
+ #include "UnitTestPy.h"
+ #include "UnitTestImp.h"
+-#include "qrc_Test.cpp"
+
+ #include <Gui/Language/Translator.h>
+ #include <Base/Console.h>
+diff --git a/src/Mod/Test/Gui/CMakeLists.txt b/src/Mod/Test/Gui/CMakeLists.txt
+index 9b8b672..eaa0dcd 100644
+--- a/src/Mod/Test/Gui/CMakeLists.txt
++++ b/src/Mod/Test/Gui/CMakeLists.txt
+@@ -30,9 +30,9 @@ SET(Dialogs_SRCS
+ )
+ SOURCE_GROUP("Dialogs" FILES ${Dialogs_SRCS})
+
+-fc_add_resources(Resource_SRCS Resources/Test.qrc)
++qt4_add_resources(Resource_SRCS Resources/Test.qrc)
+ SET(Resource_SRCS
+-# ${Resource_SRCS}
++ ${Resource_SRCS}
+ Resources/Test.qrc
+ )
+ SOURCE_GROUP("Resource" FILES ${Resource_SRCS})
diff --git a/media-gfx/freecad/files/freecad-0.13.1830-no-machdist.patch b/media-gfx/freecad/files/freecad-0.13.1830-no-machdist.patch
new file mode 100644
index 000000000000..9e02f1b8b37d
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.13.1830-no-machdist.patch
@@ -0,0 +1,11 @@
+--- src/Mod/CMakeLists.txt 2013-02-02 18:09:17.000000000 +0100
++++ src/Mod/CMakeLists.txt.new 2014-01-19 18:00:27.215825143 +0100
+@@ -18,7 +18,7 @@
+ MESSAGE("Due to the missing Eigen3 library the Sketcher module won't be built")
+ MESSAGE("Due to the missing Eigen3 library the Robot module won't be built")
+ ENDIF(EIGEN3_FOUND)
+-add_subdirectory(Machining_Distortion)
++#add_subdirectory(Machining_Distortion)
+
+ add_subdirectory(ReverseEngineering)
+ add_subdirectory(MeshPart)
diff --git a/media-gfx/freecad/files/freecad-0.13.1830-occ-6.7.patch b/media-gfx/freecad/files/freecad-0.13.1830-occ-6.7.patch
new file mode 100644
index 000000000000..410929bec851
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.13.1830-occ-6.7.patch
@@ -0,0 +1,63 @@
+commit c1d14eab3c3f9f1141dc0b7fca7cc4441431b50b
+Author: wmayer <wmayer@users.sourceforge.net>
+Date: Sat Dec 28 12:22:31 2013 +0100
+
+ + Fix OCC 6.7 build failure
+
+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 <TopoDS.hxx>
+ # include <TopoDS_Wire.hxx>
+ # include <BRepOffsetAPI_MakePipeShell.hxx>
++# include <Standard_Version.hxx>
+ # include <TopTools_ListIteratorOfListOfShape.hxx>
+ #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<Part::TopoShapePy*>(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
+@@ -127,6 +158,7 @@ PyObject* BRepOffsetAPI_MakePipeShellPy::setAuxiliarySpine(PyObject *args)
+ PyObject_IsTrue(curv) ? Standard_True : Standard_False,
+ PyObject_IsTrue(keep) ? Standard_True : Standard_False);
+ Py_Return;
++#endif
+ }
+
+ PyObject* BRepOffsetAPI_MakePipeShellPy::add(PyObject *args)
diff --git a/media-gfx/freecad/files/freecad-0.13.1830-remove-qt3-support.patch b/media-gfx/freecad/files/freecad-0.13.1830-remove-qt3-support.patch
new file mode 100644
index 000000000000..8f761d8796d6
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.13.1830-remove-qt3-support.patch
@@ -0,0 +1,33 @@
+--- freecad-0.13.1830/src/Mod/Arch/Resources/ui/archprefs-base.ui
++++ freecad-0.13.1830/src/Mod/Arch/Resources/ui/archprefs-base.ui
+@@ -309,7 +309,7 @@
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
++ <pixmapfunction></pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>Gui::ColorButton</class>
+--- freecad-0.13.1830/src/Mod/Draft/Resources/ui/userprefs-base.ui
++++ freecad-0.13.1830/src/Mod/Draft/Resources/ui/userprefs-base.ui
+@@ -1185,7 +1185,7 @@
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
++ <pixmapfunction></pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>Gui::FileChooser</class>
+--- freecad-0.13.1830/src/Mod/Draft/Resources/ui/userprefs-import.ui
++++ freecad-0.13.1830/src/Mod/Draft/Resources/ui/userprefs-import.ui
+@@ -536,7 +536,7 @@
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
++ <pixmapfunction></pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>Gui::FileChooser</class>
diff --git a/media-gfx/freecad/files/freecad-0.13.1830-startpage-links.patch b/media-gfx/freecad/files/freecad-0.13.1830-startpage-links.patch
new file mode 100644
index 000000000000..f8af21c2b3e3
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.13.1830-startpage-links.patch
@@ -0,0 +1,97 @@
+commit dbdff257966c65feed6dd9360bc3d50549d9c4c9
+Author: Yorik van Havre <yorik@uncreated.net>
+Date: Thu Sep 12 00:30:59 2013 -0300
+
+ Startpage: Fixed links
+
+diff --git a/src/Mod/Start/StartPage/StartPage.py b/src/Mod/Start/StartPage/StartPage.py
+index 478bf40..43985f3 100644
+--- a/src/Mod/Start/StartPage/StartPage.py
++++ b/src/Mod/Start/StartPage/StartPage.py
+@@ -84,7 +84,7 @@ text34 = translate("StartPage","creation time:")
+ text35 = translate("StartPage","last modified:")
+ text36 = translate("StartPage","location:")
+ text37 = translate("StartPage","User manual")
+-text38 = translate("StartPage","http://sourceforge.net/apps/mediawiki/free-cad/index.php?title=Online_Help_Toc")
++text38 = translate("StartPage","http://www.freecadweb.org/wiki/index.php?title=Online_Help_Toc")
+ text39 = translate("StartPage","Tutorials")
+ text40 = translate("StartPage","Python resources")
+ text41 = translate("StartPage","File not found")
+@@ -97,7 +97,7 @@ text47 = translate("StartPage","The section of the FreeCAd website dedicate dto
+ text48 = translate("StartPage","A blog dedicated to teaching FreeCAD, maintained by members of the FreeCAD community")
+ text49 = translate("StartPage","Getting started")
+ text50 = translate("StartPage","The FreeCAD interface is divided in workbenches, which are sets of tools suited for a specific task. You can start with one of the workbenches in this list, or with the complete workbench, which presents you with some of the most used tools gathered from other workbenches. Click to read more about workbenches on the FreeCAD website.")
+-text51 = translate("StartPage","http://sourceforge.net/apps/mediawiki/free-cad/index.php?title=Workbench_Concept")
++text51 = translate("StartPage","http://www.freecadweb.org/wiki/index.php?title=Workbench_Concept")
+ text52 = translate("StartPage","Ship Design")
+ text53 = translate("StartPage","Designing and calculating ships")
+ text54 = translate("StartPage","The <b>Ship Design</b> module offers several tools to help ship designers to view, model and calculate profiles and other specific properties of ship hulls.")
+@@ -159,7 +159,7 @@ page = """
+ ddiv.innerHTML = "Done fetching";
+ ddiv = document.getElementById("news");
+ ddiv.innerHTML = "Fetching data from the web...";
+- var tobj=new JSONscriptRequest('http://twitter.com/status/user_timeline/FreeCADNews.json?count=10&callback=showTweets');
++ var tobj=new JSONscriptRequest('http://pipes.yahoo.com/pipes/pipe.run?_id=da8b612e97a6bb4588b1ce27db30efd9&_render=json&_callback=showTweets');
+ tobj.buildScriptTag(); // Build the script tag
+ tobj.addScriptTag(); // Execute (add) the script tag
+ ddiv.innerHTML = "Done fetching";
+@@ -182,19 +182,13 @@ page = """
+ ddiv = document.getElementById('news');
+ ddiv.innerHTML = "Received";
+ var html = ['<ul>'];
+- for (var i = 0; i < Math.min(5,data.length); i++) {
+- tf = placeLinks(data[i].text);
+- html.push('<li>',tf,'</li>');
++ for (var i = 0; i < 8; i++) {
++ html.push('<li><a href="', data.value.items[i].link, '">', data.value.items[i].title, '</a></li>');
+ }
+ html.push('</ul>');
+ ddiv.innerHTML = html.join('');
+ }
+
+- function placeLinks(text) {
+- result=text.replace(/(https?:\/\/([-\w\.]+)+(:\d+)?(\/([\w\/_\.]*(\?\S+)?)?)?)/g,'<a href="$1">$1</a>');
+- return result;
+- }
+-
+ </script>
+
+ <style type="text/css">
+@@ -286,12 +280,12 @@ page = """
+ </div>
+
+ <div class="block">
+- <h2>""" + text04 + """ <span class="from">""" + text44 + """</span></h2>
++ <h2>""" + text04 + """</h2>
+ <div id="youtube">youtube videos</div>
+ </div>
+
+ <div class="block">
+- <h2>""" + text05 + """ <span class="from">""" + text42 + """</span></h2>
++ <h2>""" + text05 + """</h2>
+ <div id="news">news feed</div>
+ </div>
+
+@@ -354,7 +348,7 @@ def getLinks():
+ <li><img src="web.png">&nbsp;
+ <a onMouseover="show('<p>""" + text07 + """</p>')"
+ onMouseout="show('')"
+- href="http://free-cad.sf.net/">""" + text08 + """</a></li>
++ href="http://www.freecadweb.org/">""" + text08 + """</a></li>
+ <li><img src="web.png">&nbsp;
+ <a onMouseover="show('<p>""" + text45 + """</p>')"
+ onMouseout="show('')"
+@@ -362,11 +356,11 @@ def getLinks():
+ <li><img src="web.png">&nbsp;
+ <a onMouseover="show('<p>""" + text46 + """</p>')"
+ onMouseout="show('')"
+- href="http://sourceforge.net/apps/mediawiki/free-cad/index.php?title=Tutorials">""" + text39 + """</a></li>
++ href="http://www.freecadweb.org/wiki/index.php?title=Tutorials">""" + text39 + """</a></li>
+ <li><img src="web.png">&nbsp;
+ <a onMouseover="show('<p>""" + text47 + """</p>')"
+ onMouseout="show('')"
+- href="http://sourceforge.net/apps/mediawiki/free-cad/index.php?title=Power_users_hub">""" + text40 + """</a></li>
++ href="http://www.freecadweb.org/wiki/index.php?title=Power_users_hub">""" + text40 + """</a></li>
+ <li><img src="web.png">&nbsp;
+ <a onMouseover="show('<p>""" + text48 + """</p>')"
+ onMouseout="show('')"
diff --git a/media-gfx/freecad/files/freecad-0.14.3702-install-paths.patch b/media-gfx/freecad/files/freecad-0.14.3702-install-paths.patch
new file mode 100644
index 000000000000..d042695e88c6
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.14.3702-install-paths.patch
@@ -0,0 +1,21 @@
+--- freecad-0.14.3702/CMakeLists.txt
++++ freecad-0.14.3702/CMakeLists.txt
+@@ -69,9 +69,15 @@
+ SET(CMAKE_INSTALL_PREFIX "/usr/lib${LIB_SUFFIX}/freecad" CACHE PATH "Installation root directory")
+ endif(WIN32)
+
+-SET(CMAKE_INSTALL_DATADIR data CACHE PATH "Output directory for data and resource files")
+-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")
++if(NOT CMAKE_INSTALL_DATADIR)
++ SET(CMAKE_INSTALL_DATADIR data CACHE PATH "Output directory for data and resource files")
++endif(NOT CMAKE_INSTALL_DATADIR)
++if(NOT CMAKE_INSTALL_INCLUDEDIR)
++ SET(CMAKE_INSTALL_INCLUDEDIR include CACHE PATH "Output directory for header files")
++endif(NOT CMAKE_INSTALL_INCLUDEDIR)
++if(NOT CMAKE_INSTALL_DOCDIR)
++ SET(CMAKE_INSTALL_DOCDIR doc CACHE PATH "Output directory for documentation and license files")
++endif(NOT CMAKE_INSTALL_DOCDIR)
+ # Don't set it without manual adaption of LibDir variable in src/App/FreeCADInit.py
+ SET(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Output directory for libraries")
+