PKGBUILD 1.99 KB
Newer Older
1 2
# Contributions from ArchLinux: https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/inkscape

Manuel's avatar
Manuel committed
3
pkgname=inkscape
Jeff Huang's avatar
Jeff Huang committed
4
pkgver=0.92.2
Xuetian Weng's avatar
Xuetian Weng committed
5 6 7
pkgrel=4
pkgdesc='Professional vector graphics editor'
url='https://inkscape.org/'
Manuel's avatar
Manuel committed
8 9
license=('GPL' 'LGPL')
arch=('x86_64')
10 11 12
depends=('gc' 'gsl' 'gtkmm' 'gtkspell' 'imagemagick' 'libxslt' 'poppler-glib'
         'popt' 'potrace' 'ttf-dejavu' 'python2' 'desktop-file-utils'
         'hicolor-icon-theme')
Xuetian Weng's avatar
Xuetian Weng committed
13 14
# python is needed for glib-genmarshal (at least with GLib 2.54)
makedepends=('boost' 'intltool' 'python3')
Manuel's avatar
Manuel committed
15
optdepends=('pstoedit: latex formulas'
Xuetian Weng's avatar
Xuetian Weng committed
16
            'python2-scour: optimized SVG output'
Manuel's avatar
Manuel committed
17 18 19 20
            'texlive-core: latex formulas'
            'python2-numpy: some extensions'
            'python2-lxml: some extensions and filters'
            'uniconvertor: reading/writing to some proprietary formats')
Xuetian Weng's avatar
Xuetian Weng committed
21 22
source=("https://media.inkscape.org/dl/resources/file/${pkgname}-${pkgver}.tar.bz2"
        poppler-0.58.patch)
23 24
sha256sums=('a628d0e04c254e9840947e6d866974f92c68ae31631a38b94d9b65e5cd84cfd3'
            '0505f49cf69ad51159cda5aa5f497f001fe9d10f34d59e6ad704a1b1e1dc50c1')
Manuel's avatar
Manuel committed
25 26 27

prepare() {
	cd "${srcdir}/${pkgname}-${pkgver}"
28 29
	# https://gitlab.com/inkscape/inkscape/commit/93ccf03162cd2e46d962822d5507865f3451168c
	patch -Np1 -i ../poppler-0.58.patch
Xuetian Weng's avatar
Xuetian Weng committed
30

Jeff Huang's avatar
Jeff Huang committed
31 32
	./autogen.sh

Manuel's avatar
Manuel committed
33 34 35 36 37
	sed -i 's|/usr/bin/python\>|/usr/bin/python2|g' cxxtest/*.py
	sed -i 's|/usr/bin/env python\>|/usr/bin/env python2|g' share/*/{test/,}*.py
	sed -i 's|"python" },|"python2" },|g' src/extension/implementation/script.cpp
	sed -i 's|python -c|python2 -c|g' configure share/extensions/uniconv*.py
	sed -i 's|"python"|"python2"|g' src/main.cpp
Xuetian Weng's avatar
Xuetian Weng committed
38

39
	sed -i 's| abs(| std::fabs(|g' src/ui/tools/flood-tool.cpp
Manuel's avatar
Manuel committed
40 41 42 43 44
}

build() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	./configure \
45
		--prefix=/usr \
Manuel's avatar
Manuel committed
46 47 48 49
		--with-python \
		--with-perl \
		--enable-lcms \
		--enable-poppler-cairo \
Xuetian Weng's avatar
Xuetian Weng committed
50
		--disable-strict-build \
Manuel's avatar
Manuel committed
51 52 53 54 55 56 57 58
		--disable-dependency-tracking
	make
}

package() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	make DESTDIR="${pkgdir}" install
}