diff --git a/mingw-w64-qwt-qt6/001-separate-debug-info-build.patch b/mingw-w64-qwt-qt6/001-separate-debug-info-build.patch new file mode 100644 index 0000000000000..ad32960ed72bf --- /dev/null +++ b/mingw-w64-qwt-qt6/001-separate-debug-info-build.patch @@ -0,0 +1,11 @@ +--- qwt-6.1.4/qwtbuild.pri.orig 2020-02-28 08:25:24.337340800 +0300 ++++ qwt-6.1.4/qwtbuild.pri 2020-02-28 08:26:14.550861400 +0300 +@@ -27,7 +27,7 @@ + # might need a debug version. + # Enable debug_and_release + build_all if you want to build both. + +- CONFIG += debug_and_release ++ CONFIG += release force_debug_info separate_debug_info + CONFIG += build_all + } + else { diff --git a/mingw-w64-qwt-qt6/002-link-to-release.patch b/mingw-w64-qwt-qt6/002-link-to-release.patch new file mode 100644 index 0000000000000..b0c062b3777d1 --- /dev/null +++ b/mingw-w64-qwt-qt6/002-link-to-release.patch @@ -0,0 +1,18 @@ +--- a/qwtfunctions.pri ++++ b/qwtfunctions.pri +@@ -68,15 +68,6 @@ + + isEmpty(LINKAGE) { + +- if(!debug_and_release|build_pass):CONFIG(debug, debug|release) { +- +- mac:LINKAGE = -l$${LIB_NAME}_debug +- win32:LINKAGE = -l$${LIB_NAME}d +- } +- } +- +- isEmpty(LINKAGE) { +- + LINKAGE = -l$${LIB_NAME} + } + diff --git a/mingw-w64-qwt-qt6/003-qwtconfig-msys2.patch b/mingw-w64-qwt-qt6/003-qwtconfig-msys2.patch new file mode 100644 index 0000000000000..c4afea51da5fa --- /dev/null +++ b/mingw-w64-qwt-qt6/003-qwtconfig-msys2.patch @@ -0,0 +1,63 @@ +--- qwt-6.2.0/qwtconfig.pri.orig 2021-07-18 12:19:33.000000000 +0100 ++++ qwt-6.2.0/qwtconfig.pri 2021-07-19 08:10:23.644576700 +0100 +@@ -24,12 +24,11 @@ + } + + win32 { +- QWT_INSTALL_PREFIX = C:/Qwt-$$QWT_VERSION +- # QWT_INSTALL_PREFIX = C:/Qwt-$$QWT_VERSION-qt-$$QT_VERSION ++ QWT_INSTALL_PREFIX = %VALUE_QWT_INSTALL_PREFIX% + } + +-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 + + ###################################################################### +@@ -42,7 +41,7 @@ + # runtime environment of designer/creator. + ###################################################################### + +-QWT_INSTALL_PLUGINS = $${QWT_INSTALL_PREFIX}/plugins/designer ++QWT_INSTALL_PLUGINS = $${QWT_INSTALL_PREFIX}/share/qt6/plugins/designer + + # linux distributors often organize the Qt installation + # their way and QT_INSTALL_PREFIX doesn't offer a good +@@ -63,8 +62,7 @@ + # with every Qt upgrade. + ###################################################################### + +-QWT_INSTALL_FEATURES = $${QWT_INSTALL_PREFIX}/features +-# QWT_INSTALL_FEATURES = $$[QT_INSTALL_PREFIX]/features ++QWT_INSTALL_FEATURES = $${QWT_INSTALL_PREFIX}/share/qt6/mkspecs/features + + ###################################################################### + # Build the static/shared libraries. +@@ -137,7 +135,7 @@ + # Otherwise you have to build them from the examples directory. + ###################################################################### + +-QWT_CONFIG += QwtExamples ++#QWT_CONFIG += QwtExamples + + ###################################################################### + # The playground is primarily intended for the Qwt development +@@ -148,14 +146,14 @@ + # Otherwise you have to build them from the playground directory. + ###################################################################### + +-QWT_CONFIG += QwtPlayground ++#QWT_CONFIG += QwtPlayground + + ###################################################################### + # If you want to auto build the tests, enable the line below + # Otherwise you have to build them from the tests directory. + ###################################################################### + +-QWT_CONFIG += QwtTests ++#QWT_CONFIG += QwtTests + + ###################################################################### + # When Qt has been built as framework qmake wants diff --git a/mingw-w64-qwt-qt6/PKGBUILD b/mingw-w64-qwt-qt6/PKGBUILD new file mode 100644 index 0000000000000..2bb8069aba5a8 --- /dev/null +++ b/mingw-w64-qwt-qt6/PKGBUILD @@ -0,0 +1,64 @@ +# Maintainer: Alexey Pavlov +# Contributor: Ingo Maindorfer +# Based on work by AlexWMF + +_realname=qwt +pkgbase=mingw-w64-${_realname}-qt6 +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}-qt6") +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}" + "${MINGW_PACKAGE_PREFIX}-${_realname}-qt5") +pkgver=6.2.0 +pkgrel=1 +pkgdesc="Qt Widgets for Technical Applications (mingw-w64)" +arch=('any') +mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') +license=("custom:${_realname}") +url="https://qwt.sourceforge.io/" +depends=("${MINGW_PACKAGE_PREFIX}-qt6-base" + "${MINGW_PACKAGE_PREFIX}-qt6-svg") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") +options=(!strip staticlibs !buildflags) +source=("https://downloads.sourceforge.net/${_realname}/${_realname}-${pkgver}.tar.bz2" + 001-separate-debug-info-build.patch + 002-link-to-release.patch + 003-qwtconfig-msys2.patch) +sha256sums=('9194f6513955d0fd7300f67158175064460197abab1a92fa127a67a4b0b71530' + '0e103a7ae290bb706c87135b9f0fffc9f2fb83eea57922973817b220c0f45e9d' + '6e0101d2c2897c94da6284ba0b929a7a39d82120313e6cd6353fd5e3aaf4b059' + '85072f5c854f5568ee109be1a13213b78890e5001e801cfcfdc00da59bb0e494') + +prepare() { + cd ${_realname}-${pkgver} + + patch -p1 -i ${srcdir}/001-separate-debug-info-build.patch + patch -p1 -i ${srcdir}/002-link-to-release.patch + patch -p1 -i ${srcdir}/003-qwtconfig-msys2.patch +} + +package() { + [[ -d ${srcdir}/build-${MSYSTEM} ]] && rm -rf ${srcdir}/build-${MSYSTEM} + cp -rf ${srcdir}/${_realname}-${pkgver} ${srcdir}/build-${MSYSTEM} + + cd ${srcdir}/build-${MSYSTEM} + + local PREFIX_WIN=$(cygpath -am ${pkgdir}${MINGW_PREFIX}) + sed -s "s|%VALUE_QWT_INSTALL_PREFIX%|${PREFIX_WIN}|g" -i qwtconfig.pri + ${MINGW_PREFIX}/bin/qmake CONFIG-=debug_and_release CONFIG+=release qwt.pro + + make # VERBOSE=1 + make -j1 install + + install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING \ + ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING + + mkdir -p ${pkgdir}${MINGW_PREFIX}/bin/ + mv "${pkgdir}${MINGW_PREFIX}"/lib/*.{debug,dll} "${pkgdir}${MINGW_PREFIX}"/bin/ + + # install debug info + #install -Dm644 lib/*.debug -t "${pkgdir}${MINGW_PREFIX}"/bin/ + + local PREFIX_WIN=$(cygpath -am ${pkgdir}${MINGW_PREFIX}) + + sed -s "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" \ + -i ${pkgdir}${MINGW_PREFIX}/share/qt6/mkspecs/features/qwtconfig.pri +}