singular: replace local patches by upstream ones

This commit is contained in:
Mauricio Collares
2021-05-11 16:49:10 -03:00
parent 391028eb3a
commit f206ba8ab9
@@ -31,11 +31,9 @@ stdenv.mkDerivation rec {
owner = "Singular"; owner = "Singular";
repo = "Singular"; repo = "Singular";
# 4.2.0p2 is not tagged, but the tarball matches commit # 4.2.0p2 is not tagged, but the tarball matches the commit below.
# 6f68939ddf612d96e3caaaaa8275f77613ac1da8. the commit below has rev = "6f68939ddf612d96e3caaaaa8275f77613ac1da8";
# two extra fixes. sha256 = "sha256-BJNzYylzDqD/5YjzjxPRb/c96tYiuGy9Y+A7qf3ZSG8=";
rev = "3cda50c00a849455efa2502e56596955491a353a";
sha256 = "sha256-OizPhGE6L2LTOrKfeDdDB6BSdvYkDVXvbbYjV14hnHM=";
# if a release is tagged it will be in the format below. # if a release is tagged it will be in the format below.
# rev = "Release${lib.replaceStrings ["."] ["-"] version}"; # rev = "Release${lib.replaceStrings ["."] ["-"] version}";
@@ -60,6 +58,13 @@ stdenv.mkDerivation rec {
# https://github.com/alsa-project/alsa-firmware/issues/3 for a # https://github.com/alsa-project/alsa-firmware/issues/3 for a
# related issue. # related issue.
./use-older-ax-prog-cc-for-build.patch ./use-older-ax-prog-cc-for-build.patch
# https://github.com/Singular/Singular/issues/1086
(fetchpatch {
name = "schubert-lib-fails-with-too-many-cpus.patch";
url = "https://github.com/Singular/Singular/commit/3cda50c00a849455efa2502e56596955491a353a.patch";
sha256 = "sha256-fgYd+2vT32w5Ki8kKx6PfZn2e4QSJcYWOwEFXtc+lSA=";
})
] ++ lib.optionals enableDocs [ ] ++ lib.optionals enableDocs [
# singular supports building without 4ti2, bertini, normaliz or # singular supports building without 4ti2, bertini, normaliz or
# topcom just fine, but the docbuilding does not skip manual pages # topcom just fine, but the docbuilding does not skip manual pages
@@ -67,6 +72,13 @@ stdenv.mkDerivation rec {
# doc2tex.pl::HandleLib, since it seems to ignore "-exclude" # doc2tex.pl::HandleLib, since it seems to ignore "-exclude"
# argumens). skip them manually. # argumens). skip them manually.
./disable-docs-for-optional-unpackaged-deps.patch ./disable-docs-for-optional-unpackaged-deps.patch
# fix some non-ascii characters in doc/decodegb.doc
(fetchpatch {
name = "decodegb-ascii.patch";
url = "https://github.com/Singular/Singular/commit/36966d9009de572ee4dbc487f3e5744098fe91be.patch";
sha256 = "sha256-9WcEov/oOQRC584ag6WVHFwY2aCjbM75HWyvZoEwppw=";
})
]; ];
configureFlags = [ configureFlags = [
@@ -83,9 +95,6 @@ stdenv.mkDerivation rec {
substituteInPlace Tst/regress.cmd --replace 'mysystem_catch("hostname")' 'nix_test_runner' substituteInPlace Tst/regress.cmd --replace 'mysystem_catch("hostname")' 'nix_test_runner'
patchShebangs . patchShebangs .
'' + lib.optionalString enableDocs ''
# work around encoding problem
sed -i -e 's/\xb7/@cdot{}/g' doc/decodegb.doc
''; '';
# For reference (last checked on commit 75f460d): # For reference (last checked on commit 75f460d):
@@ -149,7 +158,7 @@ stdenv.mkDerivation rec {
# singular tests are a bit complicated, see # singular tests are a bit complicated, see
# https://github.com/Singular/Singular/tree/spielwiese/Tst # https://github.com/Singular/Singular/tree/spielwiese/Tst
# https://www.singular.uni-kl.de/forum/viewtopic.php&t=2773 # https://www.singular.uni-kl.de/forum/viewtopic.php?f=10&t=2773
testsToRun = [ testsToRun = [
"Old/universal.lst" "Old/universal.lst"
"Buch/buch.lst" "Buch/buch.lst"
@@ -181,7 +190,7 @@ stdenv.mkDerivation rec {
2>"$TMPDIR/out-err.log" 2>"$TMPDIR/out-err.log"
# unfortunately regress.cmd always returns exit code 0, so check stderr # unfortunately regress.cmd always returns exit code 0, so check stderr
# https://www.singular.uni-kl.de/forum/viewtopic.php&t=2773 # https://www.singular.uni-kl.de/forum/viewtopic.php?f=10&t=2773
if [[ -s "$TMPDIR/out-err.log" ]]; then if [[ -s "$TMPDIR/out-err.log" ]]; then
cat "$TMPDIR/out-err.log" cat "$TMPDIR/out-err.log"
exit 1 exit 1