Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

197.2. opencascade-7.9.3

Open CASCADE Technology, the B-rep CAD kernel with STEP, IGES and glTF exchange

Version 7.9.3, release 1
Shelf cad — Mechanical, architectural and 2D CAD, geometry kernels, meshing and FEM
Phase 42_graphics (Graphics Stack), 70 of 189 in build order
Licence LGPL-2.1-only WITH OCCT-exception-1.0
Homepage https://dev.opencascade.org/
Build time 35.1 SBU
Installed size 105.6 MiB in 7718 files
Recipe ports/core/cad/opencascade/kpkgbuild

About

Open CASCADE Technology (OCCT) is a boundary-representation geometry kernel: solid modelling, Boolean operations, meshing, and data exchange through STEP, IGES, glTF, OBJ, PLY, STL and VRML. In KDOS it is there for other programs: FreeCAD, KiCad, netgen, gmsh, IfcOpenShell, LibrePCB, Horizon EDA and PrusaSlicer link it, for their geometry and their STEP import and export.

Sources

Dependencies

Depends on: cmake, ninja, freetype2, fontconfig, rapidjson, draco, mesa, libglvnd.

Required by (8): freecad, gmsh, horizon-eda, ifcopenshell, kicad, librepcb, netgen, prusaslicer.

Optional, off in KDOS

These switches in build.sh turn off a feature whose library is a port here. The recipe may turn each off on purpose, or because the library was not yet a port when the recipe was written; this list cannot tell which.

Patches

build.sh applies these; kpkg applies nothing by itself.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/42_graphics/phase.env && kpkg install opencascade'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/cad/opencascade.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/cad/opencascade
echo '5ecf094ec6b12d5413dfb851d8c3590c354058aee556e32e408bdfbf8c357d57  opencascade-7.9.3.tar.gz' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/opencascade
SRC=$SRC_ROOT/opencascade-7.9.3
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf opencascade-7.9.3.tar.gz -C "$SRC" --strip-components=1

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the recipe’s helpers _tag and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

patch -p1 -i "$PORT_SRC/no_mallinfo.patch"
patch -p1 -i "$PORT_SRC/no_feenableexcept.patch"
patch -p1 -i "$PORT_SRC/no_backtrace.patch"

mkdir -p build && cd build
cmake .. -G Ninja -Wno-dev -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DBUILD_LIBRARY_TYPE=Shared \
	-DINSTALL_DIR_LIB=lib \
	-DINSTALL_DIR_CMAKE=lib/cmake/opencascade \
	-DINSTALL_DIR_SCRIPT=share/opencascade/scripts \
	-DBUILD_MODULE_Draw=OFF \
	-DBUILD_DOC_Overview=OFF \
	-DINSTALL_SAMPLES=OFF \
	-DINSTALL_TEST_CASES=OFF \
	-DUSE_XLIB=OFF \
	-DUSE_OPENGL=ON \
	-DUSE_GLES2=OFF \
	-DUSE_TK=OFF \
	-DUSE_FREETYPE=ON \
	-DUSE_RAPIDJSON=ON \
	-DUSE_FREEIMAGE=OFF \
	-DUSE_FFMPEG=OFF \
	-DUSE_DRACO=ON \
	-DUSE_TBB=OFF \
	-DUSE_EIGEN=OFF \
	-DUSE_VTK=OFF \
	-DUSE_OPENVR=OFF
ninja
DESTDIR=$PKG ninja install
rm -rf "$PKG/usr/share/doc"
readelf -d "$PKG/usr/lib/libTKDEGLTF.so" | grep -q libdraco

The switches, and why each is set:

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/opencascade, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf opencascade-7.9.3-1.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/opencascade, and runs the triggers its paths call for.

Contents

Installed programs: ExpToCasExe, ExpToCasExe-7.9.3.

Installed libraries: libTKBO.so, libTKBRep.so, libTKBin.so, libTKBinL.so, libTKBinTObj.so, libTKBinXCAF.so, libTKBool.so, libTKCAF.so, libTKCDF.so, libTKDE.so, libTKDECascade.so, libTKDEGLTF.so, libTKDEIGES.so, libTKDEOBJ.so, libTKDEPLY.so, libTKDESTEP.so, libTKDESTL.so, libTKDEVRML.so, libTKExpress.so, libTKFeat.so, libTKFillet.so, libTKG2d.so, libTKG3d.so, libTKGeomAlgo.so, libTKGeomBase.so, libTKHLR.so, libTKLCAF.so, libTKMath.so, libTKMesh.so, libTKMeshVS.so, libTKOffset.so, libTKOpenGl.so, libTKPrim.so, libTKRWMesh.so, libTKService.so, libTKShHealing.so, libTKStd.so, libTKStdL.so, libTKTObj.so, libTKTopAlgo.so, libTKV3d.so, libTKVCAF.so, libTKXCAF.so, libTKXMesh.so, libTKXSBase.so, libTKXml.so, libTKXmlL.so, libTKXmlTObj.so, libTKXmlXCAF.so, libTKernel.so.

Installed directories: /usr/include/opencascade, /usr/lib/cmake/opencascade, /usr/share/licenses/opencascade, /usr/share/opencascade.

Notes