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

216.1. openbabel-3.2.1

Chemistry toolbox — reads, writes and converts over a hundred molecular file formats

3.2.1-1 · GPL-2.0-only · 7.0 SBU · 22.8 MiB, 326 files · 42_graphics, 60 of 189 · ports/core/bioscience/openbabel

Homepage: https://openbabel.org/

Depends on: cmake, ninja, pkgconf, eigen, libxml2, zlib, cairo, rapidjson, libtirpc.

Required by (1): kalzium.

Sources: openbabel-3.2.1.tar.gz (36.1 MiB). Every step kpkg takes applies to this port.

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.

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

build.sh:

export CXXFLAGS="$CXXFLAGS -I/usr/include/tirpc"
mkdir build && cd build
cmake .. -G Ninja -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib \
	-DCMAKE_SKIP_INSTALL_RPATH=ON \
	-DBUILD_SHARED=ON \
	-DBUILD_GUI=OFF \
	-DENABLE_TESTS=OFF \
	-DOPTIMIZE_NATIVE=OFF \
	-DENABLE_OPENMP=OFF \
	-DWITH_INCHI=ON \
	-DOPENBABEL_USE_SYSTEM_INCHI=OFF \
	-DWITH_JSON=ON \
	-DOPENBABEL_USE_SYSTEM_RAPIDJSON=ON \
	-DWITH_MAEPARSER=OFF \
	-DWITH_COORDGEN=OFF \
	-DCMAKE_DISABLE_FIND_PACKAGE_Boost=ON \
	-DPYTHON_BINDINGS=OFF \
	-DRUN_SWIG=OFF \
	-DCMAKE_REQUIRED_INCLUDES=/usr/include/tirpc \
	-DCMAKE_REQUIRED_LIBRARIES=tirpc \
	-DCMAKE_CXX_STANDARD_LIBRARIES=-ltirpc
ninja
DESTDIR=$PKG ninja install
find "$PKG/usr/lib/openbabel" -name xtcformat.so | grep -q .

Programs: obabel, obconformer, obdistgen, obenergy, obfit, obfitall, obgen, obgrep, obminimize, obmm, obprobe, obprop, obrms, obrotamer, obrotate, obspectrophore, obsym, obtautomer, obthermo.

Libraries: libinchi.so, libopenbabel.so.

Directories: /usr/include/inchi, /usr/include/openbabel3, /usr/lib/cmake/openbabel3, /usr/lib/openbabel, /usr/share/licenses/openbabel, /usr/share/openbabel.