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#!/bin/sh -e1#2# This helper script compiles Normaliz for you.3# To use it, pass the location of your GAP installation4# to it:5#6# ./build-normaliz.sh GAPDIR7#8# Then you can compile NormalizInterface as follows:9#10# ./configure --with-gaproot=GAPDIR11# make12#1314if [ "$#" -ge 1 ]; then15GAPDIR=$116shift17else18GAPDIR=../..19fi2021# make path absolut22SCRIPTDIR=$PWD23cd $GAPDIR24GAPDIR=$PWD25cd $SCRIPTDIR2627# check for presence of GAP and determine value of GAParch28if [ ! -f "$GAPDIR/sysinfo.gap" ]; then29echo "ERROR: could not locate GAP in directory $GAPDIR"30exit 131fi;32. "$GAPDIR/sysinfo.gap"3334echo "Found GAP in directory $GAPDIR"35echo "GAParch = $GAParch"3637# check if GAP was built with its own GMP (this is kind of a hack...)38GAP_GMP="$GAPDIR/bin/$GAParch/extern/gmp"39if [ -f "$GAP_GMP/MAKE_CHECK_PASSED" -a -f "$GAP_GMP/include/gmp.h" ]; then40echo "GAP was built with its own GMP"41if [ -f "$GAP_GMP/include/gmpxx.h" ]; then42echo "GAP's GMP includes C++ support"43GMP_FLAG="$GAP_GMP"44else45echo "ERROR: GAP's GMP was built without C++ support"46exit 147fi48else49echo "GAP was built with external GMP"50# TODO: actually, now we should figure out somehow which51# external GMP library was used to build GAP. But that's not really52# possible: While we could e.g. scan the "internal" sysinfo.gap53# file for the "gap_config_options" string, and in there54# look for an "--with-gmp", this is not entirely reliable by55# itself (partially due to bugs in the GAP build system).56#57# So, we do not even try to figure out details, and instead58# cross our fingers and hope for the best.59#60# Expert users can help with that, of course, by setting61# the GMP_DIR variable manually.62fi6364NORMALIZ_VERSION=v3.4.06566# needs git 1.8 or newer67if [ ! -d Normaliz.git ]; then68echo "Fetching Normaliz source code"69git clone --depth 1 --branch $NORMALIZ_VERSION -- https://github.com/Normaliz/Normaliz Normaliz.git70fi71cd Normaliz.git72# get a new version73if [ `git describe --tags` != $NORMALIZ_VERSION ]; then74git fetch origin $NORMALIZ_VERSION75git fetch origin76git checkout $NORMALIZ_VERSION77fi7879rm -rf DST80mkdir -p DST8182# The cmake build process honors environment variables like83# GMP_DIR and BOOST_ROOT. So if you need to tell the build84# process where to find GMP and Boost, you can invoke this85# script like this:86#87# GMP_DIR=/some/path BOOST_ROOT=/another/path ./build-normaliz.sh $GAPROOT8889# If GAP was build for 32 bit, also do it for normaliz90if [ x$GAParch_abi = x"32-bit" ] || [ x$GAP_ABI = x32 ]; then91echo "GAP was build for 32 bit"92export CXXFLAGS="-m32"93fi9495## use the libtool build system9697PREFIX="$PWD/DST"98./bootstrap.sh99if [ "x$GMP_FLAG" != "x" ]; then100./configure --prefix=$PREFIX --with-gmp=$GMP_FLAG $@101else102./configure --prefix=$PREFIX $@103fi104make105make install106107108