Date: Mon, 14 May 2018 21:01:37 +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: r469966 - in head/math/octave-forge-linear-algebra: . files Message-ID: <201805142101.w4EL1bAh061293@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: stephen Date: Mon May 14 21:01:37 2018 New Revision: 469966 URL: https://svnweb.freebsd.org/changeset/ports/469966 Log: - Add patches that unbreak it. - Bump portrevision. Obtained from: https://sourceforge.net/p/octave/linear-algebra/ci/default/tree/ Added: head/math/octave-forge-linear-algebra/files/ head/math/octave-forge-linear-algebra/files/patch-CmplxGSVD.cc (contents, props changed) head/math/octave-forge-linear-algebra/files/patch-CmplxGSVD.h (contents, props changed) head/math/octave-forge-linear-algebra/files/patch-Makefile (contents, props changed) head/math/octave-forge-linear-algebra/files/patch-dbleGSVD.cc (contents, props changed) head/math/octave-forge-linear-algebra/files/patch-dbleGSVD.h (contents, props changed) Modified: head/math/octave-forge-linear-algebra/Makefile Modified: head/math/octave-forge-linear-algebra/Makefile ============================================================================== --- head/math/octave-forge-linear-algebra/Makefile Mon May 14 20:43:50 2018 (r469965) +++ head/math/octave-forge-linear-algebra/Makefile Mon May 14 21:01:37 2018 (r469966) @@ -3,14 +3,14 @@ PORTNAME= octave-forge-linear-algebra PORTVERSION= 2.2.2 -PORTREVISION= 5 +PORTREVISION= 6 PORTEPOCH= 1 CATEGORIES= math MAINTAINER= stephen@FreeBSD.org COMMENT= Octave-forge package ${OCTAVE_PKGNAME} -BROKEN= does not build with octave 4.4.0 +#BROKEN= does not build with octave 4.4.0 # OCTSRC is the name of the directory of the package. # It is usually ${OCTAVE_PKGNAME} or ${DISTNAME}. Added: head/math/octave-forge-linear-algebra/files/patch-CmplxGSVD.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/math/octave-forge-linear-algebra/files/patch-CmplxGSVD.cc Mon May 14 21:01:37 2018 (r469966) @@ -0,0 +1,147 @@ +--- CmplxGSVD.cc.orig 2015-01-24 19:54:11 UTC ++++ CmplxGSVD.cc +@@ -14,13 +14,12 @@ + // You should have received a copy of the GNU General Public License along with + // this program; if not, see <http://www.gnu.org/licenses/>. + +-#ifdef HAVE_CONFIG_H +-#include <config.h> +-#endif ++#include "CmplxGSVD.h" + + #include <iostream> + +-#include "CmplxGSVD.h" ++#include <octave/oct.h> ++ + #include "f77-fcn.h" + #include "lo-error.h" + +@@ -30,6 +29,13 @@ + #include "pager.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 +@@ -38,27 +44,27 @@ extern "C" + F77_CONST_CHAR_ARG_DECL, // JOBU (input) CHARACTER*1 + F77_CONST_CHAR_ARG_DECL, // JOBV (input) CHARACTER*1 + F77_CONST_CHAR_ARG_DECL, // JOBQ (input) CHARACTER*1 +- const octave_idx_type&, // M (input) INTEGER +- const octave_idx_type&, // N (input) INTEGER +- const octave_idx_type&, // P (input) INTEGER +- octave_idx_type &, // K (output) INTEGER +- octave_idx_type &, // L (output) INTEGER ++ const F77_INT&, // M (input) INTEGER ++ const F77_INT&, // N (input) INTEGER ++ const F77_INT&, // P (input) INTEGER ++ F77_INT&, // K (output) INTEGER ++ F77_INT&, // L (output) INTEGER + Complex*, // A (input/output) COMPLEX*16 array, dimension (LDA,N) +- const octave_idx_type&, // LDA (input) INTEGER ++ const F77_INT&, // LDA (input) INTEGER + Complex*, // B (input/output) COMPLEX*16 array, dimension (LDB,N) +- const octave_idx_type&, // LDB (input) INTEGER ++ const F77_INT&, // LDB (input) INTEGER + double*, // ALPHA (output) DOUBLE PRECISION array, dimension (N) + double*, // BETA (output) DOUBLE PRECISION array, dimension (N) + Complex*, // U (output) COMPLEX*16 array, dimension (LDU,M) +- const octave_idx_type&, // LDU (input) INTEGER ++ const F77_INT&, // LDU (input) INTEGER + Complex*, // V (output) COMPLEX*16 array, dimension (LDV,P) +- const octave_idx_type&, // LDV (input) INTEGER ++ const F77_INT&, // LDV (input) INTEGER + Complex*, // Q (output) COMPLEX*16 array, dimension (LDQ,N) +- const octave_idx_type&, // LDQ (input) INTEGER ++ const F77_INT&, // LDQ (input) INTEGER + Complex*, // WORK (workspace) COMPLEX*16 array + double*, // RWORK (workspace) DOUBLE PRECISION array +- int*, // IWORK (workspace/output) INTEGER array, dimension (N) +- octave_idx_type& // INFO (output)INTEGER ++ F77_INT*, // IWORK (workspace/output) INTEGER array, dimension (N) ++ F77_INT& // INFO (output)INTEGER + F77_CHAR_ARG_LEN_DECL + F77_CHAR_ARG_LEN_DECL + F77_CHAR_ARG_LEN_DECL +@@ -121,11 +127,11 @@ octave_idx_type + ComplexGSVD::init (const ComplexMatrix& a, const ComplexMatrix& b, + GSVD::type gsvd_type) + { +- octave_idx_type info; ++ F77_INT info; + +- octave_idx_type m = a.rows (); +- octave_idx_type n = a.cols (); +- octave_idx_type p = b.rows (); ++ F77_INT m = TO_F77_INT (a.rows ()); ++ F77_INT n = TO_F77_INT (a.cols ()); ++ F77_INT p = TO_F77_INT (b.rows ()); + + ComplexMatrix atmp = a; + Complex *tmp_dataA = atmp.fortran_vec (); +@@ -133,17 +139,17 @@ ComplexGSVD::init (const ComplexMatrix& + ComplexMatrix btmp = b; + Complex *tmp_dataB = btmp.fortran_vec (); + +- // octave_idx_type min_mn = m < n ? m : n; ++ // F77_INT min_mn = m < n ? m : n; + + char jobu = 'U'; + char jobv = 'V'; + char jobq = 'Q'; + +- octave_idx_type nrow_u = m; +- octave_idx_type nrow_v = p; +- octave_idx_type nrow_q = n; ++ F77_INT nrow_u = m; ++ F77_INT nrow_v = p; ++ F77_INT nrow_q = n; + +- octave_idx_type k, l; ++ F77_INT k, l; + + switch (gsvd_type) + { +@@ -187,7 +193,7 @@ ComplexGSVD::init (const ComplexMatrix& + } + Complex *q = right_sm.fortran_vec (); + +- octave_idx_type lwork = 3*n; ++ F77_INT lwork = 3*n; + lwork = lwork > m ? lwork : m; + lwork = (lwork > p ? lwork : p) + n; + +@@ -195,7 +201,7 @@ ComplexGSVD::init (const ComplexMatrix& + Array<double> alpha (dim_vector (n, 1)); + Array<double> beta (dim_vector (n, 1)); + Array<double> rwork(dim_vector (2*n, 1)); +- Array<int> iwork (dim_vector (n, 1)); ++ Array<F77_INT> iwork (dim_vector (n, 1)); + + F77_XFCN (zggsvd, ZGGSVD, (F77_CONST_CHAR_ARG2 (&jobu, 1), + F77_CONST_CHAR_ARG2 (&jobv, 1), +@@ -219,13 +225,13 @@ ComplexGSVD::init (const ComplexMatrix& + if (info > 0) { + (*current_liboctave_error_handler) ("zggsvd.f: Jacobi-type procedure failed to converge."); + } else { +- octave_idx_type i, j; ++ F77_INT i, j; + + if (GSVD::std == gsvd_type) { + R.resize(k+l, k+l); +- int astart = n-k-l; ++ F77_INT astart = n-k-l; + if (m - k - l >= 0) { +- int astart = n-k-l; ++ F77_INT astart = n-k-l; + /* + * R is stored in A(1:K+L,N-K-L+1:N) + */ Added: head/math/octave-forge-linear-algebra/files/patch-CmplxGSVD.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/math/octave-forge-linear-algebra/files/patch-CmplxGSVD.h Mon May 14 21:01:37 2018 (r469966) @@ -0,0 +1,11 @@ +--- CmplxGSVD.h.orig 2015-01-24 19:54:11 UTC ++++ CmplxGSVD.h +@@ -19,6 +19,8 @@ + + #include <iostream> + ++#include <octave/oct.h> ++ + #include "dDiagMatrix.h" + #include "CMatrix.h" + #include "dbleGSVD.h" Added: head/math/octave-forge-linear-algebra/files/patch-Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/math/octave-forge-linear-algebra/files/patch-Makefile Mon May 14 21:01:37 2018 (r469966) @@ -0,0 +1,83 @@ +--- Makefile.orig 2015-01-24 19:54:11 UTC ++++ Makefile +@@ -1,66 +1,24 @@ +-sinclude Makeconf +- +-ifndef OCTAVE_FORGE +-MKOCTFILE = mkoctfile +-endif +- +-ifndef LAPACK_LIBS +-LAPACK_LIBS := $(shell $(MKOCTFILE) -p LAPACK_LIBS) +-endif +-ifndef BLAS_LIBS +-BLAS_LIBS := $(shell $(MKOCTFILE) -p BLAS_LIBS) +-endif +-LFLAGS := $(shell $(MKOCTFILE) -p LFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) +-export LFLAGS +- +-DEFINES = -DHAVE_CONFIG_H -Wall +-GSVD_OBJECTS = gsvd.o dbleGSVD.o CmplxGSVD.o +-GSVD_TARGET = gsvd.oct +-GSVD_TEST = gsvd +-GSVD_DEPENDS = gsvd.d dbleGSVD.d CmplxGSVD.d +- +-OBJECTS = $(GSVD_OBJECTS) +-TARGETS = $(GSVD_TARGET) +-DEPENDS = $(GSVD_DEPENDS) +- +-.PHONY: all test clean count +- +-.SUFFIXES: +- +-.PRECIOUS: %.d %.o +- +-all : $(TARGETS) pgmres.oct +- +-$(GSVD_TARGET) : $(GSVD_DEPENDS) $(GSVD_OBJECTS) +- $(MKOCTFILE) $(DEFINES) $(GSVD_OBJECTS) -o $@ ${LAPACK_LIBS} ++MKOCTFILE ?= mkoctfile + +-$(GSVD_TEST) : $(GSVD_TARGET) ++OCT_FILES := gsvd.oct pgmres.oct + +-ifneq (,$(DEPENDS)) +- sinclude $(DEPENDS) +-endif ++GSVD_DEPENDS := dbleGSVD.o CmplxGSVD.o + +-%.d:%.cc +- $(MKOCTFILE) $(DEFINES) -M $< ++LAPACK_LIBS ?= $(shell $(MKOCTFILE) -p LAPACK_LIBS) ++BLAS_LIBS ?= $(shell $(MKOCTFILE) -p BLAS_LIBS) + +-%.o:%.cc +-%.o:%.cc %.d +- $(MKOCTFILE) $(DEFINES) -c $< ++.PHONY: all clean + +-%.o:%.f +- $(MKOCTFILE) $(DEFINES) -c $< +-%.oct:%.o +- $(MKOCTFILE) $(DEFINES) $< -o $@ ++all: $(OCT_FILES) + + %.oct: %.cc +- mkoctfile $(DEFINES) $< -o $@ ${LAPACK_LIBS} ++ $(MKOCTFILE) $^ + +-.phony: test +-test: $(GSVD_TEST) +- for i in $^; do echo "test $$i"; done | octave --silent ++%.o: %.cc %.h ++ $(MKOCTFILE) -c $< + +-clean: +- rm -f $(TARGETS) $(DEPENDS) $(OBJECTS) octave-core ++gsvd.oct: gsvd.cc $(GSVD_DEPENDS) ++ $(MKOCTFILE) -c $< $(LAPACK_LIBS) $(BLAS_LIBS) + +-count: +- wc *{.cc,.h,.f} ++clean: ++ $(RM) *.o *.oct octave-core octave-workspace Added: head/math/octave-forge-linear-algebra/files/patch-dbleGSVD.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/math/octave-forge-linear-algebra/files/patch-dbleGSVD.cc Mon May 14 21:01:37 2018 (r469966) @@ -0,0 +1,147 @@ +--- dbleGSVD.cc.orig 2015-01-24 19:54:11 UTC ++++ dbleGSVD.cc +@@ -14,14 +14,14 @@ + // You should have received a copy of the GNU General Public License along with + // this program; if not, see <http://www.gnu.org/licenses/>. + +-#ifdef HAVE_CONFIG_H +-#include <config.h> +-#endif ++#include "dbleGSVD.h" + + #include <iostream> + +-#include "dbleGSVD.h" ++#include <octave/oct.h> ++ + #include "f77-fcn.h" ++#include "lo-error.h" + + /* + uncomment those lines to monitor k and l +@@ -29,6 +29,13 @@ + #include "pager.h" + */ + ++#if defined (OCTAVE_HAVE_F77_INT_TYPE) ++# define TO_F77_INT(x) octave::to_f77_int (x) ++#else ++# define TO_F77_INT(x) (x) ++typedef octave_idx_type F77_INT; ++#endif ++ + extern "C" + { + F77_RET_T +@@ -37,26 +44,26 @@ extern "C" + F77_CONST_CHAR_ARG_DECL, // JOBU (input) CHARACTER*1 + F77_CONST_CHAR_ARG_DECL, // JOBV (input) CHARACTER*1 + F77_CONST_CHAR_ARG_DECL, // JOBQ (input) CHARACTER*1 +- const octave_idx_type&, // M (input) INTEGER +- const octave_idx_type&, // N (input) INTEGER +- const octave_idx_type&, // P (input) INTEGER +- octave_idx_type &, // K (output) INTEGER +- octave_idx_type &, // L (output) INTEGER ++ const F77_INT&, // M (input) INTEGER ++ const F77_INT&, // N (input) INTEGER ++ const F77_INT&, // P (input) INTEGER ++ F77_INT &, // K (output) INTEGER ++ F77_INT &, // L (output) INTEGER + double*, // A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +- const octave_idx_type&, // LDA (input) INTEGER ++ const F77_INT&, // LDA (input) INTEGER + double*, // B (input/output) DOUBLE PRECISION array, dimension (LDB,N) +- const octave_idx_type&, // LDB (input) INTEGER ++ const F77_INT&, // LDB (input) INTEGER + double*, // ALPHA (output) DOUBLE PRECISION array, dimension (N) + double*, // BETA (output) DOUBLE PRECISION array, dimension (N) + double*, // U (output) DOUBLE PRECISION array, dimension (LDU,M) +- const octave_idx_type&, // LDU (input) INTEGER ++ const F77_INT&, // LDU (input) INTEGER + double*, // V (output) DOUBLE PRECISION array, dimension (LDV,P) +- const octave_idx_type&, // LDV (input) INTEGER ++ const F77_INT&, // LDV (input) INTEGER + double*, // Q (output) DOUBLE PRECISION array, dimension (LDQ,N) +- const octave_idx_type&, // LDQ (input) INTEGER ++ const F77_INT&, // LDQ (input) INTEGER + double*, // WORK (workspace) DOUBLE PRECISION array +- int*, // IWORK (workspace/output) INTEGER array, dimension (N) +- octave_idx_type& // INFO (output)INTEGER ++ F77_INT*, // IWORK (workspace/output) INTEGER array, dimension (N) ++ F77_INT& // INFO (output)INTEGER + F77_CHAR_ARG_LEN_DECL + F77_CHAR_ARG_LEN_DECL + F77_CHAR_ARG_LEN_DECL +@@ -117,11 +124,11 @@ GSVD::R_matrix (void) const + octave_idx_type + GSVD::init (const Matrix& a, const Matrix& b, GSVD::type gsvd_type) + { +- octave_idx_type info; ++ F77_INT info; + +- octave_idx_type m = a.rows (); +- octave_idx_type n = a.cols (); +- octave_idx_type p = b.rows (); ++ F77_INT m = TO_F77_INT (a.rows ()); ++ F77_INT n = TO_F77_INT (a.cols ()); ++ F77_INT p = TO_F77_INT (b.rows ()); + + Matrix atmp = a; + double *tmp_dataA = atmp.fortran_vec (); +@@ -129,17 +136,17 @@ GSVD::init (const Matrix& a, const Matri + Matrix btmp = b; + double *tmp_dataB = btmp.fortran_vec (); + +- // octave_idx_type min_mn = m < n ? m : n; ++ // F77_INT min_mn = m < n ? m : n; + + char jobu = 'U'; + char jobv = 'V'; + char jobq = 'Q'; + +- octave_idx_type nrow_u = m; +- octave_idx_type nrow_v = p; +- octave_idx_type nrow_q = n; ++ F77_INT nrow_u = m; ++ F77_INT nrow_v = p; ++ F77_INT nrow_q = n; + +- octave_idx_type k, l; ++ F77_INT k, l; + + switch (gsvd_type) + { +@@ -183,14 +190,14 @@ GSVD::init (const Matrix& a, const Matri + } + double *q = right_sm.fortran_vec (); + +- octave_idx_type lwork = 3*n; ++ F77_INT lwork = 3*n; + lwork = lwork > m ? lwork : m; + lwork = (lwork > p ? lwork : p) + n; + + Array<double> work (dim_vector (lwork, 1)); + Array<double> alpha (dim_vector (n, 1)); + Array<double> beta (dim_vector (n, 1)); +- Array<int> iwork (dim_vector (n, 1)); ++ Array<F77_INT> iwork (dim_vector (n, 1)); + + F77_XFCN (dggsvd, DGGSVD, (F77_CONST_CHAR_ARG2 (&jobu, 1), + F77_CONST_CHAR_ARG2 (&jobv, 1), +@@ -213,13 +220,13 @@ GSVD::init (const Matrix& a, const Matri + if (info > 0) { + (*current_liboctave_error_handler) ("dggsvd.f: Jacobi-type procedure failed to converge."); + } else { +- octave_idx_type i, j; ++ F77_INT i, j; + + if (GSVD::std == gsvd_type) { + R.resize(k+l, k+l); +- int astart = n-k-l; ++ F77_INT astart = n-k-l; + if (m - k - l >= 0) { +- int astart = n-k-l; ++ F77_INT astart = n-k-l; + /* + * R is stored in A(1:K+L,N-K-L+1:N) + */ Added: head/math/octave-forge-linear-algebra/files/patch-dbleGSVD.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/math/octave-forge-linear-algebra/files/patch-dbleGSVD.h Mon May 14 21:01:37 2018 (r469966) @@ -0,0 +1,11 @@ +--- dbleGSVD.h.orig 2015-01-24 19:54:11 UTC ++++ dbleGSVD.h +@@ -19,6 +19,8 @@ + + #include <iostream> + ++#include <octave/oct.h> ++ + #include "dDiagMatrix.h" + #include "dMatrix.h" +
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805142101.w4EL1bAh061293>