Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
Project: cocalc-sagemath-dev-slelievre
Views: 418346#!/usr/bin/env bash12set -e34# This script attempts to build all GAP packages contained in the current5# directory. Normally, you should run this script from the 'pkg'6# subdirectory of your GAP installation.78# You can also run it from other locations, but then you need to tell the9# script where your GAP root directory is, by passing it as first argument10# to the script. By default, the script assumes that the parent of the11# current working directory is the GAP root directory.1213# You need at least 'gzip', GNU 'tar', a C compiler, sed, pdftex to run this.14# Some packages also need a C++ compiler.1516# Contact [email protected] for questions and complaints.1718# Note, that this isn't and is not intended to be a sophisticated script.19# Even if it doesn't work completely automatically for you, you may get20# an idea what to do for a complete installation of GAP.212223if [ $# -eq 0 ]24then25echo "Assuming default GAP location: ../.."26GAPDIR=../..27else28echo "Using GAP location: $1"29GAPDIR="$1"30fi3132# Is someone trying to run us from inside the 'bin' directory?33if [ -f gapicon.bmp ]34then35echo "This script must be run from inside the pkg directory"36echo "Type: cd ../pkg; ../bin/BuildPackages.sh"37exit 138fi3940# We need any subdirectory, to test if $GAPDIR is right41SUBDIR=`ls -d */ | head -n 1`42if ! (cd $SUBDIR && [ -f $GAPDIR/sysinfo.gap ])43then44echo "$GAPDIR is not the root of a gap installation (no sysinfo.gap)"45echo "Please provide the absolute path of your GAP root directory as"46echo "first argument to this script."47exit 148fi4950if (cd $SUBDIR && grep 'ABI_CFLAGS=-m32' $GAPDIR/Makefile > /dev/null) ; then51echo "Building with 32-bit ABI"52ABI32=YES53CONFIGFLAGS="CFLAGS=-m32 LDFLAGS=-m32 LOPTS=-m32 CXXFLAGS=-m32"54fi;5556# Many package require GNU make. So use gmake if available,57# for improved compatibility with *BSD systems where "make"58# is BSD make, not GNU make.59if ! [ x`which gmake` = "x" ] ; then60MAKE=gmake61else62MAKE=make63fi6465cat <<EOF66Attempting to build GAP packages.67Note that many GAP packages require extra programs to be installed,68and some are quite difficult to build. Please read the documentation for69packages which fail to build correctly, and only worry about packages70you require!71EOF7273build_carat() {74(75# TODO: FIX Carat76# Installation of Carat produces a lot of data, maybe you want to leave77# this out until a user complains.78# It is not possible to move around compiled binaries because these have the79# path to some data files burned in.80zcat carat-2.1b1.tgz | tar pxf -81ln -s carat-2.1b1/bin bin82cd carat-2.1b183make TOPDIR=`pwd`84chmod -R a+rX .85cd bin86aa=`./config.guess`87for x in "`ls -d1 $GAPDIR/bin/${aa}*`"; do88ln -s "$aa" "`basename $x`"89done90)91}9293build_cohomolo() {94(95./configure $GAPDIR96cd standalone/progs.d97cp makefile.orig makefile98cd ../..99$MAKE100)101}102103build_fail() {104echo "= Failed to build $dir"105}106107run_configure_and_make() {108# We want to know if this is an autoconf configure script109# or not, without actually executing it!110if [ -f autogen.sh ] && ! [ -f configure ] ; then111./autogen.sh112fi;113if [ -f configure ]; then114if grep Autoconf ./configure > /dev/null; then115./configure $CONFIGFLAGS --with-gaproot=$GAPDIR116else117./configure $GAPDIR118fi;119$MAKE120else121echo "No building required for $dir"122fi;123}124125for dir in `ls -d */`126do127if [ -e $dir/PackageInfo.g ]; then128dir="${dir%/}"129echo "==== Checking $dir"130( # start subshell131set -e132cd $dir133case $dir in134atlasrep*)135chmod 1777 datagens dataword136;;137138carat*)139build_carat140;;141142cohomolo*)143build_cohomolo144;;145146fplsa*)147./configure $GAPDIR &&148$MAKE CC="gcc -O2 "149;;150151kbmag*)152./configure $GAPDIR &&153$MAKE COPTS="-O2 -g"154;;155156NormalizInterface*)157./build-normaliz.sh $GAPDIR &&158run_configure_and_make159;;160161pargap*)162./configure $GAPDIR &&163$MAKE &&164cp bin/pargap.sh $GAPDIR/bin &&165rm -f ALLPKG166;;167168xgap*)169./configure &&170$MAKE &&171rm -f $GAPDIR/bin/xgap.sh &&172cp bin/xgap.sh $GAPDIR/bin173;;174175simpcomp*)176;;177178*)179run_configure_and_make180;;181esac;182) || build_fail183# end subshell184else185echo "$dir is not a GAP package -- no PackageInfo.g"186fi;187done;188189190