From a37911852cb06578343abd6ec1caf7422dc659cc Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Mon, 3 Feb 2014 22:04:34 +0000 Subject: [PATCH] added extra/texmacs --- extra/texmacs/PKGBUILD | 61 +++++++++++++++++++++++++++++++++++ extra/texmacs/arm.patch | 12 +++++++ extra/texmacs/texmacs.install | 14 ++++++++ 3 files changed, 87 insertions(+) create mode 100644 extra/texmacs/PKGBUILD create mode 100644 extra/texmacs/arm.patch create mode 100644 extra/texmacs/texmacs.install diff --git a/extra/texmacs/PKGBUILD b/extra/texmacs/PKGBUILD new file mode 100644 index 000000000..38f33cd2a --- /dev/null +++ b/extra/texmacs/PKGBUILD @@ -0,0 +1,61 @@ +# $Id$ +# Maintainer: Ronald van Haren +# Contributor: Damir Perisa # Contributor: Christopher Reimer + +# ALARM: Kevin Mihelich +# - patch to fix qreal usage + +pkgname=texmacs +pkgver=1.0.7.21 +pkgrel=1 +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') +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') +makedepends=('ghostscript') +#source=(ftp://ftp.texmacs.org/pub/TeXmacs/targz/TeXmacs-${pkgver}-src.tar.gz) +source=(http://pkgs.fedoraproject.org/repo/pkgs/TeXmacs/TeXmacs-1.0.7.21-src.tar.gz/a56e2f14761e9003471fd26d91058ef0/TeXmacs-1.0.7.21-src.tar.gz + arm.patch) +install=texmacs.install +options=('!emptydirs') +sha1sums=('e8086acd4b7c1bb3aaccf75b6b0199aa612cb66c' + '3c431d63360da065b4021df04ed052ee6b18b8ae') + +build() { + cd ${srcdir}/TeXmacs-${pkgver}-src + patch -p1 -i ../arm.patch + 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 + + 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 +} diff --git a/extra/texmacs/arm.patch b/extra/texmacs/arm.patch new file mode 100644 index 000000000..5a2b493bf --- /dev/null +++ b/extra/texmacs/arm.patch @@ -0,0 +1,12 @@ +diff -urN a/src/Plugins/Qt/qt_renderer.cpp b/src/Plugins/Qt/qt_renderer.cpp +--- a/src/Plugins/Qt/qt_renderer.cpp 2013-11-03 16:09:35.000000000 -0700 ++++ b/src/Plugins/Qt/qt_renderer.cpp 2014-02-03 13:45:42.670490781 -0700 +@@ -271,7 +271,7 @@ + if ((N(y) != n) || (n<2)) return; + STACK_NEW_ARRAY (pnt, QPointF, n); + for (i=0; isetRenderHints (QPainter::Antialiasing); + painter->drawPolyline (pnt, n); + STACK_DELETE_ARRAY (pnt); diff --git a/extra/texmacs/texmacs.install b/extra/texmacs/texmacs.install new file mode 100644 index 000000000..7486663d6 --- /dev/null +++ b/extra/texmacs/texmacs.install @@ -0,0 +1,14 @@ +post_install() { + update-desktop-database -q + update-mime-database usr/share/mime +} + +post_upgrade() { + post_install +} + +post_remove () { + post_install +} + +