summaryrefslogtreecommitdiff
path: root/extra/inkscape/PKGBUILD
blob: 58f933952fd0856fd599433f186be2f6f1bfc1a9 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# $Id: PKGBUILD 215353 2014-06-23 10:40:14Z bisson $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Tobias Kieslich <tobias@justdreams.de>
# Contributor: tobias <tobias@archlinux.org>

pkgname=inkscape
pkgver=0.48.4
pkgrel=17
pkgdesc='Vector graphics editor using the SVG file format'
url='http://inkscape.sourceforge.net/'
license=('GPL' 'LGPL')
arch=('i686' 'x86_64')
makedepends=('boost' 'intltool')
depends=('gc' 'gsl' 'gtkmm' 'gtkspell' 'imagemagick' 'libxslt' 'poppler-glib' 'popt'
         'python2' 'desktop-file-utils' 'hicolor-icon-theme')
optdepends=('pstoedit: latex formulas'
            'texlive-core: latex formulas'
            'python2-numpy: some extensions'
            'python2-lxml: some extensions and filters'
            'uniconvertor: reading/writing to some proprietary formats')
source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2"
        'spuriouscomma.patch'
        'ime-placement.patch'
        'freetype.patch'
        'gc74.patch'
        'poppler-0.26.patch')
sha1sums=('5f26f6ad191d1e7c2a9fb69a438722beb172224c'
          '7d1d5a6d1d2b0926721a994d5889c52890fc57c1'
          'b12b948ca5ee7e02703a13aa8b8bccdf67947f12'
          'aba4d98bebae088c3401fd9259ea3cf70b96fbbf'
          '3e1b5b6852d668388a857bc7a73fb7731fb262b8'
          'b60843f43e6d3b6cfcf4e253abb3f7ea7bc69c2a')

install=install

prepare() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	patch -p1 -i ../gc74.patch # FS#39106
	patch -p0 -i ../freetype.patch # FS#37956
	patch -p1 -i ../ime-placement.patch # FS#39898
	patch -p0 -i ../spuriouscomma.patch
	patch -p0 -i ../poppler-0.26.patch
	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
	sed -i '/^#include <g.kmm/i #include <glibmm.h>' src/*{,/*{,/*{,/*}}}.{h,cpp}
	sed -i '/extern unsigned GC_version;/c unsigned GC_version=GC_VERSION_MAJOR<<16+GC_VERSION_MINOR<<8+GC_VERSION_MICRO;' configure
}

build() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	./configure \
		--prefix=/usr \
		--with-python \
		--with-perl \
		--enable-lcms \
		--enable-poppler-cairo \
		--disable-dependency-tracking
	make
}

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