Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ginac for openSUSE:Factory checked in at 2024-01-03 12:23:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ginac (Old) and /work/SRC/openSUSE:Factory/.ginac.new.28375 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "ginac" Wed Jan 3 12:23:48 2024 rev:15 rq:1135586 version:1.8.7 Changes: -------- --- /work/SRC/openSUSE:Factory/ginac/ginac.changes 2023-06-16 16:55:44.066022543 +0200 +++ /work/SRC/openSUSE:Factory/.ginac.new.28375/ginac.changes 2024-01-03 12:23:50.552966115 +0100 @@ -1,0 +2,13 @@ +Thu Dec 28 08:36:20 UTC 2023 - jun wang <junguo.wang@suse.com> + +- Update to version 1.8.7 + * Fix series expansion of polynomial(x)^n for small and large n. + * Fix bugs in internal parser from strings. + * Make ginsh evaluate line-by-line in non-interactive mode. + * Several build fixes. + * remove obsolete patch ginac-doc-latex-symbol-error.patch + becuase it has applied into source code + * update patch ginac-fix-makeindex.patch because one line + changed + +------------------------------------------------------------------- Old: ---- ginac-1.8.6.tar.bz2 ginac-doc-latex-symbol-error.patch New: ---- ginac-1.8.7.tar.bz2 BETA DEBUG BEGIN: Old: * Several build fixes. * remove obsolete patch ginac-doc-latex-symbol-error.patch becuase it has applied into source code BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ginac.spec ++++++ --- /var/tmp/diff_new_pack.u95SpC/_old 2024-01-03 12:23:51.208990092 +0100 +++ /var/tmp/diff_new_pack.u95SpC/_new 2024-01-03 12:23:51.212990238 +0100 @@ -38,7 +38,7 @@ %define library_version 11 Name: %{srcname}%{?pkg_suffix} -Version: 1.8.6 +Version: 1.8.7 Release: 0 Summary: C++ library for symbolic calculations License: GPL-2.0-only @@ -48,8 +48,6 @@ Patch0: ginac-fix-makeindex.patch # PATCH-FIX-UPSTREAM ginac-cmake-install-doc.patch badshah400@gmail.com -- Install man and other documentation files when cmake is used for building Patch1: ginac-cmake-install-doc.patch -# PATCH-FIX-UPSTREAM ginac-doc-latex-symbol-error.patch badshah400@gmail.com -- Change a math symbol to get pdflatex to build reference.pdf correctly -Patch2: ginac-doc-latex-symbol-error.patch BuildRequires: bison BuildRequires: cln-devel BuildRequires: cmake ++++++ ginac-1.8.6.tar.bz2 -> ginac-1.8.7.tar.bz2 ++++++ ++++ 1602 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/AUTHORS new/ginac-1.8.7/AUTHORS --- old/ginac-1.8.6/AUTHORS 2022-12-31 19:47:20.000000000 +0100 +++ new/ginac-1.8.7/AUTHORS 2023-02-12 00:40:49.000000000 +0100 @@ -1,5 +1,5 @@ -Contacing the developers ------------------------- +Contacting the developers +------------------------- If you have found a bug, have a patch or a question, or would like to make a suggestion please send email to one of our public mailing lists diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/GiNaC.spec new/ginac-1.8.7/GiNaC.spec --- old/ginac-1.8.6/GiNaC.spec 2023-02-08 20:23:47.000000000 +0100 +++ new/ginac-1.8.7/GiNaC.spec 2023-08-12 18:10:13.000000000 +0200 @@ -1,5 +1,5 @@ %define name ginac -%define version 1.8.6 +%define version 1.8.7 %define release 1 Summary: C++ library for symbolic calculations diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/Makefile.am new/ginac-1.8.7/Makefile.am --- old/ginac-1.8.6/Makefile.am 2022-12-31 19:47:20.000000000 +0100 +++ new/ginac-1.8.7/Makefile.am 2023-08-12 18:09:13.000000000 +0200 @@ -17,7 +17,7 @@ cmake/modules/FindGiNaC.cmake \ cmake/modules/FindLibDL.cmake -BUILD_HELPERS = scripts/yaptu.py scripts/fixupind.py +BUILD_HELPERS = scripts/yaptu.py # All the rest of the distributed files EXTRA_DIST = ginac.pc GiNaC.spec $(BUILD_HELPERS) $(CMAKE_FILES) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/NEWS new/ginac-1.8.7/NEWS --- old/ginac-1.8.6/NEWS 2023-02-08 20:11:12.000000000 +0100 +++ new/ginac-1.8.7/NEWS 2023-08-12 17:40:31.000000000 +0200 @@ -1,5 +1,11 @@ This file records noteworthy changes. +1.8.7 (12 August 2023) +* Fix series expansion of polynomial(x)^n for small and large n. +* Fix bugs in internal parser from strings. +* Make ginsh evaluate line-by-line in non-interactive mode. +* Several build fixes. + 1.8.6 (8 February 2023) * Fix wrong numeric info on transcendental functions. * Fix crash of evaluation of binomial(n, k) with negative integer n, k. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/check/exam_parser.cpp new/ginac-1.8.7/check/exam_parser.cpp --- old/ginac-1.8.6/check/exam_parser.cpp 2022-12-31 19:47:20.000000000 +0100 +++ new/ginac-1.8.7/check/exam_parser.cpp 2023-06-20 22:23:55.000000000 +0200 @@ -98,6 +98,104 @@ } } +// Check that two strings parse to equal expressions. +static int check_eq(ostream &err_str, parser &reader, const char *expr1, const char *expr2) +{ + const string srep1(expr1); + const string srep2(expr2); + ex e1, e2; + try{ e1 = reader(srep1); } catch (const exception &e) { + err_str << "\"" << srep1 << "\" failed to parse: " + << e.what() << endl; + return 1; + } + try{ e2 = reader(srep2); } catch (const exception &e) { + err_str << "\"" << srep2 << "\" failed to parse: " + << e.what() << endl; + return 1; + } + if (!(e1-e2).expand().is_zero()) { + err_str << "\"" << srep1 << "\" was misparsed as \"" + << e1 << "\"" << endl; + return 1; + } + return 0; +} + +// Tests for the interaction of the '^' operator with +// the unary '+' and the unary '-' operators +static int check5(ostream& err_str) +{ + parser reader; + return + +check_eq(err_str, reader, "3^2+1", "10") + +check_eq(err_str, reader, "3^+2-1", "8") + +check_eq(err_str, reader, "3^-2+1", "10/9") + +check_eq(err_str, reader, "3^-2/5", "1/45") + +check_eq(err_str, reader, "3^-2*5", "5/9") + +check_eq(err_str, reader, "3^-2-5", "-44/9") + +check_eq(err_str, reader, "3^(-2)+1", "10/9") + +check_eq(err_str, reader, "(3)^(-2)+1", "10/9") + +check_eq(err_str, reader, "+3^2+1", "10") + +check_eq(err_str, reader, "+3^+2+1", "10") + +check_eq(err_str, reader, "+3^-2+1", "10/9") + +check_eq(err_str, reader, "+3^-2/5", "1/45") + +check_eq(err_str, reader, "+3^-2*5", "5/9") + +check_eq(err_str, reader, "+3^-2-5", "-44/9") + +check_eq(err_str, reader, "-3^2+1", "-8") + +check_eq(err_str, reader, "-3^+2+1", "-8") + +check_eq(err_str, reader, "-3^-2+1", "8/9") + +check_eq(err_str, reader, "-3^-2/3", "-1/27") + +check_eq(err_str, reader, "1+2^3^4", "1+(2^81)") + +check_eq(err_str, reader, "2^3^4+1", "1+(2^81)") + +check_eq(err_str, reader, "2^+3^4+1", "1+(2^81)") + +check_eq(err_str, reader, "2^3^+4+1", "1+(2^81)"); +} + +// Tests for the interaction of the '*' operator with +// the unary '+' and the unary '-' operators +static int check6(ostream& err_str) +{ + parser reader; + return + +check_eq(err_str, reader, "3*+2-1", "5") + +check_eq(err_str, reader, "3*2+1", "7") + +check_eq(err_str, reader, "3*+2+1", "7") + +check_eq(err_str, reader, "3*-2+1", "-5") + +check_eq(err_str, reader, "3*-2/5", "-6/5") + +check_eq(err_str, reader, "3*-2*5", "-30") + +check_eq(err_str, reader, "3*-2-5", "-11") + +check_eq(err_str, reader, "3*(-2)+1", "-5") + +check_eq(err_str, reader, "(3)*(-2)+1", "-5") + +check_eq(err_str, reader, "+3*2+1", "7") + +check_eq(err_str, reader, "+3*+2+1", "7") + +check_eq(err_str, reader, "+3*-2+1", "-5") + +check_eq(err_str, reader, "+3*-2/5", "-6/5") + +check_eq(err_str, reader, "+3*-2*5", "-30") + +check_eq(err_str, reader, "+3*-2-5", "-11") + +check_eq(err_str, reader, "-3*2+1", "-5") + +check_eq(err_str, reader, "-3*+2+1", "-5") + +check_eq(err_str, reader, "-3*-2+1", "7") + +check_eq(err_str, reader, "-3*-2/3", "2") + +check_eq(err_str, reader, "1+2*3*4", "25") + +check_eq(err_str, reader, "2*3*4+1", "25") + +check_eq(err_str, reader, "2*+3*4+1", "25") + +check_eq(err_str, reader, "2*3*+4+1", "25"); +} + +// Tests for nested unary + and unary - +static int check7(ostream& err_str) +{ + parser reader; + return + +check_eq(err_str, reader, "+1", "1") + +check_eq(err_str, reader, "++1", "1") + +check_eq(err_str, reader, "+-+1", "-1") + +check_eq(err_str, reader, "+-+-1", "1") + +check_eq(err_str, reader, "+-+-+1", "1") + +check_eq(err_str, reader, "100++--+1+10", "111"); +} + int main(int argc, char** argv) { cout << "examining old parser bugs" << flush; @@ -107,6 +205,9 @@ errors += check2(err_str); cout << '.' << flush; errors += check3(err_str); cout << '.' << flush; errors += check4(err_str); cout << '.' << flush; + errors += check5(err_str); cout << '.' << flush; + errors += check6(err_str); cout << '.' << flush; + errors += check7(err_str); cout << '.' << flush; if (errors) { cout << "Yes, unfortunately:" << endl; cout << err_str.str(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/check/exam_pseries.cpp new/ginac-1.8.7/check/exam_pseries.cpp --- old/ginac-1.8.6/check/exam_pseries.cpp 2022-12-31 19:47:20.000000000 +0100 +++ new/ginac-1.8.7/check/exam_pseries.cpp 2023-08-06 19:01:10.000000000 +0200 @@ -390,6 +390,24 @@ return result; } +// Test expansion of powers of polynomials. +static unsigned exam_series15() +{ + unsigned result = 0; + + ex e = pow(x + pow(x,2), 2); + + result += check_series(e, 0, Order(1), 0); + result += check_series(e, 0, Order(x), 1); + result += check_series(e, 0, Order(pow(x,2)), 2); + result += check_series(e, 0, pow(x,2) + Order(pow(x,3)), 3); + result += check_series(e, 0, pow(x,2) + 2*pow(x,3) + Order(pow(x,4)), 4); + result += check_series(e, 0, pow(x,2) + 2*pow(x,3) + pow(x,4), 5); + result += check_series(e, 0, pow(x,2) + 2*pow(x,3) + pow(x,4), 6); + + return result; +} + unsigned exam_pseries() { unsigned result = 0; @@ -410,6 +428,7 @@ result += exam_series12(); cout << '.' << flush; result += exam_series13(); cout << '.' << flush; result += exam_series14(); cout << '.' << flush; + result += exam_series15(); cout << '.' << flush; return result; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/config/test-driver new/ginac-1.8.7/config/test-driver --- old/ginac-1.8.6/config/test-driver 2018-10-12 20:59:28.000000000 +0200 +++ new/ginac-1.8.7/config/test-driver 2023-08-12 17:38:26.000000000 +0200 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2018 Free Software Foundation, Inc. +# Copyright (C) 2011-2021 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -42,11 +42,13 @@ { cat <<END Usage: - test-driver --test-name=NAME --log-file=PATH --trs-file=PATH - [--expect-failure={yes|no}] [--color-tests={yes|no}] - [--enable-hard-errors={yes|no}] [--] + test-driver --test-name NAME --log-file PATH --trs-file PATH + [--expect-failure {yes|no}] [--color-tests {yes|no}] + [--enable-hard-errors {yes|no}] [--] TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS] + The '--test-name', '--log-file' and '--trs-file' options are mandatory. +See the GNU Automake documentation for information. END } @@ -103,8 +105,14 @@ trap "st=141; $do_exit" 13 trap "st=143; $do_exit" 15 -# Test script is run here. -"$@" >$log_file 2>&1 +# Test script is run here. We create the file first, then append to it, +# to ameliorate tests themselves also writing to the log file. Our tests +# don't, but others can (automake bug#35762). +: >"$log_file" +case "$1" in + *.sh) sh "$@" >>"$log_file" 2>&1 ;; + *) "$@" >>"$log_file" 2>&1 ;; +esac estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then @@ -126,7 +134,7 @@ # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). -echo "$res $test_name (exit status: $estatus)" >>$log_file +echo "$res $test_name (exit status: $estatus)" >>"$log_file" # Report outcome to console. echo "${col}${res}${std}: $test_name" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/configure.ac new/ginac-1.8.7/configure.ac --- old/ginac-1.8.6/configure.ac 2022-12-31 19:47:20.000000000 +0100 +++ new/ginac-1.8.7/configure.ac 2023-02-11 15:24:37.000000000 +0100 @@ -74,7 +74,7 @@ AC_PATH_PROG(MAKEINDEX, makeindex, "") AC_PATH_PROG(MAKEINFO, makeinfo, "") AC_PATH_PROG(DVIPS, dvips, "") -AM_CONDITIONAL(CONFIG_TEX, [test ! \( -z "$LATEX" -o -z $"PDFLATEX" -o -z "$MAKEINDEX" -o -z "$DVIPS" \)]) +AM_CONDITIONAL(CONFIG_TEX, [test ! \( -z "$LATEX" -o -z "$PDFLATEX" -o -z "$MAKEINDEX" -o -z "$DVIPS" \)]) AC_PATH_PROG(FIG2DEV, fig2dev, "") AM_CONDITIONAL(CONFIG_FIG2DEV, [test ! -z "$FIG2DEV"]) AS_IF([test -z "$FIG2DEV" -o -z "$MAKEINFO"], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/doc/CMakeLists.txt new/ginac-1.8.7/doc/CMakeLists.txt --- old/ginac-1.8.6/doc/CMakeLists.txt 2022-12-31 19:47:20.000000000 +0100 +++ new/ginac-1.8.7/doc/CMakeLists.txt 2023-02-11 18:25:46.000000000 +0100 @@ -35,7 +35,6 @@ set(_idx ${_dirname}/${_basename}.idx) set(_ind ${_dirname}/${_basename}.ind) set(_pdf ${_dirname}/${_basename}.pdf) - set(_fixupind ${CMAKE_SOURCE_DIR}/scripts/fixupind.py) add_custom_command( OUTPUT ${_idx} COMMAND ${PDFLATEX_COMPILER} ${texfile} @@ -45,7 +44,6 @@ add_custom_command( OUTPUT ${_ind} COMMAND ${MAKEINDEX_COMPILER} ${_idx} - COMMAND ${PYTHON} ${_fixupind} ${_idx} WORKING_DIRECTORY ${_dirname} DEPENDS ${texfile} ${_idx} COMMENT "MAKEINDEX ${_basename}.idx") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/doc/reference/Makefile.am new/ginac-1.8.7/doc/reference/Makefile.am --- old/ginac-1.8.6/doc/reference/Makefile.am 2022-12-31 19:47:20.000000000 +0100 +++ new/ginac-1.8.7/doc/reference/Makefile.am 2023-02-11 18:25:54.000000000 +0100 @@ -53,7 +53,6 @@ cd pdflatex; \ ${PDFLATEX} reference.tex ;\ ${MAKEINDEX} reference.idx ;\ - ${PYTHON} $(abs_top_srcdir)/scripts/fixupind.py reference.ind; \ ${PDFLATEX} reference.tex reference.dvi: latex latex/reference.dvi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/doc/tutorial/ginac.info new/ginac-1.8.7/doc/tutorial/ginac.info --- old/ginac-1.8.6/doc/tutorial/ginac.info 2023-02-08 20:24:55.000000000 +0100 +++ new/ginac-1.8.7/doc/tutorial/ginac.info 2023-08-12 18:10:31.000000000 +0200 @@ -5,7 +5,7 @@ * ginac: (ginac). C++ library for symbolic computation. END-INFO-DIR-ENTRY -This is a tutorial that documents GiNaC 1.8.6, an open framework for +This is a tutorial that documents GiNaC 1.8.7, an open framework for symbolic computation within the C++ programming language. Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany @@ -25,7 +25,7 @@ GiNaC ***** -This is a tutorial that documents GiNaC 1.8.6, an open framework for +This is a tutorial that documents GiNaC 1.8.7, an open framework for symbolic computation within the C++ programming language. * Menu: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/doc/tutorial/stamp-vti new/ginac-1.8.7/doc/tutorial/stamp-vti --- old/ginac-1.8.6/doc/tutorial/stamp-vti 2023-02-08 20:24:55.000000000 +0100 +++ new/ginac-1.8.7/doc/tutorial/stamp-vti 2023-08-12 18:10:30.000000000 +0200 @@ -1,4 +1,4 @@ @set UPDATED 1 January 2023 @set UPDATED-MONTH January 2023 -@set EDITION 1.8.6 -@set VERSION 1.8.6 +@set EDITION 1.8.7 +@set VERSION 1.8.7 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/doc/tutorial/version.texi new/ginac-1.8.7/doc/tutorial/version.texi --- old/ginac-1.8.6/doc/tutorial/version.texi 2023-02-08 20:24:55.000000000 +0100 +++ new/ginac-1.8.7/doc/tutorial/version.texi 2023-08-12 18:10:30.000000000 +0200 @@ -1,4 +1,4 @@ @set UPDATED 1 January 2023 @set UPDATED-MONTH January 2023 -@set EDITION 1.8.6 -@set VERSION 1.8.6 +@set EDITION 1.8.7 +@set VERSION 1.8.7 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/ginac/clifford.h new/ginac-1.8.7/ginac/clifford.h --- old/ginac-1.8.6/ginac/clifford.h 2022-12-31 19:47:20.000000000 +0100 +++ new/ginac-1.8.7/ginac/clifford.h 2023-02-11 23:24:55.000000000 +0100 @@ -306,7 +306,7 @@ * if e contains at least one, otherwise returns -1 * * @param e Expression to be processed - * @ignore_ONE defines if clifford_ONE should be ignored in the search*/ + * @param ignore_ONE defines if clifford_ONE should be ignored in the search */ int clifford_max_label(const ex & e, bool ignore_ONE = false); /** Calculation of the norm in the Clifford algebra. */ @@ -321,9 +321,14 @@ * @param mu Index (must be of class varidx or a derived class) * @param metr Metric (should be indexed, tensmetric or a derived class, or a matrix) * @param rl Representation label - * @param e Clifford unit object * @return Clifford vector with given components */ ex lst_to_clifford(const ex & v, const ex & mu, const ex & metr, unsigned char rl = 0); + +/** List or vector conversion into the Clifford vector. + * + * @param v List or vector of coordinates + * @param e Clifford unit object + * @return Clifford vector with given components */ ex lst_to_clifford(const ex & v, const ex & e); /** An inverse function to lst_to_clifford(). For given Clifford vector extracts diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/ginac/ex.cpp new/ginac-1.8.7/ginac/ex.cpp --- old/ginac-1.8.6/ginac/ex.cpp 2022-12-31 19:47:20.000000000 +0100 +++ new/ginac-1.8.7/ginac/ex.cpp 2023-02-11 23:22:26.000000000 +0100 @@ -70,6 +70,8 @@ bp->dbgprinttree(); } +/** Expand an expression. + * @param options see GiNaC::expand_options */ ex ex::expand(unsigned options) const { if (options == 0 && (bp->flags & status_flags::expanded)) // The "expanded" flag only covers the standard options; someone might want to re-expand with different options diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/ginac/excompiler.h new/ginac-1.8.7/ginac/excompiler.h --- old/ginac-1.8.6/ginac/excompiler.h 2022-12-31 19:47:20.000000000 +0100 +++ new/ginac-1.8.7/ginac/excompiler.h 2023-02-11 22:38:05.000000000 +0100 @@ -65,7 +65,8 @@ * C code equivalent in double precision. The function pointer has type FUNCP_2P. * * @param expr Expression to be compiled - * @param sym Symbol from the expression to become the function parameter + * @param sym1 Symbol from the expression to become the first function parameter + * @param sym2 Symbol from the expression to become the second function parameter * @param fp Returned function pointer * @param filename Name of the intermediate source code and so-file. If * supplied, these intermediate files will not be deleted @@ -76,8 +77,8 @@ * Takes an expression and produces a function pointer to the compiled and linked * C code equivalent in double precision. The function pointer has type FUNCP_CUBA. * - * @param expr Expression to be compiled - * @param sym Symbol from the expression to become the function parameter + * @param exprs List of expression to be compiled + * @param syms Symbols from the expression to become the function parameters * @param fp Returned function pointer * @param filename Name of the intermediate source code and so-file. If * supplied, these intermediate files will not be deleted diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/ginac/factor.cpp new/ginac-1.8.7/ginac/factor.cpp --- old/ginac-1.8.6/ginac/factor.cpp 2022-12-31 19:47:20.000000000 +0100 +++ new/ginac-1.8.7/ginac/factor.cpp 2023-02-12 11:20:14.000000000 +0100 @@ -2394,7 +2394,7 @@ ctx.vn = ctx.pp.collect(x).lcoeff(x); ctx.vnlst = put_factors_into_vec(factor(ctx.vn)); - ctx.modulus = (ctx.vnlst.size() > 3) ? ctx.vnlst.size() : 3; + ctx.modulus = (ctx.vnlst.size() > 3) ? ctx.vnlst.size() : numeric(3); ctx_in_x.push_back(ctx); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/ginac/factor.h new/ginac-1.8.7/ginac/factor.h --- old/ginac-1.8.6/ginac/factor.h 2022-12-31 19:47:20.000000000 +0100 +++ new/ginac-1.8.7/ginac/factor.h 2023-02-11 22:43:26.000000000 +0100 @@ -36,7 +36,7 @@ * functions or polynomials inside function arguments. * * @param[in] poly expression to factorize - * @param[in] option options to influence the factorization + * @param[in] options see GiNaC::factor_options * @return factorized expression */ extern ex factor(const ex& poly, unsigned options = 0); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/ginac/idx.h new/ginac-1.8.7/ginac/idx.h --- old/ginac-1.8.6/ginac/idx.h 2022-12-31 19:47:20.000000000 +0100 +++ new/ginac-1.8.7/ginac/idx.h 2023-02-11 23:03:52.000000000 +0100 @@ -41,8 +41,7 @@ /** Construct index with given value and dimension. * * @param v Value of index (numeric or symbolic) - * @param dim Dimension of index space (numeric or symbolic) - * @return newly constructed index */ + * @param dim Dimension of index space (numeric or symbolic) */ explicit idx(const ex & v, const ex & dim); // functions overriding virtual functions from base classes @@ -119,8 +118,7 @@ * * @param v Value of index (numeric or symbolic) * @param dim Dimension of index space (numeric or symbolic) - * @param covariant Make covariant index (default is contravariant) - * @return newly constructed index */ + * @param covariant Make covariant index (default is contravariant) */ varidx(const ex & v, const ex & dim, bool covariant = false); // functions overriding virtual functions from base classes @@ -169,8 +167,7 @@ * @param v Value of index (numeric or symbolic) * @param dim Dimension of index space (numeric or symbolic) * @param covariant Make covariant index (default is contravariant) - * @param dotted Make covariant dotted (default is undotted) - * @return newly constructed index */ + * @param dotted Make covariant dotted (default is undotted) */ spinidx(const ex & v, const ex & dim = 2, bool covariant = false, bool dotted = false); // functions overriding virtual functions from base classes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/ginac/indexed.h new/ginac-1.8.7/ginac/indexed.h --- old/ginac-1.8.6/ginac/indexed.h 2022-12-31 19:47:20.000000000 +0100 +++ new/ginac-1.8.7/ginac/indexed.h 2023-02-11 22:47:19.000000000 +0100 @@ -48,23 +48,20 @@ public: /** Construct indexed object with no index. * - * @param b Base expression - * @return newly constructed indexed object */ + * @param b Base expression */ indexed(const ex & b); /** Construct indexed object with one index. The index must be of class idx. * * @param b Base expression - * @param i1 The index - * @return newly constructed indexed object */ + * @param i1 The index */ indexed(const ex & b, const ex & i1); /** Construct indexed object with two indices. The indices must be of class idx. * * @param b Base expression * @param i1 First index - * @param i2 Second index - * @return newly constructed indexed object */ + * @param i2 Second index */ indexed(const ex & b, const ex & i1, const ex & i2); /** Construct indexed object with three indices. The indices must be of class idx. @@ -72,8 +69,7 @@ * @param b Base expression * @param i1 First index * @param i2 Second index - * @param i3 Third index - * @return newly constructed indexed object */ + * @param i3 Third index */ indexed(const ex & b, const ex & i1, const ex & i2, const ex & i3); /** Construct indexed object with four indices. The indices must be of class idx. @@ -82,8 +78,7 @@ * @param i1 First index * @param i2 Second index * @param i3 Third index - * @param i4 Fourth index - * @return newly constructed indexed object */ + * @param i4 Fourth index */ indexed(const ex & b, const ex & i1, const ex & i2, const ex & i3, const ex & i4); /** Construct indexed object with two indices and a specified symmetry. The @@ -92,8 +87,7 @@ * @param b Base expression * @param symm Symmetry of indices * @param i1 First index - * @param i2 Second index - * @return newly constructed indexed object */ + * @param i2 Second index */ indexed(const ex & b, const symmetry & symm, const ex & i1, const ex & i2); /** Construct indexed object with three indices and a specified symmetry. @@ -103,8 +97,7 @@ * @param symm Symmetry of indices * @param i1 First index * @param i2 Second index - * @param i3 Third index - * @return newly constructed indexed object */ + * @param i3 Third index */ indexed(const ex & b, const symmetry & symm, const ex & i1, const ex & i2, const ex & i3); /** Construct indexed object with four indices and a specified symmetry. The @@ -115,16 +108,14 @@ * @param i1 First index * @param i2 Second index * @param i3 Third index - * @param i4 Fourth index - * @return newly constructed indexed object */ + * @param i4 Fourth index */ indexed(const ex & b, const symmetry & symm, const ex & i1, const ex & i2, const ex & i3, const ex & i4); /** Construct indexed object with a specified vector of indices. The indices * must be of class idx. * * @param b Base expression - * @param iv Vector of indices - * @return newly constructed indexed object */ + * @param iv Vector of indices */ indexed(const ex & b, const exvector & iv); /** Construct indexed object with a specified vector of indices and @@ -132,8 +123,7 @@ * * @param b Base expression * @param symm Symmetry of indices - * @param iv Vector of indices - * @return newly constructed indexed object */ + * @param iv Vector of indices */ indexed(const ex & b, const symmetry & symm, const exvector & iv); // internal constructors diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/ginac/inifcns.cpp new/ginac-1.8.7/ginac/inifcns.cpp --- old/ginac-1.8.6/ginac/inifcns.cpp 2022-12-31 19:47:20.000000000 +0100 +++ new/ginac-1.8.7/ginac/inifcns.cpp 2023-08-06 19:44:38.000000000 +0200 @@ -1021,6 +1021,20 @@ return Order(x).hold(); } +static ex Order_power(const ex & x, const ex & e) +{ + // Order(x)^e -> Order(x^e) for positive integer e + if (is_exactly_a<numeric>(e) && e.info(info_flags::posint)) + return Order(pow(x, e)); + // NB: For negative exponents, the above could be wrong. + // This is because series() produces Order(x^n) to denote the order where + // it gave up. So, Order(x^n) can also be an x^(n+1) term if the x^n term + // vanishes. In this situation, 1/Order(x^n) can also be a x^(-n-1) term. + // Transforming it to Order(x^-n) would miss that. + + return power(Order(x), e).hold(); +} + static ex Order_expl_derivative(const ex & arg, const symbol & s) { return Order(arg.diff(s)); @@ -1032,7 +1046,8 @@ expl_derivative_func(Order_expl_derivative). conjugate_func(Order_conjugate). real_part_func(Order_real_part). - imag_part_func(Order_imag_part)); + imag_part_func(Order_imag_part). + power_func(Order_power)); ////////// // Solve linear system diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/ginac/normal.cpp new/ginac-1.8.7/ginac/normal.cpp --- old/ginac-1.8.6/ginac/normal.cpp 2022-12-31 19:47:20.000000000 +0100 +++ new/ginac-1.8.7/ginac/normal.cpp 2023-02-11 22:43:50.000000000 +0100 @@ -1428,6 +1428,7 @@ * @param cb pointer to expression that will receive the cofactor of b, or nullptr * @param check_args check whether a and b are polynomials with rational * coefficients (defaults to "true") + * @param options see GiNaC::gcd_options * @return the GCD as a new expression */ ex gcd(const ex &a, const ex &b, ex *ca, ex *cb, bool check_args, unsigned options) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/ginac/numeric.cpp new/ginac-1.8.7/ginac/numeric.cpp --- old/ginac-1.8.6/ginac/numeric.cpp 2023-02-08 00:02:38.000000000 +0100 +++ new/ginac-1.8.7/ginac/numeric.cpp 2023-02-12 00:09:38.000000000 +0100 @@ -2139,7 +2139,7 @@ /** The Binomial coefficients. It computes the binomial coefficients. For * integer n and k and positive n this is the number of ways of choosing k * objects from n distinct objects. If n is a negative integer, the formula - * binomial(n,k) == (-1)^k*binomial(k-n-1,k) (if k≥0) + * binomial(n,k) == (-1)^k*binomial(k-n-1,k) (if k>=0) * binomial(n,k) == (-1)^(n-k)*binomial(-k-1,n-k) (otherwise) * is used to compute the result. */ const numeric binomial(const numeric &n, const numeric &k) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/ginac/parser/parse_binop_rhs.cpp new/ginac-1.8.7/ginac/parser/parse_binop_rhs.cpp --- old/ginac-1.8.6/ginac/parser/parse_binop_rhs.cpp 2022-12-31 19:47:20.000000000 +0100 +++ new/ginac-1.8.7/ginac/parser/parse_binop_rhs.cpp 2023-06-20 22:23:55.000000000 +0200 @@ -114,6 +114,18 @@ } } +/// unary_expr: [+-] expression +ex parser::parse_unary_expr() +{ + // Parse a binary expression with the priority of exponentiation + // or higher. Ignore the overall sign, because parse_primary() + // handles it for us. + get_next_tok(); // Skip [+-] + ex lhs = parse_primary(); + ex e = parse_binop_rhs(get_tok_prec('^'), lhs); + return e; +} + extern const numeric* _num_1_p; static ex make_minus_expr(const exvector& args) @@ -137,6 +149,16 @@ return dynallocate<mul>(args[0], rest); } +static ex make_power_expr(const exvector& args) +{ + size_t n = args.size(); + ex p = pow(args[n - 2], args[n - 1]); + for (size_t i = n - 2; i > 0; i--) { + p = pow(args[i - 1], p); + } + return p; +} + static ex make_binop_expr(const int binop, const exvector& args) { switch (binop) { @@ -149,11 +171,7 @@ case '/': return make_divide_expr(args); case '^': - if (args.size() != 2) - throw std::invalid_argument( - std::string(__func__) - + ": power should have exactly 2 operands"); - return pow(args[0], args[1]); + return make_power_expr(args); default: throw std::invalid_argument( std::string(__func__) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/ginac/parser/parser.cpp new/ginac-1.8.7/ginac/parser/parser.cpp --- old/ginac-1.8.6/ginac/parser/parser.cpp 2022-12-31 19:47:20.000000000 +0100 +++ new/ginac-1.8.7/ginac/parser/parser.cpp 2023-06-20 22:23:55.000000000 +0200 @@ -27,6 +27,7 @@ #include "mul.h" #include "constant.h" #include "function.h" +#include "operators.h" #include <cstdint> // for uintptr_t #include <sstream> @@ -144,27 +145,6 @@ return list; } -extern const ex _ex0; - -/// unary_expr: [+-] expression -ex parser::parse_unary_expr() -{ - // Unlike most other parse_* method this one does NOT consume - // current token so parse_binop_rhs() knows what kind of operator - // is being parsed. - - // There are different kinds of expressions which need to be handled: - // -a+b - // -(a) - // +a - // +(a) - // Delegate the work to parse_binop_rhs(), otherwise we end up - // duplicating it here. - ex lhs = _ex0; // silly trick - ex e = parse_binop_rhs(0, lhs); - return e; -} - /// primary: identifier_expr | number_expr | paren_expr | unary_expr ex parser::parse_primary() { @@ -178,6 +158,7 @@ case '{': return parse_lst_expr(); case '-': + return -parse_unary_expr(); case '+': return parse_unary_expr(); case lexer::token_type::literal: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/ginac/pseries.cpp new/ginac-1.8.7/ginac/pseries.cpp --- old/ginac-1.8.6/ginac/pseries.cpp 2022-12-31 19:47:20.000000000 +0100 +++ new/ginac-1.8.7/ginac/pseries.cpp 2023-08-06 19:45:09.000000000 +0200 @@ -66,8 +66,7 @@ * non-terminating series. * * @param rel_ expansion variable and point (must hold a relational) - * @param ops_ vector of {coefficient, power} pairs (coefficient must not be zero) - * @return newly constructed pseries */ + * @param ops_ vector of {coefficient, power} pairs (coefficient must not be zero) */ pseries::pseries(const ex &rel_, const epvector &ops_) : seq(ops_) { @@ -993,8 +992,8 @@ // which can easily be solved given the starting value c_0 = (a_0)^p. // For the more general case where the leading coefficient of A(x) is not // a constant, just consider A2(x) = A(x)*x^m, with some integer m and - // repeat the above derivation. The leading power of C2(x) = A2(x)^2 is - // then of course x^(p*m) but the recurrence formula still holds. + // repeat the above derivation. The leading power of C2(x) = A2(x)^p is + // then of course a_0^p*x^(p*m) but the recurrence formula still holds. if (seq.empty()) { // as a special case, handle the empty (zero) series honoring the @@ -1006,16 +1005,27 @@ else return *this; } - - const int ldeg = ldegree(var); - if (!(p*ldeg).is_integer()) + + const int base_ldeg = ldegree(var); + if (!(p*base_ldeg).is_integer()) throw std::runtime_error("pseries::power_const(): trying to assemble a Puiseux series"); + int new_ldeg = (p*base_ldeg).to_int(); + + const int base_deg = degree(var); + int new_deg = deg; + if (p.is_pos_integer()) { + // No need to compute beyond p*base_deg. + new_deg = std::min((p*base_deg).to_int(), deg); + } // adjust number of coefficients - int numcoeff = deg - (p*ldeg).to_int(); + int numcoeff = new_deg - new_ldeg; + if (new_deg < deg) + numcoeff += 1; + if (numcoeff <= 0) { - epvector epv { expair(Order(_ex1), deg) }; - return dynallocate<pseries>(relational(var,point), std::move(epv)); + return dynallocate<pseries>(relational(var, point), + epvector{{Order(_ex1), deg}}); } // O(x^n)^(-m) is undefined @@ -1025,33 +1035,35 @@ // Compute coefficients of the powered series exvector co; co.reserve(numcoeff); - co.push_back(pow(coeff(var, ldeg), p)); + co.push_back(pow(coeff(var, base_ldeg), p)); for (int i=1; i<numcoeff; ++i) { ex sum = _ex0; for (int j=1; j<=i; ++j) { - ex c = coeff(var, j + ldeg); + ex c = coeff(var, j + base_ldeg); if (is_order_function(c)) { co.push_back(Order(_ex1)); break; } else sum += (p * j - (i - j)) * co[i - j] * c; } - co.push_back(sum / coeff(var, ldeg) / i); + co.push_back(sum / coeff(var, base_ldeg) / i); } // Construct new series (of non-zero coefficients) epvector new_seq; bool higher_order = false; for (int i=0; i<numcoeff; ++i) { - if (!co[i].is_zero()) - new_seq.emplace_back(expair(co[i], p * ldeg + i)); + if (!co[i].is_zero()) { + new_seq.emplace_back(expair(co[i], new_ldeg + i)); + } if (is_order_function(co[i])) { higher_order = true; break; } } - if (!higher_order) - new_seq.emplace_back(expair(Order(_ex1), p * ldeg + numcoeff)); + if (!higher_order && new_deg == deg) { + new_seq.emplace_back(expair{Order(_ex1), new_deg}); + } return pseries(relational(var,point), std::move(new_seq)); } @@ -1151,7 +1163,8 @@ if (!(real_ldegree*numexp).is_integer()) throw std::runtime_error("pseries::power_const(): trying to assemble a Puiseux series"); - ex e = basis.series(r, (order + real_ldegree*(1-numexp)).to_int(), options); + int extra_terms = (real_ldegree*(1-numexp)).to_int(); + ex e = basis.series(r, order + std::max(0, extra_terms), options); ex result; try { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/ginac/version.h new/ginac-1.8.7/ginac/version.h --- old/ginac-1.8.6/ginac/version.h 2023-02-08 20:00:21.000000000 +0100 +++ new/ginac-1.8.7/ginac/version.h 2023-08-12 17:42:15.000000000 +0200 @@ -30,7 +30,7 @@ #define GINACLIB_MINOR_VERSION 8 /* Micro version of GiNaC */ -#define GINACLIB_MICRO_VERSION 6 +#define GINACLIB_MICRO_VERSION 7 // GiNaC library version information. It has very little to do with GiNaC // version number. In particular, library version is OS dependent. @@ -56,7 +56,7 @@ // * change matrix inverse to use default argument (twice) // * check for interfaces marked as deprecated #define GINAC_LT_CURRENT 12 -#define GINAC_LT_REVISION 5 +#define GINAC_LT_REVISION 6 #define GINAC_LT_AGE 1 /* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/ginac.pc new/ginac-1.8.7/ginac.pc --- old/ginac-1.8.6/ginac.pc 2023-02-08 20:23:47.000000000 +0100 +++ new/ginac-1.8.7/ginac.pc 2023-08-12 18:10:13.000000000 +0200 @@ -5,7 +5,7 @@ Name: GiNaC Description: C++ library for symbolic calculations -Version: 1.8.6 +Version: 1.8.7 Requires: cln >= 1.2.2 Libs: -L${libdir} -lginac -Wl,-rpath -Wl,${libdir} Cflags: -I${includedir} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/ginsh/ginsh_lexer.cpp new/ginac-1.8.7/ginsh/ginsh_lexer.cpp --- old/ginac-1.8.6/ginsh/ginsh_lexer.cpp 2023-02-08 20:24:48.000000000 +0100 +++ new/ginac-1.8.7/ginsh/ginsh_lexer.cpp 2023-08-12 18:10:30.000000000 +0200 @@ -2171,8 +2171,16 @@ YY_FATAL_ERROR("input in flex scanner failed"); result = n; #endif - } else if (((result = fread(buf, 1, max_size, yyin)) == 0) && ferror(yyin)) - YY_FATAL_ERROR("input in flex scanner failed"); + } else { + int c = '*', n; + for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) + buf[n] = (char)c; + if (c == '\n') + buf[n++] = (char)c; + if (c == EOF && ferror(yyin)) + YY_FATAL_ERROR("input in flex scanner failed"); + result = n; + } return result; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/ginsh/ginsh_lexer.lpp new/ginac-1.8.7/ginsh/ginsh_lexer.lpp --- old/ginac-1.8.6/ginsh/ginsh_lexer.lpp 2022-12-31 19:47:20.000000000 +0100 +++ new/ginac-1.8.7/ginsh/ginsh_lexer.lpp 2023-06-21 20:41:54.000000000 +0200 @@ -203,8 +203,16 @@ YY_FATAL_ERROR("input in flex scanner failed"); result = n; #endif - } else if (((result = fread(buf, 1, max_size, yyin)) == 0) && ferror(yyin)) - YY_FATAL_ERROR("input in flex scanner failed"); + } else { + int c = '*', n; + for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n) + buf[n] = (char)c; + if (c == '\n') + buf[n++] = (char)c; + if (c == EOF && ferror(yyin)) + YY_FATAL_ERROR("input in flex scanner failed"); + result = n; + } return result; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/m4/ax_cxx_compile_stdcxx.m4 new/ginac-1.8.7/m4/ax_cxx_compile_stdcxx.m4 --- old/ginac-1.8.6/m4/ax_cxx_compile_stdcxx.m4 2022-12-31 19:47:20.000000000 +0100 +++ new/ginac-1.8.7/m4/ax_cxx_compile_stdcxx.m4 2023-08-12 17:32:38.000000000 +0200 @@ -43,7 +43,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 15 +#serial 18 dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro dnl (serial version number 13). @@ -104,9 +104,18 @@ dnl HP's aCC needs +std=c++11 according to: dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Note... dnl Cray's crayCC needs "-h std=c++11" + dnl MSVC needs -std:c++NN for C++17 and later (default is C++14) for alternative in ${ax_cxx_compile_alternatives}; do - for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do - cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) + for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}" MSVC; do + if test x"$switch" = xMSVC; then + dnl AS_TR_SH maps both `:` and `=` to `_` so -std:c++17 would collide + dnl with -std=c++17. We suffix the cache variable name with _MSVC to + dnl avoid this. + switch=-std:c++${alternative} + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_${switch}_MSVC]) + else + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) + fi AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, $cachevar, [ac_save_CXX="$CXX" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/m4/lib-link.m4 new/ginac-1.8.7/m4/lib-link.m4 --- old/ginac-1.8.6/m4/lib-link.m4 2023-02-08 20:20:49.000000000 +0100 +++ new/ginac-1.8.7/m4/lib-link.m4 2023-08-12 17:37:07.000000000 +0200 @@ -224,7 +224,7 @@ additional_libdir3= fi dnl Search the library and its dependencies in $additional_libdir and - dnl $LDFLAGS. Using breadth-first-seach. + dnl $LDFLAGS. Use breadth-first search. LIB[]NAME= LTLIB[]NAME= INC[]NAME= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/m4/libtool.m4 new/ginac-1.8.7/m4/libtool.m4 --- old/ginac-1.8.6/m4/libtool.m4 2022-12-19 21:12:39.000000000 +0100 +++ new/ginac-1.8.7/m4/libtool.m4 2023-08-12 17:34:17.000000000 +0200 @@ -1,6 +1,6 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software +# Copyright (C) 1996-2001, 2003-2019, 2021-2023 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # @@ -1368,7 +1368,7 @@ ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) +s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when @@ -1383,7 +1383,7 @@ x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; - x86_64-*linux*) + x86_64-*linux*|x86_64-gnu*) case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" @@ -1412,7 +1412,7 @@ x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; - x86_64-*linux*) + x86_64-*linux*|x86_64-gnu*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ginac-1.8.6/scripts/fixupind.py new/ginac-1.8.7/scripts/fixupind.py --- old/ginac-1.8.6/scripts/fixupind.py 2022-12-31 19:47:20.000000000 +0100 +++ new/ginac-1.8.7/scripts/fixupind.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,30 +0,0 @@ - -# encoding: utf-8 -# TeX Live 2012 seems to dislike files produces by doxygen (1.8.x.y) -# In particular, makeindex(1) program creates invalid index entries like -# \hyperpage{NNN_} -# (note the trailing underscore in the page number). This breaks automatic -# builds and is very annoying. Hence this script. It replaces (broken) -# \hyperpage{NNN_} with \hyperpage{NNN}. -# Note: this is an ugly work around, a proper fix is welcome. -import sys, os, re - -def fixupind(fname): - """ Fix \\hyperpage{NNN_} entries in the ind file @var{fname} """ - tmpout = fname + '.tmp' - inp = open(fname) - out = open(tmpout, 'wt') - rx = re.compile('(hyperpage)[{]([0-9]+)[_][}]') - for line in inp: - out.write(re.sub(rx, '\\1{\\2}', line)) - out.flush() - out.close() - inp.close() - os.rename(tmpout, fname) - -if __name__ == '__main__': - if len(sys.argv) <= 1: - sys.exit(1) - fixupind(sys.argv[1]) - sys.exit(0) - ++++++ ginac-fix-makeindex.patch ++++++ --- /var/tmp/diff_new_pack.u95SpC/_old 2024-01-03 12:23:51.829012752 +0100 +++ /var/tmp/diff_new_pack.u95SpC/_new 2024-01-03 12:23:51.833012898 +0100 @@ -10,5 +10,5 @@ + set(_idx ${_basename}.idx) set(_ind ${_dirname}/${_basename}.ind) set(_pdf ${_dirname}/${_basename}.pdf) - set(_fixupind ${CMAKE_SOURCE_DIR}/scripts/fixupind.py) + add_custom_command(
participants (1)
-
Source-Sync