opencascade: switch to the official version (version 7.7.0) (#7538)

* 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: add patch from Liguros to fix finding Qt5 on x86

* opencascade: disable OpenGL, reorganize the patchset a bit

Tools and samples which tried to use OpenGL before will now crash because there is no 3D viewer driver implementation.
This commit is contained in:
Joachim Mairböck
2022-12-26 20:17:27 +01:00
committed by GitHub
parent d10a1a6a48
commit e5fcf703a6
4 changed files with 1001 additions and 442 deletions

View File

@@ -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
}

View File

@@ -0,0 +1,423 @@
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:libexecinfo$secondaryArchSuffix
# devel:libEGL$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_OPENGL=OFF \
-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, OpenGL has no native implementation amd EGL is broken
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 \
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 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
}

View File

@@ -1,244 +0,0 @@
From 838ef11dbc70e82650549a8ab19f1c96b8573177 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
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 <TCollection_AsciiString.hxx>
#include <NCollection_DataMap.hxx>
-#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 <InterfaceGraphic.hxx>
#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 <stdio.h>
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 <signal.h>
-#if !defined(__ANDROID__)
+#if !defined(__ANDROID__) && !defined(__HAIKU__)
#include <sys/signal.h>
#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 <sys/mman.h> /* mmap() */
#endif
+#ifdef __HAIKU__
+# include <errno.h>
+#endif
+
#include <fcntl.h>
//
#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 <Standard_Mutex.hxx>
#include <Standard_OStream.hxx>
+#ifdef __HAIKU__
+#include <Errors.h>
+#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 <windows.h>
#else
#include <pthread.h>
- #include <sys/errno.h>
+ #ifndef __HAIKU__
+ #include <sys/errno.h>
+ #endif
#include <unistd.h>
#include <time.h>
#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 <Xw_Window.hxx>
-#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 <Aspect_Convert.hxx>
#include <Aspect_WindowDefinitionError.hxx>
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 <Aspect_Window.hxx>
--
2.16.2
From 03827b0b856173e015a3eb4c60c729f7ce3a6253 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
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?= <zmizsei@extrowerk.com>
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

View File

@@ -0,0 +1,578 @@
From 88ed698031d776e27efcfa964e96d7e5309845d0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= <j.mairboeck@gmail.com>
Date: Sun, 18 Dec 2022 20:25:23 +0100
Subject: Haiku support
diff --git a/adm/cmake/occt_csf.cmake b/adm/cmake/occt_csf.cmake
index bee8ba7..55e78b2 100644
--- a/adm/cmake/occt_csf.cmake
+++ b/adm/cmake/occt_csf.cmake
@@ -133,6 +133,18 @@ 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")
+ if (USE_OPENGL)
+ set (CSF_OpenGlLibs "GL EGL")
+ endif()
+ 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-<version>
+# - 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-<version>
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/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/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 <signal.h>
-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
+#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && !defined(__HAIKU__)
#include <sys/signal.h>
#endif
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 <algorithm>
#include <iostream>
+#include <limits>
namespace
{
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
From e2ce92d6a65eff90850d33c449f18b11697ac976 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= <j.mairboeck@gmail.com>
Date: Sun, 18 Dec 2022 20:26:18 +0100
Subject: allow building the OpenGl module on Haiku
This is not used when building without OpenGL. It uses EGL (which doesn't seem to work).
There is no native Haiku implementation.
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 <X11/Xlib.h> // XOpenDisplay()
- #include <GL/glx.h>
+ #ifdef __HAIKU__
+ #define HAVE_EGL
+ #include <X11/Xutil.h>
+ #else
+ #include <GL/glx.h>
+ #endif
#endif
#if !defined(HAVE_EGL)
--
2.37.3
From 6d76e7402a139f084860ec267fa71e87b3f1c2ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= <j.mairboeck@gmail.com>
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 641785c5aba5cbf34cb256126cc6acdfd211272d Mon Sep 17 00:00:00 2001
From: Bernd Waibel <waebbl@gmail.com>
Date: Wed, 3 Feb 2021 23:31:23 +0100
Subject: allow default search path for Qt5
Signed-off-by: Bernd Waibel <waebbl@gmail.com>
diff --git a/adm/cmake/qt.cmake b/adm/cmake/qt.cmake
index 535e6a2..ca8fa9a 100644
--- a/adm/cmake/qt.cmake
+++ b/adm/cmake/qt.cmake
@@ -24,7 +24,7 @@ set(CMAKE_PREFIX_PATH ${3RDPARTY_QT_DIR})
# Now we can apply standard CMake finder for Qt5. We do this mostly
# to have qt5_wrap_cpp() function available and Qt5_FOUND variable filled
-find_package(Qt5 QUIET COMPONENTS Widgets Quick Xml PATHS ${3RDPARTY_QT_DIR} NO_DEFAULT_PATH)
+find_package(Qt5 COMPONENTS Widgets Quick Xml REQUIRED)
if (NOT ${Qt5_FOUND})
# Now we can apply standard CMake finder for Qt. We do this mostly
# to have qt4_wrap_cpp() function available
--
2.37.3
From 9f478eb50f8a994577c37c71d787d48d73db36a7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= <j.mairboeck@gmail.com>
Date: Sun, 18 Dec 2022 20:16:41 +0100
Subject: allow building without OpenGL (stubbed)
Tools which use a 3d viewer will now crash if built without OpenGL because there is no driver.
diff --git a/adm/cmake/occt_toolkit.cmake b/adm/cmake/occt_toolkit.cmake
index 132890b..0cdb426 100644
--- a/adm/cmake/occt_toolkit.cmake
+++ b/adm/cmake/occt_toolkit.cmake
@@ -434,6 +434,10 @@ if (USE_DRACO)
endif()
endif()
+if (NOT USE_OPENGL)
+ list (REMOVE_ITEM USED_TOOLKITS_BY_CURRENT_PROJECT "TKOpenGl")
+endif()
+
if (APPLE)
list (FIND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT X11 IS_X11_FOUND)
if (NOT ${IS_X11_FOUND} EQUAL -1)
diff --git a/samples/OCCTOverview/code/Viewer3dSamples.cxx b/samples/OCCTOverview/code/Viewer3dSamples.cxx
index 5cb2b76..52dcb0a 100644
--- a/samples/OCCTOverview/code/Viewer3dSamples.cxx
+++ b/samples/OCCTOverview/code/Viewer3dSamples.cxx
@@ -25,7 +25,9 @@
#include <AIS_Shape.hxx>
#include <AIS_ViewCube.hxx>
+#ifdef HAVE_OPENGL_EXT
#include <OpenGl_GraphicDriver.hxx>
+#endif
#include <V3d_SpotLight.hxx>
#include <V3d_PositionalLight.hxx>
#include <V3d_DirectionalLight.hxx>
@@ -325,18 +327,22 @@ void Viewer3dSamples::HalfTransparencyPresentation3dSample()
void Viewer3dSamples::VboOn3dSample()
{
+#ifdef HAVE_OPENGL_EXT
if(Handle(OpenGl_GraphicDriver) aDriver =
Handle(OpenGl_GraphicDriver)::DownCast(myContext->CurrentViewer()->Driver()))
{
aDriver->ChangeOptions().vboDisable = Standard_False;
}
+#endif
}
void Viewer3dSamples::VboOff3dSample()
{
+#ifdef HAVE_OPENGL_EXT
if(Handle(OpenGl_GraphicDriver) aDriver =
Handle(OpenGl_GraphicDriver)::DownCast(myContext->CurrentViewer()->Driver()))
{
aDriver->ChangeOptions().vboDisable = Standard_True;
}
+#endif
}
diff --git a/samples/qt/Common/src/ApplicationCommon.cxx b/samples/qt/Common/src/ApplicationCommon.cxx
index 2dfc5ed..98502d7 100755
--- a/samples/qt/Common/src/ApplicationCommon.cxx
+++ b/samples/qt/Common/src/ApplicationCommon.cxx
@@ -16,7 +16,9 @@
#include <Standard_WarningsRestore.hxx>
#include <Graphic3d_GraphicDriver.hxx>
+#ifdef HAVE_OPENGL_EXT
#include <OpenGl_GraphicDriver.hxx>
+#endif
#include <OSD_Environment.hxx>
#include <stdlib.h>
@@ -446,6 +448,7 @@ void ApplicationCommonWindow::onUseVBO()
if (aContextAIS.IsNull())
return;
+#ifdef HAVE_OPENGL_EXT
Handle(OpenGl_GraphicDriver) aDriver =
Handle(OpenGl_GraphicDriver)::DownCast (aContextAIS->CurrentViewer()->Driver());
@@ -453,6 +456,7 @@ void ApplicationCommonWindow::onUseVBO()
{
aDriver->ChangeOptions().vboDisable = Standard_True;
}
+#endif
}
void ApplicationCommonWindow::onCloseDocument(DocumentCommon* theDoc)
diff --git a/samples/qt/Common/src/DocumentCommon.cxx b/samples/qt/Common/src/DocumentCommon.cxx
index e4903bb..da1f5c0 100755
--- a/samples/qt/Common/src/DocumentCommon.cxx
+++ b/samples/qt/Common/src/DocumentCommon.cxx
@@ -13,8 +13,11 @@
#include <Aspect_DisplayConnection.hxx>
#include <AIS_InteractiveObject.hxx>
+#include <Graphic3d_GraphicDriver.hxx>
#include <Graphic3d_NameOfMaterial.hxx>
+#ifdef HAVE_OPENGL_EXT
#include <OpenGl_GraphicDriver.hxx>
+#endif
#if !defined(_WIN32) && !defined(__WIN32__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
#include <OSD_Environment.hxx>
#endif
@@ -31,6 +34,7 @@ Handle(V3d_Viewer) DocumentCommon::Viewer (const Standard_ExtString ,
const Standard_Boolean theComputedMode,
const Standard_Boolean theDefaultComputedMode )
{
+#ifdef HAVE_OPENGL_EXT
static Handle(OpenGl_GraphicDriver) aGraphicDriver;
if (aGraphicDriver.IsNull())
@@ -41,6 +45,9 @@ Handle(V3d_Viewer) DocumentCommon::Viewer (const Standard_ExtString ,
#endif
aGraphicDriver = new OpenGl_GraphicDriver (aDisplayConnection);
}
+#else
+ static Handle(Graphic3d_GraphicDriver) aGraphicDriver = nullptr; //TODO
+#endif
Handle(V3d_Viewer) aViewer = new V3d_Viewer (aGraphicDriver);
aViewer->SetDefaultViewSize (theViewSize);
diff --git a/samples/qt/OCCTOverview/src/ApplicationCommon.cxx b/samples/qt/OCCTOverview/src/ApplicationCommon.cxx
index 49d9e89..bfe4247 100644
--- a/samples/qt/OCCTOverview/src/ApplicationCommon.cxx
+++ b/samples/qt/OCCTOverview/src/ApplicationCommon.cxx
@@ -44,7 +44,10 @@
#include <QDomAttr>
#include <Standard_WarningsRestore.hxx>
+#include <Message.hxx>
+#ifdef HAVE_OPENGL_EXT
#include <OpenGl_GraphicDriver.hxx>
+#endif
#include <OSD_Environment.hxx>
#include <stdlib.h>
diff --git a/samples/qt/OCCTOverview/src/DocumentCommon.cxx b/samples/qt/OCCTOverview/src/DocumentCommon.cxx
index d92b6d5..3f361aa 100644
--- a/samples/qt/OCCTOverview/src/DocumentCommon.cxx
+++ b/samples/qt/OCCTOverview/src/DocumentCommon.cxx
@@ -33,8 +33,11 @@
#include <AIS_InteractiveObject.hxx>
#include <Aspect_DisplayConnection.hxx>
+#include <Graphic3d_GraphicDriver.hxx>
#include <Graphic3d_NameOfMaterial.hxx>
+#ifdef HAVE_OPENGL_EXT
#include <OpenGl_GraphicDriver.hxx>
+#endif
#include <OSD_Environment.hxx>
#include <TCollection_AsciiString.hxx>
@@ -50,6 +53,7 @@ Handle(V3d_Viewer) DocumentCommon::Viewer(const Standard_ExtString,
const Standard_Boolean theComputedMode,
const Standard_Boolean theDefaultComputedMode)
{
+#ifdef HAVE_OPENGL_EXT
static Handle(OpenGl_GraphicDriver) aGraphicDriver;
if (aGraphicDriver.IsNull())
{
@@ -59,6 +63,9 @@ Handle(V3d_Viewer) DocumentCommon::Viewer(const Standard_ExtString,
#endif
aGraphicDriver = new OpenGl_GraphicDriver(aDisplayConnection);
}
+#else
+ static Handle(Graphic3d_GraphicDriver) aGraphicDriver = nullptr; //TODO
+#endif
Handle(V3d_Viewer) aViewer = new V3d_Viewer(aGraphicDriver);
aViewer->SetDefaultViewSize(theViewSize);
diff --git a/tools/View/View_Viewer.cxx b/tools/View/View_Viewer.cxx
index f2d8dac..60a778a 100644
--- a/tools/View/View_Viewer.cxx
+++ b/tools/View/View_Viewer.cxx
@@ -15,7 +15,11 @@
#include <inspector/View_Viewer.hxx>
+#include <Aspect_DisplayConnection.hxx>
+#include <Graphic3d_GraphicDriver.hxx>
+#ifdef HAVE_OPENGL_EXT
#include <OpenGl_GraphicDriver.hxx>
+#endif
#include <Standard_ExtString.hxx>
// =======================================================================
@@ -56,7 +60,11 @@ void View_Viewer::InitViewer (const Handle(AIS_InteractiveContext)& theContext)
Handle(AIS_InteractiveContext) View_Viewer::CreateStandardViewer()
{
Handle(Aspect_DisplayConnection) aDisplayConnection = new Aspect_DisplayConnection();
+#ifdef HAVE_OPENGL_EXT
static Handle(OpenGl_GraphicDriver) aGraphicDriver = new OpenGl_GraphicDriver (aDisplayConnection);
+#else
+ static Handle(Graphic3d_GraphicDriver) aGraphicDriver = nullptr; //TODO
+#endif
Handle(V3d_Viewer) aViewer = new V3d_Viewer (aGraphicDriver);
aViewer->SetDefaultLights();
--
2.37.3