257.50. kfilemetadata-6.31.0
KDE Frameworks: file metadata and text extraction
6.31.0-1 · LGPL-2.1-or-later AND (LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL) AND LGPL-2.1-only · 0.8 SBU · 1.2 MiB, 67 files · 43_toolkits, 128 of 344 · ports/core/kf6/kfilemetadata
Homepage: https://invent.kde.org/frameworks/kfilemetadata
Why it is in KDOS. The comment above the 61 ports from karchive to kfilemetadata in script/phases/43_toolkits/packages.d/kf6.txt:
The libraries KDE applications are built on, without Plasma.
KFileMetaData reads metadata and text out of files, and writes some of it back: title, author, duration, resolution, camera settings, page counts and the rest, through one extractor plugin per family of formats. baloo indexes what it extracts, and dolphin’s information panel and tooltips, elisa and kfind read it directly.
Depends on: cmake, ninja, extra-cmake-modules, qt6-qtbase, karchive, kcodecs, kconfig, kcoreaddons, ki18n, poppler, taglib, exiv2, ffmpeg, ebook-tools, catdoc, libzip, libxml2, attr, gettext, kdegraphics-mobipocket.
Required by (13): arianna, ark, baloo, baloo-widgets, dolphin, elisa, haruna, itinerary, k3b, kdenlive, kfind, koko, plasma-browser-integration.
Sources: kfilemetadata-6.31.0.tar.xz (1.3 MiB). Every step kpkg takes applies to this port.
Install: script/chroot/exec.sh bash -c 'source script/phases/43_toolkits/phase.env && kpkg install kfilemetadata'
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 KF_SKIP_PO_PROCESSING=ON \
-D BUILD_TESTING=OFF \
-D CMAKE_REQUIRE_FIND_PACKAGE_QMobipocket6=ON \
-D CMAKE_DISABLE_FIND_PACKAGE_libappimage=ON \
-D BUILD_FUZZERS=OFF \
-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
-D CMAKE_REQUIRE_FIND_PACKAGE_QMobipocket6=ON— Make QMobipocket, the Mobipocket reader of kdegraphics-mobipocket, a requirement. Upstream looks for it as optional and, when it finds it, builds the extractor for.mobie-books; without it the format is left out with only a line in the configure summary. Text extraction from the books (ENABLE_MOBIPOCKET_TEXT_EXTRACTION) stays at upstream’s experimental default, off, so only the metadata is read.-D CMAKE_DISABLE_FIND_PACKAGE_libappimage=ON— Never look for libappimage, which the extractor for AppImage bundles needs. libappimage is not a port, and the switch keeps the result from depending on what is installed in the build root.-D BUILD_FUZZERS=OFF— Build none of the fuzzing harnesses. It is upstream’s default, written out so the recipe states it.-D KF_SKIP_PO_PROCESSING=ON— Build none of the gettext catalogues underpo/, whichki18n_install()would compile into.mofiles. The strings in the source are English, and the package-wide English-only rule (see Size and language policy) would remove every catalogue in another language.
Programs: kfilemetadata_dump6.
Libraries: libKF6FileMetaData.so.
Directories: /usr/include/KF6/KFileMetaData, /usr/lib/cmake/KF6FileMetaData, /usr/lib/qt6/plugins/kf6/kfilemetadata/writers, /usr/share/licenses/kfilemetadata.
Every other extractor’s library is optional upstream and in depends, so each is built: poppler for PDF, taglib for audio tags, exiv2 for EXIF and XMP in images, ffmpeg for video, and ebook-tools for EPUB, whose find module also needs libzip and libxml2. The office formats of ODF and Office Open XML are read through karchive. Extended attributes, where tags, ratings and comments are stored, come from attr, which the configure requires on Linux. catdoc is a run-time dependency: the extractor for Word, Excel and PowerPoint 97 files runs its catdoc, xls2csv and catppt commands, and without them those formats give no text.