nixpkgs/pkgs/applications/science/math/sage/spkg-giac.patch
Timo Kaufmann 272e930827 sage: fix non-deterministic build failures
The build was failing on some machines because of a `find` command that
touched files in different orders on different machines.

That confused `make`s timestamp mechanism.
2018-02-05 15:03:24 +01:00

21 lines
657 B
Diff

diff --git a/build/pkgs/giac/spkg-install b/build/pkgs/giac/spkg-install
index bdd8df6cb8..3fd7a3ef8a 100644
--- a/build/pkgs/giac/spkg-install
+++ b/build/pkgs/giac/spkg-install
@@ -2,6 +2,15 @@
## Giac
###########################################
+# Fix hardcoded paths, while making sure to only update timestamps of actually
+# changed files (otherwise confuses make)
+grep -rlF '/bin/cp' . | while read file
+do
+ sed -e 's@/bin/cp@cp@g' -i "$file"
+done
+
+# Fix input parser syntax
+sed -e 's@yylex (&yylval)@yylex (\&yyval, scanner)@gp' -i 'src/src/input_parser.cc'
if [ "$SAGE_LOCAL" = "" ]; then
echo "SAGE_LOCAL undefined ... exiting";