added community/opencascade

closes #1254
This commit is contained in:
Kevin Mihelich 2016-01-15 00:44:50 +00:00
parent 0fc4f9f931
commit 072c3069e2
4 changed files with 95 additions and 0 deletions

View file

@ -0,0 +1,70 @@
# Maintainer: Florian Pritz <bluewind@xinu.at>
# Contributor: Giuseppe Borzi <gborzi@ieee.org>
# Contributor: Brice M<E9>alier <mealier_brice@yahoo.fr>
# Contributor: Michele Mocciola <mickele>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - remove x86isms
buildarch=28
highmem=1
pkgname=opencascade
pkgver=6.9.1
pkgrel=1
pkgdesc="Open CASCADE Technology, 3D modeling & numerical simulation"
arch=('i686' 'x86_64')
url="http://www.opencascade.org"
license=('custom')
depends=('tk' 'mesa' 'java-runtime' 'libxmu' 'ftgl' 'vtk')
makedepends=('java-environment')
source=("https://sources.archlinux.org/other/community/opencascade/opencascade-$pkgver.tgz" "env.sh" "opencascade.sh" "opencascade.conf"
'arm.patch')
md5sums=('7f2e645b5010d190c9bb35dc457f9a7c'
'a96f28ee7f4273ae1771ee033a2a3af3'
'd9368b8d348ced3ec4462012977552d2'
'2924ecf57c95d25888f51071fdc72ad0'
'79b004fccfc7bfbe21559a1d52f074c2')
prepare() {
cd "$srcdir/$pkgname-$pkgver"
# fix build with vtk 6.3.0
sed -i '/CSF_VTK_LIB/s/-6\.1//g' configure.ac
# fix for automake 1.13
sed -i -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac
./build_configure
sed -i 's/-mmmx -msse -msse2 -mfpmath=sse//g' configure
patch -p0 -i ../arm.patch
}
build() {
cd "$srcdir/$pkgname-$pkgver"
# fix build with vtk 6.3.0
CXXFLAGS+=' -DvtkFloatingPointType=double'
./configure --disable-debug --enable-production \
--with-java-include=/usr/lib/jvm/default/include \
--with-vtk-library=/usr/lib/ --with-vtk-include=/usr/include/vtk/ \
--prefix=/opt/$pkgname
make
}
package() {
cd "$srcdir/$pkgname-$pkgver"
# no DESTDIR support so use prefix. This has to suffix match the prefix in ./configure
make prefix="$pkgdir/opt/$pkgname" install
cp -r src/UnitsAPI/ "${pkgdir}/opt/$pkgname/src"
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 -dm755 "$pkgdir/usr/share/licenses/$pkgname/"
install -m644 LICENSE_LGPL_21.txt OCCT_LGPL_EXCEPTION.txt "$pkgdir/usr/share/licenses/$pkgname"
}
# vim:set ts=2 sw=2 et:

View file

@ -0,0 +1,22 @@
#!/bin/sh -f
export PATH="$PATH:$CASROOT/bin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$CASROOT/lib"
export CSF_LANGUAGE=us
export MMGT_CLEAR=1
export CSF_EXCEPTION_PROMPT=1
export CSF_SHMessage="$CASROOT"/src/SHMessage
export CSF_MDTVTexturesDirectory="$CASROOT"/src/Textures
export CSF_XSMessage="$CASROOT"/src/XSMessage
export CSF_StandardDefaults="$CASROOT"/src/StdResource
export CSF_PluginDefaults="$CASROOT"/src/StdResource
export CSF_XCAFDefaults="$CASROOT"/src/StdResource
export CSF_StandardLiteDefaults="$CASROOT"/src/StdResource
export CSF_UnitsLexicon="$CASROOT"/src/UnitsAPI/Lexi_Expr.dat
export CSF_UnitsDefinition="$CASROOT"/src/UnitsAPI/Units.dat
export CSF_IGESDefaults="$CASROOT"/src/XSTEPResource
export CSF_STEPDefaults="$CASROOT"/src/XSTEPResource
export CSF_XmlOcafResource="$CASROOT"/src/XmlOcafResource
export CSF_GraphicShr="$CASROOT"/lib/libTKOpenGl.so

View file

@ -0,0 +1 @@
/opt/opencascade/lib

View file

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