[105514] trunk/dports/math/octave

michaelld at macports.org michaelld at macports.org
Tue Apr 23 08:25:19 PDT 2013


Revision: 105514
          https://trac.macports.org/changeset/105514
Author:   michaelld at macports.org
Date:     2013-04-23 08:25:19 -0700 (Tue, 23 Apr 2013)
Log Message:
-----------
octave:
* whitespace and rearranging;
* add new patchfiles, to handle compiler/system-generic source code
  tweaks for more correct/restrictive building;
* remove "-I${prefix}/include" from build system to make use of CPATH
  instead, which should allow octave to build correctly no matter what
  is already installed;
* addresses ticket #38694 (and more).

Modified Paths:
--------------
    trunk/dports/math/octave/Portfile

Added Paths:
-----------
    trunk/dports/math/octave/files/patch-liboctave_oct-alloc.h.diff
    trunk/dports/math/octave/files/patch-liboctave_oct-inttypes.h.diff
    trunk/dports/math/octave/files/patch-src_pr-output.cc.diff

Modified: trunk/dports/math/octave/Portfile
===================================================================
--- trunk/dports/math/octave/Portfile	2013-04-23 13:15:41 UTC (rev 105513)
+++ trunk/dports/math/octave/Portfile	2013-04-23 15:25:19 UTC (rev 105514)
@@ -49,6 +49,18 @@
                     port:SuiteSparse \
                     port:gsed
 
+patchfiles \
+    patch-configure-no_x11.diff \
+    patch-liboctave_oct-alloc.h.diff \
+    patch-liboctave_oct-inttypes.h.diff \
+    patch-lo-specfun.cc.diff \
+    patch-src_pr-output.cc.diff \
+    patch-urlwrite.cc.diff
+
+post-patch {
+    reinplace "s|-lcholmod|-lcholmod -lmetis|g" ${worksrcpath}/configure
+}
+
 configure.args      --enable-shared \
                     --enable-dl \
                     --with-hdf5 \
@@ -75,9 +87,13 @@
                     TEXI2DVI="${prefix}/bin/texi2dvi" \
                     TEXI2PDF="${prefix}/bin/texi2pdf"
 
+configure.cppflags
+
 post-configure {
     reinplace "s|UMFPACK_LIBS = -lumfpack|UMFPACK_LIBS = -lSuiteSparse -lumfpack|" ${worksrcpath}/Makeconf
-}   
+    reinplace "s|-I${prefix}/include ||g" ${worksrcpath}/Makeconf
+    reinplace "s|-I${prefix}/include$||g" ${worksrcpath}/Makeconf
+}
 
 use_parallel_build  no
 universal_variant   no
@@ -88,6 +104,7 @@
 variant atlas conflicts accelerate description {use BLAS from ATLAS} {
     depends_lib-append port:atlas
 }
+
 variant accelerate conflicts atlas description {use BLAS from Accelerate.framework} {
     if {![variant_isset g95]} {
         configure.fflags-append -ff2c
@@ -98,6 +115,7 @@
     }
     configure.args-append   --with-lapack="-framework Accelerate"
 }
+
 if {[variant_isset g95]} {
     default_variants +accelerate
 } elseif {![variant_isset accelerate]} {
@@ -142,18 +160,13 @@
 if { ![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset g95] } {
     default_variants +gcc47
 }
+
 if {![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset gcc47] && ![variant_isset g95]} {
     pre-fetch {
         return -code error "You must use one of the compiler variants."
     }
 }
 
-patchfiles patch-lo-specfun.cc.diff patch-configure-no_x11.diff patch-urlwrite.cc.diff
-
-post-patch {
-    reinplace "s|-lcholmod|-lcholmod -lmetis|g" ${worksrcpath}/configure
-}
-
 livecheck.type      regex
 livecheck.url       http://www.gnu.org/software/octave/news.html
 livecheck.regex     Version (\\d+(\\.\\d+)*)

Added: trunk/dports/math/octave/files/patch-liboctave_oct-alloc.h.diff
===================================================================
--- trunk/dports/math/octave/files/patch-liboctave_oct-alloc.h.diff	                        (rev 0)
+++ trunk/dports/math/octave/files/patch-liboctave_oct-alloc.h.diff	2013-04-23 15:25:19 UTC (rev 105514)
@@ -0,0 +1,13 @@
+--- liboctave/oct-alloc.h.orig	2013-04-23 10:09:26.000000000 -0400
++++ liboctave/oct-alloc.h	2013-04-23 10:09:09.000000000 -0400
+@@ -24,6 +24,10 @@
+ #if !defined (octave_oct_alloc_h)
+ #define octave_oct_alloc_h 1
+ 
++#if !defined(size_t) && defined(HAVE_SYS_TYPES_H)
++#include <sys/types.h>
++#endif
++
+ class
+ OCTAVE_API
+ octave_allocator

Added: trunk/dports/math/octave/files/patch-liboctave_oct-inttypes.h.diff
===================================================================
--- trunk/dports/math/octave/files/patch-liboctave_oct-inttypes.h.diff	                        (rev 0)
+++ trunk/dports/math/octave/files/patch-liboctave_oct-inttypes.h.diff	2013-04-23 15:25:19 UTC (rev 105514)
@@ -0,0 +1,20 @@
+--- liboctave/oct-inttypes.h.orig	2013-04-23 09:15:24.000000000 -0400
++++ liboctave/oct-inttypes.h	2013-04-23 09:15:55.000000000 -0400
+@@ -416,7 +416,7 @@
+     {
+       // Promotion type for multiplication (if exists).
+       typedef typename query_integer_type<2*sizeof (T), false>::type mptype;
+-      return truncate_int (static_cast<mptype> (x) 
++      return octave_int_base<T>::truncate_int (static_cast<mptype> (x) 
+                            * static_cast<mptype> (y));
+     }
+ 
+@@ -669,7 +669,7 @@
+     {
+       // Promotion type for multiplication (if exists).
+       typedef typename query_integer_type<2*sizeof (T), true>::type mptype;
+-      return truncate_int (static_cast<mptype> (x) 
++      return octave_int_base<T>::truncate_int (static_cast<mptype> (x) 
+                            * static_cast<mptype> (y));
+     }
+ 

Added: trunk/dports/math/octave/files/patch-src_pr-output.cc.diff
===================================================================
--- trunk/dports/math/octave/files/patch-src_pr-output.cc.diff	                        (rev 0)
+++ trunk/dports/math/octave/files/patch-src_pr-output.cc.diff	2013-04-23 15:25:19 UTC (rev 105514)
@@ -0,0 +1,11 @@
+--- src/pr-output.cc.orig	2013-04-23 10:01:54.000000000 -0400
++++ src/pr-output.cc	2013-04-23 10:02:49.000000000 -0400
+@@ -2854,7 +2854,7 @@
+ }
+ 
+ #define INSTANTIATE_ABS(T) \
+-  template /* static */ inline T abs (T)
++  template /* static */ T abs (T)
+ 
+ INSTANTIATE_ABS(signed char);
+ INSTANTIATE_ABS(short);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130423/8b9dc71c/attachment.html>


More information about the macports-changes mailing list