summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authormaya <maya>2017-03-15 11:33:03 +0000
committermaya <maya>2017-03-15 11:33:03 +0000
commitf10186b2063dd896fe7157280d63b576b4da87bf (patch)
treec5dfe32c325b3fd1d486698d7642ef9011735afd /math
parent4cb3db4679beffcd660efc7ef9968417ecd90fb0 (diff)
downloadpkgsrc-f10186b2063dd896fe7157280d63b576b4da87bf.tar.gz
octave: amend wrapper patches to be netbsd-specific. fix sunOS build
octave is using gnulib for portability, but has an additional wrapper around it. unfortunately that means that this type signature is no longer portable. netbsd doesn't have struct tm_zone, others do. I failed to use gnulib to provide struct tm_zone, using an OS-specific macro as an ugly hack. reported by hans
Diffstat (limited to 'math')
-rw-r--r--math/octave/distinfo6
-rw-r--r--math/octave/patches/patch-liboctave_wrappers_strftime-wrapper.c12
-rw-r--r--math/octave/patches/patch-liboctave_wrappers_strftime-wrapper.h12
3 files changed, 19 insertions, 11 deletions
diff --git a/math/octave/distinfo b/math/octave/distinfo
index c9c1dce1f77..65022fdd72c 100644
--- a/math/octave/distinfo
+++ b/math/octave/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.50 2016/11/19 21:53:12 maya Exp $
+$NetBSD: distinfo,v 1.51 2017/03/15 11:33:03 maya Exp $
SHA1 (octave-4.2.0.tar.gz) = 9fac578c08a7efabd79ccc38bc196b9627e3212f
RMD160 (octave-4.2.0.tar.gz) = 07ff9bae3a0128c93f9113ebf952dea129b58284
@@ -13,8 +13,8 @@ SHA1 (patch-libinterp_dldfcn_config-module.awk) = 0746cca7f69995abbe3af793181b96
SHA1 (patch-libinterp_dldfcn_module.mk) = a38b2b70780d33ed7e5c0f586fc9521367be0e28
SHA1 (patch-libinterp_module.mk) = 26889c064497eb2bcbd77199e96925f61359c128
SHA1 (patch-liboctave_operators_mx-inlines.cc) = e74ea202f89c1a6a394f8fd3d86397dfa2121d7e
-SHA1 (patch-liboctave_wrappers_strftime-wrapper.c) = ca69583ec200f3bcbe02d9b7f8b6b7d001fae5a9
-SHA1 (patch-liboctave_wrappers_strftime-wrapper.h) = 54307cc5678f6654cde29530cb65902ab607550f
+SHA1 (patch-liboctave_wrappers_strftime-wrapper.c) = 1b8645c00e6db0d6d7045fa0bbef13661cd2aa84
+SHA1 (patch-liboctave_wrappers_strftime-wrapper.h) = f1453aa44ea5b3600c5ed13acc2d10800f538959
SHA1 (patch-m4_acinclude.m4) = 194b8c3cf6f5e45a0251b229af9b3a47c12aa608
SHA1 (patch-scripts_pkg_private_configure__make.m) = 7d4b620f889faa66c4c9c581ef8a7e7692b68c94
SHA1 (patch-scripts_plot_util_____gnuplot__drawnow____.m) = 449b178aefd78c5c1b03ffd960f2e8be3874efc2
diff --git a/math/octave/patches/patch-liboctave_wrappers_strftime-wrapper.c b/math/octave/patches/patch-liboctave_wrappers_strftime-wrapper.c
index 0afb7ee11b4..cd619e9c3d1 100644
--- a/math/octave/patches/patch-liboctave_wrappers_strftime-wrapper.c
+++ b/math/octave/patches/patch-liboctave_wrappers_strftime-wrapper.c
@@ -1,15 +1,19 @@
-$NetBSD: patch-liboctave_wrappers_strftime-wrapper.c,v 1.1 2016/11/19 21:53:12 maya Exp $
+$NetBSD: patch-liboctave_wrappers_strftime-wrapper.c,v 1.2 2017/03/15 11:33:03 maya Exp $
-Don't have struct tm_zone (in netbsd), instead use timezone_t as libgnu does
+Octave's wrapper breaks gnulib portability, netbsd doesn't have struct tm_zone,
+use ifdefs to work around it
--- liboctave/wrappers/strftime-wrapper.c.orig 2016-11-13 15:16:10.000000000 +0000
+++ liboctave/wrappers/strftime-wrapper.c
-@@ -36,7 +36,7 @@ along with Octave; see the file COPYING.
+@@ -36,7 +36,11 @@ along with Octave; see the file COPYING.
size_t
octave_strftime_wrapper (char *buf, size_t len, const char *fmt,
-- const struct tm *t, struct tm_zone *tz, int ns)
++#ifdef __NetBSD__
+ const struct tm *t, timezone_t *tz, int ns)
++#else
+ const struct tm *t, struct tm_zone *tz, int ns)
++#endif
{
return nstrftime (buf, len, fmt, t, tz, ns);
}
diff --git a/math/octave/patches/patch-liboctave_wrappers_strftime-wrapper.h b/math/octave/patches/patch-liboctave_wrappers_strftime-wrapper.h
index cd4f983b5ad..37a54dd8301 100644
--- a/math/octave/patches/patch-liboctave_wrappers_strftime-wrapper.h
+++ b/math/octave/patches/patch-liboctave_wrappers_strftime-wrapper.h
@@ -1,15 +1,19 @@
-$NetBSD: patch-liboctave_wrappers_strftime-wrapper.h,v 1.1 2016/11/19 21:53:12 maya Exp $
+$NetBSD: patch-liboctave_wrappers_strftime-wrapper.h,v 1.2 2017/03/15 11:33:03 maya Exp $
-Don't have struct tm_zone (in netbsd), instead use timezone_t as libgnu does
+Octave's wrapper breaks gnulib portability, netbsd doesn't have struct tm_zone,
+use ifdefs to work around it
--- liboctave/wrappers/strftime-wrapper.h.orig 2016-11-13 15:16:10.000000000 +0000
+++ liboctave/wrappers/strftime-wrapper.h
-@@ -35,7 +35,7 @@ extern "C" {
+@@ -35,7 +35,11 @@ extern "C" {
extern size_t
octave_strftime_wrapper (char *buf, size_t len, const char *fmt,
-- const struct tm *t, struct tm_zone *tz, int ns);
++#ifdef __NetBSD__
+ const struct tm *t, timezone_t *tz, int ns);
++#else
+ const struct tm *t, struct tm_zone *tz, int ns);
++#endif
#if defined __cplusplus
}