Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 May 2018 21:34:01 +0000 (UTC)
From:      Stephen Montgomery-Smith <stephen@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r469973 - in head/math/octave-forge-tisean: . files
Message-ID:  <201805142134.w4ELY1X5080448@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: stephen
Date: Mon May 14 21:34:01 2018
New Revision: 469973
URL: https://svnweb.freebsd.org/changeset/ports/469973

Log:
  - Add patches to unbreak.
  - Bump portrevision (since octave upgraded to 4.4.0).
  
  Obtained from:	https://sourceforge.net/p/octave/tisean/ci/default/tree/ except I added the -fPIC to Makefile.in.

Added:
  head/math/octave-forge-tisean/files/
  head/math/octave-forge-tisean/files/patch-Makefile.in   (contents, props changed)
  head/math/octave-forge-tisean/files/patch-____c1____.cc   (contents, props changed)
  head/math/octave-forge-tisean/files/patch-____surrogates____.cc   (contents, props changed)
  head/math/octave-forge-tisean/files/patch-____upo____.cc   (contents, props changed)
  head/math/octave-forge-tisean/files/patch-lazy.cc   (contents, props changed)
Modified:
  head/math/octave-forge-tisean/Makefile

Modified: head/math/octave-forge-tisean/Makefile
==============================================================================
--- head/math/octave-forge-tisean/Makefile	Mon May 14 21:16:04 2018	(r469972)
+++ head/math/octave-forge-tisean/Makefile	Mon May 14 21:34:01 2018	(r469973)
@@ -3,7 +3,7 @@
 
 PORTNAME=	octave-forge-tisean
 PORTVERSION=	0.2.3
-PORTREVISION=	5
+PORTREVISION=	6
 CATEGORIES=	math
 
 MAINTAINER=	stephen@FreeBSD.org
@@ -11,8 +11,6 @@ COMMENT=	Octave-forge package ${OCTAVE_PKGNAME}
 
 LICENSE=	GPLv3
 LICENSE_FILE=	${WRKDIR}/${OCTSRC}/COPYING
-
-BROKEN=		does not build with octave 4.4.0
 
 RUN_DEPENDS+=	${TARBALLS_DIR}/signal.tar.gz:math/octave-forge-signal
 

Added: head/math/octave-forge-tisean/files/patch-Makefile.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/octave-forge-tisean/files/patch-Makefile.in	Mon May 14 21:34:01 2018	(r469973)
@@ -0,0 +1,15 @@
+--- Makefile.in.orig	2018-05-14 21:28:27 UTC
++++ Makefile.in
+@@ -73,10 +73,10 @@ $(OCTFILES) : %.oct : %.cc
+ 	$(MKOCTFILE) $(CXXFLAGS) $< $(LIBS) -o $@
+ 
+ $(OCT_LINK_F): %.oct : %.cc $(OBJECTS_F) $(LIBS_F)
+-	$(MKOCTFILE) $(CXXFLAGS) $< $(OBJECTS_F) $(LIBS_F) -o $@
++	$(MKOCTFILE) -fPIC $(CXXFLAGS) $< $(OBJECTS_F) $(LIBS_F) -o $@
+ 
+ $(OCT_LINK_CC): %.oct : %.cc $(OBJECTS_CC)
+-	$(MKOCTFILE) $(CXXFLAGS) $< $(OBJECTS_CC) -o $@
++	$(MKOCTFILE) -fPIC $(CXXFLAGS) $< $(OBJECTS_CC) -o $@
+ 
+ PKG_ADD PKG_DEL: $(OCT_SOURCES)
+ 	$(SED) -n -e 's/.*$@: \(.*\)/\1/p' $^ > $@-t

Added: head/math/octave-forge-tisean/files/patch-____c1____.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/octave-forge-tisean/files/patch-____c1____.cc	Mon May 14 21:34:01 2018	(r469973)
@@ -0,0 +1,75 @@
+--- __c1__.cc.orig	2015-08-14 22:25:52 UTC
++++ __c1__.cc
+@@ -34,17 +34,24 @@ FOR INTERNAL USE ONLY"
+ #include <octave/f77-fcn.h>
+ #include <octave/oct-map.h>
+ 
++#if defined (OCTAVE_HAVE_F77_INT_TYPE)
++#  define TO_F77_INT(x) octave::to_f77_int (x)
++#else
++typedef octave_idx_type F77_INT;
++#  define TO_F77_INT(x) (x)
++#endif
++
+ extern "C"
+ {
+   F77_RET_T
+   F77_FUNC (d1, D1)
+-            (const octave_idx_type& nmax, const octave_idx_type& mmax,
+-             const octave_idx_type& nxx, const double *y,
+-             const octave_idx_type& delay, const octave_idx_type& m,
+-             const octave_idx_type& ncmin, const double& pr,
++            (const F77_INT& nmax, const F77_INT& mmax,
++             const F77_INT& nxx, const double *y,
++             const F77_INT& delay, const F77_INT& m,
++             const F77_INT& ncmin, const double& pr,
+              double& pln, double& eln, 
+-             const octave_idx_type& nmin, const octave_idx_type& kmax,
+-             const octave_idx_type& iverb);
++             const F77_INT& nmin, const F77_INT& kmax,
++             const F77_INT& iverb);
+ 
+   F77_RET_T
+   F77_FUNC (rand, RAND)
+@@ -66,23 +73,23 @@ DEFUN_DLD (__c1__, args, nargout, HELPTE
+     {
+     // Assigning inputs
+       Matrix input           = args(0).matrix_value ();
+-      octave_idx_type mindim = args(1).idx_type_value ();
+-      octave_idx_type maxdim = args(2).idx_type_value ();
+-      octave_idx_type delay  = args(3).idx_type_value ();
+-      octave_idx_type tmin   = args(4).idx_type_value ();
+-      octave_idx_type cmin   = args(5).idx_type_value ();
++      F77_INT mindim         = TO_F77_INT (args(1).idx_type_value ());
++      F77_INT maxdim         = TO_F77_INT (args(2).idx_type_value ());
++      F77_INT delay          = TO_F77_INT (args(3).idx_type_value ());
++      F77_INT tmin           = TO_F77_INT (args(4).idx_type_value ());
++      F77_INT cmin           = TO_F77_INT (args(5).idx_type_value ());
+       double resolution      = args(6).double_value ();
+       double seed            = args(7).double_value ();
+-      octave_idx_type kmax   = args(8).idx_type_value ();
++      F77_INT kmax           = TO_F77_INT (args(8).idx_type_value ());
+       bool verbose           = args(9).bool_value ();
+-      octave_idx_type iverb  = verbose;
++      F77_INT iverb          = TO_F77_INT (verbose);
+ 
+ 
+       if (! error_state)
+         {
+ 
+-          octave_idx_type lines_read   = input.rows (); //nmax in d1()
+-          octave_idx_type columns_read = input.columns ();
++          F77_INT lines_read   = TO_F77_INT (input.rows ()); //nmax in d1()
++          F77_INT columns_read = TO_F77_INT (input.columns ());
+ 
+ 
+           dim_vector dv (maxdim - mindim + 1, 1);
+@@ -94,7 +101,7 @@ DEFUN_DLD (__c1__, args, nargout, HELPTE
+           // Seed the rand() function for d1()
+           F77_XFCN (rand, RAND, (sqrt(seed)));
+ 
+-          for (octave_idx_type m = mindim; m <= maxdim; m++)
++          for (F77_INT m = mindim; m <= maxdim; m++)
+             {
+               octave_scalar_map tmp (keys);
+               tmp.setfield ("dim", m);

Added: head/math/octave-forge-tisean/files/patch-____surrogates____.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/octave-forge-tisean/files/patch-____surrogates____.cc	Mon May 14 21:34:01 2018	(r469973)
@@ -0,0 +1,57 @@
+--- __surrogates__.cc.orig	2015-08-14 22:25:52 UTC
++++ __surrogates__.cc
+@@ -34,14 +34,21 @@ FOR INTERNAL USE ONLY"
+ #include <octave/f77-fcn.h>
+ #include <octave/Cell.h>
+ 
++#if defined (OCTAVE_HAVE_F77_INT_TYPE)
++#  define TO_F77_INT(x) octave::to_f77_int (x)
++#else
++typedef octave_idx_type F77_INT;
++#  define TO_F77_INT(x) (x)
++#endif
++
+ extern "C"
+ {
+   F77_RET_T
+   F77_FUNC (ts_surrogates, TS_SURROGATES)
+-            (const double *xx, const octave_idx_type& nmaxp,
+-             const octave_idx_type& mcmax, const octave_idx_type& imax,
+-             const octave_idx_type& ispec, const double& seed, double *output,
+-             octave_idx_type& iterations, double& rel_discrepency);
++            (const double *xx, const F77_INT& nmaxp,
++             const F77_INT& mcmax, const F77_INT& imax,
++             const F77_INT& ispec, const double& seed, double *output,
++             F77_INT& iterations, double& rel_discrepency);
+ }
+ 
+ 
+@@ -59,15 +66,15 @@ DEFUN_DLD (__surrogates__, args, nargout
+     // Assigning inputs
+       Matrix input          = args(0).matrix_value ();
+       octave_idx_type nsur  = args(1).idx_type_value ();
+-      octave_idx_type imax  = args(2).idx_type_value ();
+-      octave_idx_type ispec = args(3).idx_type_value ();
++      F77_INT imax          = TO_F77_INT (args(2).idx_type_value ());
++      F77_INT ispec         = TO_F77_INT (args(3).idx_type_value ());
+       double seed           = args(4).double_value ();
+ 
+       if (! error_state)
+         {
+ 
+-          octave_idx_type nmaxp = input.rows ();
+-          octave_idx_type mcmax = input.columns ();
++          F77_INT nmaxp = TO_F77_INT (input.rows ());
++          F77_INT mcmax = TO_F77_INT (input.columns ());
+ 
+           Cell surro_data (dim_vector (nsur,1));
+           Matrix surro_tmp (input.dims ());
+@@ -75,7 +82,7 @@ DEFUN_DLD (__surrogates__, args, nargout
+ 
+           for (octave_idx_type i = 0; i < nsur; i++)
+             {
+-              octave_idx_type it_tmp;
++              F77_INT it_tmp;
+               double rel_discrepency_tmp;
+ 
+               F77_XFCN (ts_surrogates, TS_SURROGATES,

Added: head/math/octave-forge-tisean/files/patch-____upo____.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/octave-forge-tisean/files/patch-____upo____.cc	Mon May 14 21:34:01 2018	(r469973)
@@ -0,0 +1,58 @@
+--- __upo__.cc.orig	2015-08-14 22:25:52 UTC
++++ __upo__.cc
+@@ -33,18 +33,24 @@ FOR INTERNAL USE ONLY"
+ #include <octave/oct.h>
+ #include <octave/f77-fcn.h>
+ 
++#if defined (OCTAVE_HAVE_F77_INT_TYPE)
++#  define TO_F77_INT(x) octave::to_f77_int (x)
++#else
++typedef octave_idx_type F77_INT;
++#  define TO_F77_INT(x) (x)
++#endif
+ 
+ extern "C"
+ {
+   F77_RET_T
+   F77_FUNC (ts_upo, TS_UPO)
+-            (const int& m, const double& eps,
++            (const F77_INT& m, const double& eps,
+              const double& frac, const double& teq,
+              const double& tdis, const double& h,
+-             const double& tacc, const int& iper,
+-             const int& icen, const int& lines_read,
++             const double& tacc, const F77_INT& iper,
++             const F77_INT& icen, const F77_INT& lines_read,
+              double* in_out1, double* olens,
+-             double* orbit_data, const int& sizedat,
++             double* orbit_data, const F77_INT& sizedat,
+              double* accuracy, double* stability);
+ }
+ 
+@@ -63,22 +69,22 @@ DEFUN_DLD (__upo__, args, nargout, HELPT
+     {
+     // Assigning inputs
+       NDArray in_out1 = args(0).array_value();
+-      int m           = args(1).int_value();
++      F77_INT m       = TO_F77_INT (args(1).int_value());
+       double eps      = args(2).double_value();
+       double frac     = args(3).double_value();
+       double teq      = args(4).double_value();
+       double tdis     = args(5).double_value();
+       double h        = args(6).double_value();
+       double tacc     = args(7).double_value();
+-      int iper        = args(8).int_value();
+-      int icen        = args(9).int_value();
++      F77_INT iper    = TO_F77_INT (args(8).int_value());
++      F77_INT icen    = TO_F77_INT (args(9).int_value());
+ 
+ 
+ 
+       if (! error_state)
+         {
+ 
+-          int lines_read = in_out1.numel();
++          F77_INT lines_read = TO_F77_INT (in_out1.numel());
+           // Generating output vectors with estimated lengths
+           // The extra length (+1) is to store the actual lengths
+           NDArray olens (dim_vector (icen+1,1));

Added: head/math/octave-forge-tisean/files/patch-lazy.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/octave-forge-tisean/files/patch-lazy.cc	Mon May 14 21:34:01 2018	(r469973)
@@ -0,0 +1,58 @@
+--- lazy.cc.orig	2015-08-14 22:25:52 UTC
++++ lazy.cc
+@@ -35,7 +35,7 @@ Performs simple nonlinear noise reductio
+ @item X\n\
+ Must be realvector. If it is a row vector then the output will be row vectors as well.\n\
+ @item m\n\
+-Embedding dimension. Must be postive integer.\n\
++Embedding dimension. Must be positive integer.\n\
+ @item rv\n\
+ If @var{rv} > 0 then it is equal to the absolute radius of the neighbourhoods. If @var{rv} < 0 then its opposite (-@var{rv}) is equal to the fraction of standard deviation used. It cannot be equal 0.\n\
+ @item imax\n\
+@@ -71,12 +71,19 @@ Uses TISEAN package lazy\n\
+ // In order to avoid clobbered warnings transposed is initialized globally.
+ bool transposed;
+ 
++#if defined (OCTAVE_HAVE_F77_INT_TYPE)
++#  define TO_F77_INT(x) octave::to_f77_int (x)
++#else
++typedef octave_idx_type F77_INT;
++#  define TO_F77_INT(x) (x)
++#endif
++
+ extern "C"
+ {
+   F77_RET_T
+   F77_FUNC (ts_lazy, TS_LAZY)
+-            (const int& m, const double& rv,
+-             const int& imax, const int& lines_read,
++            (const F77_INT& m, const double& rv,
++             const F77_INT& imax, const F77_INT& lines_read,
+              double* in_out1, double* in_out2);
+ }
+ 
+@@ -100,12 +107,12 @@ DEFUN_DLD (lazy, args, nargout, HELPTEXT
+     {
+     // Assigning inputs
+       Matrix in_out1 = args(0).matrix_value();
+-      int m          = args(1).int_value();
++      F77_INT m      = TO_F77_INT (args(1).int_value());
+       double rv      = args(2).double_value();
+-      int imax       = DEFAULT_IMAX;
++      F77_INT imax   = DEFAULT_IMAX;
+ 
+       if (nargin == 4)
+-        imax = args(3).int_value();
++        imax = TO_F77_INT (args(3).int_value());
+ 
+ // --- DATA VALIDATION ---
+ 
+@@ -144,7 +151,7 @@ DEFUN_DLD (lazy, args, nargout, HELPTEXT
+               in_out1    = in_out1.transpose();
+             }
+ 
+-          int lines_read = in_out1.numel();
++          F77_INT lines_read = TO_F77_INT (in_out1.numel());
+           NDArray in_out2 (Matrix (lines_read, 1));
+ 
+           F77_XFCN (ts_lazy, TS_LAZY,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805142134.w4ELY1X5080448>