summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Zou2020-11-01 20:54:22 +0100
committerMichel Zou2020-11-01 20:54:22 +0100
commit6e31cbd7cb30ac4d0d47db6e46a7901599bd9e99 (patch)
treea6126e0f87429da9c5674b274fd2895d24087244
downloadaur-6e31cbd7cb30ac4d0d47db6e46a7901599bd9e99.tar.gz
qt6
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD70
2 files changed, 87 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..cbec5daee6c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = mingw-w64-qwt-qt6
+ pkgdesc = Qt Widgets for Technical Applications (mingw-w64)
+ pkgver = 6.1.5
+ pkgrel = 1
+ url = http://qwt.sourceforge.net
+ arch = any
+ license = custom:qwt
+ makedepends = mingw-w64-gcc
+ depends = mingw-w64-qt6-svg
+ options = staticlibs
+ options = !strip
+ options = !buildflags
+ source = svn+https://svn.code.sf.net/p/qwt/code/trunk/qwt
+ sha256sums = SKIP
+
+pkgname = mingw-w64-qwt-qt6
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..e4834926213
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,70 @@
+pkgname=mingw-w64-qwt-qt6
+pkgver=6.1.5
+pkgrel=1
+pkgdesc="Qt Widgets for Technical Applications (mingw-w64)"
+arch=('any')
+license=('custom:qwt')
+url="http://qwt.sourceforge.net"
+depends=('mingw-w64-qt6-svg')
+makedepends=('mingw-w64-gcc')
+options=('staticlibs' '!strip' '!buildflags')
+source=("svn+https://svn.code.sf.net/p/qwt/code/trunk/qwt")
+sha256sums=('SKIP')
+
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+prepare() {
+ cd qwt
+ # Build release only
+ sed -i 's|+= debug_and_release|+= release|' qwtbuild.pri
+ sed -i '/+= build_all/d' qwtbuild.pri
+
+ # No designer plugin:
+ sed -i 's|+= QwtDesigner|-= QwtDesigner|' qwtconfig.pri
+
+ # Make install locations consistent with Arch's native Qwt:
+ sed -i 's|$${QWT_INSTALL_PREFIX}/doc|$${QWT_INSTALL_PREFIX}/share/doc/qwt|' qwtconfig.pri
+ sed -i 's|$${QWT_INSTALL_PREFIX}/include|$${QWT_INSTALL_PREFIX}/include/qwt|' qwtconfig.pri
+
+ # No need for docs:
+ sed -i "s|= target doc|= target|" src/src.pro
+}
+
+build() {
+ for _arch in ${_architectures}; do
+ export QTDIR=/usr/${_arch}/lib/qt6
+ export PATH=${QTDIR}/bin:${PATH}
+ mkdir -p "${srcdir}/qwt-build-${_arch}"
+ cd "${srcdir}"
+ cp -r "qwt/" "qwt-build-${_arch}"
+ cd "${srcdir}/qwt-build-${_arch}/qwt"
+
+ # This is a mingw build, so Windows prefix is used. Let's change it:
+ sed -i "s|C:/Qwt-\$\$QWT_VERSION|/usr/${_arch}|" qwtconfig.pri
+
+ ${QTDIR}/bin/qmake-qt6 qwt.pro
+ make
+ done
+}
+
+package() {
+
+ for _target in ${_architectures}; do
+
+ cd "${srcdir}/qwt-build-${_target}/qwt"
+
+ make INSTALL_ROOT=${pkgdir} QTDIR=/usr/${_target}/ install
+
+ cd "${pkgdir}/usr/${_target}"
+
+ # Move DLLs from lib to bin
+ mkdir -p bin
+ mv lib/*.dll bin/
+ ${_target}-strip --strip-unneeded "$pkgdir"/usr/${_target}/bin/*.dll
+ ${_target}-strip -g "$pkgdir"/usr/${_target}/lib/*.a
+ # Move features to share/qt/mkspecs
+ rm -rf "$pkgdir"/usr/${_target}/share
+ mkdir -p lib/qt/mkspecs
+ mv features lib/qt/mkspecs
+ done
+}