274.4. kopeninghours-26.08.2
Library that parses, validates and evaluates OpenStreetMap opening_hours expressions
26.08.2-1 · LGPL-2.0-or-later AND BSD-3-Clause AND CC0-1.0 · 0.9 SBU · 543.4 KiB, 25 files · 43_toolkits, 149 of 344 · ports/core/gis/kopeninghours
Homepage: https://invent.kde.org/libraries/kopeninghours
KOpeningHours parses, validates and evaluates OpenStreetMap opening_hours expressions: it says whether a place is open at a given time, when it next opens or closes, and how an expression reads in words, with public and school holidays taken from kholidays. The QML module org.kde.kopeninghours offers the same to QML. kosmindoormap and KDE Itinerary use it to show whether a station, shop or venue is open.
Depends on: cmake, ninja, extra-cmake-modules, qt6-qtbase, qt6-qtdeclarative, kholidays, ki18n, flex, bison.
Required by (2): itinerary, kosmindoormap.
Sources: kopeninghours-26.08.2.tar.xz (75.3 KiB). Every step kpkg takes applies to this port.
Install: script/chroot/exec.sh bash -c 'source script/phases/43_toolkits/phase.env && kpkg install kopeninghours'
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 BUILD_WITH_QT6=ON \
-D CMAKE_REQUIRE_FIND_PACKAGE_Qt6Qml=ON \
-D CMAKE_DISABLE_FIND_PACKAGE_Python=ON \
-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
-D BUILD_WITH_QT6=ON— Build against Qt 6 and KDE Frameworks 6. The project asks for an old ECM, and ECM’sQtVersionOptionthen picks Qt 5 unless this is passed.-D CMAKE_REQUIRE_FIND_PACKAGE_Qt6Qml=ON— Make Qt’s QML module a requirement. Upstream looks for it as an optional component of Qt and leaves out theorg.kde.kopeninghoursQML module without it, which kosmindoormap and Itinerary import. It comes from qt6-qtdeclarative.-D CMAKE_DISABLE_FIND_PACKAGE_Python=ON— Build no Python bindings. Upstream buildsPyKOpeningHourswhenever it finds Python’s headers and Boost.Python, both of which this tree has, and that would put a Python module into a C++ library’s package.-D KF_SKIP_PO_PROCESSING=ON— Builds none of the interface translations, which kpkg’s English-only rule would remove from the package anyway (see Size and language policy).
Libraries: libKOpeningHours.so.
Directories: /usr/include/KOpeningHours, /usr/include/kopeninghours, /usr/lib/cmake/KOpeningHours, /usr/lib/qt6/qml/org/kde/kopeninghours, /usr/share/licenses/kopeninghours.
The expression grammar is generated at build time with flex and bison, which the configure requires.