archrelease: copy trunk to testing-x86_64
[arch-packages.git] / asymptote / trunk / PKGBUILD
blobcbb04a7e9b4203f6d8b924a3accc98712b89fdeb
1 # Maintainer: Rémy Oudompheng <remy@archlinux.org>
2 # Contributor: Firmicus <francois.archlinux.org>
3 # Contributor: bender02 at gmx dot com
5 pkgname=asymptote
6 pkgver=2.85
7 pkgrel=1
8 pkgdesc="A vector graphics language (like metapost)"
9 arch=('x86_64')
10 url="http://asymptote.sourceforge.net/"
11 license=("GPL3")
12 depends=('texlive-core' 'gc' 'freeglut' 'gsl' 'fftw' 'libsigsegv')
13 makedepends=('ghostscript' 'imagemagick'
14              'mesa'               # For OpenGL headers
15              'texlive-plainextra' # For texinfo
16              'texlive-latexextra'
17              'python-pyqt5'       # For xasy GUI generation
18              'glm'
19              'glu')
20 optdepends=('python-pyqt5: for the xasy GUI'
21             'python-cson:  for the xasy GUI')
22 source=("https://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.src.tgz")
23 sha256sums=('4c0559b62c41f947b5fbf044b4d091bd3cf0abe599c85138087069809875ec87')
25 prepare() {
26   cd "${srcdir}/${pkgname}-${pkgver}"
27   ./autogen.sh
30 build() {
31   cd "${srcdir}/${pkgname}-${pkgver}"
33   export CXXFLAGS+=" -I${srcdir}/${pkgname}-${pkgver}"
34   ./configure --enable-gc=/usr \
35               --prefix=/usr \
36               --with-latex=/usr/share/texmf/tex/latex \
37               --with-context=/usr/share/texmf/tex/context \
38               --enable-offscreen
39   make all
42 check() {
43   cd "${srcdir}/${pkgname}-${pkgver}"
44   make check-all
47 package() {
48   cd "${srcdir}/${pkgname}-${pkgver}"
49   make -j1 DESTDIR="${pkgdir}" install-all
50   # this dir contains png files that are already embedded in the pdf documentation:
51   rm -rf "${pkgdir}/usr/share/info/asymptote"
53   # copy some data files to their correct location
54   mkdir -p "$pkgdir"/usr/share/emacs/site-lisp
55   cp "$pkgdir"/usr/share/asymptote/*.el "$pkgdir"/usr/share/emacs/site-lisp
56   mkdir -p "$pkgdir"/usr/share/vim/vimfiles/syntax
57   cp "$pkgdir"/usr/share/asymptote/*.vim "$pkgdir"/usr/share/vim/vimfiles/syntax
58   mkdir -p "$pkgdir"/usr/share/org.kde.syntax-highlighting/syntax
59   cd "$pkgdir"/usr/share/asymptote/
60   sh asy-kate.sh
61   mv asymptote.xml "$pkgdir"/usr/share/org.kde.syntax-highlighting/syntax