Help building texmacs

This commit is contained in:
gnastyle 2015-05-08 20:43:57 +00:00
parent cc624513ec
commit cca3bbc343
3 changed files with 93 additions and 0 deletions

69
texmacs/PKGBUILD Normal file
View File

@ -0,0 +1,69 @@
pkgname=texmacs
pkgver=1.99.2
pkgrel=1
pkgdesc="WYSIWYG Qt4 editor and graphical frontend to various CASes"
arch=('x86_64')
url='http://texmacs.org/'
screenshot="http://www.texmacs.org/tmweb/images/texmacs-1.png"
license=('GPL3')
depends=('qt' 'texlive-core' 'guile1.8' 'cairo' 'freetype2' 'imlib2'
'perl' 'python2' 'libxext'
'desktop-file-utils' 'shared-mime-info')
makedepends=('ghostscript')
optdepends=('gawk: conversion of some files'
'transfig: convert images using fig2ps')
provides=('texmacs')
conflicts=('texmacs-qt')
install=${pkgname}.install
options=('!emptydirs')
source=("http://www.texmacs.org/Download/ftp/tmftp/source/TeXmacs-$pkgver-src.tar.gz"
'https://lists.gnu.org/archive/html/texmacs-dev/2010-09/png9oo9TJIjlY.png'
'texmacs.desktop')
sha512sums=('e9d2dd0aab2e66470c4ae860e13b6fad2cc07913f14f7bca042c703d4d8b4a62fafafa711b81a0d8f8c125a3641b8bb5f38cd3adac74ec18895671423aa60be9'
'aae0c0a2c9f6f691ab694d3a6069ac0286153fe3aec6865c0bba6422f287e95cf18a26f810b5b87ad77944ea890f8839448059d095d7b22483d50e16d366966e'
'277353b9e612c2d958e621c317aff75615ddaaee3570357b492a2dcb656aec1dda42f4e65ea24c11ff37b74eaaf3ffe9a5776c964a9d5a2eb8cf157fe9348069')
prepare() {
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_extension/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
}
build() {
cd "${srcdir}/TeXmacs-${pkgver}-src"
export QMAKE=qmake
export MOC=moc-qt4
export UIC=uic-qt4
./configure \
--prefix=/usr \
--enable-pdf-renderer \
--enable-optimize \
--with-freetype \
--with-imlib2 \
--enable-guile2=no \
--with-qt
make || return 1
}
package() {
cd $srcdir/TeXmacs-$pkgver-src
make DESTDIR=${pkgdir} install
# fix fig2ps script
sed -i 's|${prefix}|/usr|' "${pkgdir}/usr/bin/fig2ps"
}

11
texmacs/texmacs.desktop Normal file
View File

@ -0,0 +1,11 @@
[Desktop Entry]
Name=TeXmacs
GenericName=GNU TeXmacs Editor
GenericName[es]=Editor GNU TeXmacs
Comment=A structured wysiwyg scientific text editor and graphical frontend to various CASes
Comment[es]=GNU TeXmacs es un editor de texto cientifico libre e interface de programas CAS
Exec=texmacs
Icon=texmacs
Terminal=false
Type=Application
Categories=Science;Math;

13
texmacs/texmacs.install Normal file
View File

@ -0,0 +1,13 @@
post_install() {
update-desktop-database -q
update-mime-database /usr/share/mime
gtk-update-icon-cache --force -t -q /usr/share/icons/gnome
}
post_upgrade() {
post_install
}
post_remove() {
post_install
}