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

Commit

Permalink
Merge branch 't/29233/bootstrap____make_distclean_broken' into t/2178…
Browse files Browse the repository at this point in the history
…5/install_sage_src_ext__in_package_data_of_sage_package_by_setup_py__not_sage_local_share_sage_ext__by_build_make_makefile
  • Loading branch information
Matthias Koeppe committed Feb 22, 2020
2 parents 50a5d25 + 0dc97db commit 51e7f51
Show file tree
Hide file tree
Showing 130 changed files with 1,765 additions and 803 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ distclean: build-clean
# source tarball
bootstrap-clean:
rm -rf config configure build/make/Makefile-auto.in
rm -f src/doc/en/installation/*.txt

# Remove absolutely everything which isn't part of the git repo
maintainer-clean: distclean bootstrap-clean
Expand Down Expand Up @@ -193,7 +194,7 @@ ptestoptional: all
ptestoptionallong: all
$(PTESTALL) --long --logfile=logs/ptestoptionallong.log

configure: configure.ac src/bin/sage-version.sh m4/*.m4 build/pkgs/*/spkg-configure.m4
configure: bootstrap src/doc/bootstrap configure.ac src/bin/sage-version.sh m4/*.m4 build/pkgs/*/spkg-configure.m4 build/pkgs/*.txt build/pkgs/*/distros/*.txt
./bootstrap -d

install: all
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 9.1.beta4, Release Date: 2020-02-13
SageMath version 9.1.beta5, Release Date: 2020-02-21
3 changes: 2 additions & 1 deletion bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ SAGE_SPKG_ENABLE([$pkgname], [$pkgtype])" ;;
done
echo "$spkg_configures" >> m4/sage_spkg_configures.m4

SAGE_ROOT="$SAGE_ROOT" src/doc/bootstrap && \
install_config_rpath && \
aclocal -I m4 && \
automake --add-missing --copy build/make/Makefile-auto && \
Expand Down Expand Up @@ -154,7 +155,7 @@ save () {
# Create configure tarball
echo "Creating $NEWCONFBALL..."
mkdir -p upstream
tar zcf "$NEWCONFBALL" configure config/* build/make/Makefile-auto.in
tar zcf "$NEWCONFBALL" configure config/* build/make/Makefile-auto.in src/doc/en/installation/*.txt

# Update version
echo "$NEWCONFVERSION" >$PKG/package-version.txt
Expand Down
35 changes: 35 additions & 0 deletions build/bin/sage-print-system-package-command
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
#
system=$1
command=$2
if [ -z "$system" -o -z "$command" ]; then
echo >&2 "usage: $0 {debian|arch|conda|...} {install|remove|...} PACKAGES..."
exit 1
fi
shift 2
system_packages="$*"
if [ -z "$system_packages" ]; then
# No command needed to install nothing
exit 0
fi
shopt -s extglob
case $system:$command in
debian*|ubuntu*)
echo "sudo apt-get $command $system_packages"
;;
@(fedora*|redhat*|centos*):install)
echo "sudo yum install $system_packages"
;;
arch*:install)
echo "sudo pacman -S $system_packages"
;;
*conda*:install)
echo "conda install $system_packages"
;;
homebrew*:install)
echo "brew install $system_packages"
;;
*)
echo "# $command the following packages: $system_packages"
;;
esac
27 changes: 2 additions & 25 deletions build/bin/sage-spkg
Original file line number Diff line number Diff line change
Expand Up @@ -366,40 +366,17 @@ if [ $INFO -ne 0 -a "$USE_LOCAL_SCRIPTS" = yes ]; then
debian)
# Generic
echo "Debian/Ubuntu:"
echo " sudo apt-get install $system_packages"
;;
debian*|ubuntu*)
# Specific distribution
echo "$system:"
echo " sudo apt-get install $system_packages"
;;
fedora)
# Generic
echo "Fedora/Redhat/CentOS:"
echo " sudo yum install $system_packages"
;;
fedora*|redhat*|centos*)
# Specific distribution
echo "$system:"
echo " sudo yum install $system_packages"
;;
arch*)
echo "$system:"
echo " sudo pacman -S $system_packages"
;;
*conda*)
echo "$system:"
echo " conda install $system_packages"
;;
homebrew*)
echo "$system:"
echo " brew install $system_packages"
;;
*)
echo "$system:"
echo " install the following packages: $system_packages"
;;
esac
echo -n " "
sage-print-system-package-command $system install $system_packages
fi
done
if [ -z "$system" ]; then
Expand Down
1 change: 1 addition & 0 deletions build/bin/write-dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ cat <<EOF
RUN mkdir -p /sage
WORKDIR /sage
ADD Makefile VERSION.txt README.md bootstrap configure.ac sage ./
ADD src/doc/bootstrap src/doc/bootstrap
ADD m4 ./m4
ADD build ./build
ADD src/bin/sage-version.sh src/bin/sage-version.sh
Expand Down
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=5331e588682dfea9308e8308e510d47429500e76
md5=fe1a9a72f856549d946340703d20d791
cksum=888161184
sha1=c5ac16fd484b7d261fdd5f9ddc0ad144d212c074
md5=6e01232385ed6a22fae6873990ca2b9a
cksum=45471057
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
158b93057a44377a3dd8235795317aa0bd412ed9
f363300209b159a65d9ceaf6b79bb684a9c71db1
2 changes: 1 addition & 1 deletion build/pkgs/coxeter3/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8ac9c71723c8ca57a836d6381aed125261e44e9e
8ac9c71723c8ca57a836d6381aed125261e44e9e.p0
26 changes: 15 additions & 11 deletions build/pkgs/coxeter3/patches/makefile.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ diff -druN src/makefile src/makefile

ifdef optimize
NDEBUG = true
@@ -22,18 +23,74 @@
@@ -22,18 +27,78 @@
cflags = $(pflags)
endif

Expand Down Expand Up @@ -53,21 +53,25 @@ diff -druN src/makefile src/makefile
+executable: $(objects)
+ $(CXX) -o $(EXENAME)$(EXEEXT) $(objects)
+
+DATADIR="$$SAGE_LOCAL/coxeter/"
+INCLUDEDIR="$$SAGE_LOCAL/include/coxeter/"
+LIBRARYDIR="$$SAGE_LOCAL/$(LIBDIR)"
+BINDIR=$$SAGE_LOCAL/bin/
+DATADIR=$$SAGE_LOCAL/coxeter/
+INCLUDEDIR=$$SAGE_LOCAL/include/coxeter/
+LIBRARYDIR=$$SAGE_LOCAL/$(LIBDIR)
+
+install: coxeter executable
+ cp $(EXENAME)$(EXEEXT) "$$SAGE_LOCAL/bin/"
+ cp $(LIBRARY) $(LIBRARYDIR)
+ mkdir -p "$(DESTDIR)$(BINDIR)"
+ mkdir -p "$(DESTDIR)$(LIBRARYDIR)"
+ cp $(EXENAME)$(EXEEXT) "$(DESTDIR)$(BINDIR)"
+ cp $(LIBRARY) "$(DESTDIR)$(LIBRARYDIR)"
+ if [ $(UNAME) = "CYGWIN" ]; then \
+ cp $(IMPLIB) "$$SAGE_LOCAL/lib/"; \
+ mkdir -p "$(DESTDIR)$$SAGE_LOCAL/lib/"; \
+ cp $(IMPLIB) "$(DESTDIR)$$SAGE_LOCAL/lib/"; \
+ fi
+
+ mkdir -p $(DATADIR)
+ cp -r coxeter_matrices headers messages $(DATADIR)
+ mkdir -p $(INCLUDEDIR)
+ cp -r *.h *.hpp $(INCLUDEDIR)
+ mkdir -p "$(DESTDIR)$(DATADIR)"
+ cp -r coxeter_matrices headers messages "$(DESTDIR)$(DATADIR)"
+ mkdir -p "$(DESTDIR)$(INCLUDEDIR)"
+ cp -r *.h *.hpp "$(DESTDIR)$(INCLUDEDIR)"
+
+check: coxeter executable
+ $(EXENAME)$(EXEEXT) < test.input > test.output
Expand Down
1 change: 1 addition & 0 deletions build/pkgs/gfortran/set-library-path
2 changes: 2 additions & 0 deletions build/pkgs/gfortran/spkg-build
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
. ./set-library-path

./build-gcc --disable-bootstrap --enable-languages=fortran
8 changes: 6 additions & 2 deletions build/pkgs/gfortran/spkg-configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ SAGE_SPKG_CONFIGURE([gfortran], [
# This helps verify the compiler works too, so if some idiot sets FC to
# /usr/bin/ls, we will at least know it's not a working Fortran
# compiler.
AC_FC_FREEFORM([], [
AC_FC_FREEFORM([SAGE_HAVE_FC_FREEFORM=yes], [
AC_MSG_NOTICE([Your Fortran compiler does not accept free-format source code])
AC_MSG_NOTICE([which means the compiler is either seriously broken, or])
AC_MSG_NOTICE([is too old to build Sage.])
sage_spkg_install_gfortran=yes])
SAGE_HAVE_FC_FREEFORM=no])
AS_VAR_IF(SAGE_HAVE_FC_FREEFORM, [no], [
AS_VAR_SET(sage_spkg_install_gfortran, [yes])
])
# Special case: If we are already installing gcc then don't install
# gfortran since it's included
Expand Down
7 changes: 7 additions & 0 deletions build/pkgs/gfortran/spkg-install
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# Exit on error
set -e

# To work around #26996: Set a symlink so that writes into lib64/ end up in lib/
(mkdir -p "$SAGE_DESTDIR_LOCAL" && cd "$SAGE_DESTDIR_LOCAL" && ln -sf lib lib64)
. ./set-library-path

cd gcc-build
sdh_make_install

# The spkg still installs a minimal C compiler that needs to be removed
# so it doesn't conflict with the configured C compiler.
rm "$SAGE_DESTDIR_LOCAL"/bin/gcc "$SAGE_DESTDIR_LOCAL"/bin/cpp

# To work around #26996: Remove the symlink set, or we get "cp: cannot overwrite directory"
rm -f "$SAGE_DESTDIR_LOCAL/lib64"
20 changes: 20 additions & 0 deletions build/pkgs/gfortran/spkg-postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- mode: shell-script -*-

# #27907: Symlink crt1.o and friends where gfortran can find it.
if [ -n "$SAGE_CRTI_DIR" ]; then
INSTALLED_SCRIPTS_DEST="$SAGE_SPKG_SCRIPTS/$PKG_BASE"
LIBGCC=$(dirname -- $("$SAGE_LOCAL"/bin/gfortran -print-libgcc-file-name))
if [ -z "$LIBGCC" -o ! -d "$LIBGCC" ]; then
echo >&2 "Warning: Unable to locate LIBGCC directory, so cannot install crt symlinks"
exit
fi
echo "Installing symlinks to crt files."
echo "# Remove symlinks created by spkg-postinst" >> "$INSTALLED_SCRIPTS_DEST"/spkg-postrm
for f in "$SAGE_CRTI_DIR"/*crt?.o; do
if [ -r $f -a ! -r "$LIBGCC"/$f ]; then
ln -s $f "$LIBGCC"/
fb=`basename $f`
echo "rm -f \"$LIBGCC\"/$fb" >> "$INSTALLED_SCRIPTS_DEST"/spkg-postrm
fi
done
fi
3 changes: 3 additions & 0 deletions build/pkgs/gfortran/spkg-postrm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# -*- mode: shell-script -*-

## spkg-postinst adds commands to the bottom of the generated version of this file.
6 changes: 3 additions & 3 deletions src/bin/sage-version.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Sage version information for shell scripts
# This file is auto-generated by the sage-update-version script, do not edit!
SAGE_VERSION='9.1.beta4'
SAGE_RELEASE_DATE='2020-02-13'
SAGE_VERSION_BANNER='SageMath version 9.1.beta4, Release Date: 2020-02-13'
SAGE_VERSION='9.1.beta5'
SAGE_RELEASE_DATE='2020-02-21'
SAGE_VERSION_BANNER='SageMath version 9.1.beta5, Release Date: 2020-02-21'
1 change: 1 addition & 0 deletions src/doc/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/en/reference/sage
/en/reference/sagenb
/output
/en/installation/*.txt
51 changes: 51 additions & 0 deletions src/doc/bootstrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/usr/bin/env bash

########################################################################
# Regenerate auto-generated files, using information in SAGE_ROOT/build/
#
# This script is run by SAGE_ROOT/bootstrap as part of the bootstrapping phase
# (before configure, before creating source distributions).
########################################################################

set -e

if [ -z "$SAGE_ROOT" ]; then
echo Please run the top-level bootstrap script of the Sage distribution.
exit 1
fi

cd "$SAGE_ROOT"

PROMPT=' $ '
STRIP_COMMENTS="sed s/#.*//;"
OUTPUT_DIR="src/doc/en/installation"
mkdir -p "$OUTPUT_DIR"

shopt -s extglob

for SYSTEM in debian fedora; do
SYSTEM_PACKAGES=$(echo $(${STRIP_COMMENTS} build/pkgs/$SYSTEM.txt))
for PKG_SCRIPTS in build/pkgs/*; do
if [ -d $PKG_SCRIPTS ]; then
PKG_BASE=$(basename $PKG_SCRIPTS)
SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/distros/$SYSTEM.txt
PKG_TYPE=$(cat $PKG_SCRIPTS/type)
if [ -f $SYSTEM_PACKAGES_FILE -a -f $PKG_SCRIPTS/spkg-configure.m4 ]; then
PKG_SYSTEM_PACKAGES=$(echo $(${STRIP_COMMENTS} $SYSTEM_PACKAGES_FILE))
if [ -n "PKG_SYSTEM_PACKAGES" ]; then
case "$PKG_TYPE" in
standard)
SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
;;
*)
OPTIONAL_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
;;
esac
fi
fi
fi
done
echo >&2 $0:$LINENO: installing "$OUTPUT_DIR"/$SYSTEM.txt and "$OUTPUT_DIR"/$SYSTEM-optional.txt
echo "$PROMPT$(sage-print-system-package-command $SYSTEM install $(echo $(echo $SYSTEM_PACKAGES | xargs -n 1 echo | sort)))" > "$OUTPUT_DIR"/$SYSTEM.txt
echo "$PROMPT$(sage-print-system-package-command $SYSTEM install $(echo $(echo $OPTIONAL_SYSTEM_PACKAGES | xargs -n 1 echo | sort)))" > "$OUTPUT_DIR"/$SYSTEM-optional.txt
done
2 changes: 0 additions & 2 deletions src/doc/en/installation/debian-optional.txt

This file was deleted.

9 changes: 0 additions & 9 deletions src/doc/en/installation/debian.txt

This file was deleted.

1 change: 0 additions & 1 deletion src/doc/en/installation/fedora-optional.txt

This file was deleted.

8 changes: 0 additions & 8 deletions src/doc/en/installation/fedora.txt

This file was deleted.

6 changes: 3 additions & 3 deletions src/doc/en/reference/conf_sub.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
title = title.replace(u'`', u'$')

# General information about the project.
project = u'Sage Reference Manual: ' + title
project = u'Sage {} Reference Manual: '.format(release) + title

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
html_title = u'Sage Reference Manual v' + release + ': ' + title
html_title = project

# A shorter title for the navigation bar. Default is the same as html_title.
html_short_title = title
html_short_title = project

# HTML theme (e.g., 'default', 'sphinxdoc'). The pages for the
# reference manual use a custom theme, a slight variant on the 'sage'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ List of Polyhedron methods
:meth:`~sage.geometry.polyhedron.base.Polyhedron_base.boundary_complex` | returns the boundary complex of simplicial compact polyhedron
:meth:`~sage.geometry.polyhedron.base.Polyhedron_base.center` | returns the average of the vertices of the polyhedron
:meth:`~sage.geometry.polyhedron.base.Polyhedron_base.representative_point` | returns the sum of the center and the rays
:meth:`~sage.geometry.polyhedron.base.Polyhedron_base.a_maximal_chain` | returns a maximal chain of faces
:meth:`~sage.geometry.polyhedron.base.Polyhedron_base.face_fan` | returns the fan spanned by the faces of the polyhedron
:meth:`~sage.geometry.polyhedron.base.Polyhedron_base.face_generator` | a generator over the faces
:meth:`~sage.geometry.polyhedron.base.Polyhedron_base.faces` | the list of faces
Expand Down
Loading

0 comments on commit 51e7f51

Please sign in to comment.