330.19. rocs-26.08.2
KDE graph theory IDE — draw graphs and run algorithms on them in JavaScript
26.08.2-1 · (LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL) AND (GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL) AND GPL-2.0-or-later AND GPL-2.0-only AND BSD-2-Clause AND BSD-3-Clause AND GFDL-1.2-or-later AND CC0-1.0 · 8.9 SBU · 3.4 MiB, 69 files · 44_apps, 104 of 422 · ports/core/education/rocs
Homepage: https://apps.kde.org/rocs/
Rocs is KDE Education’s graph theory IDE for teaching and experimenting with graph algorithms: a visual editor for graphs with typed nodes and edges, generators for common graph families, and a JavaScript engine in which an algorithm runs over the graph on screen. Graphs are saved in Rocs’s own .graph2 format and import and export DOT, GML, TGF and TikZ; a project, .rocs, bundles the graphs and scripts.
Depends on: cmake, ninja, extra-cmake-modules, boost, qt6-qtbase, qt6-qtdeclarative, qt6-qtsvg, qt6-qtscxml, karchive, kconfig, kcoreaddons, kcrash, ki18n, kitemviews, ktexteditor, ktexttemplate, ktextwidgets, kxmlgui, kdoctools.
Required by (1): kde-gear-education.
Sources: rocs-26.08.2.tar.xz (1.5 MiB). Every step kpkg takes applies to this port.
Install: script/chroot/exec.sh bash -c 'source script/phases/44_apps/phase.env && kpkg install rocs'
build.sh:
cmake -S . -B build -G Ninja \
-D CMAKE_INSTALL_PREFIX=/usr \
-D KDE_INSTALL_LIBDIR=lib \
-D CMAKE_BUILD_TYPE=Release \
-D KDE_INSTALL_USE_QT_SYS_PATHS=ON \
-D BUILD_TESTING=OFF \
-D KF_SKIP_PO_PROCESSING=ON \
-D CMAKE_REQUIRE_FIND_PACKAGE_KF6DocTools=ON \
-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
install -Dm644 /dev/stdin "$PKG/usr/share/mime/packages/kdos-rocs.xml" <<'MIMEXML'
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-rocs">
<comment>Rocs graph theory project</comment>
<sub-class-of type="application/x-compressed-tar"/>
<glob pattern="*.rocs"/>
</mime-type>
</mime-info>
MIMEXML
-D CMAKE_REQUIRE_FIND_PACKAGE_KF6DocTools=ON— Stop the configure if kdoctools is missing. Upstream looks for it as an optional package, and without it leaves the handbook out.-D KF_SKIP_PO_PROCESSING=ON— Skips building the interface translations, which the package-wide English-only rule would remove anyway (see Size and language policy).
Programs: rocs.
Libraries: librocsgraphtheory.so.
Directories: /usr/include/rocs, /usr/lib/qt6/plugins/rocs, /usr/share/doc/HTML/en/rocs, /usr/share/licenses/rocs, /usr/share/rocs.
The entry claims application/x-rocs, a type no MIME package defines, so a project would never be offered to Rocs. build.sh installs kdos-rocs.xml, which defines it for *.rocs as a subclass of application/x-compressed-tar: a project is a gzip-compressed tar archive, written with KTar. kpkg rebuilds the MIME database on install (see Shared indexes).
boost is used for headers only: Boost.Graph for the generators and layouts, Boost.Spirit for the DOT and GML parsers, and Boost.Random; nothing of it is linked. The script engine is Qt’s QJSEngine, from qt6-qtdeclarative, which also gives the editor its Quick Widgets view. The graph scene, Scene.qml, drives its editing modes with QtQml.StateMachine, a QML module of qt6-qtscxml; CMake does not check for it, so that port is in depends for run time, and without it the editor opens no graph. KAboutData gives the window the app_id org.kde.rocs, the name of upstream’s entry.