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

Commit

Permalink
Trac #21992: Merge 7.5.rc1 for master bibliography
Browse files Browse the repository at this point in the history
SageMath version 7.5.rc1
  • Loading branch information
cheuberg committed Jan 3, 2017
2 parents 0b218b1 + e82c80c commit b034597
Show file tree
Hide file tree
Showing 1,409 changed files with 57,042 additions and 19,807 deletions.
9 changes: 9 additions & 0 deletions .dir-locals.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")

((nil
;; Use space instead of tabs for indentation
(indent-tabs-mode . nil))
(makefile-mode
;; But use tabs in Makefiles
(indent-tabs-mode . t)))
3 changes: 3 additions & 0 deletions COPYING.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ free open source license as defined at http://www.opensource.org/.
The whole Sage software distribution is licensed under the General
Public License, version 3 (no other versions!).

All Sage documentation is licensed under Creative Commons 3.0 BY-SA
License.

Some of the code available in *optional* Sage packages (not included
in sage-*.tar) are licensed under more restrictive conditions.

Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 7.4, Release Date: 2016-10-18
SageMath version 7.5.rc1, Release Date: 2016-12-28
78 changes: 78 additions & 0 deletions build/bin/sage-apply-patches
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#!/usr/bin/env bash
#
# sage-apply-patches [-p<num>] [-d patch-subdir] [patch-dir] -- [...]
#
# Apply any patches to original spkg sources. Patch files must have
# the .patch extension.
#
# By default the patches are applied from ../patches/ using the -p1
# option, and it is assumed that the patches are being applied from
# the root of the package source.
#
# An optional patch subdirectory may be specified with the -d flag.
# For example `sage-apply-patches -d cygwin` applies only those
# patches under <patch-dir>/cygwin.
#
# The -p<num> arg is the argument accepted by the `patch` command,
# and overrides the default -p1
#
# Any additional arguments following " -- " are passed directly
# to the `patch` command.
#
#***************************************************************************
#
# Distributed under the terms of the GNU General Public License (GPL)
# as published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
# http://www.gnu.org/licenses/
#***************************************************************************

patchdir="../patches"
patch_subdir=""
patch_strip="-p1"
patch_args_sep=""
patch_args="--no-backup-if-mismatch"

while [[ $# > 0 ]]; do
if [[ -z "$patch_args_sep" ]]; then
case $1 in
-d)
patch_subdir="${2%/}"
shift
;;
-p[0-9])
patch_strip="$1"
;;
--)
patch_args_sep="$1"
;;
*)
patchdir="${1%/}"
;;
esac
else
patch_args="$patch_args $1"
fi

shift
done

patchdir="${patchdir}/${patch_subdir}"
patchdir="${patchdir%/}"
patches=( "${patchdir}"/*.patch )

if [[ -r "${patches[0]}" ]]; then
echo "Applying patches from ${patchdir}..."
for patch in ${patches[@]}; do
# Skip non-existing or non-readable patches
[ -r "$patch" ] || continue
echo "Applying $patch"
patch $patch_strip $patch_args < "$patch"
if [ $? -ne 0 ]; then
echo >&2 "Error applying '$patch'"
exit 1
fi
done
else
>&2 echo "No patch files found in $patchdir"
fi
54 changes: 39 additions & 15 deletions build/bin/sage-logger
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,50 @@ fi
# Use sed option to reduce buffering, to make the output appear more
# smoothly. For GNU sed, this is the --unbuffered option.
# For BSD sed (which is also on OS X), this is the -l option.
if sed </dev/null 2>/dev/null --unbuffered ""; then
SED="sed --unbuffered"
elif sed </dev/null 2>/dev/null -l ""; then
SED="sed -l"
if [ -n "$prefix" ]; then
if sed </dev/null 2>/dev/null --unbuffered ""; then
SED="sed --unbuffered"
elif sed </dev/null 2>/dev/null -l ""; then
SED="sed -l"
else
SED="sed"
fi

# eval needed to get the quoting around the regexp right
SED="eval $SED 's/^/$prefix/'"
else
SED="sed"
# Make SED a useless use of cat
SED=cat
fi

mkdir -p "$logdir"

# Redirect stdout and stderr to a subprocess running tee.
# We trap SIGINT such that SIGINT interrupts the main process being
# run, not the logging.
( exec 2>&1; eval "$cmd" ) | \
( trap '' SIGINT; tee -a "$logfile" | $SED "s/^/$prefix/" )
if [[ "$V" = 0 && $use_prefix = true ]]; then
# Silent build.
# Similar to https://www.gnu.org/software/automake/manual/html_node/Automake-Silent-Rules.html#Automake-Silent-Rules
echo "[$logname] installing. Log file: $logfile"
# Use verbose mode for output to logfiles.
export V=1
( exec>> $logfile 2>&1 ; eval "$cmd" )
status=$?
if [[ $status != 0 ]]; then
echo " [$logname] error installing, exit status $status. Log file: $logfile"
else
echo " [$logname] successfully installed."
fi
exit $status
else
# Redirect stdout and stderr to a subprocess running tee.
# We trap SIGINT such that SIGINT interrupts the main process being
# run, not the logging.
( exec 2>&1; eval "$cmd" ) | \
( trap '' SIGINT; tee -a "$logfile" | $SED )

pipestatus=(${PIPESTATUS[*]})
pipestatus=(${PIPESTATUS[*]})

if [ ${pipestatus[1]} -ne 0 ]; then
exit ${pipestatus[1]}
else
exit ${pipestatus[0]}
if [ ${pipestatus[1]} -ne 0 ]; then
exit ${pipestatus[1]}
else
exit ${pipestatus[0]}
fi
fi

0 comments on commit b034597

Please sign in to comment.