mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-05 22:47:14 +08:00
82 lines
2.5 KiB
Bash
82 lines
2.5 KiB
Bash
|
#
|
||
|
# 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
|
||
|
}
|