summaryrefslogtreecommitdiff
path: root/extra/texmacs/PKGBUILD
blob: 8ae557e05de7318f40aa02db86bd5ed0d721d888 (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
# $Id: PKGBUILD 188082 2013-06-08 11:18:26Z bpiotrowski $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: Damir Perisa <damir.perisa@bluewin.ch> # Contributor: Christopher Reimer <c.reimer1993@gmail.com>

pkgname=texmacs
pkgver=1.0.7.19
pkgrel=2
pkgdesc="Free scientific text editor, inspired by TeX and GNU Emacs. WYSIWYG editor TeX-fonts and CAS-interface (Giac, GTybalt, Macaulay 2, Maxima, Octave, Pari, Qcl, R and Yacas) in one."
arch=('i686' 'x86_64' 'mips64el')
url="http://www.texmacs.org/"
license=('GPL')
depends=('perl' 'guile1.8' 'texlive-core' 'python2' 'libxext' 'freetype2' 'shared-mime-info'
         'desktop-file-utils' 'qt4')
# do not remove texlive-core dependency, as it is needed!
optdepends=('transfig: convert images using fig2ps'
            'gawk: conversion of some files')
#source=(ftp://ftp.texmacs.org/pub/TeXmacs/targz/TeXmacs-${pkgver}-src.tar.gz)
source=(http://www.texmacs.org/Download/ftp/tmftp/source/TeXmacs-${pkgver}-src.tar.gz)
install=texmacs.install
options=('!emptydirs')
sha1sums=('855b8252f561b69deb45a3b80f4531a9055ea465')

build() {
  cd ${srcdir}/TeXmacs-${pkgver}-src
  sed -i 's/env python/env python2/' \
    plugins/{mathematica/bin/realpath.py,python/bin/tm_python,sage/bin/tm_sage} \
    TeXmacs/misc/inkscape_plugin/texmacs_reedit.py
  sed -i 's/"python"/"python2"/' plugins/python/progs/init-python.scm
  sed -i '/^LDPATH/d' src/makefile.in
  sed -i -e 's/guile /guile1.8 /g' \
         -e 's/guile-config/guile-config1.8/g' \
         configure

 # Don't generate icon-cache and mime-database (namcap tells that they should not be in a package)
  sed -i '/update-mime-database/d' Makefile.in
  sed -i '/gtk-update-icon-cache/d' Makefile.in
  sed -i '\/icons\/gnome 2>\/dev\/null/d' Makefile.in

  # Unused i386 binary making strip fail.
  rm plugins/maxima/bin/maxima_filter
  
  export QMAKE=qmake-qt4
  export MOC=moc-qt4
  export UIC=uic-qt4
  ./configure --prefix=/usr \
              --mandir=/usr/share/man \
              --libexecdir=/usr/lib
  make
}

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

 # fix fig2ps script
 sed -i 's|${prefix}|/usr|' ${pkgdir}/usr/bin/fig2ps
}