View | Details | Raw Unified | Return to bug 221316
Collapse All | Expand All

(-)math/dynare/Makefile (-2 / +14 lines)
Lines 3-19 Link Here
3
3
4
PORTNAME=	dynare
4
PORTNAME=	dynare
5
PORTVERSION=	4.4.3
5
PORTVERSION=	4.4.3
6
PORTREVISION=	9
6
PORTREVISION=	10
7
CATEGORIES=	math
7
CATEGORIES=	math
8
MASTER_SITES=	http://www.dynare.org/release/source/
8
MASTER_SITES=	http://www.dynare.org/release/source/
9
9
10
MAINTAINER=	fernando.apesteguia@gmail.com
10
MAINTAINER=	fernando.apesteguia@gmail.com
11
COMMENT=	Software platform for handling a wide class of economic models
11
COMMENT=	Software platform for handling a wide class of economic models
12
12
13
LICENSE=	GPLv3
14
LICENSE_FILE=	${WRKSRC}/COPYING
15
13
BUILD_DEPENDS=	${LOCALBASE}/include/boost/unordered_set.hpp:devel/boost-libs \
16
BUILD_DEPENDS=	${LOCALBASE}/include/boost/unordered_set.hpp:devel/boost-libs \
14
		ctangle:devel/cweb
17
		ctangle:devel/cweb
15
LIB_DEPENDS=	libumfpack.so:math/suitesparse \
18
LIB_DEPENDS=	libumfpack.so:math/suitesparse \
16
		libmatio.so:math/matio
19
		libmatio.so:math/matio \
20
		libhdf5.so:science/hdf5 \
21
		libopenblas.so:math/openblas \
22
		libopenblasp.so:math/openblas \
23
		libfftw3_threads.so:math/fftw3 \
24
		libfftw3.so:math/fftw3 \
25
		libfftw3f_threads.so:math/fftw3-float \
26
		libfftw3f.so:math/fftw3-float \
27
		liblapack.so:math/lapack \
28
		libblas.so:math/blas
17
29
18
WRKSRC=		${WRKDIR}/${DISTNAME}
30
WRKSRC=		${WRKDIR}/${DISTNAME}
19
GNU_CONFIGURE=	yes
31
GNU_CONFIGURE=	yes
(-)math/dynare/files/patch-Makefile.in (-1 / +1 lines)
Lines 1-6 Link Here
1
--- Makefile.in.orig	2014-07-31 12:30:46 UTC
1
--- Makefile.in.orig	2014-07-31 12:30:46 UTC
2
+++ Makefile.in
2
+++ Makefile.in
3
@@ -827,9 +827,9 @@
3
@@ -827,9 +827,9 @@ dist-hook:
4
 install-exec-local:
4
 install-exec-local:
5
 	$(MKDIR_P) $(DESTDIR)$(pkglibdir)/contrib/ms-sbvar/TZcode
5
 	$(MKDIR_P) $(DESTDIR)$(pkglibdir)/contrib/ms-sbvar/TZcode
6
 	cp -r examples $(DESTDIR)$(pkglibdir)
6
 	cp -r examples $(DESTDIR)$(pkglibdir)
(-)math/dynare/files/patch-configure (-11 lines)
Lines 1-11 Link Here
1
--- mex/build/octave/configure.orig	2014-01-10 20:33:42.000000000 +0100
2
+++ mex/build/octave/configure	2014-01-10 20:34:24.000000000 +0100
3
@@ -6769,7 +6769,7 @@
4
   $as_echo_n "(cached) " >&6
5
 else
6
   ac_check_lib_save_LIBS=$LIBS
7
-LIBS="-lumfpack  $LIBS"
8
+LIBS="-lumfpack -llapack -lblas -lsuitesparseconfig -lcholmod -lcolamd -lamd $LIBS"
9
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10
 /* end confdefs.h.  */
11
 
(-)math/dynare/files/patch-dynare++_kord_journal.cweb (+53 lines)
Line 0 Link Here
1
--- dynare++/kord/journal.cweb.orig	2013-11-08 16:37:59 UTC
2
+++ dynare++/kord/journal.cweb
3
@@ -5,6 +5,8 @@
4
 @c
5
 #include "journal.h"
6
 #include "kord_exception.h"
7
+#include <sys/types.h>
8
+#include <sys/sysctl.h>
9
 
10
 #if !defined(__MINGW32__)
11
 # include <sys/resource.h>
12
@@ -72,7 +74,16 @@ long int SystemResources::onlineProcesso
13
 @<|SystemResources::availableMemory| code@>=
14
 long int SystemResources::availableMemory()
15
 {
16
-	return pageSize()*sysconf(_SC_AVPHYS_PAGES);
17
+	long value;
18
+	size_t len;
19
+	char *path = "vm.stats.vm.v_free_count";
20
+
21
+	if (sysctlbyname(path, &value, &len, NULL, 0) == -1) {
22
+		return (-1);
23
+	}
24
+
25
+
26
+	return pageSize() * value;
27
 }
28
 
29
 @ Here we read the current values of resource usage. For MinGW, we
30
@@ -84,6 +95,10 @@ void SystemResources::getRUS(double& loa
31
 							 long int& idrss, long int& majflt)
32
 {
33
 	struct timeval now;
34
+	long value;
35
+	size_t len;
36
+	char *path = "vm.stats.vm.v_free_count";
37
+
38
 	gettimeofday(&now, NULL);
39
 	elapsed = now.tv_sec-start.tv_sec + (now.tv_usec-start.tv_usec)*1.0e-6;
40
 
41
@@ -107,7 +122,11 @@ void SystemResources::getRUS(double& loa
42
 	load_avg = -1.0;
43
 #endif
44
 
45
-	pg_avail = sysconf(_SC_AVPHYS_PAGES);
46
+	if (sysctlbyname(path, &value, &len, NULL, 0) == -1) {
47
+		pg_avail = -1;
48
+	}
49
+
50
+	pg_avail = value;
51
 }
52
 
53
 @ 
(-)math/dynare/files/patch-dynare++_parser_cc_parser__exception.h (+10 lines)
Line 0 Link Here
1
--- dynare++/parser/cc/parser_exception.h.orig	2013-11-08 16:37:59 UTC
2
+++ dynare++/parser/cc/parser_exception.h
3
@@ -6,6 +6,7 @@
4
 #define OG_FORMULA_PARSER_H
5
 
6
 #include <string>
7
+#include <stdio.h>
8
 
9
 namespace ogp {
10
 	using std::string;
(-)math/dynare/files/patch-journal.cweb (-53 lines)
Lines 1-53 Link Here
1
--- dynare++/kord/journal.cweb.orig	2011-08-21 20:56:09.000000000 +0200
2
+++ dynare++/kord/journal.cweb	2011-08-21 23:02:31.000000000 +0200
3
@@ -5,6 +5,8 @@
4
 @c
5
 #include "journal.h"
6
 #include "kord_exception.h"
7
+#include <sys/types.h>
8
+#include <sys/sysctl.h>
9
 
10
 #if !defined(__MINGW32__)
11
 # include <sys/resource.h>
12
@@ -72,7 +74,16 @@
13
 @<|SystemResources::availableMemory| code@>=
14
 long int SystemResources::availableMemory()
15
 {
16
-	return pageSize()*sysconf(_SC_AVPHYS_PAGES);
17
+	long value;
18
+	size_t len;
19
+	char *path = "vm.stats.vm.v_free_count";
20
+
21
+	if (sysctlbyname(path, &value, &len, NULL, 0) == -1) {
22
+		return (-1);
23
+	}
24
+
25
+
26
+	return pageSize() * value;
27
 }
28
 
29
 @ Here we read the current values of resource usage. For MinGW, we
30
@@ -84,6 +95,10 @@
31
 							 long int& idrss, long int& majflt)
32
 {
33
 	struct timeval now;
34
+	long value;
35
+	size_t len;
36
+	char *path = "vm.stats.vm.v_free_count";
37
+
38
 	gettimeofday(&now, NULL);
39
 	elapsed = now.tv_sec-start.tv_sec + (now.tv_usec-start.tv_usec)*1.0e-6;
40
 
41
@@ -107,7 +122,11 @@
42
 	load_avg = -1.0;
43
 #endif
44
 
45
-	pg_avail = sysconf(_SC_AVPHYS_PAGES);
46
+	if (sysctlbyname(path, &value, &len, NULL, 0) == -1) {
47
+		pg_avail = -1;
48
+	}
49
+
50
+	pg_avail = value;
51
 }
52
 
53
 @ 
(-)math/dynare/files/patch-mex_build_octave_configure (+11 lines)
Line 0 Link Here
1
--- mex/build/octave/configure.orig	2014-07-31 12:31:10 UTC
2
+++ mex/build/octave/configure
3
@@ -7076,7 +7076,7 @@ if ${ac_cv_lib_umfpack_umfpack_dl_defaul
4
   $as_echo_n "(cached) " >&6
5
 else
6
   ac_check_lib_save_LIBS=$LIBS
7
-LIBS="-lumfpack  $LIBS"
8
+LIBS="-lumfpack -llapack -lblas -lsuitesparseconfig -lcholmod -lcolamd -lamd $LIBS"
9
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10
 /* end confdefs.h.  */
11
 
(-)math/dynare/files/patch-parser-exception.h (-10 lines)
Lines 1-10 Link Here
1
--- dynare++/parser/cc/parser_exception.h.orig	2011-08-21 19:10:51.000000000 +0200
2
+++ dynare++/parser/cc/parser_exception.h	2011-08-21 19:31:06.000000000 +0200
3
@@ -6,6 +6,7 @@
4
 #define OG_FORMULA_PARSER_H
5
 
6
 #include <string>
7
+#include <stdio.h>
8
 
9
 namespace ogp {
10
 	using std::string;

Return to bug 221316