# Maintainer: Simon Repp # Contributor: TheNiceGuy pkgname=vpaint pkgver=1.7 pkgrel=2 pkgdesc='VPaint is an experimental vector graphics editor based on the Vector Animation Complex technology.' arch=('i686' 'x86_64') license=('MIT') depends=('glu' 'qt5-base' 'libxkbcommon-x11') makedepends=('gendesk' 'icoutils') url='https://www.vpaint.org' conflicts=('vpaint-git') provides=() source=( 'Gui.pro.patch' "https://github.com/dalboris/vpaint/archive/v$pkgver.tar.gz" ) md5sums=( 'b9fd8b31d9a6edda47df543a7d4bfe90' 'f714e2bd6569e08e16f89e22cfbcb2dd' ) prepare() { icotool -x -o $srcdir/vpaint.png $srcdir/$pkgname-$pkgver/src/Gui/images/VPaint.ico gendesk -f --pkgname "$pkgname" --pkgdesc "Vector graphics editor" --name="VPaint" \ --comment "Start VPaint" --exec "$pkgname" --categories "Graphics;2DGraphics;VectorGraphics" \ --custom "Icon=/usr/share/pixmaps/vpaint.png" } build() { # Apply unreleased patch to un-break building 1.7 on recent linux/gcc # https://github.com/dalboris/vpaint/pull/134#issuecomment-1256451558 # (This can be removed with any following release after current 1.7) patch "$srcdir/$pkgname-$pkgver/src/Gui/Gui.pro" "$srcdir/Gui.pro.patch" mkdir -p "$srcdir/$pkgname-$pkgver/build" cd "$srcdir/$pkgname-$pkgver/build" export QT_SELECT=5 qmake ../src/VPaint.pro -r -spec linux-g++ QMAKE_CXXFLAGS+="-fPIC -fno-delete-null-pointer-checks" make } package() { mkdir -p "$pkgdir/usr/bin" install -Dm755 "$srcdir/$pkgname-$pkgver/build/Gui/VPaint" "$pkgdir/usr/bin/vpaint" install -Dm644 "$srcdir/vpaint.png" "$pkgdir/usr/share/pixmaps/vpaint.png" install -Dm644 "$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop" }