mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 13:07:13 +08:00
Add Sage and Maxima 2 optional backends for Cantor
This commit is contained in:
parent
7fe529fce7
commit
925a7f8e18
43
maxima/PKGBUILD
Normal file
43
maxima/PKGBUILD
Normal file
@ -0,0 +1,43 @@
|
||||
#
|
||||
# Platform Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
pkgname=maxima
|
||||
pkgver=5.21.1
|
||||
pkgrel=1
|
||||
pkgdesc="Maxima - a sophisticated computer algebra system"
|
||||
arch=('i686' 'x86_64')
|
||||
license=('GPL')
|
||||
url="http://maxima.sourceforge.net"
|
||||
depends=('sbcl=1.0.42' 'texinfo' 'sh')
|
||||
optdepends=('gnuplot: plotting capabilities' \
|
||||
'rlwrap: readline support via /usr/bin/rmaxima' \
|
||||
'tk: graphical xmaxima interface')
|
||||
# needs rebuild when bash changes version
|
||||
# needs a rebuild when sbcl changes version
|
||||
options=('!makeflags' '!zipman') # don't zip info pages or they won't work inside maxima
|
||||
install=maxima.install
|
||||
source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz" "$pkgname.desktop")
|
||||
md5sums=('e08ed533f3059cec52788ef35198bdcc' '24aa81126fbb8b726854e5a80d4c2415')
|
||||
|
||||
build() {
|
||||
cd ${srcdir}/${pkgname}-${pkgver}
|
||||
./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info \
|
||||
--libexecdir=/usr/lib --enable-sbcl --with-default-lisp=sbcl || return 1
|
||||
make || return 1
|
||||
make DESTDIR=${pkgdir} install || return 1
|
||||
|
||||
# install some freedesktop.org compatibility
|
||||
install -Dm644 ${srcdir}/${pkgname}.desktop \
|
||||
${pkgdir}/usr/share/applications/${pkgname}.desktop || return 1
|
||||
|
||||
# make sure, we have a nice icon for the desktop file at the right place ;)
|
||||
install -d ${pkgdir}/usr/share/pixmaps/
|
||||
ln -s /usr/share/maxima/${pkgver}/xmaxima/maxima-new.png \
|
||||
${pkgdir}/usr/share/pixmaps/${pkgname}.png || return 1
|
||||
}
|
11
maxima/maxima.desktop
Normal file
11
maxima/maxima.desktop
Normal file
@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Name=XMaxima
|
||||
GenericName=A computer algebra system
|
||||
GenericName[de]=Computeralgebra System
|
||||
GenericName[it]=algebra a livello avanzato
|
||||
Comment=A sophisticated computer algebra system
|
||||
Exec=xmaxima
|
||||
Icon=maxima
|
||||
Terminal=true
|
||||
Type=Application
|
||||
Categories=Science;Math;
|
18
maxima/maxima.install
Normal file
18
maxima/maxima.install
Normal file
@ -0,0 +1,18 @@
|
||||
infodir=/usr/share/info
|
||||
filelist=(imaxima.info maxima.info xmaxima.info)
|
||||
|
||||
post_install() {
|
||||
for file in ${filelist[@]}; do
|
||||
install-info $infodir/$file $infodir/dir 2> /dev/null
|
||||
done
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install $1
|
||||
}
|
||||
|
||||
pre_remove() {
|
||||
for file in ${filelist[@]}; do
|
||||
install-info --delete $infodir/$file $infodir/dir 2> /dev/null
|
||||
done
|
||||
}
|
81
sage/PKGBUILD
Normal file
81
sage/PKGBUILD
Normal file
@ -0,0 +1,81 @@
|
||||
#
|
||||
# Platform Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
pkgname=sage-mathematics
|
||||
pkgver=4.5.3
|
||||
pkgrel=1
|
||||
pkgdesc='SAGE: Open Source Mathematics Software, a viable free alternative to Magma, Maple, Mathematica, and Matlab.'
|
||||
url='http://www.sagemath.org'
|
||||
arch=('i686' 'x86_64')
|
||||
license=('GPL')
|
||||
depends=('readline')
|
||||
makedepends=('gcc-fortran' 'desktop-file-utils' 'imagemagick' 'texlive-core')
|
||||
optdepends=('imagemagick: some plotting functionality benefits from it'
|
||||
'texlive-core: some plotting functionality benefits from it')
|
||||
options=('!makeflags')
|
||||
install="${pkgname}.install"
|
||||
source=("http://sage.math.washington.edu/home/release/sage-${pkgver}/sage-${pkgver}.tar"
|
||||
'SAGE-notebook.desktop')
|
||||
md5sums=('56290f2910bbce1f430b603d152860b5'
|
||||
'bcd01b7863794431f8f208ed96fd108d')
|
||||
|
||||
build() {
|
||||
cd sage-${pkgver}
|
||||
|
||||
# modularization of sage, sort of :)
|
||||
# fixes the following error:
|
||||
# bash: symbol lookup error: bash: undefined symbol: rl_filename_rewrite_hook
|
||||
# remove this hack when sage uses a readline 6.1 or greater, or when sage uses its own internal bash
|
||||
# this is for people who have custom kernels (sage works this around by checking uname -r)
|
||||
mkdir -p spkg/installed
|
||||
touch spkg/installed/readline-6.0.p2
|
||||
|
||||
# fix "missing sage.all error" during build
|
||||
unset CFLAGS
|
||||
unset CXXFLAGS
|
||||
|
||||
# fix build errors
|
||||
unset LDFLAGS
|
||||
|
||||
# enable multiple threads while building, is this really needed? check if uses MAKEFLAGS
|
||||
export SAGE_BUILD_THREADS=$(lscpu | awk '/CPU\(s\)/ { print $2 }')
|
||||
export MAKE="make -j${SAGE_BUILD_THREADS}"
|
||||
|
||||
# disable building with debugging support
|
||||
export SAGE_DEBUG=0
|
||||
|
||||
# enable fat binaries (disables processor specific optimizations)
|
||||
# comment out if you're only building it for yourself
|
||||
export SAGE_FAT_BINARY='yes'
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd sage-${pkgver}
|
||||
|
||||
install -d ${pkgdir}/opt/sage
|
||||
|
||||
# cp because make install is experimental and will corrupt the install
|
||||
cp -r * ${pkgdir}/opt/sage
|
||||
|
||||
desktop-file-install ${srcdir}/SAGE-notebook.desktop --dir ${pkgdir}/usr/share/applications
|
||||
|
||||
# install binary
|
||||
install -d ${pkgdir}/usr/bin
|
||||
ln -s /opt/sage/sage ${pkgdir}/usr/bin/sage
|
||||
|
||||
# remove logs
|
||||
rm -f ${pkgdir}/opt/sage/install.log
|
||||
rm -rf ${pkgdir}/opt/sage/spkg/logs
|
||||
|
||||
# remove source packages
|
||||
rm -f ${pkgdir}/opt/sage/spkg/base/*spkg
|
||||
rm -f ${pkgdir}/opt/sage/spkg/standard/*spkg
|
||||
}
|
20
sage/SAGE-notebook.desktop
Normal file
20
sage/SAGE-notebook.desktop
Normal file
@ -0,0 +1,20 @@
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Name=SAGE
|
||||
Comment=SAGE NOTEBOOK
|
||||
Comment[en_US]=SAGE NOTEBOOK
|
||||
Exec=/opt/sage/sage -notebook
|
||||
GenericName=
|
||||
GenericName[de]=
|
||||
Icon=/opt/sage/data/extcode/notebook/images/sageicon.png
|
||||
MimeType=
|
||||
Name[de]=SAGE
|
||||
Path=/opt/sage/notebook
|
||||
StartupNotify=true
|
||||
Terminal=true
|
||||
Type=Application
|
||||
Categories=Science;Math;
|
||||
X-DCOP-ServiceType=
|
||||
X-KDE-SubstituteUID=false
|
||||
X-KDE-Username=
|
||||
GenericName[en_US]=
|
27
sage/sage-mathematics.install
Normal file
27
sage/sage-mathematics.install
Normal file
@ -0,0 +1,27 @@
|
||||
post_install() {
|
||||
cd /opt/sage
|
||||
|
||||
# set HOME because when sage updates its sage_root (after being moved) it will write files to ~/.sage with root ownership
|
||||
# the files it writes to ~/.sage can be safely ignored
|
||||
HOME=/tmp ./sage -c
|
||||
|
||||
echo '
|
||||
___
|
||||
/ (_) o |
|
||||
\__ _ _ __ |
|
||||
/ / |/ | | / \_| | |
|
||||
\___/ | |_/|/\__/ \_/|/o
|
||||
/| /|
|
||||
\| \|
|
||||
'
|
||||
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install $1
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
# clean up left overs
|
||||
rm -rf /opt/sage
|
||||
}
|
Loading…
Reference in New Issue
Block a user