256.20. qwt-qt5-6.3.0
Qwt for Qt 5 — plot, dial and scale widgets for GNU Radio's gr-qtgui and Qt 5 SDR tools
| 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), 292 of 344 in build order |
| Licence | LGPL-2.1-only WITH Qwt-exception-1.0 |
| Homepage | https://qwt.sourceforge.io/ |
| Build time | 3.6 SBU |
| Installed size | 2.2 MiB in 306 files |
| Recipe | ports/core/qt-extra/qwt-qt5/kpkgbuild |
About
This is Qwt, the plot, dial and scale widget library, built for Qt 5 from the same source as the Qt 6 port: libqwt-qt5, its headers in /usr/include/qwt-qt5, the Qt 5 Designer plugin, the qmake feature files under /usr/lib/qt5/mkspecs/features and the pkg-config module Qt5Qwt6. gnuradio’s gr-qtgui links it.
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: qt5-qtbase, qt5-qtsvg, qt5-qttools.
Required by (1): gnuradio.
Patches
build.sh applies these; kpkg applies nothing by itself.
10_install_paths.patch— the same patch as the Qt 6 port’s: Qwt’s install prefix/usrin place of/usr/local/qwt-<version>, its headers ininclude/qwt(which40_headers_per_qt.patchchanges), its documentation inshare/doc/qwt, and the Designer plugin and qmake feature files underlib.20_fix_rpath.patch— removes theRPATHthatdesigner/designer.procompiles into the Designer plugin; the library is in/usr/lib, where the loader looks anyway.30_multibuild.patch— names the librarylibqwt-qt5, with the sonamelibqwt-qt5.so.<major>.<minor>, and puts the Designer plugin and the feature files under/usr/lib/qt5, so the two builds take no name from each other.40_headers_per_qt.patch— the one patch the Qt 6 port does not carry: it installs the headers ininclude/qwt-qt5rather thaninclude/qwt, which the Qt 6 build keeps.
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-qt5'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/qt-extra/qwt-qt5.
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-qt5
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-qt5
SRC=$SRC_ROOT/qwt-qt5-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"
patch -p1 -i "$PORT_SRC/40_headers_per_qt.patch"
/usr/lib/qt5/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-qt5.so
test -e "$PKG"/usr/include/qwt-qt5/qwt_plot.h
test -e "$PKG"/usr/lib/pkgconfig/Qt5Qwt6.pc
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 5’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-qt5, 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-qt5-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-qt5, and runs the triggers its paths call for.
Contents
Installed libraries: libqwt-qt5.so.
Installed directories: /usr/include/qwt-qt5, /usr/share/licenses/qwt-qt5.
Short descriptions
Qt5Qwt6.pc |
Qt Widgets for Technical Applications |
Notes
The source is the same release archive as qwt’s. The :: form of source = saves it as qwt-<version>.tar.bz2, the name the Qt 6 port’s file has, instead of a name built from this port’s own.
build.sh ends by checking that libqwt-qt5.so, /usr/include/qwt-qt5/qwt_plot.h and Qt5Qwt6.pc are in the package. As with the Qt 6 port, the build compiles Qwt’s examples, playground and tests and installs none of them.