Use opencascade7

This commit is contained in:
Markus Hovorka 2017-03-18 00:51:10 +01:00
parent 7f76fdd333
commit 111a934dbc
3 changed files with 55 additions and 8 deletions

View file

@ -2,14 +2,14 @@
# Contributer: Christian Hesse <mail@eworm.de> # Contributer: Christian Hesse <mail@eworm.de>
pkgname=freecad-git pkgname=freecad-git
pkgver=0.17pre.r3401.g99fa203f3 pkgver=0.17pre.r3794.g4f165179e
pkgrel=2 pkgrel=1
epoch=1 epoch=1
pkgdesc='A general purpose 3D CAD modeler - git checkout' pkgdesc='A general purpose 3D CAD modeler - git checkout'
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
url='http://www.freecadweb.org/' url='http://www.freecadweb.org/'
license=('LGPL') license=('LGPL')
depends=('boost-libs' 'curl' 'hicolor-icon-theme' 'libspnav' 'opencascade' depends=('boost-libs' 'curl' 'hicolor-icon-theme' 'libspnav' 'opencascade7'
'med' 'xerces-c' 'python2-pivy' 'python2-pyside' 'med' 'xerces-c' 'python2-pivy' 'python2-pyside'
'libtheora' 'shared-mime-info' 'vtk-qt4' 'jsoncpp') 'libtheora' 'shared-mime-info' 'vtk-qt4' 'jsoncpp')
makedepends=('git' 'boost' 'cmake' 'coin' 'python2-pyside-tools' makedepends=('git' 'boost' 'cmake' 'coin' 'python2-pyside-tools'
@ -21,11 +21,13 @@ conflicts=('freecad')
source=("$pkgname::git+https://github.com/FreeCAD/FreeCAD.git" source=("$pkgname::git+https://github.com/FreeCAD/FreeCAD.git"
"freecad.desktop" "freecad.desktop"
"freecad.xml" "freecad.xml"
"fem-rpath.patch") "rpath.patch"
"fix-occ-search.patch")
md5sums=('SKIP' md5sums=('SKIP'
'7e781d41e90a1c137930e47672996a52' '7e781d41e90a1c137930e47672996a52'
'c2f4154c8e4678825411de8e7fa54c6b' 'c2f4154c8e4678825411de8e7fa54c6b'
'99a41687a9ba980eea86aee4345d9a1d') 'b313a990287bce43dc698affae35d58d'
'5a7beefb78ef73241b0e421fec67f4db')
pkgver() { pkgver() {
cd "$pkgname" cd "$pkgname"
@ -34,7 +36,8 @@ pkgver() {
prepare() { prepare() {
cd "$srcdir/$pkgname" cd "$srcdir/$pkgname"
patch -p1 -i "$srcdir/fem-rpath.patch" patch -Np1 -i "$srcdir/rpath.patch"
patch -Np1 -i "$srcdir/fix-occ-search.patch"
} }
build() { build() {
@ -42,9 +45,13 @@ build() {
cmake -DCMAKE_BUILD_TYPE=Release \ cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX:PATH="/opt/freecad" \ -DCMAKE_INSTALL_PREFIX:PATH="/opt/freecad" \
-DOCC_INCLUDE_DIR:PATH=/opt/opencascade/inc \ -DOCC_INCLUDE_DIR:PATH=/opt/opencascade7/include/opencascade \
-DOCC_LIBRARY_DIR:PATH=/opt/opencascade/lib \ -DOCC_LIBRARY_DIR:PATH=/opt/opencascade7/lib \
-DVTK_DIR:PATH=/opt/vtk-qt4/lib/cmake/vtk-7.0 \ -DVTK_DIR:PATH=/opt/vtk-qt4/lib/cmake/vtk-7.0 \
-DCMAKE_PREFIX_PATH=/opt/opencascade7 \
-DCMAKE_INCLUDE_PATH:PATH=/opt/opencascade7/include/opencascade \
-DCMAKE_LIBRARY_PATH:PATH=/opt/opencascade7/lib \
-DCMAKE_INSTALL_RPATH=/opt/opencascade7/lib:/opt/vtk-qt4/lib \
-DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python2 \ -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python2 \
-DPYTHON_SUFFIX=-python2.7 \ -DPYTHON_SUFFIX=-python2.7 \
-DPYTHON_BASENAME=-python2.7 \ -DPYTHON_BASENAME=-python2.7 \

24
fix-occ-search.patch Normal file
View file

@ -0,0 +1,24 @@
diff --git a/cMake/FindOpenCasCade.cmake b/cMake/FindOpenCasCade.cmake
index 9944b8ade..2f60ba7dd 100644
--- a/cMake/FindOpenCasCade.cmake
+++ b/cMake/FindOpenCasCade.cmake
@@ -56,17 +56,8 @@ else(OCE_FOUND) #look for OpenCASCADE
)
endif(CYGWIN OR MINGW)
else(WIN32)
- FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
- /usr/include/opencascade
- /usr/local/include/opencascade
- /opt/opencascade/include
- /opt/opencascade/inc
- )
- FIND_LIBRARY(OCC_LIBRARY TKernel
- /usr/lib
- /usr/local/lib
- /opt/opencascade/lib
- )
+ FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx)
+ FIND_LIBRARY(OCC_LIBRARY TKernel)
endif(WIN32)
if(OCC_LIBRARY)
GET_FILENAME_COMPONENT(OCC_LIBRARY_DIR ${OCC_LIBRARY} PATH)

16
rpath.patch Normal file
View file

@ -0,0 +1,16 @@
diff --git a/cMake/FreeCadMacros.cmake b/cMake/FreeCadMacros.cmake
index 1faa610d8..18ccdeea6 100644
--- a/cMake/FreeCadMacros.cmake
+++ b/cMake/FreeCadMacros.cmake
@@ -239,9 +239,9 @@ MACRO(SET_BIN_DIR ProjectName OutputName)
# FreeCADBase, SMDS, Driver, MEFISTO2 and area libs don't depend on parts from CMAKE_INSTALL_LIBDIR
if(NOT ${ProjectName} MATCHES "^(FreeCADBase|SMDS|Driver|MEFISTO2|area)$")
if(${ARGC} STREQUAL 4)
- set_target_properties(${ProjectName} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}${ARGV3})
+ set_property(TARGET ${ProjectName} APPEND PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}${ARGV3})
else(${ARGC} STREQUAL 4)
- set_target_properties(${ProjectName} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_LIBDIR})
+ set_property(TARGET ${ProjectName} APPEND PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_LIBDIR})
endif()
endif()
endif(WIN32)