aboutsummaryrefslogtreecommitdiff
path: root/cad
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2007-05-26 19:26:10 +0000
committerThierry Thomas <thierry@FreeBSD.org>2007-05-26 19:26:10 +0000
commit15cbed5e11c43b326b5d7bd7ddb68861ab3f752d (patch)
tree5cbe0a2bdd39e7e29311c413f044c710db6922c6 /cad
parentcf88fd19dae006b41f2e8f85d303d17d30221320 (diff)
downloadports-15cbed5e11c43b326b5d7bd7ddb68861ab3f752d.tar.gz
ports-15cbed5e11c43b326b5d7bd7ddb68861ab3f752d.zip
Notes
Diffstat (limited to 'cad')
-rw-r--r--cad/Makefile1
-rw-r--r--cad/freecad/Makefile79
-rw-r--r--cad/freecad/distinfo3
-rw-r--r--cad/freecad/files/patch-configure47
-rw-r--r--cad/freecad/files/patch-src_App_Application.cpp29
-rw-r--r--cad/freecad/files/patch-src_App_FreeCADInit.py11
-rw-r--r--cad/freecad/files/patch-src_Base_Documentation.cpp16
-rw-r--r--cad/freecad/files/patch-src_Base_EnvMacros.h38
-rw-r--r--cad/freecad/files/patch-src_Base_FileInfo.cpp11
-rw-r--r--cad/freecad/files/patch-src_Base_Parameter.cpp20
-rw-r--r--cad/freecad/files/patch-src_Base_Parameter.h11
-rw-r--r--cad/freecad/files/patch-src_Base_ParameterPy.cpp11
-rw-r--r--cad/freecad/files/patch-src_Base_PyExport.h16
-rw-r--r--cad/freecad/files/patch-src_Base_PyExportImp.h16
-rw-r--r--cad/freecad/files/patch-src_Base_PyTools.c11
-rw-r--r--cad/freecad/files/patch-src_Base_TimeInfo.h12
-rw-r--r--cad/freecad/files/patch-src_FCConfig.h27
-rw-r--r--cad/freecad/files/patch-src_Gui_FreeCADGuiInit.py20
-rw-r--r--cad/freecad/files/patch-src_Gui_Makefile.in28
-rw-r--r--cad/freecad/files/patch-src_Gui_NetworkRetriever.cpp11
-rw-r--r--cad/freecad/files/patch-src_Gui_Process.cpp29
-rw-r--r--cad/freecad/files/patch-src_Gui_PythonConsole.cpp29
-rw-r--r--cad/freecad/files/patch-src_Gui_ReportView.cpp11
-rw-r--r--cad/freecad/files/patch-src_Gui_View3DInventorViewer.cpp11
-rw-r--r--cad/freecad/files/patch-src_Main_MainCmd.cpp11
-rw-r--r--cad/freecad/files/patch-src_Main_MainGui.cpp11
-rw-r--r--cad/freecad/files/patch-src_Main_MainPy.cpp29
-rw-r--r--cad/freecad/files/patch-src_Main_Makefile.in19
-rw-r--r--cad/freecad/files/patch-src_Mod_Image_App_ImageBase.cpp15
-rw-r--r--cad/freecad/files/patch-src_Mod_Mesh_App_Core_MeshIO.cpp58
-rw-r--r--cad/freecad/files/patch-src_Mod_Mesh_App_CurveProjector.cpp11
-rw-r--r--cad/freecad/files/patch-src_Mod_Mesh_App_MeshAlgos.cpp11
-rw-r--r--cad/freecad/files/patch-src_Mod_Part_App_PartAlgos.cpp11
-rw-r--r--cad/freecad/files/patch-src_Mod_Part_Gui_ViewProviderBox.cpp12
-rw-r--r--cad/freecad/files/patch-src_Mod_Points_App_PointsAlgos.cpp11
-rw-r--r--cad/freecad/pkg-descr9
-rw-r--r--cad/freecad/pkg-plist159
37 files changed, 865 insertions, 0 deletions
diff --git a/cad/Makefile b/cad/Makefile
index 195ef3646a37..4583754f21b6 100644
--- a/cad/Makefile
+++ b/cad/Makefile
@@ -22,6 +22,7 @@
SUBDIR += fandango
SUBDIR += feappv
SUBDIR += findhier
+ SUBDIR += freecad
SUBDIR += freehdl
SUBDIR += gdsreader
SUBDIR += gdt
diff --git a/cad/freecad/Makefile b/cad/freecad/Makefile
new file mode 100644
index 000000000000..e5de2d45b455
--- /dev/null
+++ b/cad/freecad/Makefile
@@ -0,0 +1,79 @@
+# New ports collection makefile for: FreeCAD
+# Date created: Sun 1 apr 2007
+# Whom: thierry@pompo.net
+#
+# $FreeBSD$
+#
+
+PORTNAME= FreeCAD
+DISTVERSION= 0.6.472
+CATEGORIES= cad
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= free-cad
+
+MAINTAINER= thierry@FreeBSD.org
+COMMENT= A general purpose 3D CAD modeller
+
+BUILD_DEPENDS= qmake:${PORTSDIR}/devel/qmake \
+ ${LOCALBASE}/lib/libWm4Foundation.a:${PORTSDIR}/graphics/wildmagic
+LIB_DEPENDS= gts.5:${PORTSDIR}/graphics/gts \
+ SoQt.24:${PORTSDIR}/x11-toolkits/soqt \
+ TKernel.0:${PORTSDIR}/cad/opencascade \
+ xerces-c.27:${PORTSDIR}/textproc/xerces-c2
+
+USE_PYTHON= yes
+USE_QT_VER= 3
+USE_GMAKE= yes
+GNU_CONFIGURE= yes
+USE_LDCONFIG= yes
+CONFIGURE_ARGS= --with-wildmagic-includes=${LOCALBASE}/include/Wm4 \
+ --with-wildmagic-libs=${LOCALBASE}/lib \
+ --with-xercesc-includes=${LOCALBASE}/include \
+ --with-xercesc-libs=${LOCALBASE}/lib \
+ --with-OCC-includes=${LOCALBASE}/OpenCAS/ros/inc \
+ --with-OCC-libs=${LOCALBASE}/lib
+CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+QTDIR= ${QT_PREFIX}
+QMAKESPEC= ${LOCALBASE}/share/qt/mkspecs/freebsd-g++
+MAKE_ENV= QMAKESPEC="${QMAKESPEC}" QTDIR="${QTDIR}"
+PLIST_SUB= QTDIR="${QTDIR}"
+
+WM3TOWM4= Core/Approximation.cpp Core/Approximation.h Core/Algorithm.cpp \
+ Core/Algorithm.h Core/Elements.cpp Core/Evaluation.cpp \
+ Core/Tools.h Core/Tools.cpp Core/TopoAlgorithm.cpp \
+ FeatureMeshCurvature.cpp MeshCurvature.cpp MeshPy.cpp \
+ PreCompiled.h
+MOD2FIX= App/FreeCADInit.py Gui/FreeCADGuiInit.py
+
+pre-configure:
+ ${REINPLACE_CMD} -e 's|Wm3|Wm4|g;s|wm3|wm4|g;s|WM3|WM4|g' \
+ -e 's|-lpthread|${PTHREAD_LIBS}|' ${WRKSRC}/${CONFIGURE_SCRIPT}
+.for sf in ${WM3TOWM4}
+ ${REINPLACE_CMD} -e 's|Wm3|Wm4|g;s|wm3|wm4|g;s|WM3|WM4|g' \
+ ${WRKSRC}/src/Mod/Mesh/App/${sf}
+.endfor
+ ${FIND} ${WRKSRC} -name Makefile.in | ${XARGS} \
+ ${REINPLACE_CMD} -e 's|WM3|WM4|g' \
+ -e 's|$$(prefix)/Mod|${DATADIR}/Mod|'
+.for sf in ${MOD2FIX}
+ ${REINPLACE_CMD} -e \
+ 's|/usr/local/share/FreeCAD|${DATADIR}|' \
+ ${WRKSRC}/src/${sf}
+.endfor
+
+pre-build:
+ cd ${WRKSRC}/src/Tools/plugins/widget && \
+ ${SETENV} ${MAKE_ENV} qmake plugin.pro && \
+ ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET}
+
+pre-install:
+ ${MKDIR} ${QTDIR}/plugin/designer
+ ${INSTALL_PROGRAM} \
+ ${WRKSRC}/src/Tools/plugins/widget/plugin/libFreeCAD_widgets.so \
+ ${QTDIR}/plugin/designer
+
+post-install:
+ @${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${DATADIR}/Mod
+ @${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py ${DATADIR}/Mod
+
+.include <bsd.port.mk>
diff --git a/cad/freecad/distinfo b/cad/freecad/distinfo
new file mode 100644
index 000000000000..cc55e287582a
--- /dev/null
+++ b/cad/freecad/distinfo
@@ -0,0 +1,3 @@
+MD5 (FreeCAD-0.6.472.tar.gz) = 2f40b02e96c3aba8b89c233cfd080d1a
+SHA256 (FreeCAD-0.6.472.tar.gz) = 5db66385097abe7dff956e9c25c86cd99bfb08e453443a0cfa456bbd3a84c829
+SIZE (FreeCAD-0.6.472.tar.gz) = 1935746
diff --git a/cad/freecad/files/patch-configure b/cad/freecad/files/patch-configure
new file mode 100644
index 000000000000..d532ced5d64f
--- /dev/null
+++ b/cad/freecad/files/patch-configure
@@ -0,0 +1,47 @@
+--- configure.orig Mon Feb 26 14:00:53 2007
++++ configure Sat Apr 21 23:40:36 2007
+@@ -21008,7 +21008,7 @@
+ fc_py_ac_save_libs=$LIBS
+ CPPFLAGS="$CPPFLAGS -I$fc_py_incs"
+ LDFLAGS="$LDFLAGS -L$fc_py_libs"
+-LIBS="-lpython$fc_py_ver"
++LIBS="-lpython$fc_py_ver -lpthread"
+
+ fc_cv_lib_py_avail=no
+ if test "${ac_cv_header_Python_h+set}" = set; then
+@@ -23737,7 +23737,7 @@
+ echo "configure: could not compile:" >&5
+ cat moc_bnv_qt_test.$ac_ext >&5
+ else
+- bnv_try_3="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o bnv_qt_main.o bnv_qt_main.$ac_ext >/dev/null 2>/dev/null"
++ bnv_try_3="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o bnv_qt_main.o bnv_qt_main.$ac_ext >&5"
+ { (eval echo "$as_me:$LINENO: \"$bnv_try_3\"") >&5
+ (eval $bnv_try_3) 2>&5
+ ac_status=$?
+@@ -23748,7 +23748,7 @@
+ echo "configure: could not compile:" >&5
+ cat bnv_qt_main.$ac_ext >&5
+ else
+- bnv_try_4="$CXX $QT_LIBS $LIBS -o bnv_qt_main bnv_qt_main.o moc_bnv_qt_test.o >/dev/null 2>/dev/null"
++ bnv_try_4="$CXX $QT_LIBS $LIBS -lpthread -o bnv_qt_main bnv_qt_main.o moc_bnv_qt_test.o >&5"
+ { (eval echo "$as_me:$LINENO: \"$bnv_try_4\"") >&5
+ (eval $bnv_try_4) 2>&5
+ ac_status=$?
+@@ -24227,7 +24227,7 @@
+ fc_occ_ac_save_libs=$LIBS
+ CPPFLAGS="$CPPFLAGS -I$fc_occ_incs"
+ LDFLAGS="$LDFLAGS -L$fc_occ_libs"
+-LIBS="-ldl -lTKernel"
++LIBS="-lTKernel -lpthread"
+
+ fc_cv_lib_occ_avail=no
+ if test "${ac_cv_header_Standard_hxx+set}" = set; then
+@@ -24416,7 +24416,7 @@
+
+
+ # Checking for version >= 6.1
+-LIBS="-ldl -lTKernel -lTKMesh -lTKG2d -lTKG3d -lTKTopAlgo -lTKMath -lTKBRep -lTKGeomBase -lTKGeomAlgo"
++LIBS="-lTKernel -lTKMesh -lTKG2d -lTKG3d -lTKTopAlgo -lTKMath -lTKBRep -lTKGeomBase -lTKGeomAlgo -lpthread"
+ fc_cv_lib_occ_ver_6=no
+ if test x"$fc_cv_lib_occ_avail" = xyes; then
+ if test "${ac_cv_header_Standard_hxx+set}" = set; then
diff --git a/cad/freecad/files/patch-src_App_Application.cpp b/cad/freecad/files/patch-src_App_Application.cpp
new file mode 100644
index 000000000000..294499e4baae
--- /dev/null
+++ b/cad/freecad/files/patch-src_App_Application.cpp
@@ -0,0 +1,29 @@
+--- ./src/App/Application.cpp.orig Sat Feb 24 11:35:04 2007
++++ ./src/App/Application.cpp Sun Apr 22 00:17:01 2007
+@@ -29,7 +29,7 @@
+ #ifndef _PreComp_
+ # include <iostream>
+ # include <sstream>
+-# ifdef FC_OS_LINUX
++# if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD)
+ # include <time.h>
+ # include <unistd.h>
+ # endif
+@@ -1157,7 +1157,7 @@
+ // installed as a fallback solution.
+ //
+ // Default paths for the user depending on the platform
+-#if defined(FC_OS_LINUX) || defined(FC_OS_CYGWIN)
++#if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD) || defined(FC_OS_CYGWIN)
+ if(getenv("HOME") != 0)
+ mConfig["UserHomePath"] = getenv("HOME");
+ #elif defined(FC_OS_WIN32)
+@@ -1199,7 +1199,7 @@
+ }
+ }
+
+-#if defined (FC_OS_LINUX)
++#if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD)
+ std::string Application::FindHomePath(const char* sCall)
+ {
+ // We have three ways to start this application either use one of the both executables or
diff --git a/cad/freecad/files/patch-src_App_FreeCADInit.py b/cad/freecad/files/patch-src_App_FreeCADInit.py
new file mode 100644
index 000000000000..be92197d2cf2
--- /dev/null
+++ b/cad/freecad/files/patch-src_App_FreeCADInit.py
@@ -0,0 +1,11 @@
+--- ./src/App/FreeCADInit.py.orig Sat Feb 24 11:35:04 2007
++++ ./src/App/FreeCADInit.py Sun Apr 29 10:04:04 2007
+@@ -52,6 +52,8 @@
+ #print FreeCAD.ConfigGet("HomePath")
+ if os.path.isdir(FreeCAD.ConfigGet("HomePath")+'Mod'):
+ ModDir = FreeCAD.ConfigGet("HomePath")+'Mod'
++ elif sys.platform[:7] == 'freebsd':
++ ModDir = '/usr/local/share/FreeCAD/Mod'
+ else:
+ if os.path.isdir(FreeCAD.ConfigGet("HomePath")+'src\\Mod'):
+ ModDir = FreeCAD.ConfigGet("HomePath")+'src\\Mod'
diff --git a/cad/freecad/files/patch-src_Base_Documentation.cpp b/cad/freecad/files/patch-src_Base_Documentation.cpp
new file mode 100644
index 000000000000..8342eac8da3d
--- /dev/null
+++ b/cad/freecad/files/patch-src_Base_Documentation.cpp
@@ -0,0 +1,16 @@
+--- ./src/Base/Documentation.cpp.orig Sat Feb 24 11:44:54 2007
++++ ./src/Base/Documentation.cpp Sun Apr 22 18:46:43 2007
+@@ -44,6 +44,13 @@
+ # undef _POSIX_C_SOURCE
+ # endif // (re-)defined in pyconfig.h
+ # include <Python.h>
++# undef isspace
++# undef isupper
++# undef islower
++# undef isalpha
++# undef isalnum
++# undef toupper
++# undef tolower
+ # include <iostream>
+ # include <fstream>
+ # include <fcntl.h>
diff --git a/cad/freecad/files/patch-src_Base_EnvMacros.h b/cad/freecad/files/patch-src_Base_EnvMacros.h
new file mode 100644
index 000000000000..2460fb09c926
--- /dev/null
+++ b/cad/freecad/files/patch-src_Base_EnvMacros.h
@@ -0,0 +1,38 @@
+--- ./src/Base/EnvMacros.h.orig Sat Feb 24 11:44:54 2007
++++ ./src/Base/EnvMacros.h Sun Apr 22 00:06:11 2007
+@@ -22,7 +22,7 @@
+ * Juergen Riegel 2002 *
+ ***************************************************************************/
+
+-#if defined (FC_OS_LINUX) || defined(FC_OS_CYGWIN)
++#if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD) || defined(FC_OS_CYGWIN)
+ # include <unistd.h>
+ # include <stdlib.h>
+ # include <string>
+@@ -54,7 +54,7 @@
+
+ void SetEnvironment(const char* sVar, const char* sVal)
+ {
+-#if defined (FC_OS_LINUX) || defined(FC_OS_CYGWIN)
++#if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD) || defined(FC_OS_CYGWIN)
+ setenv(sVar, sVal, 1);
+ //#elif defined (FC_OS_WIN32) // Seems not to work properly!
+ // SetEnvironmentVariable(sVar,sVal);
+@@ -106,7 +106,7 @@
+ }
+ }
+
+-#if defined (FC_OS_LINUX) || defined(FC_OS_CYGWIN)
++#if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD) || defined(FC_OS_CYGWIN)
+ std::string FindHomePathUnix(const char* sCall)
+ {
+ std::string argv = sCall;
+@@ -486,7 +486,7 @@
+ sTempString3 += "dll";
+ sTempString3 += PATHSEP;
+ sTempString3 += "TKOpenGl.dll";
+-#elif defined(FC_OS_LINUX) || defined(FC_OS_CYGWIN)
++#elif defined(FC_OS_LINUX) || defined(FC_OS_FREEBSD) || defined(FC_OS_CYGWIN)
+ sTempString3 += sLib;
+ sTempString3 += "lib";
+ sTempString3 += PATHSEP;
diff --git a/cad/freecad/files/patch-src_Base_FileInfo.cpp b/cad/freecad/files/patch-src_Base_FileInfo.cpp
new file mode 100644
index 000000000000..b017349cfe48
--- /dev/null
+++ b/cad/freecad/files/patch-src_Base_FileInfo.cpp
@@ -0,0 +1,11 @@
+--- ./src/Base/FileInfo.cpp.orig Sat Feb 24 11:44:54 2007
++++ ./src/Base/FileInfo.cpp Sun Apr 22 00:02:40 2007
+@@ -28,7 +28,7 @@
+ #ifndef _PreComp_
+ # include <assert.h>
+ # include <stdio.h>
+-# if defined (FC_OS_LINUX) || defined(FC_OS_CYGWIN)
++# if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD) || defined(FC_OS_CYGWIN)
+ # include <unistd.h>
+ # include <sys/stat.h>
+ # elif defined (FC_OS_WIN32)
diff --git a/cad/freecad/files/patch-src_Base_Parameter.cpp b/cad/freecad/files/patch-src_Base_Parameter.cpp
new file mode 100644
index 000000000000..e1a434862834
--- /dev/null
+++ b/cad/freecad/files/patch-src_Base_Parameter.cpp
@@ -0,0 +1,20 @@
+--- ./src/Base/Parameter.cpp.orig Sat Feb 24 11:44:54 2007
++++ ./src/Base/Parameter.cpp Sun Apr 22 00:07:49 2007
+@@ -52,7 +52,7 @@
+
+
+ #include <fcntl.h>
+-#ifdef FC_OS_LINUX
++#if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD)
+ # include <unistd.h>
+ #endif
+
+@@ -1117,7 +1117,7 @@
+
+ catch(const XMLException& toCatch)
+ {
+-#if defined(FC_OS_LINUX) || defined(FC_OS_CYGWIN)
++#if defined(FC_OS_LINUX) || defined(FC_OS_FREEBSD) || defined(FC_OS_CYGWIN)
+ std::ostringstream err;
+ #else
+ std::stringstream err;
diff --git a/cad/freecad/files/patch-src_Base_Parameter.h b/cad/freecad/files/patch-src_Base_Parameter.h
new file mode 100644
index 000000000000..5a87cfeee1de
--- /dev/null
+++ b/cad/freecad/files/patch-src_Base_Parameter.h
@@ -0,0 +1,11 @@
+--- ./src/Base/Parameter.h.orig Sat Feb 24 11:44:54 2007
++++ ./src/Base/Parameter.h Sun Apr 22 00:09:23 2007
+@@ -40,7 +40,7 @@
+
+
+ // Include files
+-#ifdef FC_OS_LINUX
++#if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD)
+ # include <sstream>
+ #endif
+ #include <map>
diff --git a/cad/freecad/files/patch-src_Base_ParameterPy.cpp b/cad/freecad/files/patch-src_Base_ParameterPy.cpp
new file mode 100644
index 000000000000..25e8bc6df35f
--- /dev/null
+++ b/cad/freecad/files/patch-src_Base_ParameterPy.cpp
@@ -0,0 +1,11 @@
+--- ./src/Base/ParameterPy.cpp.orig Sat Feb 24 11:44:54 2007
++++ ./src/Base/ParameterPy.cpp Sun Apr 22 00:10:34 2007
+@@ -39,7 +39,7 @@
+
+
+ #include <fcntl.h>
+-#ifdef FC_OS_LINUX
++#if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD)
+ # include <unistd.h>
+ #endif
+
diff --git a/cad/freecad/files/patch-src_Base_PyExport.h b/cad/freecad/files/patch-src_Base_PyExport.h
new file mode 100644
index 000000000000..27455ec1bb86
--- /dev/null
+++ b/cad/freecad/files/patch-src_Base_PyExport.h
@@ -0,0 +1,16 @@
+--- ./src/Base/PyExport.h.orig Sat Feb 24 11:44:54 2007
++++ ./src/Base/PyExport.h Sun Apr 22 10:49:49 2007
+@@ -19,6 +19,13 @@
+
+ #undef slots
+ #include <Python.h>
++#undef isspace
++#undef isupper
++#undef islower
++#undef isalpha
++#undef isalnum
++#undef toupper
++#undef tolower
+ #define slots
+ //#include <iostream>
+ //#include <typeinfo>
diff --git a/cad/freecad/files/patch-src_Base_PyExportImp.h b/cad/freecad/files/patch-src_Base_PyExportImp.h
new file mode 100644
index 000000000000..7852c2063db9
--- /dev/null
+++ b/cad/freecad/files/patch-src_Base_PyExportImp.h
@@ -0,0 +1,16 @@
+--- ./src/Base/PyExportImp.h.orig Sat Feb 24 11:44:54 2007
++++ ./src/Base/PyExportImp.h Sun Apr 22 11:33:01 2007
+@@ -33,6 +33,13 @@
+ // needed header
+ #undef slots
+ # include <Python.h>
++#undef isspace
++#undef isupper
++#undef islower
++#undef isalpha
++#undef isalnum
++#undef toupper
++#undef tolower
+ #define slots
+ #include <iostream>
+
diff --git a/cad/freecad/files/patch-src_Base_PyTools.c b/cad/freecad/files/patch-src_Base_PyTools.c
new file mode 100644
index 000000000000..97ed71d81324
--- /dev/null
+++ b/cad/freecad/files/patch-src_Base_PyTools.c
@@ -0,0 +1,11 @@
+--- ./src/Base/PyTools.c.orig Sat Feb 24 11:44:54 2007
++++ ./src/Base/PyTools.c Sun Apr 22 00:12:29 2007
+@@ -447,7 +447,7 @@
+ int res; /* interact with python, in "__main__" */
+ Py_Initialize(); /* in the program's "stdio" window */
+ if (prompt != NULL)
+-#if defined (FC_OS_LINUX) || defined(FC_OS_CYGWIN)
++#if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD) || defined(FC_OS_CYGWIN)
+ printf("[%s <Use Ctrl-D (i.e. EOF) to exit.>]\n", prompt);
+ #else
+ printf("[%s <Use Ctrl-Z plus Return to exit.>]\n", prompt);
diff --git a/cad/freecad/files/patch-src_Base_TimeInfo.h b/cad/freecad/files/patch-src_Base_TimeInfo.h
new file mode 100644
index 000000000000..a446e3d188ae
--- /dev/null
+++ b/cad/freecad/files/patch-src_Base_TimeInfo.h
@@ -0,0 +1,12 @@
+--- ./src/Base/TimeInfo.h.orig Sat Feb 24 11:44:54 2007
++++ ./src/Base/TimeInfo.h Sun Apr 22 11:09:07 2007
+@@ -28,8 +28,8 @@
+
+
+ #include <stdio.h>
+-#include <sys/timeb.h>
+ #include <time.h>
++#include <sys/timeb.h>
+
+ namespace Base
+ {
diff --git a/cad/freecad/files/patch-src_FCConfig.h b/cad/freecad/files/patch-src_FCConfig.h
new file mode 100644
index 000000000000..b0092e5da687
--- /dev/null
+++ b/cad/freecad/files/patch-src_FCConfig.h
@@ -0,0 +1,27 @@
+--- ./src/FCConfig.h.orig Sat Feb 24 11:44:55 2007
++++ ./src/FCConfig.h Sun Apr 22 22:02:51 2007
+@@ -71,8 +71,10 @@
+ //# endif
+ //#elif defined(hpux) || defined(__hpux) || defined(__hpux__)
+ //# define FC_OS_HPUX_
+-//#elif defined(__FreeBSD__)
+-//# define FC_OS_FREEBSD
++#elif defined(__FreeBSD__)
++# ifndef FC_OS_FREEBSD
++# define FC_OS_FREEBSD
++# endif
+ //#elif defined(__NetBSD__)
+ //# define FC_OS_NETBSD
+ //#elif defined(__OpenBSD__)
+@@ -159,6 +161,11 @@
+ # define _WINDOWS
+ # endif
+ #endif
++
++#ifdef FC_OS_FREEBSD
++# define FREEBSD
++#endif
++
+
+ #ifdef FC_OS_LINUX
+ # define LIN
diff --git a/cad/freecad/files/patch-src_Gui_FreeCADGuiInit.py b/cad/freecad/files/patch-src_Gui_FreeCADGuiInit.py
new file mode 100644
index 000000000000..27f093428559
--- /dev/null
+++ b/cad/freecad/files/patch-src_Gui_FreeCADGuiInit.py
@@ -0,0 +1,20 @@
+--- ./src/Gui/FreeCADGuiInit.py.orig Sat Feb 24 11:41:26 2007
++++ ./src/Gui/FreeCADGuiInit.py Sun Apr 29 10:08:42 2007
+@@ -31,7 +31,7 @@
+
+
+ # imports the one and only
+-import FreeCAD, FreeCADGui
++import FreeCAD, FreeCADGui, sys
+
+ # shortcuts
+ Gui = FreeCADGui
+@@ -83,6 +83,8 @@
+ #print FreeCAD.ConfigGet("HomePath")
+ if os.path.isdir(FreeCAD.ConfigGet("HomePath")+'Mod'):
+ ModDir = FreeCAD.ConfigGet("HomePath")+'Mod'
++ elif sys.platform[:7] == 'freebsd':
++ ModDir = '/usr/local/share/FreeCAD/Mod'
+ else:
+ if os.path.isdir(FreeCAD.ConfigGet("HomePath")+'src\\Mod'):
+ ModDir = FreeCAD.ConfigGet("HomePath")+'src\\Mod'
diff --git a/cad/freecad/files/patch-src_Gui_Makefile.in b/cad/freecad/files/patch-src_Gui_Makefile.in
new file mode 100644
index 000000000000..c08d80865d82
--- /dev/null
+++ b/cad/freecad/files/patch-src_Gui_Makefile.in
@@ -0,0 +1,28 @@
+--- ./src/Gui/Makefile.in.orig Mon Feb 26 14:00:45 2007
++++ ./src/Gui/Makefile.in Mon Apr 23 22:16:25 2007
+@@ -996,20 +996,20 @@
+ uninstall-info-am:
+ install-dataDATA: $(data_DATA)
+ @$(NORMAL_INSTALL)
+- test -z "$(datadir)" || $(mkdir_p) "$(DESTDIR)$(datadir)"
++ test -z "$(pkgdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgdatadir)"
+ @list='$(data_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+- echo " $(dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(datadir)/$$f'"; \
+- $(dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(datadir)/$$f"; \
++ echo " $(dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \
++ $(dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \
+ done
+
+ uninstall-dataDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(data_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+- echo " rm -f '$(DESTDIR)$(datadir)/$$f'"; \
+- rm -f "$(DESTDIR)$(datadir)/$$f"; \
++ echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
++ rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
+ done
+
+ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
diff --git a/cad/freecad/files/patch-src_Gui_NetworkRetriever.cpp b/cad/freecad/files/patch-src_Gui_NetworkRetriever.cpp
new file mode 100644
index 000000000000..385af60cee56
--- /dev/null
+++ b/cad/freecad/files/patch-src_Gui_NetworkRetriever.cpp
@@ -0,0 +1,11 @@
+--- ./src/Gui/NetworkRetriever.cpp.orig Sat Feb 24 11:41:26 2007
++++ ./src/Gui/NetworkRetriever.cpp Sun Apr 22 00:18:44 2007
+@@ -361,7 +361,7 @@
+ // start URL
+ (*wget)<< startUrl;
+
+-#ifdef FC_OS_LINUX
++#if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD)
+ // on Linux it seems that we have to change cwd
+ QString cwd = QDir::currentDirPath ();
+ if ( !d->dir.isEmpty() )
diff --git a/cad/freecad/files/patch-src_Gui_Process.cpp b/cad/freecad/files/patch-src_Gui_Process.cpp
new file mode 100644
index 000000000000..9a5b2df4092d
--- /dev/null
+++ b/cad/freecad/files/patch-src_Gui_Process.cpp
@@ -0,0 +1,29 @@
+--- ./src/Gui/Process.cpp.orig Sat Feb 24 11:41:26 2007
++++ ./src/Gui/Process.cpp Sun Apr 22 00:20:17 2007
+@@ -232,7 +232,7 @@
+ {
+ #ifdef FC_OS_WIN32
+ sprintf(szPath, "%s;%s", env["PATH"].latin1(), path.latin1());
+-#elif defined (FC_OS_LINUX) || defined (FC_OS_CYGWIN)
++#elif defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD) || defined(FC_OS_CYGWIN)
+ sprintf(szPath, "%s:%s", env["PATH"].latin1(), path.latin1());
+ #else
+ Base::Console().Warning("Not yet implemented!\n");
+@@ -243,7 +243,7 @@
+ {
+ #ifdef FC_OS_WIN32
+ sprintf(szPath, "%s;%s", getenv("PATH"), path.latin1());
+-#elif defined (FC_OS_LINUX) || defined (FC_OS_CYGWIN)
++#elif defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD) || defined(FC_OS_CYGWIN)
+ sprintf(szPath, "%s:%s", getenv("PATH"), path.latin1());
+ #else
+ Base::Console().Warning("Not yet implemented!\n");
+@@ -276,7 +276,7 @@
+ {
+ #ifdef FC_OS_WIN32
+ ::SetEnvironmentVariable (it.key().latin1(), it.data().latin1());
+-#elif defined (FC_OS_LINUX) || defined (FC_OS_CYGWIN)
++#elif defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD) || defined(FC_OS_CYGWIN)
+ setenv(it.key().latin1(), it.data().latin1(), 1);
+ #else
+ Base::Console().Warning("Not yet implemented!\n");
diff --git a/cad/freecad/files/patch-src_Gui_PythonConsole.cpp b/cad/freecad/files/patch-src_Gui_PythonConsole.cpp
new file mode 100644
index 000000000000..e756a8e2d2aa
--- /dev/null
+++ b/cad/freecad/files/patch-src_Gui_PythonConsole.cpp
@@ -0,0 +1,29 @@
+--- ./src/Gui/PythonConsole.cpp.orig Sat Feb 24 11:41:26 2007
++++ ./src/Gui/PythonConsole.cpp Sun Apr 22 00:21:56 2007
+@@ -75,7 +75,7 @@
+ hPrefGrp->Attach( this );
+
+ zoomIn(2);
+-#ifdef FC_OS_LINUX
++#if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD)
+ QFont serifFont( "Courier", 15, QFont::Normal );
+ #else
+ QFont serifFont( "Courier", 10, QFont::Normal );
+@@ -182,7 +182,7 @@
+ font.setBold( false ); // if current font is bold we must reset it first
+ if (strcmp(sReason, "FontSize") == 0)
+ {
+-#ifdef FC_OS_LINUX
++#if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD)
+ QString txt = hPrefGrp->GetASCII( "FontSize", "15" ).c_str();
+ #else
+ QString txt = hPrefGrp->GetASCII( "FontSize", "10" ).c_str();
+@@ -190,7 +190,7 @@
+
+ bool ok;
+ int size = txt.toInt(&ok);
+-#ifdef FC_OS_LINUX
++#if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD)
+ if ( !ok ) size = 15;
+ #else
+ if ( !ok ) size = 10;
diff --git a/cad/freecad/files/patch-src_Gui_ReportView.cpp b/cad/freecad/files/patch-src_Gui_ReportView.cpp
new file mode 100644
index 000000000000..0b7ecff03404
--- /dev/null
+++ b/cad/freecad/files/patch-src_Gui_ReportView.cpp
@@ -0,0 +1,11 @@
+--- ./src/Gui/ReportView.cpp.orig Sat Feb 24 11:41:26 2007
++++ ./src/Gui/ReportView.cpp Sun Apr 22 00:23:02 2007
+@@ -241,7 +241,7 @@
+ {
+ QFont _font( font() );
+ _font.setFamily( "Courier" );
+-#ifdef FC_OS_LINUX
++#if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD)
+ _font.setPointSize( 15 );
+ #else
+ _font.setPointSize( 10 );
diff --git a/cad/freecad/files/patch-src_Gui_View3DInventorViewer.cpp b/cad/freecad/files/patch-src_Gui_View3DInventorViewer.cpp
new file mode 100644
index 000000000000..365f53e90c7e
--- /dev/null
+++ b/cad/freecad/files/patch-src_Gui_View3DInventorViewer.cpp
@@ -0,0 +1,11 @@
+--- ./src/Gui/View3DInventorViewer.cpp.orig Sat Feb 24 11:41:26 2007
++++ ./src/Gui/View3DInventorViewer.cpp Sun Apr 22 00:24:07 2007
+@@ -290,7 +290,7 @@
+
+ void View3DInventorViewer::setEnabledFPSCounter(bool b)
+ {
+-#if defined (FC_OS_LINUX) || defined(FC_OS_CYGWIN)
++#if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD) || defined(FC_OS_CYGWIN)
+ setenv("COIN_SHOW_FPS_COUNTER", (b?"1":"0"), 1);
+ #else
+ b ? _putenv ("COIN_SHOW_FPS_COUNTER=1") : _putenv ("COIN_SHOW_FPS_COUNTER=0");
diff --git a/cad/freecad/files/patch-src_Main_MainCmd.cpp b/cad/freecad/files/patch-src_Main_MainCmd.cpp
new file mode 100644
index 000000000000..fcfb205c399e
--- /dev/null
+++ b/cad/freecad/files/patch-src_Main_MainCmd.cpp
@@ -0,0 +1,11 @@
+--- ./src/Main/MainCmd.cpp.orig Mon Feb 26 10:36:38 2007
++++ ./src/Main/MainCmd.cpp Sun Apr 22 00:33:00 2007
+@@ -28,7 +28,7 @@
+ # include <sstream>
+ #endif
+
+-#ifdef FC_LINUX
++#if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD)
+ # include <unistd.h>
+ #endif
+
diff --git a/cad/freecad/files/patch-src_Main_MainGui.cpp b/cad/freecad/files/patch-src_Main_MainGui.cpp
new file mode 100644
index 000000000000..634201381174
--- /dev/null
+++ b/cad/freecad/files/patch-src_Main_MainGui.cpp
@@ -0,0 +1,11 @@
+--- ./src/Main/MainGui.cpp.orig Mon Feb 26 10:36:38 2007
++++ ./src/Main/MainGui.cpp Sun Apr 22 00:32:00 2007
+@@ -27,7 +27,7 @@
+ # undef _PreComp_
+ #endif
+
+-#ifdef FC_LINUX
++#if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD)
+ # include <unistd.h>
+ #endif
+
diff --git a/cad/freecad/files/patch-src_Main_MainPy.cpp b/cad/freecad/files/patch-src_Main_MainPy.cpp
new file mode 100644
index 000000000000..4fe18a8aa36f
--- /dev/null
+++ b/cad/freecad/files/patch-src_Main_MainPy.cpp
@@ -0,0 +1,29 @@
+--- ./src/Main/MainPy.cpp.orig Mon Feb 26 10:36:38 2007
++++ ./src/Main/MainPy.cpp Sun Apr 22 00:25:41 2007
+@@ -28,7 +28,7 @@
+ # include <sstream>
+ #endif
+
+-#ifdef FC_LINUX
++#if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD)
+ # include <unistd.h>
+ #endif
+
+@@ -71,7 +71,7 @@
+
+ return TRUE;
+ }
+-#elif defined(FC_OS_LINUX)
++#elif defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD)
+ # ifndef GNU_SOURCE
+ # define GNU_SOURCE
+ # endif
+@@ -109,7 +109,7 @@
+
+ #if defined(FC_OS_WIN32)
+ strcpy(argv[0],App::Application::Config()["HomePath"].c_str());
+-#elif defined(FC_OS_LINUX)
++#elif defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD)
+ // get whole path of the library
+ Dl_info info;
+ int ret = dladdr((void*)initFreeCAD, &info);
diff --git a/cad/freecad/files/patch-src_Main_Makefile.in b/cad/freecad/files/patch-src_Main_Makefile.in
new file mode 100644
index 000000000000..0ceb1c379416
--- /dev/null
+++ b/cad/freecad/files/patch-src_Main_Makefile.in
@@ -0,0 +1,19 @@
+--- ./src/Main/Makefile.in.orig Mon Feb 26 14:00:45 2007
++++ ./src/Main/Makefile.in Sun Apr 22 14:36:18 2007
+@@ -127,7 +127,7 @@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LDFLAGS = @LDFLAGS@
+ LIBOBJS = @LIBOBJS@
+-LIBS = @LIBS@
++LIBS = @LIBS@ -lcompat
+ LIBTOOL = @LIBTOOL@
+ LIB_AGE = @LIB_AGE@
+ LIB_CURRENT = @LIB_CURRENT@
+@@ -271,7 +271,6 @@
+ # the library search path.
+ FreeCAD_la_LDFLAGS = -L../Base -L../App $(all_libraries) -version-info @LIB_CURRENT@:@LIB_REVISION@:@LIB_AGE@ -module -avoid-version
+ FreeCAD_la_LIBADD = \
+- -ldl \
+ -l@PYTHON_LIB@ \
+ -lFreeCADBase \
+ -lFreeCADApp
diff --git a/cad/freecad/files/patch-src_Mod_Image_App_ImageBase.cpp b/cad/freecad/files/patch-src_Mod_Image_App_ImageBase.cpp
new file mode 100644
index 000000000000..660e079e818b
--- /dev/null
+++ b/cad/freecad/files/patch-src_Mod_Image_App_ImageBase.cpp
@@ -0,0 +1,15 @@
+--- ./src/Mod/Image/App/ImageBase.cpp.orig Sat Feb 24 11:32:27 2007
++++ ./src/Mod/Image/App/ImageBase.cpp Mon Apr 23 00:11:39 2007
+@@ -16,7 +16,11 @@
+ ***************************************************************************/
+
+ #include "PreCompiled.h"
+-#include <malloc.h>
++#if defined(__FreeBSD__)
++# include <stdlib.h>
++#else
++# include <malloc.h>
++#endif
+ #include <math.h>
+
+ #include "ImageBase.h"
diff --git a/cad/freecad/files/patch-src_Mod_Mesh_App_Core_MeshIO.cpp b/cad/freecad/files/patch-src_Mod_Mesh_App_Core_MeshIO.cpp
new file mode 100644
index 000000000000..e0e7f1677932
--- /dev/null
+++ b/cad/freecad/files/patch-src_Mod_Mesh_App_Core_MeshIO.cpp
@@ -0,0 +1,58 @@
+--- ./src/Mod/Mesh/App/Core/MeshIO.cpp.orig Sat Feb 24 11:34:01 2007
++++ ./src/Mod/Mesh/App/Core/MeshIO.cpp Sun Apr 22 22:02:35 2007
+@@ -38,6 +38,55 @@
+
+ #include <math.h>
+
++#if defined(FC_OS_NETBSD) || defined(FC_OS_FREEBSD)
++// Borrowed from the FreeBSD port editors/openoffice.org-1.0
++
++char *fcvt(double value, int ndigit, int *decpt, int *sign)
++{
++ static char ret[256];
++ char buf[256],zahl[256],format[256]="%";
++ char *v1,*v2;
++
++ if (value==0.0) value=1e-30;
++
++ if (value<0.0) *sign=1; else *sign=0;
++
++ if (value<1.0)
++ {
++ *decpt=(int)log10(value);
++ value*=pow(10.0,1-*decpt);
++ ndigit+=*decpt-1;
++ if (ndigit<0) ndigit=0;
++ }
++ else
++ {
++ *decpt=(int)log10(value)+1;
++ }
++
++ sprintf(zahl,"%d",ndigit);
++ strcat(format,zahl);
++ strcat(format,".");
++ strcat(format,zahl);
++ strcat(format,"f");
++
++ sprintf(buf,format,value);
++
++ if (ndigit!=0)
++ {
++ v1=strtok(buf,".");
++ v2=strtok(NULL,".");
++ strcpy(ret,v1);
++ strcat(ret,v2);
++ }
++ else
++ {
++ strcpy(ret,buf);
++ }
++
++ return(ret);
++}
++
++#endif
+
+ using namespace MeshCore;
+
diff --git a/cad/freecad/files/patch-src_Mod_Mesh_App_CurveProjector.cpp b/cad/freecad/files/patch-src_Mod_Mesh_App_CurveProjector.cpp
new file mode 100644
index 000000000000..e7968205743b
--- /dev/null
+++ b/cad/freecad/files/patch-src_Mod_Mesh_App_CurveProjector.cpp
@@ -0,0 +1,11 @@
+--- ./src/Mod/Mesh/App/CurveProjector.cpp.orig Sat Feb 24 11:34:07 2007
++++ ./src/Mod/Mesh/App/CurveProjector.cpp Sun Apr 22 00:27:59 2007
+@@ -23,7 +23,7 @@
+
+ #include "PreCompiled.h"
+ #ifndef _PreComp_
+-# ifdef FC_OS_LINUX
++# if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD)
+ # include <unistd.h>
+ # endif
+ #endif
diff --git a/cad/freecad/files/patch-src_Mod_Mesh_App_MeshAlgos.cpp b/cad/freecad/files/patch-src_Mod_Mesh_App_MeshAlgos.cpp
new file mode 100644
index 000000000000..4242a5fb20f9
--- /dev/null
+++ b/cad/freecad/files/patch-src_Mod_Mesh_App_MeshAlgos.cpp
@@ -0,0 +1,11 @@
+--- ./src/Mod/Mesh/App/MeshAlgos.cpp.orig Sat Feb 24 11:34:07 2007
++++ ./src/Mod/Mesh/App/MeshAlgos.cpp Sun Apr 22 00:35:44 2007
+@@ -23,7 +23,7 @@
+
+ #include "PreCompiled.h"
+ #ifndef _PreComp_
+-# ifdef FC_OS_LINUX
++# if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD)
+ # include <unistd.h>
+ # endif
+ #endif
diff --git a/cad/freecad/files/patch-src_Mod_Part_App_PartAlgos.cpp b/cad/freecad/files/patch-src_Mod_Part_App_PartAlgos.cpp
new file mode 100644
index 000000000000..dcde0a96e13f
--- /dev/null
+++ b/cad/freecad/files/patch-src_Mod_Part_App_PartAlgos.cpp
@@ -0,0 +1,11 @@
+--- ./src/Mod/Part/App/PartAlgos.cpp.orig Sat Feb 24 11:33:05 2007
++++ ./src/Mod/Part/App/PartAlgos.cpp Sun Apr 22 00:26:46 2007
+@@ -23,7 +23,7 @@
+
+ #include "PreCompiled.h"
+ #ifndef _PreComp_
+-# ifdef FC_OS_LINUX
++# if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD)
+ # include <unistd.h>
+ # endif
+ # include <BRep_Builder.hxx>
diff --git a/cad/freecad/files/patch-src_Mod_Part_Gui_ViewProviderBox.cpp b/cad/freecad/files/patch-src_Mod_Part_Gui_ViewProviderBox.cpp
new file mode 100644
index 000000000000..2e47cae968fc
--- /dev/null
+++ b/cad/freecad/files/patch-src_Mod_Part_Gui_ViewProviderBox.cpp
@@ -0,0 +1,12 @@
+--- ./src/Mod/Part/Gui/ViewProviderBox.cpp.orig Sat Feb 24 11:33:17 2007
++++ ./src/Mod/Part/Gui/ViewProviderBox.cpp Sun Apr 22 15:01:24 2007
+@@ -20,6 +20,9 @@
+ * *
+ ***************************************************************************/
+
++#include <vector>
++#include <string>
++using namespace std;
+
+ #include "PreCompiled.h"
+
diff --git a/cad/freecad/files/patch-src_Mod_Points_App_PointsAlgos.cpp b/cad/freecad/files/patch-src_Mod_Points_App_PointsAlgos.cpp
new file mode 100644
index 000000000000..1bc0b750d89f
--- /dev/null
+++ b/cad/freecad/files/patch-src_Mod_Points_App_PointsAlgos.cpp
@@ -0,0 +1,11 @@
+--- ./src/Mod/Points/App/PointsAlgos.cpp.orig Sat Feb 24 11:34:34 2007
++++ ./src/Mod/Points/App/PointsAlgos.cpp Sun Apr 22 00:29:09 2007
+@@ -23,7 +23,7 @@
+
+ #include "PreCompiled.h"
+ #ifndef _PreComp_
+-# ifdef FC_OS_LINUX
++# if defined (FC_OS_LINUX) || defined(FC_OS_FREEBSD)
+ # include <unistd.h>
+ # endif
+ #endif
diff --git a/cad/freecad/pkg-descr b/cad/freecad/pkg-descr
new file mode 100644
index 000000000000..2386f60e535c
--- /dev/null
+++ b/cad/freecad/pkg-descr
@@ -0,0 +1,9 @@
+FreeCAD is an OpenSource CAD/CAE, 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.
+
+Warning: FreeCAD is still in ALPHA state and not in shape for end user usage!
+
+WWW: http://juergen-riegel.net/FreeCAD/Docu/
diff --git a/cad/freecad/pkg-plist b/cad/freecad/pkg-plist
new file mode 100644
index 000000000000..8215bda2284e
--- /dev/null
+++ b/cad/freecad/pkg-plist
@@ -0,0 +1,159 @@
+bin/FreeCAD
+bin/FreeCADCmd
+include/PreCompiled.h
+lib/FreeCAD.la
+lib/FreeCAD.so
+lib/libFreeCADApp.la
+lib/libFreeCADApp.so
+lib/libFreeCADApp.so.2
+lib/libFreeCADBase.la
+lib/libFreeCADBase.so
+lib/libFreeCADBase.so.2
+lib/libFreeCADGui.la
+lib/libFreeCADGui.so
+lib/libFreeCADGui.so.2
+%%DATADIR%%/Mod/Image/Image.la
+%%DATADIR%%/Mod/Image/Image.so
+%%DATADIR%%/Mod/Image/ImageGui.la
+%%DATADIR%%/Mod/Image/ImageGui.so
+%%DATADIR%%/Mod/Image/Init.py
+%%DATADIR%%/Mod/Image/Init.pyc
+%%DATADIR%%/Mod/Image/Init.pyo
+%%DATADIR%%/Mod/Image/InitGui.py
+%%DATADIR%%/Mod/Image/InitGui.pyc
+%%DATADIR%%/Mod/Image/InitGui.pyo
+%%DATADIR%%/Mod/Image/libImage.la
+%%DATADIR%%/Mod/Image/libImage.so
+%%DATADIR%%/Mod/Image/libImage.so.2
+%%DATADIR%%/Mod/Image/libImageGui.la
+%%DATADIR%%/Mod/Image/libImageGui.so
+%%DATADIR%%/Mod/Image/libImageGui.so.2
+%%DATADIR%%/Mod/Mesh/BuildRegularGeoms.py
+%%DATADIR%%/Mod/Mesh/BuildRegularGeoms.pyc
+%%DATADIR%%/Mod/Mesh/BuildRegularGeoms.pyo
+%%DATADIR%%/Mod/Mesh/Init.py
+%%DATADIR%%/Mod/Mesh/Init.pyc
+%%DATADIR%%/Mod/Mesh/Init.pyo
+%%DATADIR%%/Mod/Mesh/InitGui.py
+%%DATADIR%%/Mod/Mesh/InitGui.pyc
+%%DATADIR%%/Mod/Mesh/InitGui.pyo
+%%DATADIR%%/Mod/Mesh/Mesh.la
+%%DATADIR%%/Mod/Mesh/Mesh.so
+%%DATADIR%%/Mod/Mesh/MeshGui.la
+%%DATADIR%%/Mod/Mesh/MeshGui.so
+%%DATADIR%%/Mod/Mesh/libMesh.la
+%%DATADIR%%/Mod/Mesh/libMesh.so
+%%DATADIR%%/Mod/Mesh/libMesh.so.2
+%%DATADIR%%/Mod/Mesh/libMeshGui.la
+%%DATADIR%%/Mod/Mesh/libMeshGui.so
+%%DATADIR%%/Mod/Mesh/libMeshGui.so.2
+%%DATADIR%%/Mod/Part/Init.py
+%%DATADIR%%/Mod/Part/Init.pyc
+%%DATADIR%%/Mod/Part/Init.pyo
+%%DATADIR%%/Mod/Part/InitGui.py
+%%DATADIR%%/Mod/Part/InitGui.pyc
+%%DATADIR%%/Mod/Part/InitGui.pyo
+%%DATADIR%%/Mod/Part/Part.la
+%%DATADIR%%/Mod/Part/Part.so
+%%DATADIR%%/Mod/Part/PartGui.la
+%%DATADIR%%/Mod/Part/PartGui.so
+%%DATADIR%%/Mod/Part/libPart.la
+%%DATADIR%%/Mod/Part/libPart.so
+%%DATADIR%%/Mod/Part/libPart.so.2
+%%DATADIR%%/Mod/Part/libPartGui.la
+%%DATADIR%%/Mod/Part/libPartGui.so
+%%DATADIR%%/Mod/Part/libPartGui.so.2
+%%DATADIR%%/Mod/Points/Init.py
+%%DATADIR%%/Mod/Points/Init.pyc
+%%DATADIR%%/Mod/Points/Init.pyo
+%%DATADIR%%/Mod/Points/InitGui.py
+%%DATADIR%%/Mod/Points/InitGui.pyc
+%%DATADIR%%/Mod/Points/InitGui.pyo
+%%DATADIR%%/Mod/Points/Points.la
+%%DATADIR%%/Mod/Points/Points.so
+%%DATADIR%%/Mod/Points/PointsGui.la
+%%DATADIR%%/Mod/Points/PointsGui.so
+%%DATADIR%%/Mod/Points/libPoints.la
+%%DATADIR%%/Mod/Points/libPoints.so
+%%DATADIR%%/Mod/Points/libPoints.so.2
+%%DATADIR%%/Mod/Points/libPointsGui.la
+%%DATADIR%%/Mod/Points/libPointsGui.so
+%%DATADIR%%/Mod/Points/libPointsGui.so.2
+%%DATADIR%%/Mod/Raytracing/Init.py
+%%DATADIR%%/Mod/Raytracing/Init.pyc
+%%DATADIR%%/Mod/Raytracing/Init.pyo
+%%DATADIR%%/Mod/Raytracing/InitGui.py
+%%DATADIR%%/Mod/Raytracing/InitGui.pyc
+%%DATADIR%%/Mod/Raytracing/InitGui.pyo
+%%DATADIR%%/Mod/Raytracing/Raytracing.la
+%%DATADIR%%/Mod/Raytracing/Raytracing.so
+%%DATADIR%%/Mod/Raytracing/RaytracingGui.la
+%%DATADIR%%/Mod/Raytracing/RaytracingGui.so
+%%DATADIR%%/Mod/Raytracing/libRaytracing.la
+%%DATADIR%%/Mod/Raytracing/libRaytracing.so
+%%DATADIR%%/Mod/Raytracing/libRaytracing.so.2
+%%DATADIR%%/Mod/Raytracing/libRaytracingGui.la
+%%DATADIR%%/Mod/Raytracing/libRaytracingGui.so
+%%DATADIR%%/Mod/Raytracing/libRaytracingGui.so.2
+%%DATADIR%%/Mod/Test/Base.py
+%%DATADIR%%/Mod/Test/Base.pyc
+%%DATADIR%%/Mod/Test/Base.pyo
+%%DATADIR%%/Mod/Test/Document.py
+%%DATADIR%%/Mod/Test/Document.pyc
+%%DATADIR%%/Mod/Test/Document.pyo
+%%DATADIR%%/Mod/Test/Init.py
+%%DATADIR%%/Mod/Test/Init.pyc
+%%DATADIR%%/Mod/Test/Init.pyo
+%%DATADIR%%/Mod/Test/InitGui.py
+%%DATADIR%%/Mod/Test/InitGui.pyc
+%%DATADIR%%/Mod/Test/InitGui.pyo
+%%DATADIR%%/Mod/Test/Menu.py
+%%DATADIR%%/Mod/Test/Menu.pyc
+%%DATADIR%%/Mod/Test/Menu.pyo
+%%DATADIR%%/Mod/Test/QtUnitGui.la
+%%DATADIR%%/Mod/Test/QtUnitGui.so
+%%DATADIR%%/Mod/Test/TestApp.py
+%%DATADIR%%/Mod/Test/TestApp.pyc
+%%DATADIR%%/Mod/Test/TestApp.pyo
+%%DATADIR%%/Mod/Test/TestGui.py
+%%DATADIR%%/Mod/Test/TestGui.pyc
+%%DATADIR%%/Mod/Test/TestGui.pyo
+%%DATADIR%%/Mod/Test/Workbench.py
+%%DATADIR%%/Mod/Test/Workbench.pyc
+%%DATADIR%%/Mod/Test/Workbench.pyo
+%%DATADIR%%/Mod/Test/libQtUnitGui.la
+%%DATADIR%%/Mod/Test/libQtUnitGui.so
+%%DATADIR%%/Mod/Test/libQtUnitGui.so.2
+%%DATADIR%%/Mod/Test/qtunittest.py
+%%DATADIR%%/Mod/Test/qtunittest.pyc
+%%DATADIR%%/Mod/Test/qtunittest.pyo
+%%DATADIR%%/Mod/_TEMPLATE_/Init.py
+%%DATADIR%%/Mod/_TEMPLATE_/Init.pyc
+%%DATADIR%%/Mod/_TEMPLATE_/Init.pyo
+%%DATADIR%%/Mod/_TEMPLATE_/InitGui.py
+%%DATADIR%%/Mod/_TEMPLATE_/InitGui.pyc
+%%DATADIR%%/Mod/_TEMPLATE_/InitGui.pyo
+%%DATADIR%%/Mod/_TEMPLATE_/_TEMPLATE_.la
+%%DATADIR%%/Mod/_TEMPLATE_/_TEMPLATE_.so
+%%DATADIR%%/Mod/_TEMPLATE_/_TEMPLATE_Gui.la
+%%DATADIR%%/Mod/_TEMPLATE_/_TEMPLATE_Gui.so
+%%DATADIR%%/Mod/_TEMPLATE_/lib_TEMPLATE_.la
+%%DATADIR%%/Mod/_TEMPLATE_/lib_TEMPLATE_.so
+%%DATADIR%%/Mod/_TEMPLATE_/lib_TEMPLATE_.so.2
+%%DATADIR%%/Mod/_TEMPLATE_/lib_TEMPLATE_Gui.la
+%%DATADIR%%/Mod/_TEMPLATE_/lib_TEMPLATE_Gui.so
+%%DATADIR%%/Mod/_TEMPLATE_/lib_TEMPLATE_Gui.so.2
+%%DATADIR%%/FCIcon.xpm
+@dirrm %%DATADIR%%/Mod/_TEMPLATE_
+@dirrm %%DATADIR%%/Mod/Test
+@dirrm %%DATADIR%%/Mod/Raytracing
+@dirrm %%DATADIR%%/Mod/Points
+@dirrm %%DATADIR%%/Mod/Part
+@dirrm %%DATADIR%%/Mod/Mesh
+@dirrm %%DATADIR%%/Mod/Image
+@dirrm %%DATADIR%%/Mod
+@dirrm %%DATADIR%%
+@cwd %%QTDIR%%
+plugin/designer/libFreeCAD_widgets.so
+@dirrmtry plugin/designer
+@dirrmtry plugin