PKGBUILDs/extra/texmacs/PKGBUILD

66 lines
2.1 KiB
Bash
Raw Normal View History

2018-03-18 22:29:12 +00:00
# $Id$
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: Damir Perisa <damir.perisa@bluewin.ch> # Contributor: Christopher Reimer <c.reimer1993@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - patch to fix size_t check on ARM
pkgname=texmacs
2018-07-14 12:12:26 +00:00
pkgver=1.99.7
pkgrel=1
2018-03-18 22:29:12 +00:00
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=('x86_64')
url="http://www.texmacs.org/"
license=('GPL')
depends=('perl' 'guile1.8' 'texlive-core' 'python2' 'libxext' 'freetype2' 'qt5-base')
# do not remove texlive-core dependency, as it is needed!
optdepends=('transfig: convert images using fig2ps'
'gawk: conversion of some files'
'ghostscript: rendering ps files'
'imagemagick: convert images'
'aspell: spell checking')
makedepends=('ghostscript' 'cmake')
source=(http://www.texmacs.org/Download/ftp/tmftp/source/TeXmacs-${pkgver}-src.tar.gz
2018-07-14 12:12:26 +00:00
texmacs-fix-linking.patch
2018-03-18 22:29:12 +00:00
fix-size_t-check.patch)
options=('!emptydirs')
2018-07-14 12:12:26 +00:00
sha1sums=('6621093936bf1062adbc86a62b5765e6373454a9'
'7e646cd354503df014f624ce26395eefc5ef4250'
2018-03-18 22:29:12 +00:00
'57e1c2a560ad4d52f0c96f05c990f738b65d2571')
prepare() {
cd 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_extension/texmacs_reedit.py
sed -i 's/"python"/"python2"/' plugins/python/progs/init-python.scm
2018-07-14 12:12:26 +00:00
patch -p1 -i ../texmacs-fix-linking.patch # Fix linking
2018-06-23 11:15:57 +00:00
2018-03-18 22:29:12 +00:00
patch -p1 -i ../fix-size_t-check.patch
}
build() {
cd TeXmacs-${pkgver}-src
mkdir -p build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DGUILECONFIG_EXECUTABLE=/usr/bin/guile-config1.8
make
}
package() {
cd TeXmacs-${pkgver}-src/build
make DESTDIR=${pkgdir} install
# fix fig2ps script
sed -i 's|${prefix}|/usr|' "${pkgdir}/usr/bin/fig2ps"
# fix launch script
sed -e 's|\@CONFIG_LIB_PATH\@|LD_LIBRARY_PATH|g' -i "$pkgdir"/usr/bin/texmacs
}