Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Add SAGE_SUDO for packages A-L
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Sep 27, 2016
1 parent c5dadf9 commit d8919cc
Show file tree
Hide file tree
Showing 37 changed files with 103 additions and 88 deletions.
2 changes: 1 addition & 1 deletion build/pkgs/4ti2/spkg-install
Expand Up @@ -13,7 +13,7 @@ export CFLAGS
./configure --prefix=$SAGE_LOCAL --with-gmp=$SAGE_LOCAL --with-glpk=$SAGE_LOCAL --enable-shared=yes --enable-static=no

$MAKE
$MAKE install
$SAGE_SUDO $MAKE install

if [ $? -ne 0 ]; then
echo "Error building 4ti2"
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/arb/spkg-install
Expand Up @@ -28,7 +28,7 @@ if [ $? -ne 0 ]; then
exit 1
fi

$MAKE install
$SAGE_SUDO $MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error installing arb."
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/bliss/spkg-install
Expand Up @@ -17,7 +17,7 @@ for patch in ../patches/*.patch; do
fi
done

./configure --prefix="$SAGE_LOCAL" --disable-gmp && $MAKE && $MAKE install
./configure --prefix="$SAGE_LOCAL" --disable-gmp && $MAKE && $SAGE_SUDO $MAKE install

if [ $? -ne 0 ]; then
echo "An error occurred whilst building bliss"
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/brial/spkg-install
Expand Up @@ -40,7 +40,7 @@ if [ $? -ne 0 ]; then
exit 1
fi

$MAKE install -j1
$SAGE_SUDO $MAKE install -j1
if [ $? -ne 0 ]; then
echo "Error installing BRiAl"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/bzip2/spkg-install
Expand Up @@ -44,7 +44,7 @@ if [ $? -ne 0 ]; then
exit 1
fi

$MAKE install
$SAGE_SUDO $MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error installing bzip2"
exit 1
Expand Down
4 changes: 2 additions & 2 deletions build/pkgs/cbc/spkg-install
Expand Up @@ -20,5 +20,5 @@ export LDFLAGS="$LDFLAGS -lz -lbz2"
cd src &&
sed -i -e "s/clock\_gettime ()/Grrrrrrrrrrrr\ ()/g" Cbc/configure &&
./configure --prefix="$SAGE_LOCAL" "${args[@]}" --enable-cbc-parallel --enable-parallel --enable-gnu-packages --enable-static &&
make &&
make install
$MAKE &&
$SAGE_SUDO $MAKE install
16 changes: 16 additions & 0 deletions build/pkgs/ccache/spkg-do-install
@@ -0,0 +1,16 @@
$MAKE install || die "installing ccache failed"


set -e

mkdir -p "$SAGE_LOCAL/libexec/ccache"
ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/cc"
ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/c++"
ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/gcc"
ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/g++"
ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/clang"
ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/clang++"

# Copy a reasonable default configuration for Sage
# (cache size of 4G and compression enabled)
cp -p ../ccache.conf "$SAGE_LOCAL/etc"
17 changes: 1 addition & 16 deletions build/pkgs/ccache/spkg-install
Expand Up @@ -15,19 +15,4 @@ export CPPFLAGS="-I$SAGE_LOCAL/include $CPPFLAGS"

$MAKE || die "building ccache failed"

$MAKE install || die "installing ccache failed"


set -e

mkdir -p "$SAGE_LOCAL/libexec/ccache"
ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/cc"
ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/c++"
ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/gcc"
ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/g++"
ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/clang"
ln -sf ../../bin/ccache "$SAGE_LOCAL/libexec/ccache/clang++"

# Copy a reasonable default configuration for Sage
# (cache size of 4G and compression enabled)
cp -p ../ccache.conf "$SAGE_LOCAL/etc"
$SAGE_SUDO ../spkg-do-install
2 changes: 1 addition & 1 deletion build/pkgs/cddlib/spkg-install
Expand Up @@ -53,5 +53,5 @@ cp "$SAGE_ROOT"/config/config.* .
$MAKE ||
die "Error building cddlib"

$MAKE install ||
$SAGE_SUDO $MAKE install ||
die "Error installing cddlib"
2 changes: 1 addition & 1 deletion build/pkgs/cephes/spkg-install
Expand Up @@ -32,7 +32,7 @@ if [ $? -ne 0 ]; then
fi

echo "Installing Cephes..."
$MAKE install
$SAGE_SUDO $MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error - Failed to build Cephes ... exiting"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/cliquer/spkg-install
Expand Up @@ -28,7 +28,7 @@ if [ $? -ne 0 ]; then
fi

echo "Building and installing ..."
$MAKE install
$SAGE_SUDO $MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error installing cliquer"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/cmake/spkg-install
Expand Up @@ -31,7 +31,7 @@ if [ $? -ne 0 ]; then
exit 1
fi

$MAKE install
$SAGE_SUDO $MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error installing CMake."
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/compilerwrapper/spkg-install
Expand Up @@ -43,7 +43,7 @@ if [ $? -ne 0 ]; then
exit 1
fi

$MAKE install
$SAGE_SUDO $MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error installing the gcc wrapper."
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/coxeter3/spkg-install
Expand Up @@ -33,7 +33,7 @@ if [ $? -ne 0 ]; then
fi

# Install
$MAKE install
$SAGE_SUDO $MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error installing coxeter3"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/cryptominisat/spkg-install
Expand Up @@ -65,7 +65,7 @@ if [ $? -ne 0 ]; then
exit 1
fi

$MAKE install
$SAGE_SUDO $MAKE install

if [ $? -ne 0 ]; then
echo "Error installing cryptominisat"
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/csdp/spkg-install
Expand Up @@ -29,7 +29,7 @@ if [ $? -ne 0 ]; then
fi

echo "Installing csdp..."
$MAKE install
$SAGE_SUDO $MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error installing csdp."
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/cysignals/spkg-install
Expand Up @@ -23,7 +23,7 @@ if [ $? -ne 0 ]; then
exit 1
fi

$MAKE install
$SAGE_SUDO $MAKE install
if [ $? -ne 0 ]; then
echo "Error installing cysignals ... exiting"
exit 1
Expand Down
28 changes: 28 additions & 0 deletions build/pkgs/ecl/spkg-do-install
@@ -0,0 +1,28 @@
# Remove old install of ECL, if any.
rm -rf "$SAGE_LOCAL/lib/ecl-"*
if [ $? -ne 0 ]; then
echo >&2 "Error - Failed to remove old ECL install ... exiting"
exit 1
fi

$MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error - Failed to install ECL ... exiting"
exit 1
fi

# Create symbolic link to lib/ecl-version directory.
# Also create a symbolic link lib/ecl/ecl -> include/ecl.
# This is important when the Sage install is moved, see Trac #14662.
cd "$SAGE_LOCAL/lib/" && rm -f ecl && ln -s ecl-* ecl
if [ $? -ne 0 ]; then
echo >&2 "Error - Failed to create symbolic link to ECL library"
echo >&2 "directory ... exiting"
exit 1
fi
cd "$SAGE_LOCAL/lib/ecl" && rm -f ecl && ln -s ../../include/ecl ecl
if [ $? -ne 0 ]; then
echo >&2 "Error - Failed to create symbolic link to ECL include"
echo >&2 "directory ... exiting"
exit 1
fi
29 changes: 1 addition & 28 deletions build/pkgs/ecl/spkg-install
Expand Up @@ -97,31 +97,4 @@ if [ $? -ne 0 ]; then
exit 1
fi

# Remove old install of ECL, if any.
rm -rf "$SAGE_LOCAL/lib/ecl-"*
if [ $? -ne 0 ]; then
echo >&2 "Error - Failed to remove old ECL install ... exiting"
exit 1
fi

$MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error - Failed to install ECL ... exiting"
exit 1
fi

# Create symbolic link to lib/ecl-version directory.
# Also create a symbolic link lib/ecl/ecl -> include/ecl.
# This is important when the Sage install is moved, see Trac #14662.
cd "$SAGE_LOCAL/lib/" && rm -f ecl && ln -s ecl-* ecl
if [ $? -ne 0 ]; then
echo >&2 "Error - Failed to create symbolic link to ECL library"
echo >&2 "directory ... exiting"
exit 1
fi
cd "$SAGE_LOCAL/lib/ecl" && rm -f ecl && ln -s ../../include/ecl ecl
if [ $? -ne 0 ]; then
echo >&2 "Error - Failed to create symbolic link to ECL include"
echo >&2 "directory ... exiting"
exit 1
fi
$SAGE_SUDO ../spkg-do-install
2 changes: 1 addition & 1 deletion build/pkgs/eclib/spkg-install
Expand Up @@ -81,7 +81,7 @@ fi

echo
echo "Build succeeded. Now installing eclib..."
$MAKE install
$SAGE_SUDO $MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error installing eclib."
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/ecm/spkg-install
Expand Up @@ -285,7 +285,7 @@ rm -f "$SAGE_LOCAL"/share/man/man1/ecm.1
###############################################################################

echo "Now installing GMP-ECM..."
$MAKE install
$SAGE_SUDO $MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error installing GMP-ECM (though it appears to have built fine)."
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/fflas_ffpack/spkg-install
Expand Up @@ -100,7 +100,7 @@ if [ $? -ne 0 ]; then
exit 1
fi

$MAKE install
$SAGE_SUDO $MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error installing fflas-ffpack"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/flint/spkg-install
Expand Up @@ -61,7 +61,7 @@ rm -f $SAGE_LOCAL/lib/libflint*
rm -rf $SAGE_LOCAL/include/flint

echo "Installing new FLINT files."
$MAKE install
$SAGE_SUDO $MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error: Failed to install FLINT."
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/flintqs/spkg-install
Expand Up @@ -24,7 +24,7 @@ if [ $? -ne 0 ]; then
exit 1
fi

$MAKE install
$SAGE_SUDO $MAKE install
if [ $? -ne 0 ]; then
echo "Error copying QuadraticSieve file"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/gc/spkg-install
Expand Up @@ -44,7 +44,7 @@ if [ $? -ne 0 ]; then
exit 1
fi

$MAKE install
$SAGE_SUDO $MAKE install

if [ $? -ne 0 ]; then
echo >&2 "Error installing BoehmGC."
Expand Down
4 changes: 2 additions & 2 deletions build/pkgs/gcc/spkg-install
Expand Up @@ -131,12 +131,12 @@ fi

$MAKE BOOT_LDFLAGS="-Wl,-rpath,$SAGE_LOCAL/lib"

$MAKE install
$SAGE_SUDO $MAKE install


# Force re-installation of gmp, mpir, mpfr and mpc with the GCC we just built.
cd "$SAGE_SPKG_INST"
rm -f gmp-* mpir-* mpfr-* mpc-*
$SAGE_SUDO rm -f gmp-* mpir-* mpfr-* mpc-*

# Force re-configuration: the next time that "make" is run, we don't
# want GCC to be built again, see Trac #19324
Expand Down
12 changes: 12 additions & 0 deletions build/pkgs/gf2x/spkg-do-install
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

echo "Deleting old gf2x files."
rm -f "$SAGE_LOCAL"/lib/libgf2x*
rm -rf "$SAGE_LOCAL"/include/gf2x*

echo "Installing gf2x."
$MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error: Failed to install gf2x."
exit 1
fi
11 changes: 1 addition & 10 deletions build/pkgs/gf2x/spkg-install
Expand Up @@ -86,13 +86,4 @@ case "$SAGE_TUNE_GF2X" in
;;
esac

echo "Deleting old gf2x files."
rm -f "$SAGE_LOCAL"/lib/libgf2x*
rm -rf "$SAGE_LOCAL"/include/gf2x*

echo "Installing gf2x."
$MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error: Failed to install gf2x."
exit 1
fi
$SAGE_SUDO ../spkg-do-install
2 changes: 1 addition & 1 deletion build/pkgs/giac/spkg-install
Expand Up @@ -73,7 +73,7 @@ if [ $? -ne 0 ]; then
fi

echo "Installing giac..."
$MAKE install
$SAGE_SUDO $MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error installing Giac."
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/givaro/spkg-install
Expand Up @@ -50,7 +50,7 @@ if [ $? -ne 0 ]; then
exit 1
fi

$MAKE install
$SAGE_SUDO $MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error installing givaro"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/glpk/spkg-install
Expand Up @@ -74,7 +74,7 @@ if [ $? -ne 0 ]; then
exit 1
fi

$MAKE install
$SAGE_SUDO $MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error installing GLPK."
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/gmp/spkg-install
Expand Up @@ -328,7 +328,7 @@ rm -f "$SAGE_SPKG_INST"/mpir-*
###############################################################################

echo "Now installing GMP..."
$MAKE install
$SAGE_SUDO $MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error installing GMP."
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/gp2c/spkg-install
Expand Up @@ -21,4 +21,4 @@ set -e

./configure --prefix="$SAGE_LOCAL" --with-paricfg="$SAGE_LOCAL/lib/pari/pari.cfg"

$MAKE install
$SAGE_SUDO $MAKE install
2 changes: 1 addition & 1 deletion build/pkgs/gsl/spkg-install
Expand Up @@ -59,7 +59,7 @@ if [ $? -ne 0 ]; then
fi

echo "Installing GSL..."
$MAKE install
$SAGE_SUDO $MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error installing GSL."
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/iconv/spkg-install
Expand Up @@ -56,7 +56,7 @@ CYGWIN|HP-UX|SunOS)
exit 1
fi

$MAKE install
$SAGE_SUDO $MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error installing iconv"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/iml/spkg-install
Expand Up @@ -50,7 +50,7 @@ if [ $? -ne 0 ]; then
exit 1
fi

$MAKE install
$SAGE_SUDO $MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error installing IML."
exit 1
Expand Down

0 comments on commit d8919cc

Please sign in to comment.