summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authornoguchi-k <55966120+noguchi-k@users.noreply.github.com>2020-01-09 03:41:39 +0900
committerAdam J. Stewart <ajstewart426@gmail.com>2020-01-08 12:41:39 -0600
commitf79649d2e3cf7f6e2f56ffb45618945b1058fb2f (patch)
tree48a12c386a43941c45211fda46f73bb75feb8b2f /var
parent26ffbe3d216cca82838915d56033b3b132f35b52 (diff)
downloadspack-f79649d2e3cf7f6e2f56ffb45618945b1058fb2f.tar.gz
spack-f79649d2e3cf7f6e2f56ffb45618945b1058fb2f.tar.bz2
spack-f79649d2e3cf7f6e2f56ffb45618945b1058fb2f.tar.xz
spack-f79649d2e3cf7f6e2f56ffb45618945b1058fb2f.zip
lrslib: fix return value (#14422)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/lrslib/fix-return-value.patch38
-rw-r--r--var/spack/repos/builtin/packages/lrslib/package.py2
2 files changed, 40 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/lrslib/fix-return-value.patch b/var/spack/repos/builtin/packages/lrslib/fix-return-value.patch
new file mode 100644
index 0000000000..ab18cb8cac
--- /dev/null
+++ b/var/spack/repos/builtin/packages/lrslib/fix-return-value.patch
@@ -0,0 +1,38 @@
+--- spack-src/lrsnashlib.c.org 2020-01-08 13:22:31.512928411 +0900
++++ spack-src/lrsnashlib.c 2020-01-08 13:24:51.047429971 +0900
+@@ -52,7 +52,7 @@
+
+ Q1 = lrs_alloc_dat("LRS globals"); /* allocate and init structure for static problem data */
+ if (Q1 == NULL) {
+- return;
++ return 1;
+ }
+
+ Q1->nash = TRUE;
+@@ -64,7 +64,7 @@
+
+ P1 = lrs_alloc_dic(Q1); /* allocate and initialize lrs_dic */
+ if (P1 == NULL) {
+- return;
++ return 1;
+ }
+
+ BuildRep(P1, Q1, g, 1, 0);
+@@ -74,7 +74,7 @@
+ /* allocate and init structure for player 2's problem data */
+ Q2 = lrs_alloc_dat("LRS globals");
+ if (Q2 == NULL) {
+- return;
++ return 1;
+ }
+
+ Q2->debug = Debug_flag;
+@@ -86,7 +86,7 @@
+
+ P2orig = lrs_alloc_dic(Q2); /* allocate and initialize lrs_dic */
+ if (P2orig == NULL) {
+- return;
++ return 1;
+ }
+ BuildRep(P2orig, Q2, g, 0, 1);
+ A2orig = P2orig->A;
diff --git a/var/spack/repos/builtin/packages/lrslib/package.py b/var/spack/repos/builtin/packages/lrslib/package.py
index a9e5c03bf3..a1ec47d3df 100644
--- a/var/spack/repos/builtin/packages/lrslib/package.py
+++ b/var/spack/repos/builtin/packages/lrslib/package.py
@@ -27,6 +27,8 @@ class Lrslib(Package):
depends_on("libtool", type="build")
patch("Makefile.spack.patch")
+ # Ref: https://github.com/mkoeppe/lrslib/commit/2e8c5bd6c06430151faea5910f44aa032c4178a9
+ patch('fix-return-value.patch')
def url_for_version(self, version):
url = "http://cgm.cs.mcgill.ca/~avis/C/lrslib/archive/lrslib-0{0}.tar.gz"