qwt: add qt6 packages

Closes: #46911.
This commit is contained in:
Andrew J. Hesford 2023-10-25 14:52:02 -04:00
parent bbfdd5e5ed
commit e8356f64c1
7 changed files with 183 additions and 18 deletions

View File

@ -1949,7 +1949,8 @@ libQt5WebKitWidgets.so.5 qt5-webkit-5.6.0_1
libx265.so.199 x265-3.5_1
libQt5Xdg.so.3 libqtxdg-3.1.0_1
libQt5XdgIconLoader.so.3 libqtxdg-3.1.0_1
libqwt.so.6.2 qwt-6.2.0_1
libqwt-qt5.so.6.2 qwt-6.2.0_2
libqwt-qt6.so.6.2 qwt-qt6-6.2.0_2
liblxqt-qt5.so.0 liblxqt-0.8.0_1
liblxqt-globalkeys-qt5.so.0 lxqt-globalkeys-0.8.0_1
liblxqt-globalkeys-ui-qt5.so.0 lxqt-globalkeys-0.8.0_1

1
srcpkgs/qwt-headers Symbolic link
View File

@ -0,0 +1 @@
qwt

1
srcpkgs/qwt-qt6 Symbolic link
View File

@ -0,0 +1 @@
qwt

1
srcpkgs/qwt-qt6-devel Symbolic link
View File

@ -0,0 +1 @@
qwt

View File

@ -0,0 +1,40 @@
--- a/qwtconfig.pri
+++ b/qwtconfig.pri
@@ -19,7 +19,7 @@
QWT_INSTALL_PREFIX = $$[QT_INSTALL_PREFIX]
unix {
- QWT_INSTALL_PREFIX = /usr/local/qwt-$$QWT_VERSION
+ QWT_INSTALL_PREFIX = /usr
# QWT_INSTALL_PREFIX = /usr/local/qwt-$$QWT_VERSION-qt-$$QT_VERSION
}
@@ -28,8 +28,8 @@
# QWT_INSTALL_PREFIX = C:/Qwt-$$QWT_VERSION-qt-$$QT_VERSION
}
-QWT_INSTALL_DOCS = $${QWT_INSTALL_PREFIX}/doc
-QWT_INSTALL_HEADERS = $${QWT_INSTALL_PREFIX}/include
+QWT_INSTALL_DOCS = $${QWT_INSTALL_PREFIX}/share/doc/qwt
+QWT_INSTALL_HEADERS = $${QWT_INSTALL_PREFIX}/include/qwt
QWT_INSTALL_LIBS = $${QWT_INSTALL_PREFIX}/lib
######################################################################
@@ -49,7 +49,7 @@
# path. Also QT_INSTALL_PREFIX is only one of the default
# search paths of the designer - not the Qt creator
-#QWT_INSTALL_PLUGINS = $$[QT_INSTALL_PREFIX]/plugins/designer
+QWT_INSTALL_PLUGINS = /usr/lib/qt$${QT_MAJOR_VERSION}/plugins/designer
######################################################################
# Features
@@ -64,7 +64,7 @@
######################################################################
QWT_INSTALL_FEATURES = $${QWT_INSTALL_PREFIX}/features
-# QWT_INSTALL_FEATURES = $$[QT_INSTALL_PREFIX]/features
+QWT_INSTALL_FEATURES = /usr/lib/qt$${QT_MAJOR_VERSION}/mkspecs/features
######################################################################
# Build the static/shared libraries.

View File

@ -0,0 +1,54 @@
diff -ur a/qwtfunctions.pri b/qwtfunctions.pri
--- a/qwtfunctions.pri 2021-07-18 07:19:33.644367625 -0400
+++ b/qwtfunctions.pri 2023-10-26 10:12:25.650218378 -0400
@@ -12,7 +12,7 @@
defineReplace(qwtLibraryTarget) {
unset(LIBRARY_NAME)
- LIBRARY_NAME = $$1
+ LIBRARY_NAME = $${1}-qt$${QT_MAJOR_VERSION}
mac:contains(QWT_CONFIG, QwtFramework) {
@@ -36,7 +36,7 @@
defineTest(qwtAddLibrary) {
LIB_PATH = $$1
- LIB_NAME = $$2
+ LIB_NAME = $${2}-qt$${QT_MAJOR_VERSION}
mac:contains(QWT_CONFIG, QwtFramework) {
diff -ur a/src/src.pro b/src/src.pro
--- a/src/src.pro 2021-07-18 07:19:33.628367286 -0400
+++ b/src/src.pro 2023-10-26 10:11:09.320983554 -0400
@@ -31,7 +31,7 @@
# we increase the SONAME for every minor number
- QWT_SONAME=libqwt.so.$${VER_MAJ}.$${VER_MIN}
+ QWT_SONAME=libqwt-qt$${QT_MAJOR_VERSION}.so.$${VER_MAJ}.$${VER_MIN}
QMAKE_LFLAGS *= $${QMAKE_LFLAGS_SONAME}$${QWT_SONAME}
QMAKE_LFLAGS_SONAME=
}
@@ -82,14 +82,17 @@
greaterThan(QT_MAJOR_VERSION, 4) {
QMAKE_PKGCONFIG_FILE = Qt$${QT_MAJOR_VERSION}$${QMAKE_PKGCONFIG_NAME}
- QMAKE_PKGCONFIG_REQUIRES = Qt5Widgets Qt5Concurrent Qt5PrintSupport
+
+ QMAKE_PKGCONFIG_REQUIRES = Qt$${QT_MAJOR_VERSION}Widgets
+ QMAKE_PKGCONFIG_REQUIRES += Qt$${QT_MAJOR_VERSION}Concurrent
+ QMAKE_PKGCONFIG_REQUIRES += Qt$${QT_MAJOR_VERSION}PrintSupport
contains(QWT_CONFIG, QwtSvg) {
- QMAKE_PKGCONFIG_REQUIRES += Qt5Svg
+ QMAKE_PKGCONFIG_REQUIRES += Qt$${QT_MAJOR_VERSION}Svg
}
contains(QWT_CONFIG, QwtOpenGL) {
- QMAKE_PKGCONFIG_REQUIRES += Qt5OpenGL
+ QMAKE_PKGCONFIG_REQUIRES += Qt$${QT_MAJOR_VERSION}OpenGL
}
QMAKE_DISTCLEAN += $${DESTDIR}/$${QMAKE_PKGCONFIG_DESTDIR}/$${QMAKE_PKGCONFIG_FILE}.pc

View File

@ -1,10 +1,12 @@
# Template file for 'qwt'
pkgname=qwt
version=6.2.0
revision=1
revision=2
build_style=qmake
hostmakedepends="qt5-qmake qt5-host-tools"
makedepends="qt5-tools-devel qt5-svg-devel"
hostmakedepends="qt6-base qt6-tools qt5-qmake qt5-host-tools"
_makedepends_qt6="qt6-tools-devel qt6-svg-devel"
_makedepends_qt5="${_makedepends_qt6//qt6/qt5}"
makedepends="${_makedepends_qt6} ${_makedepends_qt5}"
short_desc="Qt Widgets for Technical Applications"
maintainer="Giuseppe Fierro <gspe@ae-design.ws>"
license="LGPL-2.1-only, Qwt-exception-1.0"
@ -12,32 +14,97 @@ homepage="https://qwt.sourceforge.io/"
distfiles="https://sourceforge.net/projects/${pkgname}/files/${pkgname}/${version}/${pkgname}-${version}.tar.bz2"
checksum=9194f6513955d0fd7300f67158175064460197abab1a92fa127a67a4b0b71530
post_patch() {
vsed -e '/^\s*QWT_INSTALL_PREFIX/ s|=.*|= /usr|' \
-e '/^QWT_INSTALL_DOCS/ s|/doc|/share/doc/qwt|' \
-e '/^QWT_INSTALL_HEADERS/ s|include|&/qwt|' \
-e '/^QWT_INSTALL_PLUGINS/ s|plugins/designer|lib/qt5/&|' \
-e '/^QWT_INSTALL_FEATURES/ s|features|lib/qt5/mkspecs/&|' \
-i qwtconfig.pri
post_configure() {
local qmake_args f sdir dspec dname
if [ -n "${CROSS_BUILD}" ]; then
dname="linux-g++"
for sdir in .host-spec .target-spec; do
dspec="${sdir}-qt6/${dname}"
mkdir -p "${dspec}"
for f in "${sdir}/${dname}"/*; do
[ -f "${f}" ] || continue
sed 's/qt5/qt6/g' "${f}" > "${dspec}/${f##*/}"
done
done
sed -e 's/qt5/qt6/g' -e "s@-spec/@-spec-qt6/@g" qt.conf > qt6.conf
qmake_args=(
"-qtconf" "${wrksrc}/qt6.conf"
"PKG_CONFIG_EXECUTABLE=${XBPS_WRAPPERDIR}/${PKG_CONFIG}"
)
else
qmake_args=( "CONFIG+=no_qt_rpath" )
fi
mkdir -p build-qt6
cd build-qt6
/usr/lib/qt6/bin/qmake "${qmake_args[@]}" \
PREFIX=/usr QT_INSTALL_PREFIX=/usr LIB=/usr/lib ..
}
post_install() {
do_build() {
make ${makejobs} CC="$CC" CXX="$CXX" LINK="$CXX"
make ${makejobs} -C build-qt6 CC="$CC" CXX="$CXX" LINK="$CXX"
}
do_install() {
for build_root in . build-qt6; do
make -C "${build_root}" STRIP=true PREFIX=/usr \
DESTDIR="${DESTDIR}" INSTALL_ROOT="${DESTDIR}" install
done
# This is Qt5 only, so it will be installed in qwt-devel
rm "${DESTDIR}/usr/include/qwt/qwt_plot_glcanvas.h"
vlicense COPYING
}
qwt-devel_package() {
depends="${makedepends} ${sourcepkg}-${version}_${revision}"
short_desc+=" - development files"
qwt-qt6_package() {
short_desc+=" (Qt6)"
pkg_install() {
vmove "usr/lib/libqwt-qt6.so.*"
vlicense COPYING
}
}
qwt-headers_package() {
short_desc+=" - Qt5/Qt6 common headers"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
vlicense COPYING
}
}
qwt-devel_package() {
depends="${sourcepkg}-${version}_${revision}
qwt-headers-${version}_${revision} ${_makedepends_qt5}"
short_desc+=" - Qt5 development files"
pkg_install() {
vmove "usr/lib/*-qt5.so"
vmove usr/lib/qt5
vmove usr/lib/pkgconfig
vmove usr/lib/pkgconfig/Qt5*
vmkdir usr/include/qwt
vcopy "src/qwt_plot_glcanvas.h" usr/include/qwt
}
}
qwt-qt6-devel_package() {
depends="qwt-qt6-${version}_${revision}
qwt-headers-${version}_${revision} ${_makedepends_qt6}"
short_desc+=" - Qt6 development files"
pkg_install() {
vmove "usr/lib/*-qt6.so"
vmove usr/lib/qt6
vmove usr/lib/pkgconfig/Qt6*
}
}
qwt-doc_package() {
depends="${makedepends} ${sourcepkg}-${version}_${revision}"
depends="${sourcepkg}-${version}_${revision}"
short_desc+=" - doc files"
pkg_install() {
vmove usr/share/doc