aboutsummaryrefslogtreecommitdiff
path: root/math/octave-forge-biosig
diff options
context:
space:
mode:
authorStephen Montgomery-Smith <stephen@FreeBSD.org>2022-10-28 21:58:03 +0000
committerStephen Montgomery-Smith <stephen@FreeBSD.org>2022-10-28 21:58:03 +0000
commit76878a2b78b38528629f522a76a403498c63eb7c (patch)
tree683bb0eb4d11c5944ed056a907669ae159deb9d2 /math/octave-forge-biosig
parent21b6aaf8ecef9dd226df833590c9b6b940206913 (diff)
downloadports-76878a2b78b38528629f522a76a403498c63eb7c.tar.gz
ports-76878a2b78b38528629f522a76a403498c63eb7c.zip
math/octave-forge-biosig: Correction to invokation of localtime.
Bump portrevision.
Diffstat (limited to 'math/octave-forge-biosig')
-rw-r--r--math/octave-forge-biosig/Makefile1
-rw-r--r--math/octave-forge-biosig/files/patch-mexSSAVE.cpp14
2 files changed, 12 insertions, 3 deletions
diff --git a/math/octave-forge-biosig/Makefile b/math/octave-forge-biosig/Makefile
index 25dce241def1..cc6fd5f30199 100644
--- a/math/octave-forge-biosig/Makefile
+++ b/math/octave-forge-biosig/Makefile
@@ -1,5 +1,6 @@
PORTNAME= octave-forge-biosig
DISTVERSION= 3.0.1
+PORTREVISION= 1
CATEGORIES= math
MASTER_SITES= https://pub.ist.ac.at/~schloegl/biosig/prereleases/
DISTNAME= biosig4octave-${DISTVERSION}.src
diff --git a/math/octave-forge-biosig/files/patch-mexSSAVE.cpp b/math/octave-forge-biosig/files/patch-mexSSAVE.cpp
index b7e987b7bb31..2cc834af1bd2 100644
--- a/math/octave-forge-biosig/files/patch-mexSSAVE.cpp
+++ b/math/octave-forge-biosig/files/patch-mexSSAVE.cpp
@@ -1,11 +1,19 @@
---- mexSSAVE.cpp.orig 2022-10-28 21:23:00 UTC
+--- mexSSAVE.cpp.orig 2021-07-14 20:07:43 UTC
+++ mexSSAVE.cpp
-@@ -202,7 +202,7 @@ void mexFunction(
+@@ -87,6 +87,7 @@ void mexFunction(
+ HDRTYPE *hdr;
+ size_t count;
+ time_t T0;
++ time_t zero = 0;
+ char *FileName;
+ char tmpstr[128];
+ int status;
+@@ -202,7 +203,7 @@ void mexFunction(
if ( (p = mxGetField(prhs[0], 0, "tzmin") ) != NULL )
hdr->tzmin = (int16_t)getDouble(p, 0);
else
- hdr->tzmin = -timezone/60;
-+ hdr->tzmin = -localtime(0)->tm_gmtoff/60;
++ hdr->tzmin = -localtime(&zero)->tm_gmtoff/60;
if ( (p = mxGetField(prhs[0], 0, "FileName") ) != NULL ) FileName = mxArrayToString(p);
if ( (p = mxGetField(prhs[0], 0, "SampleRate") ) != NULL ) hdr->SampleRate = getDouble(p, 0);
if ( (p = mxGetField(prhs[0], 0, "NS") ) != NULL ) hdr->NS = getDouble(p, 0);