From 0425a318610a795ffeacffc2b6e951dbbb08a5cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= Date: Sun, 4 Dec 2022 21:57:11 +0100 Subject: [PATCH] opencascade: switch to the official version (version 7.7.0) * completely rewrite the recipe and the patchset * add all supported libraries and optional dependencies that are available * tools (command line only) and samples are provided as subpackages * Tk (and therefore the GUI for DRAW) is not enabled because it hangs on my system * Xlibe is used to provide a window system * using both Tk and Xlibe at once is currently not possible due to #7501 * the patchset contains a commit with a stub allowing at least to build without Xlibe, but there is no proper Haiku implementation of it yet. That code path is currently not used. * EGL is used as OpenGL API, but it doesn't work currently. It displays the following error message: ``` Error: EGL does not provide compatible configurations ``` Test report: * there are 21000 test cases, so the tests take a while to run * most tests are skipped due to missing test data (am I missing something how to invoke the tests?) * the tests involving the Inspector crash into the Debugger because both Xlibe and Qt5 try to create a BApplication when running the Inspector from DRAW (see threedeyes/qthaikuplugins#27) * some tests hang, pegging one core (although they should have a timeout apparently), they must be aborted manually by killing the secondary DRAWEXE * the detailed test results are created in $sourceDir/build/results, that folder has 168 MiB zipped --- .../opencascade/opencascade-0.18.3.recipe | 198 -------- sci-libs/opencascade/opencascade-7.7.0.recipe | 421 ++++++++++++++++++ .../patches/opencascade-0.18.3.patchset | 244 ---------- .../patches/opencascade-7.7.0.patchset | 346 ++++++++++++++ 4 files changed, 767 insertions(+), 442 deletions(-) delete mode 100644 sci-libs/opencascade/opencascade-0.18.3.recipe create mode 100644 sci-libs/opencascade/opencascade-7.7.0.recipe delete mode 100644 sci-libs/opencascade/patches/opencascade-0.18.3.patchset create mode 100644 sci-libs/opencascade/patches/opencascade-7.7.0.patchset diff --git a/sci-libs/opencascade/opencascade-0.18.3.recipe b/sci-libs/opencascade/opencascade-0.18.3.recipe deleted file mode 100644 index fe57756d2ba..00000000000 --- a/sci-libs/opencascade/opencascade-0.18.3.recipe +++ /dev/null @@ -1,198 +0,0 @@ -SUMMARY="A C++ 3D modeling library" -DESCRIPTION="Open CASCADE Technology (OCCT) is an object-oriented C++ class \ -library designed for rapid production of sophisticated domain-specific \ -CAD/CAM/CAE applications." -HOMEPAGE="https://github.com/tpaviot/oce/" -COPYRIGHT="1993-1999 Matra Datavision - 1999-2014 OPEN CASCADE SAS" -LICENSE="GNU LGPL v2.1 - Open CASCADE exception v1.0" -REVISION="2" -SOURCE_URI="https://github.com/tpaviot/oce/archive/OCE-$portVersion.tar.gz" -CHECKSUM_SHA256="c553d6a7bf52f790abc3b6bb7a1e91a65947e92a426bb1a88a11960c31f0966c" -SOURCE_DIR="oce-OCE-$portVersion" -PATCHES="opencascade-$portVersion.patchset" - -ARCHITECTURES="all !x86_gcc2" -SECONDARY_ARCHITECTURES="x86" - -libVersion="11.0.0" -libVersionCompat="$libVersion compat >= ${libVersion%%.*}" - -PROVIDES=" - opencascade$secondaryArchSuffix = $portVersion - lib:libFWOSPlugin$secondaryArchSuffix = $libVersionCompat - lib:libPTKernel$secondaryArchSuffix = $libVersionCompat - lib:libTKBinL$secondaryArchSuffix = $libVersionCompat - lib:libTKBO$secondaryArchSuffix = $libVersionCompat - lib:libTKBool$secondaryArchSuffix = $libVersionCompat - lib:libTKBRep$secondaryArchSuffix = $libVersionCompat - lib:libTKCDF$secondaryArchSuffix = $libVersionCompat - lib:libTKernel$secondaryArchSuffix = $libVersionCompat - lib:libTKFeat$secondaryArchSuffix = $libVersionCompat - lib:libTKFillet$secondaryArchSuffix = $libVersionCompat - lib:libTKG2d$secondaryArchSuffix = $libVersionCompat - lib:libTKG3d$secondaryArchSuffix = $libVersionCompat - lib:libTKGeomAlgo$secondaryArchSuffix = $libVersionCompat - lib:libTKGeomBase$secondaryArchSuffix = $libVersionCompat - lib:libTKHLR$secondaryArchSuffix = $libVersionCompat - lib:libTKIGES$secondaryArchSuffix = $libVersionCompat - lib:libTKLCAF$secondaryArchSuffix = $libVersionCompat - lib:libTKMath$secondaryArchSuffix = $libVersionCompat - lib:libTKMesh$secondaryArchSuffix = $libVersionCompat - lib:libTKOffset$secondaryArchSuffix = $libVersionCompat - lib:libTKPLCAF$secondaryArchSuffix = $libVersionCompat - lib:libTKPrim$secondaryArchSuffix = $libVersionCompat - lib:libTKPShape$secondaryArchSuffix = $libVersionCompat - lib:libTKShapeSchema$secondaryArchSuffix = $libVersionCompat - lib:libTKShHealing$secondaryArchSuffix = $libVersionCompat - lib:libTKStdLSchema$secondaryArchSuffix = $libVersionCompat - lib:libTKSTEP$secondaryArchSuffix = $libVersionCompat - lib:libTKSTEP209$secondaryArchSuffix = $libVersionCompat - lib:libTKSTEPAttr$secondaryArchSuffix = $libVersionCompat - lib:libTKSTEPBase$secondaryArchSuffix = $libVersionCompat - lib:libTKSTL$secondaryArchSuffix = $libVersionCompat - lib:libTKTObj$secondaryArchSuffix = $libVersionCompat - lib:libTKTopAlgo$secondaryArchSuffix = $libVersionCompat - lib:libTKXMesh$secondaryArchSuffix = $libVersionCompat - lib:libTKXmlL$secondaryArchSuffix = $libVersionCompat - lib:libTKXSBase$secondaryArchSuffix = $libVersionCompat - " -REQUIRES=" - haiku$secondaryArchSuffix - lib:libgomp$secondaryArchSuffix - " - -PROVIDES_devel=" - opencascade${secondaryArchSuffix}_devel = $portVersion - devel:libFWOSPlugin$secondaryArchSuffix = $libVersionCompat - devel:libPTKernel$secondaryArchSuffix = $libVersionCompat - devel:libTKBinL$secondaryArchSuffix = $libVersionCompat - devel:libTKBO$secondaryArchSuffix = $libVersionCompat - devel:libTKBool$secondaryArchSuffix = $libVersionCompat - devel:libTKBRep$secondaryArchSuffix = $libVersionCompat - devel:libTKCDF$secondaryArchSuffix = $libVersionCompat - devel:libTKernel$secondaryArchSuffix = $libVersionCompat - devel:libTKFeat$secondaryArchSuffix = $libVersionCompat - devel:libTKFillet$secondaryArchSuffix = $libVersionCompat - devel:libTKG2d$secondaryArchSuffix = $libVersionCompat - devel:libTKG3d$secondaryArchSuffix = $libVersionCompat - devel:libTKGeomAlgo$secondaryArchSuffix = $libVersionCompat - devel:libTKGeomBase$secondaryArchSuffix = $libVersionCompat - devel:libTKHLR$secondaryArchSuffix = $libVersionCompat - devel:libTKIGES$secondaryArchSuffix = $libVersionCompat - devel:libTKLCAF$secondaryArchSuffix = $libVersionCompat - devel:libTKMath$secondaryArchSuffix = $libVersionCompat - devel:libTKMesh$secondaryArchSuffix = $libVersionCompat - devel:libTKOffset$secondaryArchSuffix = $libVersionCompat - devel:libTKPLCAF$secondaryArchSuffix = $libVersionCompat - devel:libTKPrim$secondaryArchSuffix = $libVersionCompat - devel:libTKPShape$secondaryArchSuffix = $libVersionCompat - devel:libTKShapeSchema$secondaryArchSuffix = $libVersionCompat - devel:libTKShHealing$secondaryArchSuffix = $libVersionCompat - devel:libTKStdLSchema$secondaryArchSuffix = $libVersionCompat - devel:libTKSTEP$secondaryArchSuffix = $libVersionCompat - devel:libTKSTEP209$secondaryArchSuffix = $libVersionCompat - devel:libTKSTEPAttr$secondaryArchSuffix = $libVersionCompat - devel:libTKSTEPBase$secondaryArchSuffix = $libVersionCompat - devel:libTKSTL$secondaryArchSuffix = $libVersionCompat - devel:libTKTObj$secondaryArchSuffix = $libVersionCompat - devel:libTKTopAlgo$secondaryArchSuffix = $libVersionCompat - devel:libTKXMesh$secondaryArchSuffix = $libVersionCompat - devel:libTKXmlL$secondaryArchSuffix = $libVersionCompat - devel:libTKXSBase$secondaryArchSuffix = $libVersionCompat - " -REQUIRES_devel=" - opencascade$secondaryArchSuffix == $portVersion base - " - -BUILD_REQUIRES=" - haiku${secondaryArchSuffix}_devel - devel:libgomp$secondaryArchSuffix - " -BUILD_PREREQUIRES=" - cmd:cmake - cmd:g++$secondaryArchSuffix - cmd:make - cmd:pkg_config$secondaryArchSuffix - cmd:sed - " - -defineDebugInfoPackage opencascade$secondaryArchSuffix \ - "$libDir"/libFWOSPlugin.so.$libVersion \ - "$libDir"/libPTKernel.so.$libVersion \ - "$libDir"/libTKBinL.so.$libVersion \ - "$libDir"/libTKBO.so.$libVersion \ - "$libDir"/libTKBool.so.$libVersion \ - "$libDir"/libTKBRep.so.$libVersion \ - "$libDir"/libTKCDF.so.$libVersion \ - "$libDir"/libTKernel.so.$libVersion \ - "$libDir"/libTKFeat.so.$libVersion \ - "$libDir"/libTKFillet.so.$libVersion \ - "$libDir"/libTKG2d.so.$libVersion \ - "$libDir"/libTKG3d.so.$libVersion \ - "$libDir"/libTKGeomAlgo.so.$libVersion \ - "$libDir"/libTKGeomBase.so.$libVersion \ - "$libDir"/libTKHLR.so.$libVersion \ - "$libDir"/libTKIGES.so.$libVersion \ - "$libDir"/libTKLCAF.so.$libVersion \ - "$libDir"/libTKMath.so.$libVersion \ - "$libDir"/libTKMesh.so.$libVersion \ - "$libDir"/libTKOffset.so.$libVersion \ - "$libDir"/libTKPLCAF.so.$libVersion \ - "$libDir"/libTKPrim.so.$libVersion \ - "$libDir"/libTKPShape.so.$libVersion \ - "$libDir"/libTKShapeSchema.so.$libVersion \ - "$libDir"/libTKShHealing.so.$libVersion \ - "$libDir"/libTKStdLSchema.so.$libVersion \ - "$libDir"/libTKSTEP.so.$libVersion \ - "$libDir"/libTKSTEP209.so.$libVersion \ - "$libDir"/libTKSTEPAttr.so.$libVersion \ - "$libDir"/libTKSTEPBase.so.$libVersion \ - "$libDir"/libTKSTL.so.$libVersion \ - "$libDir"/libTKTObj.so.$libVersion \ - "$libDir"/libTKTopAlgo.so.$libVersion \ - "$libDir"/libTKXMesh.so.$libVersion \ - "$libDir"/libTKXmlL.so.$libVersion \ - "$libDir"/libTKXSBase.so.$libVersion - -BUILD() -{ - mkdir -p build && cd "$_" - - cmake .. \ - -DOCE_MULTITHREAD_LIBRARY=OPENMP \ - -DOCE_DISABLE_X11=ON \ - -DOCE_INSTALL_PREFIX=$prefix \ - -DOCE_INSTALL_LIB_DIR=$libDir \ - -DOCE_INSTALL_INCLUDE_DIR=$includeDir \ - -Wno-dev - - make $jobArgs -} - -INSTALL() -{ - cd build - make install - - prepareInstalledDevelLibs libFWOSPlugin libPTKernel libTKBinL libTKBO \ - libTKBool libTKBRep libTKCDF libTKernel libTKFeat libTKFillet libTKG2d \ - libTKG3d libTKGeomAlgo libTKGeomBase libTKHLR libTKIGES libTKLCAF \ - libTKMath libTKMesh libTKOffset libTKPLCAF libTKPrim libTKPShape \ - libTKShapeSchema libTKShHealing libTKStdLSchema libTKSTEP libTKSTEP209 \ - libTKSTEPAttr libTKSTEPBase libTKSTL libTKTObj libTKTopAlgo libTKXMesh \ - libTKXmlL libTKXSBase - - fixPkgconfig - - packageEntries devel \ - $developDir \ - $libDir/cmake -} - -TEST() -{ - cd build - make test -} diff --git a/sci-libs/opencascade/opencascade-7.7.0.recipe b/sci-libs/opencascade/opencascade-7.7.0.recipe new file mode 100644 index 00000000000..2f094c3a460 --- /dev/null +++ b/sci-libs/opencascade/opencascade-7.7.0.recipe @@ -0,0 +1,421 @@ +SUMMARY="A C++ 3D modeling library" +DESCRIPTION="Open CASCADE Technology (OCCT) is an object-oriented C++ class \ +library designed for rapid production of sophisticated domain-specific \ +CAD/CAM/CAE applications." +HOMEPAGE="https://www.opencascade.com/open-cascade-technology/" +COPYRIGHT="1993-1999 Matra Datavision + 1999-2020 OPEN CASCADE SAS" +LICENSE="GNU LGPL v2.1 + Open CASCADE exception v1.0" +REVISION="1" +SOURCE_URI="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/V${portVersion//./_};sf=tgz" +CHECKSUM_SHA256="075ca1dddd9646fcf331a809904925055747a951a6afd07a463369b9b441b445" +SOURCE_DIR="occt-V${portVersion//./_}" +PATCHES="opencascade-$portVersion.patchset" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +commandSuffix=$secondaryArchSuffix +commandBinDir=$binDir +relativeCommandBinDir=$relativeBinDir +if [ "$targetArchitecture" = x86_gcc2 ]; then + commandSuffix= + commandBinDir=$prefix/bin + relativeCommandBinDir=bin +fi + +portVersionCompat="$portVersion compat >= ${portVersion%.*}" + +case "$targetArchitecture" in + *64*) + scriptBitness=64 + ;; + *) + scriptBitness=32 + ;; +esac + +PROVIDES=" + opencascade$secondaryArchSuffix = $portVersion + lib:libTKBin$secondaryArchSuffix = $portVersionCompat + lib:libTKBinL$secondaryArchSuffix = $portVersionCompat + lib:libTKBinTObj$secondaryArchSuffix = $portVersionCompat + lib:libTKBinXCAF$secondaryArchSuffix = $portVersionCompat + lib:libTKBO$secondaryArchSuffix = $portVersionCompat + lib:libTKBool$secondaryArchSuffix = $portVersionCompat + lib:libTKBRep$secondaryArchSuffix = $portVersionCompat + lib:libTKCAF$secondaryArchSuffix = $portVersionCompat + lib:libTKCDF$secondaryArchSuffix = $portVersionCompat + lib:libTKernel$secondaryArchSuffix = $portVersionCompat + lib:libTKFeat$secondaryArchSuffix = $portVersionCompat + lib:libTKFillet$secondaryArchSuffix = $portVersionCompat + lib:libTKG2d$secondaryArchSuffix = $portVersionCompat + lib:libTKG3d$secondaryArchSuffix = $portVersionCompat + lib:libTKGeomAlgo$secondaryArchSuffix = $portVersionCompat + lib:libTKGeomBase$secondaryArchSuffix = $portVersionCompat + lib:libTKHLR$secondaryArchSuffix = $portVersionCompat + lib:libTKIGES$secondaryArchSuffix = $portVersionCompat + lib:libTKLCAF$secondaryArchSuffix = $portVersionCompat + lib:libTKMath$secondaryArchSuffix = $portVersionCompat + lib:libTKMesh$secondaryArchSuffix = $portVersionCompat + lib:libTKMeshVS$secondaryArchSuffix = $portVersionCompat + lib:libTKOffset$secondaryArchSuffix = $portVersionCompat + lib:libTKOpenGl$secondaryArchSuffix = $portVersionCompat + lib:libTKPrim$secondaryArchSuffix = $portVersionCompat + lib:libTKRWMesh$secondaryArchSuffix = $portVersionCompat + lib:libTKService$secondaryArchSuffix = $portVersionCompat + lib:libTKShHealing$secondaryArchSuffix = $portVersionCompat + lib:libTKStd$secondaryArchSuffix = $portVersionCompat + lib:libTKStdL$secondaryArchSuffix = $portVersionCompat + lib:libTKSTEP$secondaryArchSuffix = $portVersionCompat + lib:libTKSTEP209$secondaryArchSuffix = $portVersionCompat + lib:libTKSTEPAttr$secondaryArchSuffix = $portVersionCompat + lib:libTKSTEPBase$secondaryArchSuffix = $portVersionCompat + lib:libTKSTL$secondaryArchSuffix = $portVersionCompat + lib:libTKTObj$secondaryArchSuffix = $portVersionCompat + lib:libTKTopAlgo$secondaryArchSuffix = $portVersionCompat + lib:libTKV3d$secondaryArchSuffix = $portVersionCompat + lib:libTKVCAF$secondaryArchSuffix = $portVersionCompat + lib:libTKVRML$secondaryArchSuffix = $portVersionCompat + lib:libTKXCAF$secondaryArchSuffix = $portVersionCompat + lib:libTKXDE$secondaryArchSuffix = $portVersionCompat + lib:libTKXDECascade$secondaryArchSuffix = $portVersionCompat + lib:libTKXDEIGES$secondaryArchSuffix = $portVersionCompat + lib:libTKXDESTEP$secondaryArchSuffix = $portVersionCompat + lib:libTKXMesh$secondaryArchSuffix = $portVersionCompat + lib:libTKXml$secondaryArchSuffix = $portVersionCompat + lib:libTKXmlL$secondaryArchSuffix = $portVersionCompat + lib:libTKXmlTObj$secondaryArchSuffix = $portVersionCompat + lib:libTKXmlXCAF$secondaryArchSuffix = $portVersionCompat + lib:libTKXSBase$secondaryArchSuffix = $portVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libavcodec$secondaryArchSuffix + lib:libavformat$secondaryArchSuffix + lib:libavutil$secondaryArchSuffix + lib:libEGL$secondaryArchSuffix + lib:libexecinfo$secondaryArchSuffix + lib:libfontconfig$secondaryArchSuffix + lib:libfreeimage$secondaryArchSuffix + lib:libfreetype$secondaryArchSuffix + lib:libGL$secondaryArchSuffix + lib:libswscale$secondaryArchSuffix +# lib:libtbb$secondaryArchSuffix + lib:libX11$secondaryArchSuffix + " + +PROVIDES_devel=" + opencascade${secondaryArchSuffix}_devel = $portVersion + devel:libTKBin$secondaryArchSuffix = $portVersionCompat + devel:libTKBinL$secondaryArchSuffix = $portVersionCompat + devel:libTKBinTObj$secondaryArchSuffix = $portVersionCompat + devel:libTKBinXCAF$secondaryArchSuffix = $portVersionCompat + devel:libTKBO$secondaryArchSuffix = $portVersionCompat + devel:libTKBool$secondaryArchSuffix = $portVersionCompat + devel:libTKBRep$secondaryArchSuffix = $portVersionCompat + devel:libTKCAF$secondaryArchSuffix = $portVersionCompat + devel:libTKCDF$secondaryArchSuffix = $portVersionCompat + devel:libTKDCAF$secondaryArchSuffix = $portVersionCompat + devel:libTKDFBrowser$secondaryArchSuffix = $portVersionCompat + devel:libTKDraw$secondaryArchSuffix = $portVersionCompat + devel:libTKernel$secondaryArchSuffix = $portVersionCompat + devel:libTKExpress$secondaryArchSuffix = $portVersionCompat + devel:libTKFeat$secondaryArchSuffix = $portVersionCompat + devel:libTKFillet$secondaryArchSuffix = $portVersionCompat + devel:libTKG2d$secondaryArchSuffix = $portVersionCompat + devel:libTKG3d$secondaryArchSuffix = $portVersionCompat + devel:libTKGeomAlgo$secondaryArchSuffix = $portVersionCompat + devel:libTKGeomBase$secondaryArchSuffix = $portVersionCompat + devel:libTKHLR$secondaryArchSuffix = $portVersionCompat + devel:libTKIGES$secondaryArchSuffix = $portVersionCompat + devel:libTKLCAF$secondaryArchSuffix = $portVersionCompat + devel:libTKMath$secondaryArchSuffix = $portVersionCompat + devel:libTKMesh$secondaryArchSuffix = $portVersionCompat + devel:libTKMeshVS$secondaryArchSuffix = $portVersionCompat + devel:libTKMessageModel$secondaryArchSuffix = $portVersionCompat + devel:libTKMessageView$secondaryArchSuffix = $portVersionCompat + devel:libTKOffset$secondaryArchSuffix = $portVersionCompat + devel:libTKOpenGl$secondaryArchSuffix = $portVersionCompat + devel:libTKOpenGlTest$secondaryArchSuffix = $portVersionCompat + devel:libTKPrim$secondaryArchSuffix = $portVersionCompat + devel:libTKQADraw$secondaryArchSuffix = $portVersionCompat + devel:libTKRWMesh$secondaryArchSuffix = $portVersionCompat + devel:libTKService$secondaryArchSuffix = $portVersionCompat + devel:libTKShapeView$secondaryArchSuffix = $portVersionCompat + devel:libTKShHealing$secondaryArchSuffix = $portVersionCompat + devel:libTKStd$secondaryArchSuffix = $portVersionCompat + devel:libTKStdL$secondaryArchSuffix = $portVersionCompat + devel:libTKSTEP$secondaryArchSuffix = $portVersionCompat + devel:libTKSTEP209$secondaryArchSuffix = $portVersionCompat + devel:libTKSTEPAttr$secondaryArchSuffix = $portVersionCompat + devel:libTKSTEPBase$secondaryArchSuffix = $portVersionCompat + devel:libTKSTL$secondaryArchSuffix = $portVersionCompat + devel:libTKTInspector$secondaryArchSuffix = $portVersionCompat + devel:libTKTInspectorAPI$secondaryArchSuffix = $portVersionCompat + devel:libTKTObj$secondaryArchSuffix = $portVersionCompat + devel:libTKTObjDRAW$secondaryArchSuffix = $portVersionCompat + devel:libTKToolsDraw$secondaryArchSuffix = $portVersionCompat + devel:libTKTopAlgo$secondaryArchSuffix = $portVersionCompat + devel:libTKTopTest$secondaryArchSuffix = $portVersionCompat + devel:libTKTreeModel$secondaryArchSuffix = $portVersionCompat + devel:libTKV3d$secondaryArchSuffix = $portVersionCompat + devel:libTKVCAF$secondaryArchSuffix = $portVersionCompat + devel:libTKVInspector$secondaryArchSuffix = $portVersionCompat + devel:libTKVRML$secondaryArchSuffix = $portVersionCompat + devel:libTKView$secondaryArchSuffix = $portVersionCompat + devel:libTKViewerTest$secondaryArchSuffix = $portVersionCompat + devel:libTKXCAF$secondaryArchSuffix = $portVersionCompat + devel:libTKXDE$secondaryArchSuffix = $portVersionCompat + devel:libTKXDECascade$secondaryArchSuffix = $portVersionCompat + devel:libTKXDEDRAW$secondaryArchSuffix = $portVersionCompat + devel:libTKXDEIGES$secondaryArchSuffix = $portVersionCompat + devel:libTKXDESTEP$secondaryArchSuffix = $portVersionCompat + devel:libTKXMesh$secondaryArchSuffix = $portVersionCompat + devel:libTKXml$secondaryArchSuffix = $portVersionCompat + devel:libTKXmlL$secondaryArchSuffix = $portVersionCompat + devel:libTKXmlTObj$secondaryArchSuffix = $portVersionCompat + devel:libTKXmlXCAF$secondaryArchSuffix = $portVersionCompat + devel:libTKXSBase$secondaryArchSuffix = $portVersionCompat + devel:libTKXSDRAW$secondaryArchSuffix = $portVersionCompat + " +REQUIRES_devel=" + opencascade$secondaryArchSuffix == $portVersion base + opencascade${secondaryArchSuffix}_tools == $portVersion + " + +PROVIDES_doc=" + opencascade${secondaryArchSuffix}_doc = $portVersion + " +REQUIRES_doc=" + opencascade$secondaryArchSuffix == $portVersion base + " + +PROVIDES_samples=" + opencascade${secondaryArchSuffix}_samples = $portVersion + cmd:FuncDemo$commandSuffix = $portVersion + cmd:FuncDemo_$portVersion$commandSuffix = $portVersion + cmd:IESample$commandSuffix = $portVersion + cmd:IESample_$portVersion$commandSuffix = $portVersion + cmd:OCCTOverview$commandSuffix = $portVersion + cmd:OCCTOverview_$portVersion$commandSuffix = $portVersion + cmd:Tutorial$commandSuffix = $portVersion + cmd:Tutorial_$portVersion$commandSuffix = $portVersion + cmd:sample.sh + " +REQUIRES_samples=" + opencascade$secondaryArchSuffix == $portVersion base + opencascade${secondaryArchSuffix}_tools == $portVersion + haiku$secondaryArchSuffix + lib:libavcodec$secondaryArchSuffix + lib:libavformat$secondaryArchSuffix + lib:libavutil$secondaryArchSuffix + lib:libEGL$secondaryArchSuffix + lib:libexecinfo$secondaryArchSuffix + lib:libfontconfig$secondaryArchSuffix + lib:libfreeimage$secondaryArchSuffix + lib:libfreetype$secondaryArchSuffix + lib:libGL$secondaryArchSuffix + lib:libQt5Core$secondaryArchSuffix + lib:libQt5Gui$secondaryArchSuffix + lib:libQt5Qml$secondaryArchSuffix + lib:libQt5QmlModels$secondaryArchSuffix + lib:libQt5Quick$secondaryArchSuffix + lib:libQt5Widgets$secondaryArchSuffix + lib:libQt5Xml$secondaryArchSuffix + lib:libswscale$secondaryArchSuffix +# lib:libtbb$secondaryArchSuffix + lib:libX11$secondaryArchSuffix + " + +SUMMARY_tools="C++ 3D modeling tools (DRAW, Inspector and ExpToCas)" +PROVIDES_tools=" + opencascade${secondaryArchSuffix}_tools = $portVersion + cmd:DRAWEXE$commandSuffix = $portVersion + cmd:DRAWEXE_$portVersion$commandSuffix = $portVersion + cmd:ExpToCasExe$commandSuffix = $portVersion + cmd:ExpToCasExe_$portVersion$commandSuffix = $portVersion + cmd:TInspectorEXE$commandSuffix = $portVersion + cmd:TInspectorEXE_$portVersion$commandSuffix = $portVersion + cmd:custom.sh + cmd:custom_gcc_$scriptBitness.sh + cmd:draw.sh + cmd:env.sh + cmd:inspector.sh + lib:libTKDCAF$secondaryArchSuffix = $portVersionCompat + lib:libTKDFBrowser$secondaryArchSuffix = $portVersionCompat + lib:libTKDraw$secondaryArchSuffix = $portVersionCompat + lib:libTKExpress$secondaryArchSuffix = $portVersionCompat + lib:libTKMessageModel$secondaryArchSuffix = $portVersionCompat + lib:libTKMessageView$secondaryArchSuffix = $portVersionCompat + lib:libTKOpenGlTest$secondaryArchSuffix = $portVersionCompat + lib:libTKQADraw$secondaryArchSuffix = $portVersionCompat + lib:libTKShapeView$secondaryArchSuffix = $portVersionCompat + lib:libTKTInspector$secondaryArchSuffix = $portVersionCompat + lib:libTKTInspectorAPI$secondaryArchSuffix = $portVersionCompat + lib:libTKTObjDRAW$secondaryArchSuffix = $portVersionCompat + lib:libTKToolsDraw$secondaryArchSuffix = $portVersionCompat + lib:libTKTopTest$secondaryArchSuffix = $portVersionCompat + lib:libTKTreeModel$secondaryArchSuffix = $portVersionCompat + lib:libTKVInspector$secondaryArchSuffix = $portVersionCompat + lib:libTKView$secondaryArchSuffix = $portVersionCompat + lib:libTKViewerTest$secondaryArchSuffix = $portVersionCompat + lib:libTKXDEDRAW$secondaryArchSuffix = $portVersionCompat + lib:libTKXSDRAW$secondaryArchSuffix = $portVersionCompat + " +REQUIRES_tools=" + opencascade$secondaryArchSuffix == $portVersion base + haiku$secondaryArchSuffix + lib:libavcodec$secondaryArchSuffix + lib:libavformat$secondaryArchSuffix + lib:libavutil$secondaryArchSuffix + lib:libEGL$secondaryArchSuffix + lib:libexecinfo$secondaryArchSuffix + lib:libfontconfig$secondaryArchSuffix + lib:libfreeimage$secondaryArchSuffix + lib:libfreetype$secondaryArchSuffix + lib:libGL$secondaryArchSuffix + lib:libQt5Gui$secondaryArchSuffix + lib:libQt5Qml$secondaryArchSuffix + lib:libQt5QmlModels$secondaryArchSuffix + lib:libQt5Quick$secondaryArchSuffix + lib:libQt5Widgets$secondaryArchSuffix + lib:libQt5Xml$secondaryArchSuffix + lib:libswscale$secondaryArchSuffix +# lib:libtbb$secondaryArchSuffix + lib:libtcl8.6$secondaryArchSuffix +# lib:libtk8.6$secondaryArchSuffix + lib:libX11$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + cmd:dot + cmd:doxygen >= 1.8.4 + cmd:lrelease$secondaryArchSuffix + cmd:tclsh + devel:libavcodec$secondaryArchSuffix + devel:libavformat$secondaryArchSuffix + devel:libavutil$secondaryArchSuffix + devel:libEGL$secondaryArchSuffix + devel:libexecinfo$secondaryArchSuffix + devel:libfontconfig$secondaryArchSuffix + devel:libfreeimage$secondaryArchSuffix + devel:libfreetype$secondaryArchSuffix + devel:libGL$secondaryArchSuffix + devel:libQt5Gui$secondaryArchSuffix + devel:libQt5Qml$secondaryArchSuffix + devel:libQt5QmlModels$secondaryArchSuffix + devel:libQt5Quick$secondaryArchSuffix + devel:libQt5Widgets$secondaryArchSuffix + devel:libQt5Xml$secondaryArchSuffix + devel:librapidjson$secondaryArchSuffix + devel:libswscale$secondaryArchSuffix +# devel:libtbb$secondaryArchSuffix + devel:libtclstub8.6$secondaryArchSuffix +# devel:libtk8.6$secondaryArchSuffix + devel:libX11$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:g++$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + " + +BUILD() +{ + mkdir -p build + cd build + + cmake .. \ + -DCMAKE_BUILD_TYPE=Release \ + -D3RDPARTY_QT_DIR=$portPackageLinksDir/devel~libqt5 \ + -D3RDPARTY_SKIP_DOT_EXECUTABLE=OFF \ + -DBUILD_Inspector=ON \ + -DBUILD_SAMPLES_QT=ON \ + -DINSTALL_DIR=$prefix \ + -DINSTALL_DIR_BIN=$relativeCommandBinDir \ + -DINSTALL_DIR_CMAKE=$relativeDevelopLibDir/cmake/opencascade \ + -DINSTALL_DIR_DATA=$relativeDataDir/opencascade/data \ + -DINSTALL_DIR_DOC=$relativeDocDir \ + -DINSTALL_DIR_INCLUDE=$relativeIncludeDir/opencascade \ + -DINSTALL_DIR_LIB=$relativeLibDir \ + -DINSTALL_DIR_RESOURCE=$relativeDataDir/opencascade/resources \ + -DINSTALL_DIR_SAMPLES=$relativeDataDir/opencascade/samples \ + -DINSTALL_DIR_SCRIPT=$relativeCommandBinDir \ + -DINSTALL_DIR_TESTS=$relativeDataDir/opencascade/tests \ + -DINSTALL_DOC_Overview=ON \ + -DINSTALL_SAMPLES=ON \ + -DINSTALL_TEST_CASES=OFF \ + -DUSE_DRACO=OFF \ + -DUSE_FFMPEG=ON \ + -DUSE_FREEIMAGE=ON \ + -DUSE_OPENVR=OFF \ + -DUSE_RAPIDJSON=ON \ + -DUSE_TBB=OFF \ + -DUSE_TK=OFF \ + -DUSE_VTK=OFF \ + -DUSE_XLIB=ON + # Draco, OpenVR and VTK are not available, TBB is too old, (SDL)Tk hangs on opening a window + + make $jobArgs +} + +INSTALL() +{ + cd build + make install + + prepareInstalledDevelLibs libTKBin libTKBinL libTKBinTObj libTKBinXCAF libTKBO libTKBool \ + libTKBRep libTKCAF libTKCDF libTKDCAF libTKDFBrowser libTKDraw libTKernel libTKExpress \ + libTKFeat libTKFillet libTKG2d libTKG3d libTKGeomAlgo libTKGeomBase libTKHLR libTKIGES \ + libTKLCAF libTKMath libTKMesh libTKMeshVS libTKMessageModel libTKMessageView libTKOffset \ + libTKOpenGl libTKOpenGlTest libTKPrim libTKQADraw libTKRWMesh libTKService libTKShapeView \ + libTKShHealing libTKStd libTKStdL libTKSTEP libTKSTEP209 libTKSTEPAttr libTKSTEPBase \ + libTKSTL libTKTInspector libTKTInspectorAPI libTKTObj libTKTObjDRAW libTKToolsDraw \ + libTKTopAlgo libTKTopTest libTKTreeModel libTKV3d libTKVCAF libTKView libTKViewerTest \ + libTKVInspector libTKVRML libTKXCAF libTKXDE libTKXDECascade libTKXDEDRAW libTKXDEIGES \ + libTKXDESTEP libTKXMesh libTKXml libTKXmlL libTKXmlTObj libTKXmlXCAF libTKXSBase \ + libTKXSDRAW + + packageEntries devel \ + $developDir + + packageEntries doc \ + $documentationDir + + packageEntries samples \ + $commandBinDir/FuncDemo* \ + $commandBinDir/IESample* \ + $commandBinDir/OCCTOverview* \ + $commandBinDir/Tutorial* \ + $commandBinDir/sample.sh \ + $dataDir/opencascade/samples \ + $dataDir/opencascade/resources/samples + + packageEntries tools \ + $commandBinDir \ + $libDir/libTKExpress.so* \ + $libDir/libTKTInspector.so* \ + $libDir/libTKTInspectorAPI.so* \ + $dataDir/opencascade/resources/DrawResources + + # for dynamic loading, version-less symlinks are needed for some libraries + toolsLibs="libTKDraw libTKTopTest libTKOpenGlTest libTKViewerTest libTKXSDRAW libTKDCAF \ + libTKXDEDRAW libTKTObjDRAW libTKQADraw libTKShapeView libTKMessageModel libTKMessageView \ + libTKView libTKVInspector libTKTreeModel libTKDFBrowser libTKToolsDraw" + for lib in $toolsLibs; do + ln -s $lib.so.$portVersion $libDir/$lib.so + packageEntries tools \ + $libDir/$lib.so* + done +} + +TEST() +{ + cd build + source env.sh + lin??/gcc/bin/DRAWEXE -c testgrid +} diff --git a/sci-libs/opencascade/patches/opencascade-0.18.3.patchset b/sci-libs/opencascade/patches/opencascade-0.18.3.patchset deleted file mode 100644 index 8f99d065ef6..00000000000 --- a/sci-libs/opencascade/patches/opencascade-0.18.3.patchset +++ /dev/null @@ -1,244 +0,0 @@ -From 838ef11dbc70e82650549a8ab19f1c96b8573177 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= -Date: Sat, 3 Mar 2018 19:51:08 +0100 -Subject: Basic Haiku support - - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 092fd2f..d9ccb93 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -472,9 +472,9 @@ if(OCE_VISUALISATION) - endif(WIN32) - endif(OCE_WITH_FREEIMAGE) - -- if (NOT WIN32 AND NOT OCE_OSX_USE_COCOA) -+ if (NOT WIN32 AND NOT OCE_OSX_USE_COCOA AND NOT HAIKU) - find_package(X11 REQUIRED) -- endif(NOT WIN32 AND NOT OCE_OSX_USE_COCOA) -+ endif(NOT WIN32 AND NOT OCE_OSX_USE_COCOA AND NOT HAIKU) - - if (NOT APPLE OR OCE_OSX_USE_COCOA) - find_package(OpenGL REQUIRED) -@@ -716,6 +716,11 @@ if(UNIX) - # remark #981 "operands are evaluated in unspecified order", e.g. a = b() + c() - add_definitions("-diag-disable 383,522,858,981") - endif(INTEL) -+ if(HAIKU) -+ # Haiku networking resides in libnetwork -+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lnetwork") -+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lnetwork") -+ endif(HAIKU) - endif(APPLE) - add_definitions(-DHAVE_CONFIG_H -DCSFDB -DOCC_CONVERT_SIGNALS) - else(UNIX) -diff --git a/src/Aspect/Aspect_DisplayConnection.cxx b/src/Aspect/Aspect_DisplayConnection.cxx -index 72109bf..5eac74a 100644 ---- a/src/Aspect/Aspect_DisplayConnection.cxx -+++ b/src/Aspect/Aspect_DisplayConnection.cxx -@@ -25,7 +25,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Aspect_DisplayConnection, Standard_Transient) - // ======================================================================= - Aspect_DisplayConnection::Aspect_DisplayConnection() - { --#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) -+#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__HAIKU__) - OSD_Environment anEnv ("DISPLAY"); - myDisplayName = anEnv.Value(); - Init(); -@@ -38,7 +38,7 @@ Aspect_DisplayConnection::Aspect_DisplayConnection() - // ======================================================================= - Aspect_DisplayConnection::~Aspect_DisplayConnection() - { --#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) -+#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__HAIKU__) - if (myDisplay != NULL) - { - XCloseDisplay (myDisplay); -@@ -46,7 +46,7 @@ Aspect_DisplayConnection::~Aspect_DisplayConnection() - #endif - } - --#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) -+#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__HAIKU__) - // ======================================================================= - // function : Aspect_DisplayConnection - // purpose : -diff --git a/src/Aspect/Aspect_DisplayConnection.hxx b/src/Aspect/Aspect_DisplayConnection.hxx -index 624cbaf..16d9f28 100644 ---- a/src/Aspect/Aspect_DisplayConnection.hxx -+++ b/src/Aspect/Aspect_DisplayConnection.hxx -@@ -20,7 +20,7 @@ - #include - #include - --#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) -+#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__HAIKU__) - #include - #endif - -@@ -39,7 +39,7 @@ public: - //! Destructor. Close opened connection. - Standard_EXPORT ~Aspect_DisplayConnection(); - --#if !defined(_WIN32) && !defined(__WIN32__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) -+#if !defined(_WIN32) && !defined(__WIN32__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__HAIKU__) - //! Constructor. Creates connection with display specified in theDisplayName. - //! Display name should be in format "hostname:number" or "hostname:number.screen_number", where: - //! hostname - Specifies the name of the host machine on which the display is physically attached. -diff --git a/src/InterfaceGraphic/InterfaceGraphic.hxx b/src/InterfaceGraphic/InterfaceGraphic.hxx -index 80ac333..8539a2c 100644 ---- a/src/InterfaceGraphic/InterfaceGraphic.hxx -+++ b/src/InterfaceGraphic/InterfaceGraphic.hxx -@@ -23,7 +23,7 @@ - #undef DrawText - #endif - --#elif !defined(__ANDROID__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) -+#elif !defined(__ANDROID__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__HAIKU__) - - #include - -diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx -index e9a80d6..4e61ac3 100644 ---- a/src/OSD/OSD_signal.cxx -+++ b/src/OSD/OSD_signal.cxx -@@ -69,7 +69,7 @@ typedef void (* SIG_PFV) (int); - - #include - --#if !defined(__ANDROID__) -+#if !defined(__ANDROID__) && !defined(__HAIKU__) - #include - #endif - -diff --git a/src/Standard/Standard_MMgrOpt.cxx b/src/Standard/Standard_MMgrOpt.cxx -index 51464ad..3ed0fa1 100644 ---- a/src/Standard/Standard_MMgrOpt.cxx -+++ b/src/Standard/Standard_MMgrOpt.cxx -@@ -25,6 +25,10 @@ - # include /* mmap() */ - #endif - -+#ifdef __HAIKU__ -+# include -+#endif -+ - #include - // - #if defined (__sun) || defined(SOLARIS) -diff --git a/src/Standard/Standard_Mutex.cxx b/src/Standard/Standard_Mutex.cxx -index cdf6498..9fd1182 100644 ---- a/src/Standard/Standard_Mutex.cxx -+++ b/src/Standard/Standard_Mutex.cxx -@@ -24,6 +24,10 @@ - #include - #include - -+#ifdef __HAIKU__ -+#include -+#endif -+ - //============================================= - // Standard_Mutex::Standard_Mutex - //============================================= -diff --git a/src/Standard/Standard_Mutex.hxx b/src/Standard/Standard_Mutex.hxx -index 22b8a03..5e81912 100644 ---- a/src/Standard/Standard_Mutex.hxx -+++ b/src/Standard/Standard_Mutex.hxx -@@ -24,7 +24,9 @@ - #include - #else - #include -- #include -+ #ifndef __HAIKU__ -+ #include -+ #endif - #include - #include - #endif -diff --git a/src/Xw/Xw_Window.cxx b/src/Xw/Xw_Window.cxx -index a24a3a0..10694c3 100644 ---- a/src/Xw/Xw_Window.cxx -+++ b/src/Xw/Xw_Window.cxx -@@ -15,7 +15,7 @@ - - #include - --#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) -+#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__HAIKU__) - - #include - #include -diff --git a/src/Xw/Xw_Window.hxx b/src/Xw/Xw_Window.hxx -index 53f0c14..da04952 100644 ---- a/src/Xw/Xw_Window.hxx -+++ b/src/Xw/Xw_Window.hxx -@@ -16,7 +16,7 @@ - #ifndef _Xw_Window_H__ - #define _Xw_Window_H__ - --#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) -+#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__) && !defined(__HAIKU__) - - #include - --- -2.16.2 - - -From 03827b0b856173e015a3eb4c60c729f7ce3a6253 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= -Date: Sun, 4 Mar 2018 08:22:15 +0100 -Subject: Data install path fix - - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d9ccb93..6ff39cb 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -903,7 +903,11 @@ endif(NOT DEFINED OCE_INSTALL_SCRIPT_DIR) - # Data - if(NOT DEFINED OCE_INSTALL_DATA_DIR) - if(NOT MSVC) -- set(OCE_INSTALL_DATA_DIR share/oce-${OCE_VERSION}) -+ if(NOT HAIKU) -+ set(OCE_INSTALL_DATA_DIR share/oce-${OCE_VERSION}) -+ else () -+ set(OCE_INSTALL_DATA_DIR data/oce-${OCE_VERSION}) -+ endif(NOT HAIKU) - else () - set(OCE_INSTALL_DATA_DIR "share/oce") - endif(NOT MSVC) --- -2.16.2 - - -From 98c143fbef94320aa5c68dd0340e3660edd5c7ab Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= -Date: Sun, 4 Mar 2018 08:59:37 +0100 -Subject: Adjust .cmake install paths - - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6ff39cb..6f7f871 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -931,8 +931,13 @@ if(NOT DEFINED OCE_INSTALL_CMAKE_DATA_DIR) - set(OCE_INSTALL_CMAKE_DATA_DIR - OCE.framework/Versions/${OCE_VERSION}/Resources) - else(APPLE) -- set(OCE_INSTALL_CMAKE_DATA_DIR -- lib${LIB_SUFFIX}/oce-${OCE_VERSION}) -+ if(NOT HAIKU) -+ set(OCE_INSTALL_CMAKE_DATA_DIR -+ lib${LIB_SUFFIX}/oce-${OCE_VERSION}) -+ else(NOT HAIKU) -+ set(OCE_INSTALL_CMAKE_DATA_DIR -+ lib${LIB_SUFFIX}/cmake) -+ endif(NOT HAIKU) - endif(APPLE) - endif(WIN32) - endif(NOT DEFINED OCE_INSTALL_CMAKE_DATA_DIR) --- -2.16.2 - diff --git a/sci-libs/opencascade/patches/opencascade-7.7.0.patchset b/sci-libs/opencascade/patches/opencascade-7.7.0.patchset new file mode 100644 index 00000000000..b6e8caa6a7f --- /dev/null +++ b/sci-libs/opencascade/patches/opencascade-7.7.0.patchset @@ -0,0 +1,346 @@ +From 2b538f541f5c3cf19fa39d78aabcdb02fd49c43d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= +Date: Sun, 4 Dec 2022 21:32:37 +0100 +Subject: Haiku Support + + +diff --git a/adm/cmake/occt_csf.cmake b/adm/cmake/occt_csf.cmake +index bee8ba7..a0bafe0 100644 +--- a/adm/cmake/occt_csf.cmake ++++ b/adm/cmake/occt_csf.cmake +@@ -133,6 +133,16 @@ else() + set (CSF_ThreadLibs "c") + set (CSF_OpenGlesLibs "EGL GLESv2") + set (CSF_androidlog "log") ++ elseif (HAIKU) ++ set (CSF_psapi "execinfo") # Workaround for linking libexecinfo for Stacktrace support ++ set (CSF_wsock32 "network") ++ set (CSF_OpenGlLibs "GL EGL") ++ if (USE_XLIB) ++ set (CSF_XwLibs "X11") ++ endif() ++ if (USE_FREETYPE) ++ set (CSF_fontconfig "fontconfig") ++ endif() + elseif (UNIX) + set (CSF_ThreadLibs "pthread rt stdc++") + if (USE_XLIB) +diff --git a/adm/templates/OpenCASCADEConfig.cmake.in b/adm/templates/OpenCASCADEConfig.cmake.in +index e391ddf..6dc2e77 100644 +--- a/adm/templates/OpenCASCADEConfig.cmake.in ++++ b/adm/templates/OpenCASCADEConfig.cmake.in +@@ -20,16 +20,23 @@ set (OpenCASCADE_DEVELOPMENT_VERSION "@OCC_VERSION_DEVELOPMENT@") + # location, by going up one level + one level if "cmake" + one level if "lib". + # This is made to support different locations of CMake files: + # - in UNIX style: $INSTALL_DIR/lib/cmake/opencascade- ++# - in Haiku style: $INSTALL_DIR/develop/lib$secondaryArchSubdir/cmake/opencascade + # - in Windows style: $INSTALL_DIR/cmake + # - in Android style: $INSTALL_DIR/libs/$CMAKE_ANDROID_ARCH_ABI/cmake/opencascade- + get_filename_component (OpenCASCADE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) + get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH) + if (OpenCASCADE_INSTALL_PREFIX MATCHES "/cmake$") + get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH) ++ if (HAIKU) # for secondaryArch support ++ get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH) ++ endif() + endif() + if (OpenCASCADE_INSTALL_PREFIX MATCHES "/lib$") + get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH) + endif() ++if (OpenCASCADE_INSTALL_PREFIX MATCHES "/develop$") ++ get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH) ++endif() + if (OpenCASCADE_INSTALL_PREFIX MATCHES "/libs/${CMAKE_ANDROID_ARCH_ABI}$") + get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH) + get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH) +diff --git a/adm/templates/env.build.sh.in b/adm/templates/env.build.sh.in +index 7e11c62..d95ff2d 100644 +--- a/adm/templates/env.build.sh.in ++++ b/adm/templates/env.build.sh.in +@@ -31,6 +31,8 @@ aSystem=`uname -s` + if [ "$aSystem" == "Darwin" ]; then + export WOKSTATION="mac"; + export ARCH="64"; ++elif [ "$aSystem" == "Haiku" ]; then ++ export WOKSTATION="haiku"; + else + export WOKSTATION="lin"; + fi +@@ -108,6 +110,14 @@ if [ "$WOKSTATION" == "mac" ]; then + fi + fi + ++if [ "$WOKSTATION" == "haiku" ]; then ++ if [ "$LIBRARY_PATH" != "" ]; then ++ export LIBRARY_PATH="${LD_LIBRARY_PATH}:${LIBRARY_PATH}" ++ else ++ export LIBRARY_PATH="${LD_LIBRARY_PATH}" ++ fi ++fi ++ + # ----- Set envoronment variables used by OCCT ----- + export CSF_LANGUAGE=us + export MMGT_CLEAR=1 +diff --git a/adm/templates/env.install.sh.in b/adm/templates/env.install.sh.in +index bdb2dec..b2ce8c7 100644 +--- a/adm/templates/env.install.sh.in ++++ b/adm/templates/env.install.sh.in +@@ -33,6 +33,8 @@ aSystem=`uname -s` + if [ "$aSystem" == "Darwin" ]; then + export WOKSTATION="mac"; + export ARCH="64"; ++elif [ "$aSystem" == "Haiku" ]; then ++ export WOKSTATION="haiku"; + else + export WOKSTATION="lin"; + fi +@@ -110,6 +112,14 @@ if [ "$WOKSTATION" == "mac" ]; then + fi + fi + ++if [ "$WOKSTATION" == "haiku" ]; then ++ if [ "$LIBRARY_PATH" != "" ]; then ++ export LIBRARY_PATH="${LD_LIBRARY_PATH}:${LIBRARY_PATH}" ++ else ++ export LIBRARY_PATH="${LD_LIBRARY_PATH}" ++ fi ++fi ++ + # ----- Set envoronment variables used by OCCT ----- + export CSF_LANGUAGE=us + export MMGT_CLEAR=1 +diff --git a/adm/templates/env.sh b/adm/templates/env.sh +index 4ab363e..48881b2 100644 +--- a/adm/templates/env.sh ++++ b/adm/templates/env.sh +@@ -69,6 +69,8 @@ fi + if [ "$aSystem" == "Darwin" ]; then + export WOKSTATION="mac"; + export ARCH="64"; ++elif [ "$aSystem" == "Haiku" ]; then ++ export WOKSTATION="haiku"; + else + export WOKSTATION="lin"; + fi +@@ -210,6 +212,9 @@ export LD_LIBRARY_PATH="${CSF_OCCTLibPath}:${LD_LIBRARY_PATH}" + if [ "$WOKSTATION" == "mac" ]; then + export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${DYLD_LIBRARY_PATH}" + fi ++if [ "$WOKSTATION" == "haiku" ]; then ++ export LIBRARY_PATH="${LD_LIBRARY_PATH}:${LIBRARY_PATH}" ++fi + + # Set envoronment variables used by OCCT + export CSF_LANGUAGE="us" +diff --git a/src/OSD/OSD_Path.cxx b/src/OSD/OSD_Path.cxx +index e034e9e..8b5717a 100644 +--- a/src/OSD/OSD_Path.cxx ++++ b/src/OSD/OSD_Path.cxx +@@ -39,6 +39,8 @@ static OSD_SysType whereAmI() + return OSD_LinuxREDHAT; + #elif defined(_AIX) || defined(AIX) + return OSD_Aix; ++#elif defined(__HAIKU__) ++ return OSD_Haiku; + #else + struct utsname info; + uname(&info); +@@ -343,6 +345,7 @@ OSD_Path::OSD_Path(const TCollection_AsciiString& aDependentName, + case OSD_UnixSystemV: + case OSD_Aix: + case OSD_OSF: ++ case OSD_Haiku: + UnixExtract(aDependentName,myNode,myUserName,myPassword,myTrek,myName,myExtension); + break; + case OSD_OS2: +diff --git a/src/OSD/OSD_SysType.hxx b/src/OSD/OSD_SysType.hxx +index 0492120..d9f19dc 100644 +--- a/src/OSD/OSD_SysType.hxx ++++ b/src/OSD/OSD_SysType.hxx +@@ -35,7 +35,8 @@ OSD_MacOs, + OSD_Taligent, + OSD_WindowsNT, + OSD_LinuxREDHAT, +-OSD_Aix ++OSD_Aix, ++OSD_Haiku + }; + + #endif // _OSD_SysType_HeaderFile +diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx +index 7da3f19..72a1464 100644 +--- a/src/OSD/OSD_signal.cxx ++++ b/src/OSD/OSD_signal.cxx +@@ -758,7 +758,7 @@ typedef void (* SIG_PFV) (int); + + #include + +-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) ++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && !defined(__HAIKU__) + #include + #endif + +diff --git a/src/OpenGl/OpenGl_GlFunctions.hxx b/src/OpenGl/OpenGl_GlFunctions.hxx +index 4308080..fa28727 100644 +--- a/src/OpenGl/OpenGl_GlFunctions.hxx ++++ b/src/OpenGl/OpenGl_GlFunctions.hxx +@@ -26,7 +26,7 @@ + #if !defined(__APPLE__) + #define HAVE_EGL // EAGL is used instead of EGL + #endif +-#elif !defined(_WIN32) && !defined(__APPLE__) && !defined(HAVE_XLIB) ++#elif !defined(_WIN32) && !defined(__APPLE__) && (defined(__HAIKU__) || !defined(HAVE_XLIB)) + #define HAVE_EGL + #endif + #endif +diff --git a/src/OpenGl/OpenGl_GraphicDriver.cxx b/src/OpenGl/OpenGl_GraphicDriver.cxx +index a1b5b2b..26c2d27 100644 +--- a/src/OpenGl/OpenGl_GraphicDriver.cxx ++++ b/src/OpenGl/OpenGl_GraphicDriver.cxx +@@ -42,7 +42,12 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_GraphicDriver,Graphic3d_GraphicDriver) + + #if !defined(_WIN32) && !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && (!defined(__APPLE__) || defined(HAVE_XLIB)) + #include // XOpenDisplay() +- #include ++ #ifdef __HAIKU__ ++ #define HAVE_EGL ++ #include ++ #else ++ #include ++ #endif + #endif + + #if !defined(HAVE_EGL) +diff --git a/src/Standard/Standard_CString.cxx b/src/Standard/Standard_CString.cxx +index f73d6b6..a40a2f7 100755 +--- a/src/Standard/Standard_CString.cxx ++++ b/src/Standard/Standard_CString.cxx +@@ -79,7 +79,7 @@ Standard_Integer HashCodes (const Standard_CString theString, const Standard_Int + // glibc version for android platform use locale-independent implementation of + // strtod, strtol, strtoll functions. For other system with locale-depended + // implementations problems may appear if "C" locale is not set explicitly. +- #if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__MINGW32__) ++ #if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__MINGW32__) && !defined(__HAIKU__) + #error System does not support xlocale. Import/export could be broken if C locale did not specified by application. + #endif + #define strtod_l(thePtr, theNextPtr, theLocale) strtod(thePtr, theNextPtr) +diff --git a/src/ViewerTest/ViewerTest_CmdParser.cxx b/src/ViewerTest/ViewerTest_CmdParser.cxx +index 04cb7d4..a8619da 100644 +--- a/src/ViewerTest/ViewerTest_CmdParser.cxx ++++ b/src/ViewerTest/ViewerTest_CmdParser.cxx +@@ -21,6 +21,7 @@ + + #include + #include ++#include + + namespace + { +-- +2.37.3 + + +From 8323f236b4931d378443d5ba31a05abf3674f013 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= +Date: Sun, 4 Dec 2022 21:33:38 +0100 +Subject: add a stub to allow building on Haiku when not using Xlib + +an actual implementation of a Haiku_Window is missing + +diff --git a/tools/View/View_Widget.cxx b/tools/View/View_Widget.cxx +index a9b7406..87c8069 100644 +--- a/tools/View/View_Widget.cxx ++++ b/tools/View/View_Widget.cxx +@@ -116,6 +116,9 @@ void View_Widget::Init() + #elif defined (__APPLE__) + NSView* aViewHandle = (NSView*)winId(); + Handle(Aspect_Window) aWnd = new Cocoa_Window (aViewHandle); ++#elif defined (__HAIKU__) ++ // TODO: implement Haiku_Window ++ Handle(Aspect_Window) aWnd = nullptr; + #else + // + #endif +-- +2.37.3 + + +From 9c48e61a136a8ac3cad831a6b98764942491eb4d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= +Date: Thu, 8 Dec 2022 20:05:17 +0100 +Subject: add Haiku to tcl platform check, fixes some tests + + +diff --git a/src/DrawResources/CheckCommands.tcl b/src/DrawResources/CheckCommands.tcl +index e39a130..6fe3945 100644 +--- a/src/DrawResources/CheckCommands.tcl ++++ b/src/DrawResources/CheckCommands.tcl +@@ -1095,6 +1095,7 @@ help checkplatform { + -windows : return 1 if current platform is 'Windows', otherwise return 0 + -linux : return 1 if current platform is 'Linux', otherwise return 0 + -osx : return 1 if current platform is 'MacOS X', otherwise return 0 ++ -haiku : return 1 if current platform is 'Haiku', otherwise return 0 + + Only one option can be used at once. + If no option is given, procedure will return the name of current platform. +@@ -1103,10 +1104,12 @@ proc checkplatform {args} { + set check_for_windows false + set check_for_linux false + set check_for_macosx false ++ set check_for_haiku false + + set options {{"-windows" check_for_windows 0} + {"-linux" check_for_linux 0} +- {"-osx" check_for_macosx 0}} ++ {"-osx" check_for_macosx 0} ++ {"-haiku" check_for_haiku 0}} + + _check_args ${args} ${options} "checkplatform" + +@@ -1116,15 +1119,17 @@ proc checkplatform {args} { + set current_platform Linux + } elseif { $::tcl_platform(os) == "Darwin" } { + set current_platform MacOS ++ } elseif { $::tcl_platform(os) == "Haiku" } { ++ set current_platform Haiku + } + + # no args are given +- if { !${check_for_windows} && !${check_for_linux} && !${check_for_macosx}} { ++ if { !${check_for_windows} && !${check_for_linux} && !${check_for_macosx} && !${check_for_haiku}} { + return ${current_platform} + } + + # check usage of proc checkplatform +- if { [expr [string is true ${check_for_windows}] + [string is true ${check_for_linux}] + [string is true ${check_for_macosx}] ] > 1} { ++ if { [expr [string is true ${check_for_windows}] + [string is true ${check_for_linux}] + [string is true ${check_for_macosx}] + [string is true ${check_for_haiku}] ] > 1} { + error "Error: wrong usage of command checkplatform, only single option can be used at once" + } + +@@ -1143,6 +1148,11 @@ proc checkplatform {args} { + return 1 + } + ++ # checking for Haiku platform ++ if { ${check_for_haiku} && ${current_platform} == "Haiku" } { ++ return 1 ++ } ++ + # current platform is not equal to given as argument platform, return false + return 0 + } +diff --git a/tests/perf/fclasses/bug24947 b/tests/perf/fclasses/bug24947 +index 39bb04b..0707f0d 100644 +--- a/tests/perf/fclasses/bug24947 ++++ b/tests/perf/fclasses/bug24947 +@@ -6,6 +6,7 @@ switch -nocase [checkplatform] { + windows {set libname ${libname}.dll} + linux {set libname lib${libname}.so} + macos {set libname lib${libname}.dylib} ++ haiku {set libname lib${libname}.so} + } + + for {set i 0} {$i < 1000} {incr i} { +-- +2.37.3 +