community/opencascade to 7.6.0-1

This commit is contained in:
Kevin Mihelich 2022-01-10 13:22:40 +00:00
parent d47647ee09
commit 31e1d6d289
5 changed files with 101 additions and 92 deletions

View file

@ -1,4 +1,5 @@
# Maintainer: Kyle Keen <keenerd@gmail.com>
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Contributor: Gabriel Souza Franco <Z2FicmllbGZyYW5jb3NvdXphQGdtYWlsLmNvbQ==>
# Contributor: Florian Pritz <bluewind@xinu.at>
# Contributor: Giuseppe Borzi <gborzi@ieee.org>
@ -9,47 +10,74 @@
# - removed makedepends on adios2
pkgname=opencascade
pkgver=7.5.3
_pkgver=V7_5_3
#_pkgver=${pkgver//_/}
#_pkgver=V${_pkgver//./_}
pkgrel=4
pkgdesc="Open CASCADE Technology, 3D modeling & numerical simulation"
pkgver=7.6.0
_pkgver="V${pkgver//./_}"
pkgrel=1
pkgdesc="SDK intended for development of applications dealing with 3D CAD data"
arch=('x86_64')
url="https://www.opencascade.org"
license=('custom')
depends=('tk' 'vtk' 'gl2ps' 'ffmpeg' 'freeimage' 'intel-tbb')
makedepends=('cmake' 'qt5-base' 'rapidjson' 'eigen' 'utf8cpp' 'python' 'pugixml' 'glew'
'gdal' 'proj' 'boost' 'liblas' 'pdal' 'libharu' 'unixodbc'
'python-mpi4py' 'openvr') # VTK requires these to build
source=("opencascade-${pkgver}.tgz::https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_pkgver};sf=tgz"
'opencascade.sh' 'fix-install-dir-references.patch'
'cmake-fix-variable.patch'
'vtk9.patch'
"fix-freecad-build.patch::https://git.dev.opencascade.org/gitweb/?p=occt.git;a=patch;h=5e7632824302761b84cfceb5bfb2241d906d0eb4"
'opencascade-tbb-2021.patch')
sha256sums=('cc3d3fd9f76526502c3d9025b651f45b034187430f231414c97dda756572410b'
'2064536a85d46fee368a8f1a712b2c6c77ca79c5bffcc68cba79d70d36efa2f4'
'afb584aa453993ae8d9e2b983594558531ede735a5892754b812be30650c9fb5'
'c7427082400b2d1ac58c59549d4dd1ee5b27d06847b7907842e9e2f2b68980fa'
'ae24da8eac8b57af8f612c872c8ec1962b6e5243758aa39c92e805223fdfe157'
'4782d4d93cbd7f5489d23a855a1d31801bd61383d7cf9dc0e613fae34541cfde'
'b0c4601fd9b2905e4b3bc3ed8af1493960c80bfe10332a0c562c59786efd57a2')
license=('LGPL2.1' 'custom:LGPL-exception')
depends=(
'ffmpeg'
'freeimage'
'gl2ps'
'intel-tbb'
'tk'
'vtk'
)
makedepends=(
'boost'
'cmake'
'eigen'
'gdal'
'glew'
'libharu'
'liblas'
'openvr'
'pdal'
'proj'
'pugixml'
'python'
'python-mpi4py'
'qt5-base'
'rapidjson'
'unixodbc'
'utf8cpp'
)
source=(
"$pkgname-$pkgver.tar.gz::https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/$_pkgver;sf=tgz"
'opencascade.sh'
'fix-install-dir-references.patch'
'cmake-fix-variable.patch'
'skip-license-installation.patch'
'opencascade-tbb-2021.patch'
)
sha512sums=('6839eb6641b9e0752474fce11cf1756223067febe0f5bcd5db249e3eccef29517a6952c124aae818220b6360070a792dacd1b0b4ce970b8351ce38598f31b4be'
'a7516028e55fd303dc1cfb61b75c9cb209d431d854b4d1c58f9c19df8ecee9d79da5c8745676c68a2de0980652de4c4d1c5a927c25db1e5146fb1f1f43c5906b'
'fc5eefe2a3ee11f77ee7c304d42d3b32dc5c86050879b9ae5f02da6242a87872aa5da7ae40a961a0a799dc241a81394f8a3ca022dd14d35bc2a61599eed3f983'
'ad6ce2f52462989bd990b52fd5428f3e5cbd4fb15c38d92c0e0954e6afc3368fca961b92efead8e8957213352fb87a469e1bfaccaf14b484351acc0a0bc10485'
'fd8499793b12e4e59420f63351fef9599c3976d307979beea2681b873a340ae673ba643a7060c74bec1dd4801954c99f8f1f1a8bcc3baa3db9cbfce32153675e'
'24d81b4db35267464baedffd552d7b846871f64afaff46d92bf309c8113f20d8b575975946de2f1ff561455100541b5a5a6c44f377aa4c3c63f1da9930e34d4f')
b2sums=('c16cd096f20e90267a00b6be21b17b22b491cf5d9aa1a311d64d7707042dc88380c60ececceb6728dbcdd4ff56a67558144292950e11518b21cbc49ace4e88cd'
'da9db038ed2348d2d7736505eda2f40fe52c836bcedb74d9f369cc53f7d40a330bd87d6aedd773863745cd46e4dbe5876acda2d2d60177f00d5db9cae4f1f102'
'4fae705cd68a259a831df5cd83c72a8a3e2508a99dcc4cb572164bcbcf0a15f50fa803e520793249043edf78f93eceebfa2311fed5e0391d64476b31ccbec079'
'bb98b2b53a9a97ae15a353a9dbcc6d92a97ddaa56af0610cefe9de3a4b84c4a6021d9396f7e270c1d379278df069dbf90f9771db64947e52d38ad36bc3c6f913'
'da815c14ad3a8283c4f3cf41b6b19b40408798f64374b909c776f5ab22ee9ccfc2653c09b33c7b550a138007ff2b36b40d742c9fddc7c1ea499dfe58e59f57ea'
'f996126927c0f418cf6592300db7f9e8c4c8a899cb4a06f2eb37c7849f40176fc2d81de421ec346aaec5a99243388a466f75a2689ac7e6177ac9092802a31877')
prepare() {
cd "occt-${_pkgver}"
patch -Np1 -i "$srcdir/fix-install-dir-references.patch"
patch -Np1 -i "$srcdir/cmake-fix-variable.patch"
patch -p1 -i ../vtk9.patch # Fix build with VTK 9 https://gitlab.kitware.com/vtk/vtk/-/issues/18240
patch -p1 -i ../fix-freecad-build.patch # Fix build of FreeCAD
cd "occt-$_pkgver"
patch -p1 -i ../fix-install-dir-references.patch
patch -p1 -i ../cmake-fix-variable.patch
patch -p1 -i ../skip-license-installation.patch
patch -p1 -i ../opencascade-tbb-2021.patch # Fix build with TBB 2021
}
build() {
cd "occt-${_pkgver}"
mkdir -p build && cd build
cmake .. \
cmake \
-B build \
-S "occt-$_pkgver" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_RELEASE_DISABLE_EXCEPTIONS=OFF \
@ -61,22 +89,23 @@ build() {
-DUSE_TBB=ON \
-D3RDPARTY_VTK_INCLUDE_DIR=/usr/include/vtk
make
cmake --build build
}
package() {
cd "occt-${_pkgver}/build"
DESTDIR="$pkgdir" cmake --install build
make DESTDIR="$pkgdir" install
# environment variables (adapted from adm/templates/env.sh)
install -vDm755 -t "$pkgdir/etc/profile.d" opencascade.sh
cd ..
# remove unnecessary shell scripts
rm -v "$pkgdir/usr/bin/"*.sh
install -Dm755 "$srcdir/opencascade.sh" "$pkgdir/etc/profile.d/opencascade.sh"
install -dm755 "$pkgdir/usr/share/licenses/$pkgname/"
mv "$pkgdir/usr/share/doc/opencascade/"* "$pkgdir/usr/share/licenses/$pkgname"
rm -r "$pkgdir/usr/share/doc"
cd "occt-$_pkgver"
rm "$pkgdir/usr/bin/"*.sh
# licenses
install -vDm755 -t "$pkgdir/usr/share/licenses/$pkgname" \
LICENSE_LGPL_21.txt OCCT_LGPL_EXCEPTION.txt
}
# vim:set ts=2 sw=2 et:

View file

@ -1,7 +1,6 @@
diff -Naur occt-V7_3_0/adm/templates/OpenCASCADEConfig.cmake.in occt-V7_3_0_new/adm/templates/OpenCASCADEConfig.cmake.in
--- occt-V7_3_0/adm/templates/OpenCASCADEConfig.cmake.in 2018-05-29 12:14:02.000000000 +0200
+++ occt-V7_3_0.new/adm/templates/OpenCASCADEConfig.cmake.in 2018-05-29 12:14:02.000000000 +0200
@@ -26,7 +26,7 @@
--- a/adm/templates/OpenCASCADEConfig.cmake.in
+++ b/adm/templates/OpenCASCADEConfig.cmake.in
@@ -27,7 +27,7 @@ get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/cmake$")
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
endif()
@ -9,4 +8,4 @@ diff -Naur occt-V7_3_0/adm/templates/OpenCASCADEConfig.cmake.in occt-V7_3_0_new/
+if (OpenCASCADE_INSTALL_PREFIX MATCHES "/lib(64)?$")
get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
endif()
if (OpenCASCADE_INSTALL_PREFIX MATCHES "/libs/${CMAKE_ANDROID_ARCH_ABI}$")

View file

@ -1,7 +1,6 @@
diff -aur occt-V7_1_0/CMakeLists.txt occt-V7_1_0.new/CMakeLists.txt
--- occt-V7_1_0/CMakeLists.txt 2016-11-25 11:50:18.000000000 +0100
+++ occt-V7_1_0.new/CMakeLists.txt 2017-03-18 08:44:10.406668714 +0100
@@ -906,7 +906,7 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1229,7 +1229,7 @@ foreach (OCCT_CONFIGURATION ${CMAKE_CONFIGURATION_TYPES})
endforeach()
# install OpenCASCADE config file with compile definitions and C/C++ flags ONLY for current configuration
install (CODE "string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWER)")
@ -10,10 +9,11 @@ diff -aur occt-V7_1_0/CMakeLists.txt occt-V7_1_0.new/CMakeLists.txt
foreach (OCCT_MODULE ${OCCT_MODULES})
if (BUILD_MODULE_${OCCT_MODULE})
diff -aur occt-V7_1_0/adm/cmake/occt_macros.cmake occt-V7_1_0.new/adm/cmake/occt_macros.cmake
--- occt-V7_1_0/adm/cmake/occt_macros.cmake 2016-11-25 11:50:18.000000000 +0100
+++ occt-V7_1_0.new/adm/cmake/occt_macros.cmake 2017-03-18 08:44:10.406668714 +0100
@@ -558,7 +558,7 @@
diff --git a/adm/cmake/occt_macros.cmake b/adm/cmake/occt_macros.cmake
index 0a387945..e3f13923 100644
--- a/adm/cmake/occt_macros.cmake
+++ b/adm/cmake/occt_macros.cmake
@@ -592,7 +592,7 @@ macro (OCCT_UPDATE_TARGET_FILE)
"cmake_policy(PUSH)
cmake_policy(SET CMP0007 NEW)
string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWERCASE)

View file

@ -0,0 +1,18 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -337,15 +337,6 @@ endif()
# include occt macros
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_resources")
-# install LICENSE_LGPL_21.txt and OCCT_LGPL_EXCEPTION.txt files
-if ("${INSTALL_DIR_LAYOUT}" STREQUAL "Unix")
- OCCT_INSTALL_FILE_OR_DIR ("LICENSE_LGPL_21.txt" "${INSTALL_DIR_DOC}")
- OCCT_INSTALL_FILE_OR_DIR ("OCCT_LGPL_EXCEPTION.txt" "${INSTALL_DIR_DOC}")
-else()
- OCCT_INSTALL_FILE_OR_DIR ("LICENSE_LGPL_21.txt" ".")
- OCCT_INSTALL_FILE_OR_DIR ("OCCT_LGPL_EXCEPTION.txt" ".")
-endif()
-
if(APPLE)
set (INSTALL_NAME_DIR "" CACHE STRING "install_name library suffix on OS X (e.g. @executable_path/../Frameworks)")
endif()

View file

@ -1,37 +0,0 @@
diff --git a/src/IVtkDraw/IVtkDraw_HighlightAndSelectionPipeline.hxx b/src/IVtkDraw/IVtkDraw_HighlightAndSelectionPipeline.hxx
index 9e8a4e028a..8491febece 100644
--- a/src/IVtkDraw/IVtkDraw_HighlightAndSelectionPipeline.hxx
+++ b/src/IVtkDraw/IVtkDraw_HighlightAndSelectionPipeline.hxx
@@ -23,6 +23,7 @@
// prevent disabling some MSVC warning messages by VTK headers
#include <Standard_WarningsDisable.hxx>
+#undef AllValues
#include <vtkActor.h>
#include <vtkPolyData.h>
#include <vtkPolyDataMapper.h>
diff --git a/src/IVtkVTK/IVtkVTK_ShapeData.hxx b/src/IVtkVTK/IVtkVTK_ShapeData.hxx
index 0fda1748ab..3ca3a8eeb9 100644
--- a/src/IVtkVTK/IVtkVTK_ShapeData.hxx
+++ b/src/IVtkVTK/IVtkVTK_ShapeData.hxx
@@ -23,6 +23,7 @@
#include <vtkPolyData.h>
#include <vtkSmartPointer.h>
#include <vtkIdTypeArray.h>
+#include <vtkVersion.h>
#include <Standard_WarningsRestore.hxx>
class vtkIdTypeArray;
diff --git a/src/InterfaceGraphic/InterfaceGraphic.hxx b/src/InterfaceGraphic/InterfaceGraphic.hxx
index c533f68cd5..6410892618 100644
--- a/src/InterfaceGraphic/InterfaceGraphic.hxx
+++ b/src/InterfaceGraphic/InterfaceGraphic.hxx
@@ -40,6 +40,8 @@
#include <X11/Xatom.h>
#include <GL/glx.h>
+#undef AllValues
+
#endif
#endif // __INTERFACE_GRAPHIC_HXX