[134244] trunk/dports/math/octave-interval
michaelld at macports.org
michaelld at macports.org
Fri Mar 20 07:57:23 PDT 2015
Revision: 134244
https://trac.macports.org/changeset/134244
Author: michaelld at macports.org
Date: 2015-03-20 07:57:23 -0700 (Fri, 20 Mar 2015)
Log Message:
-----------
octave-interval:
+ update to 0.1.4, addresses ticket #47199;
+ add patches for code clarity and verboseness;
+ requires C++11, so try to force use of a C++11 compiler depending on which stdlib is in use.
Modified Paths:
--------------
trunk/dports/math/octave-interval/Portfile
Added Paths:
-----------
trunk/dports/math/octave-interval/files/
trunk/dports/math/octave-interval/files/patch-src_Makefile.diff
trunk/dports/math/octave-interval/files/patch-src_mpfr_function_d.cc.diff
Modified: trunk/dports/math/octave-interval/Portfile
===================================================================
--- trunk/dports/math/octave-interval/Portfile 2015-03-20 14:52:09 UTC (rev 134243)
+++ trunk/dports/math/octave-interval/Portfile 2015-03-20 14:57:23 UTC (rev 134244)
@@ -3,8 +3,9 @@
PortSystem 1.0
PortGroup octave 1.0
+PortGroup compiler_blacklist_versions 1.0
-octave.setup interval 0.1.3
+octave.setup interval 0.1.4
platforms darwin
license GPL-3+ Apache-2
maintainers nomaintainer
@@ -13,7 +14,40 @@
inf-sup format is based on interval boundaries represented by \
binary64 numbers and is standard conforming to IEEE 1788.
-checksums rmd160 e377be8a80cd0904b750fb903153341bb9e68a4b \
- sha256 d76313934f464d8b92f9b4a0dd07d55a18967df145c4cdbd9c5958c900599a0c
+checksums rmd160 284ba65f2e73fb0393efe3877b36fb962f5b5d62 \
+ sha256 6fe7a8deaf212fcd586f802db43ff8ab4192471b2946f982f449d16f6552cec9
depends_lib-append port:mpfr port:gmp
+
+patchfiles-append \
+ patch-src_Makefile.diff \
+ patch-src_mpfr_function_d.cc.diff
+
+# octave-interval requires <cfenv>, which is part of C++0x and newer.
+# require c++11
+
+if {${configure.cxx_stdlib} eq "libstdc++"} {
+
+ # *clang* when using libstdc++ do not seem to support C++11;
+ # C++11 support seems to need GCC 4.7+ when using libstdc++;
+ # could use C++0x support on GCC4.[56], but just ignore it since
+ # there are newer compilers already in place as defaults.
+
+ # Blacklist GCC compilers not supporting C++11 and all CLANG.
+ # This is probably not necessary, but it's good practice.
+
+ compiler.blacklist-append *clang* {*gcc-3*} {*gcc-4.[0-6]}
+
+ # and whitelist those we do want to use. wish there were a better way.
+ # these will be used in the order provided.
+
+ compiler.whitelist macports-gcc-4.9 macports-gcc-4.8 macports-gcc-4.7
+
+} else {
+
+ # using libc++;
+ # Blacklist Clang not supporting C++11 in some form and all GCC.
+
+ compiler.blacklist-append *gcc* {clang < 500}
+
+}
Added: trunk/dports/math/octave-interval/files/patch-src_Makefile.diff
===================================================================
--- trunk/dports/math/octave-interval/files/patch-src_Makefile.diff (rev 0)
+++ trunk/dports/math/octave-interval/files/patch-src_Makefile.diff 2015-03-20 14:57:23 UTC (rev 134244)
@@ -0,0 +1,13 @@
+--- src/Makefile.orig 2015-03-19 11:08:20.000000000 -0400
++++ src/Makefile 2015-03-19 11:08:29.000000000 -0400
+@@ -12,8 +12,8 @@
+
+ ## MPFR api oct-files
+ mpfr_%.oct: mpfr_%.cc mpfr_commons.cc
+- $(MKOCTFILE) -o $@ $(LDFLAGS_MPFR) $<
++ $(MKOCTFILE) -v -o $@ $(LDFLAGS_MPFR) $<
+
+ ## cfenv api oct-file
+ __setround__.oct: __setround__.cc
+- CXXFLAGS="$(CPP11_CXXFLAGS)" $(MKOCTFILE) -o $@ $<
++ CXXFLAGS="$(CPP11_CXXFLAGS)" $(MKOCTFILE) -v -o $@ $<
Added: trunk/dports/math/octave-interval/files/patch-src_mpfr_function_d.cc.diff
===================================================================
--- trunk/dports/math/octave-interval/files/patch-src_mpfr_function_d.cc.diff (rev 0)
+++ trunk/dports/math/octave-interval/files/patch-src_mpfr_function_d.cc.diff 2015-03-20 14:57:23 UTC (rev 134244)
@@ -0,0 +1,25 @@
+--- src/mpfr_function_d.cc.orig 2015-03-19 11:07:25.000000000 -0400
++++ src/mpfr_function_d.cc 2015-03-19 11:07:30.000000000 -0400
+@@ -106,19 +106,19 @@
+ bool scalar2 = arg2.numel () == 1;
+ bool scalar3 = arg3.numel () == 1;
+
+- if (scalar1)
++ if (scalar1) {
+ // arg1 shall contain the result and must possibly be resized
+ if (!scalar2)
+ {
+ arg1 = Matrix (arg2.dims (), arg1.elem (0));
+ scalar1 = false;
+ }
+- else if (!scalar3)
++ else { if (!scalar3)
+ {
+ arg1 = Matrix (arg3.dims (), arg1.elem (0));
+ scalar1 = false;
+ }
+-
++ } }
+ const unsigned int n = std::max (std::max (arg1.numel (), arg2.numel ()),
+ arg3.numel ());
+ for (octave_idx_type i = 0; i < n; i ++)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150320/1fcc6fab/attachment.html>
More information about the macports-changes
mailing list