Skip to content

Commit

Permalink
octave: update version 4.2.2->4.4.0
Browse files Browse the repository at this point in the history
Fixes https://trac.macports.org/ticket/56480
Fixes https://trac.macports.org/ticket/51707

See #1827
for all of the initial work on this issue
  • Loading branch information
MarcusCalhoun-Lopez committed Jun 2, 2018
1 parent 5a7a91f commit aec1479
Show file tree
Hide file tree
Showing 93 changed files with 1,569 additions and 699 deletions.
35 changes: 34 additions & 1 deletion _resources/port1.0/group/octave-1.0.tcl
Expand Up @@ -10,7 +10,12 @@
#
# where module is the name of the module (e.g. communications)

options octave.module
options octave.module octave.config_h

# do not use this option unless absolutely necessary
# see comments below
# this should eventually be removed
default octave.config_h {no}

# some header files from Octave require C++-11
PortGroup cxx11 1.1
Expand Down Expand Up @@ -205,3 +210,31 @@ post-activate {
set octave_install_lib ${prefix}/lib/octave/packages
system "${prefix}/bin/octave-cli -q -f -H --eval 'try; pkg prefix ${octave_install_share} ${octave_install_lib}; pkg -verbose -global rebuild; disp(lasterror.message); catch; exit(1); end_try_catch;'"
}

# octave/config.h was removed from octave 4.4
# some packages, however, still depend on it for information
# see https://savannah.gnu.org/bugs/?41027
# eventually, this code should be removed
default compiler.cpath {[octave._cpath]}
proc octave._cpath {} {
global prefix octave.config_h worksrcpath
if {${octave.config_h}} {
return "${prefix}/include ${worksrcpath}/macports_compat ${worksrcpath}/macports_compat/octave"
} else {
return ${prefix}/include
}
}

pre-configure {
if {${octave.config_h}} {
xinstall -d -m 0755 ${worksrcpath}/macports_compat/octave
set configf [open "${worksrcpath}/macports_compat/octave/config.h" w 0644]

puts ${configf} "#include <octave/octave-config.h>"
foreach v {LOCALVERFCNFILEDIR LOCALVEROCTFILEDIR LOCALVERARCHLIBDIR CANONICAL_HOST_TYPE} {
set mv [exec ${prefix}/bin/octave-config -p ${v}]
puts ${configf} "#define OCTAVE_${v} \"${mv}\""
}
close ${configf}
}
}
2 changes: 1 addition & 1 deletion aqua/qtoctave-mac/Portfile
Expand Up @@ -6,7 +6,7 @@ PortGroup cmake 1.0

name qtoctave-mac
version 0.10.1
revision 2
revision 3
categories aqua math
license GPL-2+
platforms darwin
Expand Down
1 change: 1 addition & 0 deletions audio/libsndfile/Portfile
Expand Up @@ -4,6 +4,7 @@ PortSystem 1.0

name libsndfile
version 1.0.28
revision 1
categories audio
maintainers {stare.cz:hans @janstary}
platforms darwin
Expand Down
2 changes: 1 addition & 1 deletion math/DSDP/Portfile
Expand Up @@ -5,7 +5,7 @@ PortGroup muniversal 1.0

name DSDP
version 5.8
revision 4
revision 5
categories math science
platforms darwin
maintainers nomaintainer
Expand Down
3 changes: 2 additions & 1 deletion math/octave-audio/Portfile
Expand Up @@ -4,7 +4,8 @@ PortSystem 1.0
PortGroup octave 1.0

octave.setup audio 1.1.4
revision 3
octave.config_h yes
revision 4
platforms darwin
license GPL-2+ public-domain
maintainers nomaintainer
Expand Down
20 changes: 20 additions & 0 deletions math/octave-audio/files/patch-configure.diff
@@ -0,0 +1,20 @@
--- src/configure.orig 2009-06-07 04:26:53.000000000 -0700
+++ src/configure 2018-05-21 05:24:47.000000000 -0700
@@ -2867,7 +2867,7 @@
#if test -z "$mpath" || test -z "$opath" || test -z "$xpath" || test -z "$altmpath" || test -z "$altopath" || test -z "$ver" ; then
if test -z "$mpath" || test -z "$opath" || test -z "$xpath" || test -z "$ver" ; then
cat > conftest.cc <<EOF
-#include <octave/config.h>
+#include <octave/octave-config.h>
#include <octave/version.h>
#include <octave/defaults.h>

@@ -2956,7 +2956,7 @@
{ $as_echo "$as_me:$LINENO: checking for F77_FUNC" >&5
$as_echo_n "checking for F77_FUNC... " >&6; }
cat > conftest.cc << EOF
-#include <octave/config.h>
+#include <octave/octave-config.h>
int F77_FUNC (hello, HELLO) (const int &n);
EOF
ac_try="$MKOCTFILE -c conftest.cc"
3 changes: 2 additions & 1 deletion math/octave-communications/Portfile
Expand Up @@ -4,7 +4,8 @@ PortSystem 1.0
PortGroup octave 1.0

octave.setup communications 1.2.1
revision 3
octave.config_h yes
revision 4
platforms darwin
license GPL-3+
maintainers nomaintainer
Expand Down
2 changes: 1 addition & 1 deletion math/octave-control/Portfile
Expand Up @@ -5,7 +5,7 @@ PortGroup octave 1.0
PortGroup compilers 1.0

octave.setup control 3.1.0
revision 1
revision 2
platforms darwin
license GPL-3+
maintainers {mps @Schamschula} openmaintainer
Expand Down
1 change: 1 addition & 0 deletions math/octave-database/Portfile
Expand Up @@ -4,6 +4,7 @@ PortSystem 1.0
PortGroup octave 1.0

octave.setup database 2.4.3
revision 1
platforms darwin
license GPL-3+
maintainers {mps @Schamschula} openmaintainer
Expand Down
4 changes: 3 additions & 1 deletion math/octave-doctest/Portfile
Expand Up @@ -4,7 +4,7 @@ PortSystem 1.0
PortGroup octave 1.0

octave.setup doctest 0.6.0
revision 1
revision 2
platforms darwin
license GPL-2+
maintainers {mps @Schamschula} openmaintainer
Expand All @@ -15,3 +15,5 @@ long_description ${description} It then executes the code and confirms the ou

checksums rmd160 1540310ae8daf66db9560412865143a97a380af8 \
sha256 b23f697e5386dacd7cf0a4ad654a982199faa96b52db6d5b0b1c912592b77570

supported_archs noarch
2 changes: 1 addition & 1 deletion math/octave-econometrics/Portfile
Expand Up @@ -4,7 +4,7 @@ PortSystem 1.0
PortGroup octave 1.0

octave.setup econometrics 1.1.1
revision 3
revision 4
platforms darwin
license GPL-3+
maintainers nomaintainer
Expand Down
2 changes: 1 addition & 1 deletion math/octave-fits/Portfile
Expand Up @@ -4,7 +4,7 @@ PortSystem 1.0
PortGroup octave 1.0

octave.setup fits 1.0.7
revision 3
revision 4
platforms darwin
license GPL-2+
maintainers {mps @Schamschula} openmaintainer
Expand Down
2 changes: 1 addition & 1 deletion math/octave-fl-core/Portfile
Expand Up @@ -4,7 +4,7 @@ PortSystem 1.0
PortGroup octave 1.0

octave.setup fl-core 1.0.0
revision 3
revision 4
platforms darwin
license GPL-2+
maintainers {mps @Schamschula} openmaintainer
Expand Down
19 changes: 13 additions & 6 deletions math/octave-fl-core/files/patch-src-fl_compose.cc.diff
@@ -1,12 +1,19 @@
--- src/fl_compose.cc.orig 2011-02-06 13:09:03.000000000 -0600
+++ src/fl_compose.cc 2014-11-26 15:09:20.000000000 -0600
@@ -20,7 +20,8 @@

--- src/fl_compose.cc.orig 2011-02-06 12:09:03.000000000 -0700
+++ src/fl_compose.cc 2018-05-21 14:23:42.000000000 -0700
@@ -21,6 +21,7 @@
#include <octave/oct.h>
#include <octave/parse.h>
-#include <pthread.h>
+#include <pthread.h>
#include <pthread.h>
+#include <unistd.h>

#define HELP \
"-*- texinfo -*-\n\
@@ -465,7 +466,7 @@
float tnorm_val;

// Initialize the result sparse matrix
- sparseC = SparseMatrix((int)colsB, (int)rowsA, (int)(colsB*rowsA));
+ sparseC = SparseMatrix((octave_idx_type)colsB, (octave_idx_type)rowsA, (octave_idx_type)(colsB*rowsA));

// Initialize the number of nonzero elements in the sparse matrix c
int nel = 0;
5 changes: 4 additions & 1 deletion math/octave-fuzzy-logic-toolkit/Portfile
Expand Up @@ -4,7 +4,7 @@ PortSystem 1.0
PortGroup octave 1.0

octave.setup fuzzy-logic-toolkit 0.4.5
revision 3
revision 4
platforms darwin
license GPL-2+
maintainers {mps @Schamschula} openmaintainer
Expand All @@ -15,3 +15,6 @@ checksums rmd160 8539fa54e2b9977981914fd585ce4c0b59dc1c8d \
sha256 b4c24ac48662ce413599721d2565e9eabf23ead6b9b36863d33740920aec4133

supported_archs noarch

# see https://savannah.gnu.org/bugs/?53549
patchfiles-append patch-anonymous.diff
61 changes: 61 additions & 0 deletions math/octave-fuzzy-logic-toolkit/files/patch-anonymous.diff
@@ -0,0 +1,61 @@
--- inst/defuzz.m
+++ inst/defuzz.m
@@ -1,4 +1,4 @@
-## Copyright (C) 2011-2014 L. Markowsky <lmarkov@users.sourceforge.net>
+## Copyright (C) 2011-2018 L. Markowsky <lmarkov@users.sourceforge.net>
##
## This file is part of the fuzzy-logic-toolkit.
##
@@ -162,7 +162,16 @@
function crisp_x = mom (x, y)

max_y = max (y);
- y_val = @(y_val) if (y_val == max_y) 1 else 0 endif;
+
+ function y_val = calc_yval(y_val)
+ if (y_val == max_y)
+ y_val = 1;
+ else
+ y_val = 0;
+ endif
+ endfunction
+
+ y_val = @(y_val) calc_yval(y_val);
max_y_locations = arrayfun (y_val, y);
crisp_x = sum (x .* max_y_locations) / sum (max_y_locations);

@@ -185,7 +194,16 @@
function crisp_x = som (x, y)

max_y = max (y);
- y_val = @(y_val) if (y_val == max_y) 1 else (NaN) endif;
+
+ function y_val = calc_yval(y_val)
+ if (y_val == max_y)
+ y_val = 1;
+ else
+ y_val = (NaN);
+ endif
+ endfunction
+
+ y_val = @(y_val) calc_yval(y_val);
max_y_locations = arrayfun (y_val, y);
crisp_x = min (x .* max_y_locations);

@@ -207,7 +225,16 @@
function crisp_x = lom (x, y)

max_y = max (y);
- y_val = @(y_val) if (y_val == max_y) 1 else (NaN) endif;
+
+ function y_val = calc_yval(y_val)
+ if (y_val == max_y)
+ y_val = 1;
+ else
+ y_val = (NaN);
+ endif
+ endfunction
+
+ y_val = @(y_val) calc_yval(y_val);
max_y_locations = arrayfun (y_val, y);
crisp_x = max (x .* max_y_locations);
1 change: 1 addition & 0 deletions math/octave-general/Portfile
Expand Up @@ -4,6 +4,7 @@ PortSystem 1.0
PortGroup octave 1.0

octave.setup general 2.1.0
revision 1
platforms darwin
license GPL-3+ BSD public-domain
maintainers {mps @Schamschula} openmaintainer
Expand Down
4 changes: 1 addition & 3 deletions math/octave-geometry/Portfile
Expand Up @@ -4,7 +4,7 @@ PortSystem 1.0
PortGroup octave 1.0

octave.setup geometry 3.0.0
revision 3
revision 4
platforms darwin
license GPL-2+
maintainers {mps @Schamschula} openmaintainer
Expand All @@ -17,5 +17,3 @@ checksums rmd160 60ac95bca886646229483e8c940b1f7d80bef4f4 \
sha256 76014bf3477b8c23b173dfe0e57a7e191f2318722123028d70f2ce0ea23ec8a8

depends_lib-append port:octave-general

supported_archs noarch
2 changes: 1 addition & 1 deletion math/octave-gsl/Portfile
Expand Up @@ -4,7 +4,7 @@ PortSystem 1.0
PortGroup octave 1.0

octave.setup gsl 2.1.0
revision 1
revision 2
platforms darwin
license GPL-2+
maintainers {mps @Schamschula} openmaintainer
Expand Down
2 changes: 1 addition & 1 deletion math/octave-image/Portfile
Expand Up @@ -5,7 +5,7 @@ PortGroup cxx11 1.1
PortGroup octave 1.0

octave.setup image 2.6.2
revision 1
revision 2
platforms darwin
license GPL-3+ MIT FreeBSD
maintainers {mps @Schamschula} openmaintainer
Expand Down
2 changes: 1 addition & 1 deletion math/octave-interval/Portfile
Expand Up @@ -5,7 +5,7 @@ PortGroup octave 1.0
PortGroup compiler_blacklist_versions 1.0

octave.setup interval 3.1.0
revision 2
revision 3
platforms darwin
license GPL-3+
maintainers {mps @Schamschula} openmaintainer
Expand Down
1 change: 1 addition & 0 deletions math/octave-io/Portfile
Expand Up @@ -4,6 +4,7 @@ PortSystem 1.0
PortGroup octave 1.0

octave.setup io 2.4.11
revision 1
platforms darwin
license GPL-3+ BSD
maintainers {mps @Schamschula} openmaintainer
Expand Down
3 changes: 2 additions & 1 deletion math/octave-linear-algebra/Portfile
Expand Up @@ -4,7 +4,8 @@ PortSystem 1.0
PortGroup octave 1.0

octave.setup linear-algebra 2.2.2
revision 4
octave.config_h yes
revision 5
platforms darwin
license GPL-3+ LGPL-3+ FreeBSD
maintainers {mps @Schamschula} openmaintainer
Expand Down
1 change: 1 addition & 0 deletions math/octave-ltfat/Portfile
Expand Up @@ -5,6 +5,7 @@ PortGroup octave 1.0
PortGroup compilers 1.0

octave.setup ltfat 2.3.0
revision 1
checksums rmd160 e2cef3751741523a93abbf0a615e51151ea056d1 \
sha256 57207cd922a7a52725fc9e3a24e651c2407d288265b93e43040f33821e23212a

Expand Down
2 changes: 1 addition & 1 deletion math/octave-mapping/Portfile
Expand Up @@ -4,7 +4,7 @@ PortSystem 1.0
PortGroup octave 1.0

octave.setup mapping 1.2.1
revision 3
revision 4
platforms darwin
license GPL-2+
maintainers {mps @Schamschula} openmaintainer
Expand Down
2 changes: 1 addition & 1 deletion math/octave-mechanics/Portfile
Expand Up @@ -4,7 +4,7 @@ PortSystem 1.0
PortGroup octave 1.0

octave.setup mechanics 1.3.1
revision 3
revision 4
platforms darwin
license GPL-2+
maintainers {mps @Schamschula} openmaintainer
Expand Down
2 changes: 1 addition & 1 deletion math/octave-miscellaneous/Portfile
Expand Up @@ -4,7 +4,7 @@ PortSystem 1.0
PortGroup octave 1.0

octave.setup miscellaneous 1.2.1
revision 3
revision 4
platforms darwin
license GPL-3+
maintainers nomaintainer
Expand Down
4 changes: 1 addition & 3 deletions math/octave-msh/Portfile
Expand Up @@ -4,7 +4,7 @@ PortSystem 1.0
PortGroup octave 1.0

octave.setup msh 1.0.10
revision 3
revision 4
platforms darwin
license GPL-2+
maintainers nomaintainer
Expand All @@ -21,5 +21,3 @@ checksums rmd160 bd13e148fca05cfa2092f041ee1a542394ec0498 \
depends_lib-append port:octave-splines

patchfiles-append patch-src_Makefile.in.diff

supported_archs noarch

0 comments on commit aec1479

Please sign in to comment.