freecad and opencascade update, added eigen3 as a dependency of the first

This commit is contained in:
kNeophytos 2012-03-19 03:04:15 +00:00
parent e88aa080cf
commit 689f22efd7
10 changed files with 305 additions and 55 deletions

29
eigen3/PKGBUILD Normal file
View File

@ -0,0 +1,29 @@
#
# Apps Packages for Chakra, part of chakra-project.org
#
pkgname=eigen3
pkgver=3.0.5
pkgrel=1
pkgdesc="Eigen is a lightweight C++ template library for vector and matrix math, a.k.a. linear algebra."
arch=('any')
url='http://eigen.tuxfamily.org'
license=('GPL' 'LGPL')
makedepends=('cmake' 'pkgconfig')
source=("${pkgname}-${pkgver}.tar.bz2::http://bitbucket.org/eigen/eigen/get/${pkgver}.tar.bz2")
md5sums=('43070952464a5bf21694e082e7fb8fce')
build() {
cd $srcdir
mkdir -p build
cd build
cmake ../eigen-eigen-6e7488e20373 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr
make
}
package() {
cd $srcdir/build
make DESTDIR=$pkgdir install
}

97
freecad/PKGBUILD Normal file
View File

@ -0,0 +1,97 @@
#
# Apps Packages for Chakra, part of chakra-project.org
#
# Contributors from AUR:
# mickele
# Jordi De Groof <jordi (dot) degroof (at) gmail (dot) com>
# manwithgrenade
# bricem13
# gborzi
pkgname=freecad
pkgver=0.12.5284
pkgrel=1
pkgdesc='A general purpose 3D CAD modeler'
arch=('i686' 'x86_64')
url='http://sourceforge.net/apps/mediawiki/free-cad/'
license=('GPL')
depends=('boost-libs' 'curl' 'opencascade>=6.5.2' 'pivy-hg' 'pyqt' 'xerces-c' 'libspnav' 'shared-mime-info' 'hicolor-icon-theme')
makedepends=('boost' 'eigen3' 'gcc-fortran' 'swig1' 'xerces-c' 'desktop-file-utils')
options=(!libtool !makeflags)
install=freecad.install
source=("http://downloads.sourceforge.net/sourceforge/free-cad/freecad-${pkgver}.tar.gz" "${pkgname}.desktop" "${pkgname}.xml" "occ652.patch")
md5sums=('fcd91286c578a219491ffebb2111bddf'
'0d3e92a0cb31f2621e9824a099e8a244'
'c2f4154c8e4678825411de8e7fa54c6b'
'4bafdb67647fd0f1a2cf827e517e6188')
build() {
cd "${srcdir}/FreeCAD-${pkgver}/"
patch -Np1 -i "${srcdir}/occ652.patch"
# fix boost*-mt libs
sed -i -e 's/-lboost\(.*\)-mt/-lboost\1/' acinclude.m4
./autogen.sh
./configure \
--prefix=/usr/lib/${pkgname} \
--datadir=/usr/share/${pkgname} \
--includedir=/usr/include/${pkgname} \
--docdir=/usr/share/doc/${pkgname} \
--with-qt4-dir=/usr/lib/qt/ \
--with-qt4-bin=/usr/bin/ \
--with-qt4-include=/usr/include/ \
--with-qt4-lib=/usr/lib/qt/ \
PYTHON=/usr/bin/python2 \
--with-python-include=/usr/include/python2.7/ \
--with-python-lib=/usr/lib/python2.7/ \
--with-boost-include=/usr/include/boost \
--with-boost-lib=/usr/lib \
--with-occ-lib=/opt/opencascade/lib \
--with-occ-include=/opt/opencascade/inc \
--disable-debug
# Build main program
make
# Builds Qt plugin
cd src/Tools/plugins/widget/
qmake plugin.pro
make
}
package() {
cd "${srcdir}/FreeCAD-${pkgver}/"
# Install main program
make DESTDIR=${pkgdir} install
# Symlink to /usr/bin
mkdir -p ${pkgdir}/usr/bin/
ln -sf /usr/lib/${pkgname}/bin/FreeCAD "${pkgdir}/usr/bin/${pkgname}"
ln -sf /usr/lib/${pkgname}/bin/FreeCADCmd "${pkgdir}/usr/bin/freecadcmd"
# Installs Qt plugin
install -Dm755 src/Tools/plugins/widget/libFreeCAD_widgets.so "${pkgdir}/usr/lib/qt/plugins/designer/libFreeCAD_widgets.so"
# Install pixmaps and desktop shortcut
desktop-file-install \
--dir="${pkgdir}/usr/share/applications" \
"${srcdir}/${pkgname}.desktop"
# Mime info
install -D -m644 "${srcdir}/${pkgname}.xml" "${pkgdir}/usr/share/mime/packages/${pkgname}.xml"
mkdir -p "${pkgdir}/usr/share/icons/hicolor/48x48/mimetypes/"
ln -s /usr/share/${pkgname}/freecad.xpm "${pkgdir}/usr/share/icons/hicolor/48x48/mimetypes/application-x-extension-fcstd.xpm"
# Fix hard boost dep
BOOSTVER=`pacman -Q boost|sed -e 's_-.*__' -e 's_boost __'`
cd "${pkgdir}/usr/lib/${pkgname}/lib"
for i in _program_options _signals _regex _filesystem _system; do
ln -s /usr/lib/libboost$i.so libboost$i.so.$BOOSTVER
done
}

14
freecad/freecad.desktop Normal file
View File

@ -0,0 +1,14 @@
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=FreeCAD
Comment=A general purpose 3D CAD modeler
GenericName=CAD Application
Exec=/usr/bin/freecad %F
Path=/usr/lib/freecad
Terminal=false
Type=Application
Icon=/usr/share/freecad/freecad.xpm
Categories=Application;Science;Math;Education;
StartupNotify=true
MimeType=application/x-extension-fcstd;

15
freecad/freecad.install Normal file
View File

@ -0,0 +1,15 @@
post_install() {
xdg-icon-resource forceupdate --theme hicolor &> /dev/null
update-desktop-database -q
update-mime-database usr/share/mime
}
post_upgrade() {
post_install
}
post_remove() {
xdg-icon-resource forceupdate --theme hicolor &> /dev/null
update-desktop-database -q
update-mime-database usr/share/mime
}

8
freecad/freecad.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="application/x-extension-fcstd">
<sub-class-of type="application/zip"/>
<comment>FreeCAD document</comment>
<glob pattern="*.fcstd"/>
</mime-type>
</mime-info>

110
freecad/occ652.patch Normal file
View File

@ -0,0 +1,110 @@
diff -Naur 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-04 21:20:01.762755107 +0100
+++ FreeCAD-0.12.5284/src/Mod/Image/Gui/GLImageBox.cpp 2012-01-04 21:23:57.808143007 +0100
@@ -25,6 +25,16 @@
#if defined(__MINGW32__)
# include <GL/gl.h>
# include <GL/glext.h>
+#elif defined (FC_OS_MACOSX)
+# include <OpenGL/gl.h>
+# include <OpenGL/glu.h>
+#elif defined (FC_OS_WIN32)
+# include <Windows.h>
+# include <GL/gl.h>
+# include <GL/glu.h>
+#else
+# include <GL/gl.h>
+# include <GL/glu.h>
#endif
#include "GLImageBox.h"
diff -Naur FreeCAD-0.12.5284.orig/src/Mod/Part/App/AppPartPy.cpp FreeCAD-0.12.5284/src/Mod/Part/App/AppPartPy.cpp
--- FreeCAD-0.12.5284.orig/src/Mod/Part/App/AppPartPy.cpp 2012-01-04 21:20:01.919420925 +0100
+++ FreeCAD-0.12.5284/src/Mod/Part/App/AppPartPy.cpp 2012-01-04 21:27:16.473733409 +0100
@@ -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) {
diff -Naur FreeCAD-0.12.5284.orig/src/Mod/Part/App/Geometry.cpp FreeCAD-0.12.5284/src/Mod/Part/App/Geometry.cpp
--- FreeCAD-0.12.5284.orig/src/Mod/Part/App/Geometry.cpp 2012-01-04 21:20:01.916087610 +0100
+++ FreeCAD-0.12.5284/src/Mod/Part/App/Geometry.cpp 2012-01-04 21:28:01.363490221 +0100
@@ -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();
}
diff -Naur FreeCAD-0.12.5284.orig/src/Mod/Part/App/GeometrySurfacePyImp.cpp FreeCAD-0.12.5284/src/Mod/Part/App/GeometrySurfacePyImp.cpp
--- FreeCAD-0.12.5284.orig/src/Mod/Part/App/GeometrySurfacePyImp.cpp 2012-01-04 21:20:01.919420925 +0100
+++ FreeCAD-0.12.5284/src/Mod/Part/App/GeometrySurfacePyImp.cpp 2012-01-04 21:29:16.406417012 +0100
@@ -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));
}
diff -Naur FreeCAD-0.12.5284.orig/src/Mod/Part/App/PrimitiveFeature.cpp FreeCAD-0.12.5284/src/Mod/Part/App/PrimitiveFeature.cpp
--- FreeCAD-0.12.5284.orig/src/Mod/Part/App/PrimitiveFeature.cpp 2012-01-04 21:20:01.916087610 +0100
+++ FreeCAD-0.12.5284/src/Mod/Part/App/PrimitiveFeature.cpp 2012-01-04 21:30:26.759369209 +0100
@@ -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())
diff -Naur FreeCAD-0.12.5284.orig/src/Mod/Part/App/TopoShape.cpp FreeCAD-0.12.5284/src/Mod/Part/App/TopoShape.cpp
--- FreeCAD-0.12.5284.orig/src/Mod/Part/App/TopoShape.cpp 2012-01-04 21:20:01.922754240 +0100
+++ FreeCAD-0.12.5284/src/Mod/Part/App/TopoShape.cpp 2012-01-05 00:54:08.116493768 +0100
@@ -1335,7 +1335,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();
}
@@ -1388,7 +1388,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();
}
@@ -1440,7 +1440,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();
}
diff -Naur FreeCAD-0.12.5284.orig/src/Mod/Part/App/TopoShapeFacePyImp.cpp FreeCAD-0.12.5284/src/Mod/Part/App/TopoShapeFacePyImp.cpp
--- FreeCAD-0.12.5284.orig/src/Mod/Part/App/TopoShapeFacePyImp.cpp 2012-01-04 21:20:01.919420925 +0100
+++ FreeCAD-0.12.5284/src/Mod/Part/App/TopoShapeFacePyImp.cpp 2012-01-04 21:33:14.611793209 +0100
@@ -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) {

View File

@ -1,9 +0,0 @@
2011-05-17 Korthaerd (korthaerd) <korthaerd at gmail dot com>
* 6.5.0 :
First release straight from AUR
Change depends java-runtime by openjdk6
Initialy writed by :
- Giuseppe Borzi <gborzi@ieee.org>
- Brice M<E9>alier <mealier_brice@yahoo.fr>
- Michele Mocciola <mickele>

View File

@ -2,56 +2,53 @@
# Apps Packages for Chakra, part of chakra-project.org
#
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves gmail.com>
# Contributors from AUR:
# Giuseppe Borzi <gborzi@ieee.org>
# Brice M<E9>alier <mealier_brice@yahoo.fr>
# Michele Mocciola <mickele>
pkgname=opencascade
pkgver=6.5.1
_pkgver2=651
pkgver=6.5.2
pkgrel=1
pkgdesc="Open CASCADE Technology, 3D modeling & numerical simulation."
pkgdesc="Open CASCADE Technology, 3D modeling & numerical simulation"
arch=('i686' 'x86_64')
url="http://www.opencascade.org"
license=('custom:Open CASCADE Technology Public License')
depends=('tk' 'mesa' 'openjdk6' 'libxmu')
makedepends=('openjdk6' 'ftgl')
categories=('programming')
license=('custom')
depends=('tk' 'mesa' 'java-runtime' 'libxmu')
makedepends=('java-environment' 'ftgl')
options=(!libtool)
changelog=ChangeLog
source=("http://files.$pkgname.com/OCCT/OCC_${pkgver}_release/OpenCASCADE$_pkgver2.tar.gz"
"env.sh"
"$pkgname.sh"
"$pkgname.conf"
"missing-header.diff")
md5sums=('3d554533671c1c817ed0b70078e9e210'
source=("http://files.opencascade.com/OCCT/OCC_${pkgver}_release/OpenCASCADE652.tar.gz" "env.sh" "opencascade.sh" "opencascade.conf")
md5sums=('bfc4c8974e1ae56230b0cc81ec836898'
'acf8ad1e470cd7d1c2033954c1b0f03a'
'8612eae471692a42019ebda8a5db5d93'
'2924ecf57c95d25888f51071fdc72ad0'
'e0e70dcf29863133ae8c17ef8f5f2ba8')
'd9368b8d348ced3ec4462012977552d2'
'2924ecf57c95d25888f51071fdc72ad0')
build() {
cd $srcdir/ros
# Patches.
patch -uN $srcdir/ros/src/OSD/OSD_MAllocHook.cxx $srcdir/missing-header.diff
cd "$srcdir/ros"
export CPLUS_INCLUDE_PATH=/usr/include/FTGL:/usr/include/freetype2
export CASROOT=$srcdir/ros
export CASROOT="$srcdir/ros"
export CFLAGS="$CFLAGS -fpermissive"
export CXXFLAGS="$CXXFLAGS -fpermissive"
./configure \
--disable-debug \
--enable-production \
--with-java-include=/usr/lib/jvm/java-6-openjdk/include/ \
--prefix=$pkgdir/usr/share/$pkgname
if [ ! -d $JAVA_HOME/include ]; then
[ -e /etc/profile.d/openjdk6.sh ] && source /etc/profile.d/openjdk6.sh
[ -e /etc/profile.d/jdk.sh ] && source /etc/profile.d/jdk.sh
fi
./build_configure
./configure --disable-debug --enable-production \
--with-java-include=${JAVA_HOME}/include --prefix="$pkgdir/opt/$pkgname"
make
}
package() {
cd $srcdir/ros
cd "$srcdir/ros"
make install
install -D -m644 $srcdir/$pkgname.conf $pkgdir/etc/ld.so.conf.d/$pkgname.conf
install -D -m 755 $srcdir/$pkgname.sh $pkgdir/etc/profile.d/$pkgname.sh
install -m 755 $srcdir/env.sh $pkgdir/usr/share/$pkgname
install -Dm644 $srcdir/LICENSE $pkgdir/usr/share/licenses/$pkgname/License.txt
install -D -m644 "${srcdir}/opencascade.conf" "${pkgdir}/etc/ld.so.conf.d/opencascade.conf"
install -D -m 755 "${srcdir}/opencascade.sh" "${pkgdir}/etc/profile.d/opencascade.sh"
install -m 755 "${srcdir}/env.sh" "${pkgdir}/opt/$pkgname"
install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/License.txt"
}
# vim:set ts=2 sw=2 et:

View File

@ -1,11 +0,0 @@
--- OSD_MAllocHook.cxx.old 2011-05-19 13:24:52.000000000 +0200
+++ OSD_MAllocHook.cxx.new 2011-06-24 06:42:22.000000000 +0200
@@ -15,6 +15,8 @@
#include <set>
#include <map>
+#include <stdlib.h>
+
#ifndef SIZE_MAX
#define SIZE_MAX UINT_MAX
#endif

View File

@ -1,2 +1,2 @@
export CASROOT=/usr/share/opencascade
source /usr/share/opencascade/env.sh
export CASROOT=/opt/opencascade
source /opt/opencascade/env.sh