summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1f181ffddc155fe3921982680eb3418304628209 (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
# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>
# Contributor: Kazuo Teramoto <kaz.rag at gmail dot com>
# Contributor: Rémy Oudompheng <remy@archlinux.org>
# Contributor: Firmicus <francois.archlinux.org>
# Contributor: bender02 at gmx dot com

pkgname=asymptote-git
epoch=2
pkgver=2.71.git.3.gbbb1ed00
pkgrel=1
pkgdesc="A vector graphics language (like metapost)"
arch=('i686' 'x86_64')
url="http://asymptote.sourceforge.net/"
license=('LGPL3')
depends=('gc' 'python' 'freeglut' 'gsl' 'fftw' 'libsigsegv')
makedepends=('git' 'flex' 'ghostscript' 'imagemagick' 'glm' 'librsvg')
optdepends=('python-pyqt5:      for the xasy GUI'
            'tix:               for the xasy GUI'
	    'python-cson:       for the xasy GUI')
conflicts=('asymptote')
provides=('asymptote')
source=('git+https://github.com/vectorgraphics/asymptote.git' remove_include.patch)
sha256sums=('SKIP'
            '3f72eab932e4713a58fbfafba8e24df362f23d29cb75db94204c8280246f024e')

pkgver() {
  cd ${pkgname%-git}
  git describe --tags|sed s+git+.git+|tr - .
}

prepare() {
  cd ${pkgname%-git}/
  touch prc/config.h
  patch -Np1 < "$srcdir"/remove_include.patch
}

build() {
  cd ${pkgname%-git}
  ./autogen.sh
  ./configure --enable-gc=/usr \
    --prefix=/usr \
    --enable-offscreen \
    --enable-texlive-build
  make all
}

check() {
  cd ${pkgname%-git}
  make check-all
}

package() {
  cd ${pkgname%-git}
  make DESTDIR="${pkgdir}" install-all

  # move vim files to correct place
  install -dm755 "$pkgdir"/usr/share/vim/vimfiles/{ftdetect,syntax}
  install -Dm644 "$pkgdir"/usr/share/asymptote/asy.vim \
	  "$pkgdir"/usr/share/vim/vimfiles/syntax/asy.vim
  install -Dm644 "$pkgdir"/usr/share/asymptote/asy_filetype.vim \
	  "$pkgdir"/usr/share/vim/vimfiles/ftdetect/asy.vim
  rm "$pkgdir"/usr/share/asymptote/asy.vim \
     "$pkgdir"/usr/share/asymptote/asy_filetype.vim
}