octave: add patch for octave incorrectly failing on package builds

Patch comes from https://savannah.gnu.org/bugs/?func=detailitem&item_id=62436
This commit is contained in:
Karl Hallsby 2022-05-13 10:33:14 -05:00
parent 1827d9c00b
commit 8399907be3
2 changed files with 32 additions and 0 deletions

View file

@ -119,6 +119,11 @@ let
sha256 = "sha256-1KnYHz9ntKbgfLeoDcsQrV6RdvzDB2LHCoFYCmS4sLY=";
};
patches = [
# https://savannah.gnu.org/bugs/?func=detailitem&item_id=62436
./patches/bug62436.patch
];
buildInputs = [
readline
ncurses

View file

@ -0,0 +1,27 @@
# HG changeset patch
# User John Donoghue <john.donoghue@ieee.org>
# Date 1652358904 14400
# Thu May 12 08:35:04 2022 -0400
# Branch stable
# Node ID 8c940cfcce257369677c09154da2aab2c56eaa79
# Parent 63710f3bd9811c2d206ac9e7b4f47cf06c47e153
* scripts/pkg/private/build.m: check configure and Makefile exist before trying to unlink them (Bug #62436)
diff -r 63710f3bd981 -r 8c940cfcce25 scripts/pkg/private/build.m
--- a/scripts/pkg/private/build.m Wed May 11 09:44:55 2022 -0700
+++ b/scripts/pkg/private/build.m Thu May 12 08:35:04 2022 -0400
@@ -77,8 +77,12 @@
else
arch_abi = getarch ();
configure_make (desc, build_root, verbose);
- unlink (fullfile (build_root, "src", "configure"));
- unlink (fullfile (build_root, "src", "Makefile"));
+ if exist (fullfile (build_root, "src", "configure"), "file")
+ unlink (fullfile (build_root, "src", "configure"));
+ endif
+ if exist (fullfile (build_root, "src", "Makefile"), "file")
+ unlink (fullfile (build_root, "src", "Makefile"));
+ endif
endif
tar_name = [desc.name "-" desc.version "-" arch_abi ".tar"];
tar_path = fullfile (builddir, tar_name);