Dynare is a software platform for handling a wide class of
economic models, in particular dynamic stochastic general equilibrium (DSGE) and overlapping generations (OLG) models. WWW: http://www.dynare.org PR: ports/160153 Submitted by: Fernando <fernando.apesteguia@gmail.com>
This commit is contained in:
parent
2b35911821
commit
b26682e3bd
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=282473
@ -66,6 +66,7 @@
|
||||
SUBDIR += dislin
|
||||
SUBDIR += djbfft
|
||||
SUBDIR += drgeo
|
||||
SUBDIR += dynare
|
||||
SUBDIR += e
|
||||
SUBDIR += edenmath
|
||||
SUBDIR += eigen
|
||||
|
48
math/dynare/Makefile
Normal file
48
math/dynare/Makefile
Normal file
@ -0,0 +1,48 @@
|
||||
# New ports collection makefile for: dynare
|
||||
# Date created: Aug 17 2011
|
||||
# Whom: Fernando Apesteguia <fernando.apesteguia@gmail.com>
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= dynare
|
||||
PORTVERSION= 4.2.1
|
||||
CATEGORIES= math
|
||||
MASTER_SITES= http://www.dynare.org/download/dynare-4.2/source/dynare-2.4.1/at_download/file/
|
||||
|
||||
MAINTAINER= fernando.apesteguia@gmail.com
|
||||
COMMENT= Software platform for handling a wide class of economic models
|
||||
|
||||
BUILD_DEPENDS= ${LOCALBASE}/include/boost/unordered_set.hpp:${PORTSDIR}/devel/boost-libs
|
||||
|
||||
WRKSRC= ${WRKDIR}/${DISTNAME}
|
||||
GNU_CONFIGURE= yes
|
||||
USE_GMAKE= yes
|
||||
USE_FORTRAN= yes
|
||||
|
||||
OPTIONS+= OCTAVE "Enable compilation of MEX files for Octave" on
|
||||
OPTIONS+= MATLAB "Enable compilation of MEX files for MATLAB" off
|
||||
|
||||
.if defined(WITHOUT_MATLAB)
|
||||
CONFIGURE_ARGS+= --disable-matlab
|
||||
.endif
|
||||
|
||||
.if defined(WITHOUT_OCTAVE)
|
||||
CONFIGURE_ARGS+= --disable-octave
|
||||
.else
|
||||
BUILD_DEPENDS+= octave:${PORTSDIR}/math/octave
|
||||
.endif
|
||||
|
||||
do-fetch:
|
||||
fetch -o ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} http://www.dynare.org/download/dynare-4.2/source/${DISTNAME}${EXTRACT_SUFX}/at_download/file
|
||||
|
||||
post-configure:
|
||||
@${ECHO_MSG} ""
|
||||
@${ECHO_MSG} ""
|
||||
@${ECHO_MSG} "*******************************************************************************"
|
||||
@${ECHO_MSG} "Follow instructions at http://www.freebsd.org/doc/handbook/linuxemu-matlab.html"
|
||||
@${ECHO_MSG} "on how to install MATLAB on FreeBSD"
|
||||
@${ECHO_MSG} "*******************************************************************************"
|
||||
@${ECHO_MSG} ""
|
||||
@${ECHO_MSG} ""
|
||||
|
||||
.include <bsd.port.mk>
|
2
math/dynare/distinfo
Normal file
2
math/dynare/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (dynare-4.2.1.tar.gz) = 65b30a6524843a5751387cf962a10ba104042bef7932c472254f3bbf03aa044d
|
||||
SIZE (dynare-4.2.1.tar.gz) = 13634307
|
53
math/dynare/files/patch-journal.cweb
Normal file
53
math/dynare/files/patch-journal.cweb
Normal file
@ -0,0 +1,53 @@
|
||||
--- dynare++/kord/journal.cweb.orig 2011-08-21 20:56:09.000000000 +0200
|
||||
+++ dynare++/kord/journal.cweb 2011-08-21 23:02:31.000000000 +0200
|
||||
@@ -5,6 +5,8 @@
|
||||
@c
|
||||
#include "journal.h"
|
||||
#include "kord_exception.h"
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/sysctl.h>
|
||||
|
||||
#if !defined(__MINGW32__)
|
||||
# include <sys/resource.h>
|
||||
@@ -72,7 +74,16 @@
|
||||
@<|SystemResources::availableMemory| code@>=
|
||||
long int SystemResources::availableMemory()
|
||||
{
|
||||
- return pageSize()*sysconf(_SC_AVPHYS_PAGES);
|
||||
+ long value;
|
||||
+ size_t len;
|
||||
+ char *path = "vm.stats.vm.v_free_count";
|
||||
+
|
||||
+ if (sysctlbyname(path, &value, &len, NULL, 0) == -1) {
|
||||
+ return (-1);
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ return pageSize() * value;
|
||||
}
|
||||
|
||||
@ Here we read the current values of resource usage. For MinGW, we
|
||||
@@ -84,6 +95,10 @@
|
||||
long int& idrss, long int& majflt)
|
||||
{
|
||||
struct timeval now;
|
||||
+ long value;
|
||||
+ size_t len;
|
||||
+ char *path = "vm.stats.vm.v_free_count";
|
||||
+
|
||||
gettimeofday(&now, NULL);
|
||||
elapsed = now.tv_sec-start.tv_sec + (now.tv_usec-start.tv_usec)*1.0e-6;
|
||||
|
||||
@@ -107,7 +122,11 @@
|
||||
load_avg = -1.0;
|
||||
#endif
|
||||
|
||||
- pg_avail = sysconf(_SC_AVPHYS_PAGES);
|
||||
+ if (sysctlbyname(path, &value, &len, NULL, 0) == -1) {
|
||||
+ pg_avail = -1;
|
||||
+ }
|
||||
+
|
||||
+ pg_avail = value;
|
||||
}
|
||||
|
||||
@
|
10
math/dynare/files/patch-parser-exception.h
Normal file
10
math/dynare/files/patch-parser-exception.h
Normal file
@ -0,0 +1,10 @@
|
||||
--- dynare++/parser/cc/parser_exception.h.orig 2011-08-21 19:10:51.000000000 +0200
|
||||
+++ dynare++/parser/cc/parser_exception.h 2011-08-21 19:31:06.000000000 +0200
|
||||
@@ -6,6 +6,7 @@
|
||||
#define OG_FORMULA_PARSER_H
|
||||
|
||||
#include <string>
|
||||
+#include <stdio.h>
|
||||
|
||||
namespace ogp {
|
||||
using std::string;
|
5
math/dynare/pkg-descr
Normal file
5
math/dynare/pkg-descr
Normal file
@ -0,0 +1,5 @@
|
||||
Dynare is a software platform for handling a wide class of
|
||||
economic models, in particular dynamic stochastic general
|
||||
equilibrium (DSGE) and overlapping generations (OLG) models.
|
||||
|
||||
WWW: http://www.dynare.org
|
4
math/dynare/pkg-plist
Normal file
4
math/dynare/pkg-plist
Normal file
@ -0,0 +1,4 @@
|
||||
bin/dynare++
|
||||
info/dynare.info
|
||||
lib/matlab/dynare_m
|
||||
@dirrm lib/matlab
|
Loading…
Reference in New Issue
Block a user