256.25. qwt-6.3.0
Qt widgets for plots, dials and scales, for QGIS
| Version | 6.3.0, release 1 |
| Shelf | qt-extra — Third-party and KDE-hosted Qt add-on libraries that are not in KF6 |
| Phase | 43_toolkits (Toolkits), 297 of 344 in build order |
| Licence | LGPL-2.1-only WITH Qwt-exception-1.0 |
| Homepage | https://qwt.sourceforge.io/ |
| Build time | 4.0 SBU |
| Installed size | 2.4 MiB in 304 files |
| Recipe | ports/core/qt-extra/qwt/kpkgbuild |
About
Qwt, Qt Widgets for Technical Applications, is a library of plot, dial, slider, thermometer and scale widgets for Qt programs. This port builds it for Qt 6, as libqwt-qt6, with its headers in /usr/include/qwt, its Qt Designer plugin, and its qmake feature files, so a qmake project can say CONFIG += qwt. qgis links it. The Qt 5 build is the separate qwt-qt5 port, from the same source, and the two install side by side.
Sources
qwt-6.3.0.tar.bz2(4.5 MiB)
sha256dcb085896c28aaec5518cbc08c0ee2b4e60ada7ac929d82639f6189851a6129a
upstream: https://downloads.sourceforge.net/qwt/qwt-6.3.0.tar.bz2
archive copy: sources-4/qt-extra--qwt-6.3.0.tar.bz2
Dependencies
Depends on: qt6-qtbase, qt6-qtsvg, qt6-qttools.
Required by (1): qgis.
Patches
build.sh applies these; kpkg applies nothing by itself.
10_install_paths.patch— sets Qwt’s install prefix to/usrin place of upstream’s/usr/local/qwt-<version>, its headers toinclude/qwt, its documentation toshare/doc/qwt, and moves the Designer plugin and the qmake feature files underlib.20_fix_rpath.patch— removes the line ofdesigner/designer.prothat compiles the library’s install directory into the Designer plugin as anRPATH. The library is in/usr/lib, where the loader looks anyway.30_multibuild.patch— names the library after the Qt it is built for,libqwt-qt6with the sonamelibqwt-qt6.so.<major>.<minor>, everywhere it is built and linked, and puts the Designer plugin and the feature files under that Qt’s own directories,/usr/lib/qt6/plugins/designerand/usr/lib/qt6/mkspecs/features. This is what lets this port andqwt-qt5install together.
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/43_toolkits/phase.env && kpkg install qwt'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/qt-extra/qwt.
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/qt-extra/qwt
echo 'dcb085896c28aaec5518cbc08c0ee2b4e60ada7ac929d82639f6189851a6129a qwt-6.3.0.tar.bz2' | 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/qwt
SRC=$SRC_ROOT/qwt-6.3.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf qwt-6.3.0.tar.bz2 -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 group and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
patch -p1 -i "$PORT_SRC/10_install_paths.patch"
patch -p1 -i "$PORT_SRC/20_fix_rpath.patch"
patch -p1 -i "$PORT_SRC/30_multibuild.patch"
/usr/lib/qt6/bin/qmake qwt.pro CONFIG+=release \
QMAKE_CFLAGS_RELEASE="$CFLAGS" \
QMAKE_CXXFLAGS_RELEASE="$CXXFLAGS" \
QMAKE_LFLAGS_RELEASE="$LDFLAGS"
make
make INSTALL_ROOT="$PKG" install
test -e "$PKG"/usr/lib/libqwt-qt6.so
test -e "$PKG"/usr/include/qwt/qwt_plot.h
The switches, and why each is set:
QMAKE_CFLAGS_RELEASE="$CFLAGS"— withQMAKE_CXXFLAGS_RELEASEandQMAKE_LFLAGS_RELEASEon the qmake line: replace the release flags of Qt 6’s mkspec with the tree’s, so the library is compiled and linked like every other port.
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/qwt, 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 qwt-6.3.0-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/qwt, and runs the triggers its paths call for.
Contents
Installed libraries: libqwt-qt6.so.
Installed directories: /usr/include/qwt, /usr/share/licenses/qwt.
Short descriptions
Qt6Qwt6.pc |
Qt Widgets for Technical Applications |
Notes
build.sh ends by checking that libqwt-qt6.so and /usr/include/qwt/qwt_plot.h are in the package, which fails the build if the patched names or paths did not take.
Upstream’s qwtconfig.pri turns on its examples, playground and tests, so the build compiles them; none of them is installed.