mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
81 lines
2.5 KiB
Bash
81 lines
2.5 KiB
Bash
pkgname=texmacs
|
|
pkgver=1.99.5
|
|
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' 'sqlite3'
|
|
'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")
|
|
sha512sums=('a7d846fd8823e486cf724bfcbe04ae877dd64995d6131af59b49427a1178e36b52b9fcd9109783b9ae1e39c988ae9ed497b1540dce29645ebf2c4301ca7357a8')
|
|
|
|
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
|
|
|
|
autoreconf -vi
|
|
sed -i -e 's/guile18-config/guile-config1.8/g' configure
|
|
sed -i -e 's/guile18/guile1.8/g' configure
|
|
sed -i -e 's|#include <libguile18.h>|#include <guile/gh.h>|g' src/Scheme/Guile/guile_tm.hpp
|
|
|
|
# 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
|
|
|
|
find -name '.*.d' -o -name '.*.cpp' -exec rm {} \;
|
|
|
|
}
|
|
|
|
build() {
|
|
cd "${srcdir}/TeXmacs-${pkgver}-src"
|
|
|
|
export QMAKE=qmake
|
|
export MOC=moc
|
|
export UIC=uic
|
|
export LDFLAGS=-lz
|
|
./configure \
|
|
--prefix=/usr \
|
|
--enable-pdf-renderer \
|
|
--enable-optimize \
|
|
--with-imlib2 \
|
|
--enable-guile2=no \
|
|
--with-qt
|
|
make
|
|
|
|
# --with-freetype
|
|
# --with-sqlite3=yes
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/TeXmacs-${pkgver}-src"
|
|
make DESTDIR=${pkgdir} install
|
|
|
|
cp ${pkgdir}/usr/share/icons/gnome/scalable/apps/TeXmacs.svg \
|
|
${pkgdir}/usr/share/pixmaps/texmacs.svg
|
|
rm ${pkgdir}/usr/share/pixmaps/TeXmacs.xpm
|
|
sed -i s!Icon=TeXmacs!Icon=texmacs! \
|
|
${pkgdir}/usr/share/applications/texmacs.desktop
|
|
|
|
|
|
# fix fig2ps script
|
|
sed -i 's|${prefix}|/usr|' "${pkgdir}/usr/bin/fig2ps"
|
|
|
|
msg "set environment variables"
|
|
sed -i s!"@CONFIG_LIB_PATH@"!"LD_LIBRARY_PATH"!g $pkgdir/usr/bin/$pkgname
|
|
}
|