summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2ff24de4359b2b9389d63d89db43bb8a33dbf30e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Maintainer: Simon Repp <simon@fdpl.io>
# Contributor: TheNiceGuy <gabrielpolloguilbert@gmail.com>

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"
}