Skip to content
Permalink
Browse files

octave: apply upstream patch to fix etree

  • Loading branch information...
MarcusCalhoun-Lopez committed Jan 14, 2019
1 parent 003b5f9 commit 8b73968b2a7376ddcd920c9ae86d979350473625
Showing with 24 additions and 1 deletion.
  1. +4 −1 math/octave/Portfile
  2. +20 −0 math/octave/files/patch-etree.diff
@@ -13,7 +13,7 @@ compiler.blacklist-append {*gcc-4.6} {clang < 700}
name octave
version 4.4.1
set package_version 4.x.x
revision 2
revision 3
categories math science
platforms darwin
license GPL-3+
@@ -66,6 +66,9 @@ patchfiles-append patch-versions.diff
# reports of `__opengl_info__` not working the first time
patchfiles-append patch-__opengl_info__.diff

# apply upstream fix: https://hg.savannah.gnu.org/hgweb/octave/rev/0c7a9fa16998
patchfiles-append patch-etree.diff

post-patch {
if { ${os.arch} eq "i386" } {
if { ${os.major} >= 9 && [sysctl hw.cpu64bit_capable] == 1 } {
@@ -0,0 +1,20 @@
--- libinterp/dldfcn/colamd.cc.orig 2018-08-09 11:20:32.000000000 -0700
+++ libinterp/dldfcn/colamd.cc 2019-01-14 09:23:27.000000000 -0700
@@ -68,7 +68,7 @@
for (octave_idx_type p = cidx[kk] ; p < p2 ; p++)
{
// A (i,k) is nonzero (original or permuted A)
- octave_idx_type i = (Pinv) ? (Pinv[ridx[p]]) : (ridx[p]);
+ octave_idx_type i = (P ? Pinv[ridx[p]] : ridx[p]);
if (i < k)
{
// follow path from i to root of etree, stop at flagged node
@@ -675,7 +675,7 @@
octave_idx_type *ridx = nullptr;
octave_idx_type *cidx = nullptr;

- if (args(0).issparse ())
+ if (! args(0).issparse ())
error ("etree: S must be a sparse matrix");

if (args(0).iscomplex ())

0 comments on commit 8b73968

Please sign in to comment.
You can’t perform that action at this time.