update to 3.1, which includes our all patches (and introduces some new

ones);

3.1 is a bugfix release, but also includes new threading api, perl-style
regular expressions, and the regression test suite (use run_tests).

ok steven@
This commit is contained in:
martynas 2007-04-20 19:11:51 +00:00
parent 4bbbe701d2
commit 9c984bb2d1
19 changed files with 1985 additions and 640 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.7 2007/03/27 20:12:59 martynas Exp $
# $OpenBSD: Makefile,v 1.8 2007/04/20 19:11:51 martynas Exp $
COMMENT= "environment for rapid engineering and scientific processing"
V= 3.0
V= 3.1
DISTNAME= FreeMat-${V}
PKGNAME= freemat-${V}p0
PKGNAME= freemat-${V}
CATEGORIES= graphics math
@ -18,7 +18,7 @@ PERMIT_DISTFILES_FTP= Yes
WANTLIB= GL GLU ICE SM X11 Xcursor Xext Xfixes Xi Xinerama Xrandr \
Xrender c curses fontconfig freetype g2c glib-2.0 \
m png pthread stdc++ z amd
m png pthread stdc++ z amd gthread-2.0
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=freemat/}
@ -30,19 +30,20 @@ LIB_DEPENDS= avcall::devel/ffcall \
fftw3.>=4::math/fftw3,double \
fftw3f.>=4::math/fftw3,float \
lapack.>=1::math/lapack \
pcre::devel/pcre \
umfpack::math/umfpack \
QtGui,QtOpenGL::x11/qt4
QtGui,QtNetwork,QtOpenGL,QtXml::x11/qt4
USE_X11= Yes
USE_LIBTOOL= Yes
USE_GMAKE= Yes
CONFIGURE_STYLE= autoconf no-autoheader
AUTOCONF_VERSION= 2.59
CONFIGURE_STYLE= gnu
CONFIGURE_ENV= F77=${FC} \
CPPFLAGS="-I${LOCALBASE}/include -I${LOCALBASE}/include/amd -I${LOCALBASE}/include/umfpack -I${X11BASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib" \
PKG_CONFIG_LIBDIR="${LOCALBASE}/lib/qt4"
MAKE_FLAGS= resourcedir="${LOCALBASE}/share/FreeMat-${V}"
SUBST_VARS= V

View File

@ -1,5 +1,5 @@
MD5 (FreeMat-3.0.tar.gz) = 2XLZOTIn/OSSXoEANPAlOA==
RMD160 (FreeMat-3.0.tar.gz) = Q9FCdvtD/hEn0oTLyTLW5H3o2dw=
SHA1 (FreeMat-3.0.tar.gz) = jkqooPQQNAKP7A5f5wLmDYgSO+g=
SHA256 (FreeMat-3.0.tar.gz) = xJ3f5ZDryEl6XYGR3XbEWcK/lCBVbIvbk84vd6KKCM0=
SIZE (FreeMat-3.0.tar.gz) = 4592674
MD5 (FreeMat-3.1.tar.gz) = 0ZUFb6s39nbrzylXo62Crg==
RMD160 (FreeMat-3.1.tar.gz) = d+P6qA3kc8lbs3MqqJ5ympl1OhA=
SHA1 (FreeMat-3.1.tar.gz) = dO0HLKlc722iwhnpDnN/pyLtzjY=
SHA256 (FreeMat-3.1.tar.gz) = klmZ/uiYg58E8tTenhLDVmsw5ExI/KBjnkKzgKTthgg=
SIZE (FreeMat-3.1.tar.gz) = 5264616

View File

@ -1,47 +0,0 @@
$OpenBSD: patch-acinclude_m4,v 1.1 2007/03/24 14:14:50 martynas Exp $
--- acinclude.m4.orig Thu Dec 28 16:03:20 2006
+++ acinclude.m4 Sat Mar 3 14:26:35 2007
@@ -302,6 +302,22 @@ if test x"$found_amd" == xyes; then
LIBS="-lamd $LIBS"
fi
+# umfpack depends on blas.
+if test x"$is_osx" == xyes; then
+ LIBS="$LIBS -framework vecLib"
+ found_blas="yes"
+ found_lapack="yes"
+else
+ ACX_BLAS(found_blas="yes",found_blas="no")
+ if test x"$found_blas" == xyes; then
+ LIBS="$BLAS_LIBS $LIBS"
+ fi
+ ACX_LAPACK(found_lapack="yes",found_lapack="no")
+ if test x"$found_lapack" == xyes; then
+ LIBS="$LAPACK_LIBS $LIBS"
+ fi
+fi
+
AC_CHECK_LIB(umfpack,umfpack_zl_solve,found_umfpack="yes",found_umfpack="no")
AC_CHECK_HEADER(umfpack.h,[],found_umfpack="no")
@@ -328,20 +344,6 @@ if test x"$found_fftw3" == xyes; then
AC_DEFINE(HAVE_FFTW, 1, [Set to 1 if you have the double precision version of FFTW installed])
fi
-if test x"$is_osx" == xyes; then
- LIBS="$LIBS -framework vecLib"
- found_blas="yes"
- found_lapack="yes"
-else
- ACX_BLAS(found_blas="yes",found_blas="no")
- if test x"$found_blas" == xyes; then
- LIBS="$BLAS_LIBS $LIBS"
- fi
- ACX_LAPACK(found_lapack="yes",found_lapack="no")
- if test x"$found_lapack" == xyes; then
- LIBS="$LAPACK_LIBS $LIBS"
- fi
-fi
AC_F77_FUNC(znaupd)
if test x"$znaupd" == x"unknown"; then
znaupd="znaupd_"

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-configure_in,v 1.1 2007/03/24 14:14:50 martynas Exp $
--- configure.in.orig Tue Jan 9 06:32:57 2007
+++ configure.in Sat Mar 24 15:46:51 2007
@@ -62,9 +62,8 @@ if (test "$cross_compiling" = "no") && (test "$is_mac"
fi
is_win32="false"
platform="--linux"
- FOO=`echo $QT_LIBS | sed -e 's/-L/-Wl,-rpath,/' | sed -e 's/-L.*//'`
- AC_MSG_NOTICE([Extra lib flags added $FOO])
- LDFLAGS="$LDFLAGS $FOO"
+ AC_MSG_NOTICE([Extra lib flags added $QT_LIBS])
+ LDFLAGS="$LDFLAGS $QT_LIBS"
fi
if (test "$cross_compiling" = "yes"); then

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-libs_libCore_Analyze_cpp,v 1.1 2007/03/24 14:14:50 martynas Exp $
--- libs/libCore/Analyze.cpp.orig Sat Mar 3 13:21:28 2007
+++ libs/libCore/Analyze.cpp Sat Mar 3 13:23:47 2007
@@ -55,6 +55,10 @@ double getcurrenttime() {
#include "LAPACK.hpp"
#include "MemPtr.hpp"
+/* some systems do not have abs() for 64-bit integers */
+int64 abs(int64 a) {
+ return a < 0 ? -a : a;
+}
ArrayVector HandleEmpty(Array arg) {
ArrayVector retArray;

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-libs_libCore_Directory_cpp,v 1.2 2007/03/24 14:14:50 martynas Exp $
--- libs/libCore/Directory.cpp.orig Thu Dec 28 16:02:21 2006
+++ libs/libCore/Directory.cpp Sat Mar 24 15:46:48 2007
@@ -249,7 +249,7 @@ ArrayVector DirSepFunction(int nargout, const ArrayVec
//@>
//!
ArrayVector PrintWorkingDirectoryFunction(int nargout, const ArrayVector& arg) {
- char buffer[1000];
+ char buffer[PATH_MAX];
getcwd(buffer,sizeof(buffer));
ArrayVector retval;
retval.push_back(Array::stringConstructor(buffer));

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-libs_libCore_Inspect_cpp,v 1.2 2007/03/24 14:14:50 martynas Exp $
--- libs/libCore/Inspect.cpp.orig Thu Dec 28 16:02:21 2006
+++ libs/libCore/Inspect.cpp Sat Mar 24 15:46:48 2007
@@ -149,7 +149,7 @@ ArrayVector HelpWinFunction(int nargout, const ArrayVe
dir = QDir(QString(qApp->applicationDirPath() + "/../Resources/help/html"));
} else {
QSettings settings("FreeMat","FreeMat");
- dir = QDir(QString(settings.value("root").toString())+"/help/html");
+ dir = QDir(QString(settings.value("root", RESOURCEDIR).toString())+"/help/html");
}
HelpWindow *m_helpwin = new HelpWindow(dir.canonicalPath());
m_helpwin->show();

View File

@ -1,20 +0,0 @@
$OpenBSD: patch-libs_libCore_Makefile_in,v 1.2 2007/03/24 14:14:50 martynas Exp $
--- libs/libCore/Makefile.in.orig Tue Jan 9 06:33:13 2007
+++ libs/libCore/Makefile.in Sat Mar 3 15:21:40 2007
@@ -94,7 +94,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
+CPPFLAGS = @CPPFLAGS@ -DRESOURCEDIR=\"$(resourcedir)\"
CXX = @CXX@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
@@ -192,6 +192,7 @@ target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
+resourcedir = $(datadir)/$(PACKAGE)-$(VERSION)
noinst_LIBRARIES = libCore.a
INCLUDES = -I@top_srcdir@/libs/libFreeMat -I@top_srcdir@/libs/libMex -I@top_srcdir@/libs/libXP -I@top_builddir@/libs/libXP
libCore_a_MOC = helpwidget.moc.cpp

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-libs_libFreeMat_Interpreter_cpp,v 1.1 2007/03/24 14:14:50 martynas Exp $
--- libs/libFreeMat/Interpreter.cpp.orig Tue Jan 9 06:26:33 2007
+++ libs/libFreeMat/Interpreter.cpp Sat Mar 3 13:46:47 2007
@@ -21,6 +21,7 @@
#include <stack>
#include <math.h>
#include <stdio.h>
+#include <unistd.h>
#include "Exception.hpp"
#include "Math.hpp"
#include "Array.hpp"

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-libs_libFreeMat_Module_cpp,v 1.2 2007/03/24 14:14:50 martynas Exp $
--- libs/libFreeMat/Module.cpp.orig Thu Dec 28 16:02:26 2006
+++ libs/libFreeMat/Module.cpp Sat Mar 24 15:46:48 2007
@@ -379,7 +379,7 @@ ArrayVector ImportFunction(int nargout, const ArrayVec
"return type, argument list");
libfile = arg[0].getContentsAsCString();
libfullpath = psearch.ResolvePath(libfile);
- char buffer[1000];
+ char buffer[PATH_MAX];
// Prepend the current working directory... ugly, but necessary
#ifdef WIN32
_getcwd(buffer,sizeof(buffer));

View File

@ -1,36 +0,0 @@
$OpenBSD: patch-libs_libFreeMat_Print_cpp,v 1.2 2007/03/27 20:12:59 martynas Exp $
--- libs/libFreeMat/Print.cpp.orig Tue Jan 2 00:31:44 2007
+++ libs/libFreeMat/Print.cpp Tue Mar 27 18:03:27 2007
@@ -27,7 +27,7 @@ int GetNominalWidthInteger(const T*array, int count) {
int maxdigit = 0;
for (int i=0;i<count;i++) {
memset(buffer,0,MSGBUFLEN);
- sprintf(buffer,"%lld",array[i]);
+ sprintf(buffer,"%lld",(int64)array[i]);
int j = maxdigit;
while (buffer[j] && j>=maxdigit)
j++;
@@ -39,7 +39,7 @@ int GetNominalWidthInteger(const T*array, int count) {
template <class T>
void PrintIntegers(const T*array, int count, int width) {
for (int i=0;i<count;i++)
- printf("%*lld\n",width,array[i]);
+ printf("%*lld\n",width,(int64)array[i]);
}
template <class T>
@@ -417,12 +417,12 @@ void PrintSheet(ArrayFormat format, Interpreter*io, in
// the terminal width
int colsPerPage;
if (aclass != FM_STRING)
- colsPerPage = (int) floor((termWidth-1)/((float) format.width + 3));
+ colsPerPage = (int) floor((termWidth-1)/((double) format.width + 3));
else
colsPerPage = termWidth;
colsPerPage = (colsPerPage < 1) ? 1 : colsPerPage;
int pageCount;
- pageCount = (int) ceil(columns/((float)colsPerPage));
+ pageCount = (int) ceil(columns/((double)colsPerPage));
for (int k=0;k<pageCount;k++) {
int colsInThisPage;
colsInThisPage = columns - colsPerPage*k;

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-libs_libGraphics_HandleAxis_cpp,v 1.2 2007/03/24 14:14:50 martynas Exp $
--- libs/libGraphics/HandleAxis.cpp.orig Thu Dec 28 16:02:22 2006
+++ libs/libGraphics/HandleAxis.cpp Fri Mar 2 11:28:22 2007
@@ -28,6 +28,8 @@
#include "HandleCommands.hpp"
#include <qgl.h>
+#define log2(x) (log(x)/M_LN2)
+
// Property list & status
// activepositionproperty
// alim

View File

@ -1,25 +0,0 @@
$OpenBSD: patch-libs_libGraphics_HandleWindow_cpp,v 1.1 2007/03/27 20:12:59 martynas Exp $
--- libs/libGraphics/HandleWindow.cpp.orig Thu Dec 28 16:02:22 2006
+++ libs/libGraphics/HandleWindow.cpp Tue Mar 27 18:03:53 2007
@@ -233,11 +233,19 @@ void HandleWindow::camRotate(bool active) {
void HandleWindow::save() {
QString fn = QFileDialog::getSaveFileName();
- HPrintFunction(0,singleArrayVector(Array::stringConstructor(fn.toStdString())));
+ try {
+ HPrintFunction(0,singleArrayVector(Array::stringConstructor(fn.toStdString())));
+ } catch(Exception &e) {
+ QMessageBox::critical(0,"Critical Error in Save",QString::fromStdString(e.getMessageCopy()));
+ }
}
void HandleWindow::copy() {
- HCopyFunction(0,ArrayVector());
+ try {
+ HCopyFunction(0,ArrayVector());
+ } catch(Exception &e) {
+ QMessageBox::critical(0,"Critical Error in Copy",QString::fromStdString(e.getMessageCopy()));
+ }
}
void HandleWindow::createActions() {

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-libs_libXP_KeyManager_cpp,v 1.2 2007/03/24 14:14:50 martynas Exp $
--- libs/libXP/KeyManager.cpp.orig Tue Jan 9 01:59:38 2007
+++ libs/libXP/KeyManager.cpp Sat Mar 24 15:46:48 2007
@@ -152,7 +152,7 @@ int KeyManager::DisplayedStringWidth(string s, int nc,
void KeyManager::InsertString(int pos, string s) {
int len = s.size();
- for (int i=4096-len;i>pos;i--)
+ for (int i=4096-len;i>pos && i>=len;i--)
lineData[i] = lineData[i-len];
const char* sptr = s.c_str();
for (int i=0;i<len;i++)

View File

@ -1,19 +1,19 @@
$OpenBSD: patch-libs_libXP_QTTerm_cpp,v 1.1 2007/03/24 14:14:50 martynas Exp $
--- libs/libXP/QTTerm.cpp.orig Thu Dec 28 16:02:27 2006
+++ libs/libXP/QTTerm.cpp Sat Mar 24 15:46:48 2007
@@ -207,11 +207,11 @@ void QTTerm::PaintRectangle(QPainter *paint, QRect rec
$OpenBSD: patch-libs_libXP_QTTerm_cpp,v 1.2 2007/04/20 19:11:51 martynas Exp $
--- libs/libXP/QTTerm.cpp.orig Mon Feb 5 01:19:52 2007
+++ libs/libXP/QTTerm.cpp Mon Apr 16 11:05:47 2007
@@ -213,11 +213,11 @@ void QTTerm::PaintRectangle(QPainter *paint, QRect rec
paint->eraseRect(rect);
int col_start, col_stop;
int row_start, row_stop;
- col_start = (int)floor(rect.left()/m_char_w);
- col_stop = (int)ceil(rect.right()/m_char_w);
+ col_start = (int)floor((double)rect.left()/m_char_w);
+ col_stop = (int)ceil((double)rect.right()/m_char_w);
- col_start = (int)floor(rect.left()/((float)m_char_w));
- col_stop = (int)ceil(rect.right()/((float)m_char_w));
+ col_start = (int)floor(rect.left()/((double)m_char_w));
+ col_stop = (int)ceil(rect.right()/((double)m_char_w));
col_stop = qMin(col_stop,m_width-1);
- row_start = (int)ceil(rect.top()/m_char_h);
- row_stop = (int)floor(rect.bottom()/m_char_h);
+ row_start = (int)ceil((double)rect.top()/m_char_h);
+ row_stop = (int)floor((double)rect.bottom()/m_char_h);
- row_start = (int)ceil(rect.top()/((float)m_char_h));
- row_stop = (int)floor(rect.bottom()/((float)m_char_h));
+ row_start = (int)ceil(rect.top()/((double)m_char_h));
+ row_stop = (int)floor(rect.bottom()/((double)m_char_h));
row_stop = qMin(row_stop,m_height-1);

View File

@ -1,29 +0,0 @@
$OpenBSD: patch-src_MainApp_cpp,v 1.1 2007/03/24 14:14:50 martynas Exp $
--- src/MainApp.cpp.orig Thu Dec 28 16:02:20 2006
+++ src/MainApp.cpp Sat Mar 3 15:19:53 2007
@@ -263,12 +263,12 @@ int MainApp::Run() {
}
} else {
QSettings settings("FreeMat","FreeMat");
- QDir dir1(QString(settings.value("root").toString())+"/toolbox");
+ QDir dir1(QString(settings.value("root", RESOURCEDIR).toString())+"/toolbox");
if (dir1.exists()) {
QString path1(dir1.canonicalPath());
basePath += GetRecursiveDirList(path1);
}
- QDir dir2(QString(settings.value("root").toString())+"/help/text");
+ QDir dir2(QString(settings.value("root", RESOURCEDIR).toString())+"/help/text");
if (dir2.exists()) {
QString path2(dir2.canonicalPath());
basePath += GetRecursiveDirList(path2);
@@ -295,6 +295,10 @@ int MainApp::Run() {
m_keys->SetCompletionContext(context);
m_eval->setTerminalWidth(m_keys->getTerminalWidth());
m_eval->setGreetingFlag(skipGreeting);
+#ifdef __OpenBSD__
+ /* 64 frames / calls deep */
+ m_eval->setStackSize(262144);
+#endif
m_eval->start();
emit Initialize();
return 0;

View File

@ -1,20 +0,0 @@
$OpenBSD: patch-src_Makefile_in,v 1.2 2007/03/24 14:14:50 martynas Exp $
--- src/Makefile.in.orig Sat Mar 3 15:08:47 2007
+++ src/Makefile.in Sat Mar 3 15:21:21 2007
@@ -105,7 +105,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
+CPPFLAGS = @CPPFLAGS@ -DRESOURCEDIR=\"$(resourcedir)\"
CXX = @CXX@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
@@ -203,6 +203,7 @@ target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
+resourcedir = $(datadir)/$(PACKAGE)-$(VERSION)
INCLUDES = -I@top_srcdir@/libs/libFreeMat -I@top_srcdir@/libs/libMex -I@top_srcdir@/libs/libXP -I@top_srcdir@/libs/libCore -I@top_srcdir@/libs/libGraphics -I@top_srcdir@/libs/libFN -I@top_srcdir@/src -I@top_builddir@/libs/libXP
EXTRA_DIST = appIcon.icns freemat.ico freematv2.ico
FreeMat_HFILES = \

View File

@ -5,3 +5,6 @@ Open Source. FreeMat includes several novel features such as a codeless
interface to external C/C++/FORTRAN code, parallel/distributed
algorithm development (via MPI), and plotting and visualization
capabilities.
Multi-platform regression test suite is shipped with this version.
Use run_tests command to verify the functionality of your installation.

File diff suppressed because it is too large Load Diff