Skip to content

Commit

Permalink
Trac #29557: Add script package _recommended and generate "recommende…
Browse files Browse the repository at this point in the history
…d system packages" info

Let's improve the installation-from-source documentation regarding the
"recommended system packages" for 9.1.

- `build/pkgs/_recommended` - records additional recommended packages
such as texlive-xetex (see
https://wiki.sagemath.org/prerequisites/Ubuntu); also texinfo (from
#22191)

(from #29124)

URL: https://trac.sagemath.org/29557
Reported by: mkoeppe
Ticket author(s): Matthias Koeppe, John Palmieri
Reviewer(s): John Palmieri, Matthias Koeppe
  • Loading branch information
Release Manager committed Oct 24, 2020
2 parents e23d94b + 6d5cc43 commit fe238b0
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 3 deletions.
6 changes: 6 additions & 0 deletions build/pkgs/_recommended/SPKG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
= _recommended =

== Description ==

Script package representing a list of system packages recommended
to be installed for additional functionality.
17 changes: 17 additions & 0 deletions build/pkgs/_recommended/distros/debian.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# From https://wiki.sagemath.org/prerequisitesUbuntu

# to generate pdf documentation
texlive-generic-extra
# to convert Jupyter notebooks to pdf
texlive-xetex
# to generate pdf documentation
latexmk
# to convert Jupyter notebooks to pdf
pandoc
# to render text with LaTeX in Matplotlib
dvipng
# to run the Jmol 3D viewer from the console and generate images for 3D plots in the documentation
default-jdk
# to produce animations
ffmpeg
libavdevice-dev
8 changes: 8 additions & 0 deletions build/pkgs/_recommended/distros/homebrew.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# To convert Jupyter notebooks to pdf:
pandoc
# To produce animations:
ffmpeg
imagemagick
# Homebrew's texinfo can be used to build the info files for ecl and
# maxima but the OS X default version of texinfo cannot.
texinfo
3 changes: 3 additions & 0 deletions build/pkgs/_recommended/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SAGE_SPKG_CONFIGURE([_recommended], [
sage_spkg_install__recommended=yes
])
2 changes: 2 additions & 0 deletions build/pkgs/_recommended/spkg-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#! /usr/bin/env bash
# Nothing to do
1 change: 1 addition & 0 deletions build/pkgs/_recommended/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
optional
11 changes: 8 additions & 3 deletions src/doc/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ shopt -s extglob
for SYSTEM in arch debian fedora cygwin homebrew; do
SYSTEM_PACKAGES=$(echo $(${STRIP_COMMENTS} build/pkgs/$SYSTEM.txt))
OPTIONAL_SYSTEM_PACKAGES=
RECOMMENDED_SYSTEM_PACKAGES=
for PKG_SCRIPTS in build/pkgs/*; do
if [ -d $PKG_SCRIPTS ]; then
PKG_BASE=$(basename $PKG_SCRIPTS)
Expand All @@ -40,10 +41,13 @@ for SYSTEM in arch debian fedora cygwin homebrew; do
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)
case "$PKG_BASE:$PKG_TYPE" in
*:standard)
SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
;;
_recommended:optional)
RECOMMENDED_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
;;
*)
OPTIONAL_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
;;
Expand All @@ -53,10 +57,11 @@ for SYSTEM in arch debian fedora cygwin homebrew; do
fi
done
if [ "${BOOTSTRAP_QUIET}" = "no" ]; then
echo >&2 $0:$LINENO: installing "$OUTPUT_DIR"/$SYSTEM.txt and "$OUTPUT_DIR"/$SYSTEM-optional.txt
echo >&2 $0:$LINENO: installing "$OUTPUT_DIR"/$SYSTEM\*.txt
fi
echo "$(sage-print-system-package-command $SYSTEM --prompt --sudo install $(echo $(echo $SYSTEM_PACKAGES | xargs -n 1 echo | sort)))" > "$OUTPUT_DIR"/$SYSTEM.txt
echo "$(sage-print-system-package-command $SYSTEM --prompt --sudo install $(echo $(echo $OPTIONAL_SYSTEM_PACKAGES | xargs -n 1 echo | sort)))" > "$OUTPUT_DIR"/$SYSTEM-optional.txt
echo "$(sage-print-system-package-command $SYSTEM --prompt --sudo install $(echo $(echo $RECOMMENDED_SYSTEM_PACKAGES | xargs -n 1 echo | sort)))" > "$OUTPUT_DIR"/$SYSTEM-recommended.txt
done

OUTPUT_DIR="src/doc/en/reference/spkg"
Expand Down

0 comments on commit fe238b0

Please sign in to comment.