Update to 7.1.0
This commit is contained in:
parent
6e0f7eae89
commit
69ae45eadf
1
.gitignore
vendored
1
.gitignore
vendored
@ -39,3 +39,4 @@ octave-3.2.4.tar.bz2
|
||||
/octave-6.2.0.tar.lz
|
||||
/octave-6.3.0.tar.lz
|
||||
/octave-6.4.0.tar.lz
|
||||
/octave-7.1.0.tar.lz
|
||||
|
27
bug62436.patch
Normal file
27
bug62436.patch
Normal file
@ -0,0 +1,27 @@
|
||||
# HG changeset patch
|
||||
# User John Donoghue <john.donoghue@ieee.org>
|
||||
# Date 1652358904 14400
|
||||
# Thu May 12 08:35:04 2022 -0400
|
||||
# Branch stable
|
||||
# Node ID 8c940cfcce257369677c09154da2aab2c56eaa79
|
||||
# Parent 63710f3bd9811c2d206ac9e7b4f47cf06c47e153
|
||||
* scripts/pkg/private/build.m: check configure and Makefile exist before trying to unlink them (Bug #62436)
|
||||
|
||||
diff -r 63710f3bd981 -r 8c940cfcce25 scripts/pkg/private/build.m
|
||||
--- a/scripts/pkg/private/build.m Wed May 11 09:44:55 2022 -0700
|
||||
+++ b/scripts/pkg/private/build.m Thu May 12 08:35:04 2022 -0400
|
||||
@@ -77,8 +77,12 @@
|
||||
else
|
||||
arch_abi = getarch ();
|
||||
configure_make (desc, build_root, verbose);
|
||||
- unlink (fullfile (build_root, "src", "configure"));
|
||||
- unlink (fullfile (build_root, "src", "Makefile"));
|
||||
+ if exist (fullfile (build_root, "src", "configure"), "file")
|
||||
+ unlink (fullfile (build_root, "src", "configure"));
|
||||
+ endif
|
||||
+ if exist (fullfile (build_root, "src", "Makefile"), "file")
|
||||
+ unlink (fullfile (build_root, "src", "Makefile"));
|
||||
+ endif
|
||||
endif
|
||||
tar_name = [desc.name "-" desc.version "-" arch_abi ".tar"];
|
||||
tar_path = fullfile (builddir, tar_name);
|
@ -43,7 +43,7 @@
|
||||
%octave_pkg_install \
|
||||
mkdir -p %{buildroot}%{octprefix} \
|
||||
mkdir -p %{buildroot}%{octarchprefix} \
|
||||
%octave_cmd pkg("prefix","%{buildroot}%{octprefix}","%{buildroot}%{octarchprefix}");pkg("global_list",fullfile("%{buildroot}%{octshareprefix}","octave_packages"));pkg("local_list",fullfile("%{buildroot}%{octshareprefix}","octave_packages"));pkg("install","-nodeps","-verbose",glob("%{_builddir}/%{buildsubdir}/build/%{octpkg}-%{version}-*.tar.gz"){1,1});unlink(pkg("local_list"));unlink(pkg("global_list")); \
|
||||
%octave_cmd pkg("prefix","%{buildroot}%{octprefix}","%{buildroot}%{octarchprefix}");pkg("global_list",fullfile("%{buildroot}%{octshareprefix}","octave_packages"));pkg("install","-nodeps","-verbose",glob("%{_builddir}/%{buildsubdir}/build/%{octpkg}-%{version}-*.tar.gz"){1,1});unlink(pkg("global_list")); \
|
||||
if [ -e %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m ] \
|
||||
then \
|
||||
mv %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m.orig \
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -up octave-4.4.1/libinterp/corefcn/input.cc.crash octave-4.4.1/libinterp/corefcn/input.cc
|
||||
--- octave-4.4.1/libinterp/corefcn/input.cc.crash 2018-11-11 17:27:39.588037444 -0700
|
||||
+++ octave-4.4.1/libinterp/corefcn/input.cc 2018-11-11 17:30:42.344208272 -0700
|
||||
@@ -255,7 +255,7 @@ namespace octave
|
||||
|
||||
octave_diary << retval;
|
||||
|
||||
- if (retval.back () != '\n')
|
||||
+ if (!retval.empty () && retval.back () != '\n')
|
||||
octave_diary << "\n";
|
||||
}
|
||||
else
|
@ -1,522 +0,0 @@
|
||||
diff -up octave-6.4.0/libgnu/cdefs.h.gcc12 octave-6.4.0/libgnu/cdefs.h
|
||||
--- octave-6.4.0/libgnu/cdefs.h.gcc12 2021-10-30 08:20:24.000000000 -0600
|
||||
+++ octave-6.4.0/libgnu/cdefs.h 2022-02-06 20:12:24.245448459 -0700
|
||||
@@ -1,17 +1,18 @@
|
||||
-/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 1992-2022 Free Software Foundation, Inc.
|
||||
+ Copyright The GNU Toolchain Authors.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
- modify it under the terms of the GNU General Public
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
- version 3 of the License, or (at your option) any later version.
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
- General Public License for more details.
|
||||
+ Lesser General Public License for more details.
|
||||
|
||||
- You should have received a copy of the GNU General Public
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
@@ -25,7 +26,7 @@
|
||||
|
||||
/* The GNU libc does not support any K&R compilers or the traditional mode
|
||||
of ISO C compilers anymore. Check for some of the combinations not
|
||||
- anymore supported. */
|
||||
+ supported anymore. */
|
||||
#if defined __GNUC__ && !defined __STDC__
|
||||
# error "You need a ISO C conforming compiler to use the glibc headers"
|
||||
#endif
|
||||
@@ -34,31 +35,26 @@
|
||||
#undef __P
|
||||
#undef __PMT
|
||||
|
||||
-/* Compilers that are not clang may object to
|
||||
- #if defined __clang__ && __has_attribute(...)
|
||||
- even though they do not need to evaluate the right-hand side of the &&. */
|
||||
-#if defined __clang__ && defined __has_attribute
|
||||
-# define __glibc_clang_has_attribute(name) __has_attribute (name)
|
||||
+/* Compilers that lack __has_attribute may object to
|
||||
+ #if defined __has_attribute && __has_attribute (...)
|
||||
+ even though they do not need to evaluate the right-hand side of the &&.
|
||||
+ Similarly for __has_builtin, etc. */
|
||||
+#if (defined __has_attribute \
|
||||
+ && (!defined __clang_minor__ \
|
||||
+ || 3 < __clang_major__ + (5 <= __clang_minor__)))
|
||||
+# define __glibc_has_attribute(attr) __has_attribute (attr)
|
||||
+#else
|
||||
+# define __glibc_has_attribute(attr) 0
|
||||
+#endif
|
||||
+#ifdef __has_builtin
|
||||
+# define __glibc_has_builtin(name) __has_builtin (name)
|
||||
#else
|
||||
-# define __glibc_clang_has_attribute(name) 0
|
||||
+# define __glibc_has_builtin(name) 0
|
||||
#endif
|
||||
-
|
||||
-/* Compilers that are not clang may object to
|
||||
- #if defined __clang__ && __has_builtin(...)
|
||||
- even though they do not need to evaluate the right-hand side of the &&. */
|
||||
-#if defined __clang__ && defined __has_builtin
|
||||
-# define __glibc_clang_has_builtin(name) __has_builtin (name)
|
||||
-#else
|
||||
-# define __glibc_clang_has_builtin(name) 0
|
||||
-#endif
|
||||
-
|
||||
-/* Compilers that are not clang may object to
|
||||
- #if defined __clang__ && __has_extension(...)
|
||||
- even though they do not need to evaluate the right-hand side of the &&. */
|
||||
-#if defined __clang__ && defined __has_extension
|
||||
-# define __glibc_clang_has_extension(ext) __has_extension (ext)
|
||||
+#ifdef __has_extension
|
||||
+# define __glibc_has_extension(ext) __has_extension (ext)
|
||||
#else
|
||||
-# define __glibc_clang_has_extension(ext) 0
|
||||
+# define __glibc_has_extension(ext) 0
|
||||
#endif
|
||||
|
||||
#if defined __GNUC__ || defined __clang__
|
||||
@@ -74,22 +70,26 @@
|
||||
# endif
|
||||
|
||||
/* GCC can always grok prototypes. For C++ programs we add throw()
|
||||
- to help it optimize the function calls. But this works only with
|
||||
+ to help it optimize the function calls. But this only works with
|
||||
gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
|
||||
as non-throwing using a function attribute since programs can use
|
||||
the -fexceptions options for C code as well. */
|
||||
# if !defined __cplusplus \
|
||||
- && (__GNUC_PREREQ (3, 4) || __glibc_clang_has_attribute (__nothrow__))
|
||||
+ && (__GNUC_PREREQ (3, 4) || __glibc_has_attribute (__nothrow__))
|
||||
# define __THROW __attribute__ ((__nothrow__ __LEAF))
|
||||
# define __THROWNL __attribute__ ((__nothrow__))
|
||||
# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
|
||||
# define __NTHNL(fct) __attribute__ ((__nothrow__)) fct
|
||||
# else
|
||||
# if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major >= 4)
|
||||
-# define __THROW throw ()
|
||||
-# define __THROWNL throw ()
|
||||
-# define __NTH(fct) __LEAF_ATTR fct throw ()
|
||||
-# define __NTHNL(fct) fct throw ()
|
||||
+# if __cplusplus >= 201103L
|
||||
+# define __THROW noexcept (true)
|
||||
+# else
|
||||
+# define __THROW throw ()
|
||||
+# endif
|
||||
+# define __THROWNL __THROW
|
||||
+# define __NTH(fct) __LEAF_ATTR fct __THROW
|
||||
+# define __NTHNL(fct) fct __THROW
|
||||
# else
|
||||
# define __THROW
|
||||
# define __THROWNL
|
||||
@@ -142,24 +142,68 @@
|
||||
#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
|
||||
#define __bos0(ptr) __builtin_object_size (ptr, 0)
|
||||
|
||||
+/* Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. */
|
||||
+#if __USE_FORTIFY_LEVEL == 3 && (__glibc_clang_prereq (9, 0) \
|
||||
+ || __GNUC_PREREQ (12, 0))
|
||||
+# define __glibc_objsize0(__o) __builtin_dynamic_object_size (__o, 0)
|
||||
+# define __glibc_objsize(__o) __builtin_dynamic_object_size (__o, 1)
|
||||
+#else
|
||||
+# define __glibc_objsize0(__o) __bos0 (__o)
|
||||
+# define __glibc_objsize(__o) __bos (__o)
|
||||
+#endif
|
||||
+
|
||||
+/* Compile time conditions to choose between the regular, _chk and _chk_warn
|
||||
+ variants. These conditions should get evaluated to constant and optimized
|
||||
+ away. */
|
||||
+
|
||||
+#define __glibc_safe_len_cond(__l, __s, __osz) ((__l) <= (__osz) / (__s))
|
||||
+#define __glibc_unsigned_or_positive(__l) \
|
||||
+ ((__typeof (__l)) 0 < (__typeof (__l)) -1 \
|
||||
+ || (__builtin_constant_p (__l) && (__l) > 0))
|
||||
+
|
||||
+/* Length is known to be safe at compile time if the __L * __S <= __OBJSZ
|
||||
+ condition can be folded to a constant and if it is true. The -1 check is
|
||||
+ redundant because since it implies that __glibc_safe_len_cond is true. */
|
||||
+#define __glibc_safe_or_unknown_len(__l, __s, __osz) \
|
||||
+ (__glibc_unsigned_or_positive (__l) \
|
||||
+ && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \
|
||||
+ __s, __osz)) \
|
||||
+ && __glibc_safe_len_cond ((__SIZE_TYPE__) (__l), __s, __osz))
|
||||
+
|
||||
+/* Conversely, we know at compile time that the length is unsafe if the
|
||||
+ __L * __S <= __OBJSZ condition can be folded to a constant and if it is
|
||||
+ false. */
|
||||
+#define __glibc_unsafe_len(__l, __s, __osz) \
|
||||
+ (__glibc_unsigned_or_positive (__l) \
|
||||
+ && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \
|
||||
+ __s, __osz)) \
|
||||
+ && !__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), __s, __osz))
|
||||
+
|
||||
+/* Fortify function f. __f_alias, __f_chk and __f_chk_warn must be
|
||||
+ declared. */
|
||||
+
|
||||
+#define __glibc_fortify(f, __l, __s, __osz, ...) \
|
||||
+ (__glibc_safe_or_unknown_len (__l, __s, __osz) \
|
||||
+ ? __ ## f ## _alias (__VA_ARGS__) \
|
||||
+ : (__glibc_unsafe_len (__l, __s, __osz) \
|
||||
+ ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
|
||||
+ : __ ## f ## _chk (__VA_ARGS__, __osz))) \
|
||||
+
|
||||
+/* Fortify function f, where object size argument passed to f is the number of
|
||||
+ elements and not total size. */
|
||||
+
|
||||
+#define __glibc_fortify_n(f, __l, __s, __osz, ...) \
|
||||
+ (__glibc_safe_or_unknown_len (__l, __s, __osz) \
|
||||
+ ? __ ## f ## _alias (__VA_ARGS__) \
|
||||
+ : (__glibc_unsafe_len (__l, __s, __osz) \
|
||||
+ ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
|
||||
+ : __ ## f ## _chk (__VA_ARGS__, (__osz) / (__s)))) \
|
||||
+
|
||||
#if __GNUC_PREREQ (4,3)
|
||||
-# define __warndecl(name, msg) \
|
||||
- extern void name (void) __attribute__((__warning__ (msg)))
|
||||
# define __warnattr(msg) __attribute__((__warning__ (msg)))
|
||||
# define __errordecl(name, msg) \
|
||||
extern void name (void) __attribute__((__error__ (msg)))
|
||||
-#elif __glibc_clang_has_attribute (__diagnose_if__) && 0
|
||||
-/* These definitions are not enabled, because they produce bogus warnings
|
||||
- in the glibc Fortify functions. These functions are written in a style
|
||||
- that works with GCC. In order to work with clang, these functions would
|
||||
- need to be modified. */
|
||||
-# define __warndecl(name, msg) \
|
||||
- extern void name (void) __attribute__((__diagnose_if__ (1, msg, "warning")))
|
||||
-# define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning")))
|
||||
-# define __errordecl(name, msg) \
|
||||
- extern void name (void) __attribute__((__diagnose_if__ (1, msg, "error")))
|
||||
#else
|
||||
-# define __warndecl(name, msg) extern void name (void)
|
||||
# define __warnattr(msg)
|
||||
# define __errordecl(name, msg) extern void name (void)
|
||||
#endif
|
||||
@@ -233,7 +277,7 @@
|
||||
/* At some point during the gcc 2.96 development the `malloc' attribute
|
||||
for functions was introduced. We don't want to use it unconditionally
|
||||
(although this would be possible) since it generates warnings. */
|
||||
-#if __GNUC_PREREQ (2,96) || __glibc_clang_has_attribute (__malloc__)
|
||||
+#if __GNUC_PREREQ (2,96) || __glibc_has_attribute (__malloc__)
|
||||
# define __attribute_malloc__ __attribute__ ((__malloc__))
|
||||
#else
|
||||
# define __attribute_malloc__ /* Ignore */
|
||||
@@ -248,26 +292,41 @@
|
||||
# define __attribute_alloc_size__(params) /* Ignore. */
|
||||
#endif
|
||||
|
||||
+/* Tell the compiler which argument to an allocation function
|
||||
+ indicates the alignment of the allocation. */
|
||||
+#if __GNUC_PREREQ (4, 9) || __glibc_has_attribute (__alloc_align__)
|
||||
+# define __attribute_alloc_align__(param) \
|
||||
+ __attribute__ ((__alloc_align__ param))
|
||||
+#else
|
||||
+# define __attribute_alloc_align__(param) /* Ignore. */
|
||||
+#endif
|
||||
+
|
||||
/* At some point during the gcc 2.96 development the `pure' attribute
|
||||
for functions was introduced. We don't want to use it unconditionally
|
||||
(although this would be possible) since it generates warnings. */
|
||||
-#if __GNUC_PREREQ (2,96) || __glibc_clang_has_attribute (__pure__)
|
||||
+#if __GNUC_PREREQ (2,96) || __glibc_has_attribute (__pure__)
|
||||
# define __attribute_pure__ __attribute__ ((__pure__))
|
||||
#else
|
||||
# define __attribute_pure__ /* Ignore */
|
||||
#endif
|
||||
|
||||
/* This declaration tells the compiler that the value is constant. */
|
||||
-#if __GNUC_PREREQ (2,5) || __glibc_clang_has_attribute (__const__)
|
||||
+#if __GNUC_PREREQ (2,5) || __glibc_has_attribute (__const__)
|
||||
# define __attribute_const__ __attribute__ ((__const__))
|
||||
#else
|
||||
# define __attribute_const__ /* Ignore */
|
||||
#endif
|
||||
|
||||
+#if __GNUC_PREREQ (2,7) || __glibc_has_attribute (__unused__)
|
||||
+# define __attribute_maybe_unused__ __attribute__ ((__unused__))
|
||||
+#else
|
||||
+# define __attribute_maybe_unused__ /* Ignore */
|
||||
+#endif
|
||||
+
|
||||
/* At some point during the gcc 3.1 development the `used' attribute
|
||||
for functions was introduced. We don't want to use it unconditionally
|
||||
(although this would be possible) since it generates warnings. */
|
||||
-#if __GNUC_PREREQ (3,1) || __glibc_clang_has_attribute (__used__)
|
||||
+#if __GNUC_PREREQ (3,1) || __glibc_has_attribute (__used__)
|
||||
# define __attribute_used__ __attribute__ ((__used__))
|
||||
# define __attribute_noinline__ __attribute__ ((__noinline__))
|
||||
#else
|
||||
@@ -276,7 +335,7 @@
|
||||
#endif
|
||||
|
||||
/* Since version 3.2, gcc allows marking deprecated functions. */
|
||||
-#if __GNUC_PREREQ (3,2) || __glibc_clang_has_attribute (__deprecated__)
|
||||
+#if __GNUC_PREREQ (3,2) || __glibc_has_attribute (__deprecated__)
|
||||
# define __attribute_deprecated__ __attribute__ ((__deprecated__))
|
||||
#else
|
||||
# define __attribute_deprecated__ /* Ignore */
|
||||
@@ -285,8 +344,8 @@
|
||||
/* Since version 4.5, gcc also allows one to specify the message printed
|
||||
when a deprecated function is used. clang claims to be gcc 4.2, but
|
||||
may also support this feature. */
|
||||
-#if __GNUC_PREREQ (4,5) || \
|
||||
- __glibc_clang_has_extension (__attribute_deprecated_with_message__)
|
||||
+#if __GNUC_PREREQ (4,5) \
|
||||
+ || __glibc_has_extension (__attribute_deprecated_with_message__)
|
||||
# define __attribute_deprecated_msg__(msg) \
|
||||
__attribute__ ((__deprecated__ (msg)))
|
||||
#else
|
||||
@@ -299,7 +358,7 @@
|
||||
If several `format_arg' attributes are given for the same function, in
|
||||
gcc-3.0 and older, all but the last one are ignored. In newer gccs,
|
||||
all designated arguments are considered. */
|
||||
-#if __GNUC_PREREQ (2,8) || __glibc_clang_has_attribute (__format_arg__)
|
||||
+#if __GNUC_PREREQ (2,8) || __glibc_has_attribute (__format_arg__)
|
||||
# define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
|
||||
#else
|
||||
# define __attribute_format_arg__(x) /* Ignore */
|
||||
@@ -309,7 +368,7 @@
|
||||
attribute for functions was introduced. We don't want to use it
|
||||
unconditionally (although this would be possible) since it
|
||||
generates warnings. */
|
||||
-#if __GNUC_PREREQ (2,97) || __glibc_clang_has_attribute (__format__)
|
||||
+#if __GNUC_PREREQ (2,97) || __glibc_has_attribute (__format__)
|
||||
# define __attribute_format_strfmon__(a,b) \
|
||||
__attribute__ ((__format__ (__strfmon__, a, b)))
|
||||
#else
|
||||
@@ -317,19 +376,33 @@
|
||||
#endif
|
||||
|
||||
/* The nonnull function attribute marks pointer parameters that
|
||||
- must not be NULL. Do not define __nonnull if it is already defined,
|
||||
- for portability when this file is used in Gnulib. */
|
||||
+ must not be NULL. This has the name __nonnull in glibc,
|
||||
+ and __attribute_nonnull__ in files shared with Gnulib to avoid
|
||||
+ collision with a different __nonnull in DragonFlyBSD 5.9. */
|
||||
+#ifndef __attribute_nonnull__
|
||||
+# if __GNUC_PREREQ (3,3) || __glibc_has_attribute (__nonnull__)
|
||||
+# define __attribute_nonnull__(params) __attribute__ ((__nonnull__ params))
|
||||
+# else
|
||||
+# define __attribute_nonnull__(params)
|
||||
+# endif
|
||||
+#endif
|
||||
#ifndef __nonnull
|
||||
-# if __GNUC_PREREQ (3,3) || __glibc_clang_has_attribute (__nonnull__)
|
||||
-# define __nonnull(params) __attribute__ ((__nonnull__ params))
|
||||
+# define __nonnull(params) __attribute_nonnull__ (params)
|
||||
+#endif
|
||||
+
|
||||
+/* The returns_nonnull function attribute marks the return type of the function
|
||||
+ as always being non-null. */
|
||||
+#ifndef __returns_nonnull
|
||||
+# if __GNUC_PREREQ (4, 9) || __glibc_has_attribute (__returns_nonnull__)
|
||||
+# define __returns_nonnull __attribute__ ((__returns_nonnull__))
|
||||
# else
|
||||
-# define __nonnull(params)
|
||||
+# define __returns_nonnull
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* If fortification mode, we warn about unused results of certain
|
||||
function calls which can lead to problems. */
|
||||
-#if __GNUC_PREREQ (3,4) || __glibc_clang_has_attribute (__warn_unused_result__)
|
||||
+#if __GNUC_PREREQ (3,4) || __glibc_has_attribute (__warn_unused_result__)
|
||||
# define __attribute_warn_unused_result__ \
|
||||
__attribute__ ((__warn_unused_result__))
|
||||
# if defined __USE_FORTIFY_LEVEL && __USE_FORTIFY_LEVEL > 0
|
||||
@@ -343,7 +416,7 @@
|
||||
#endif
|
||||
|
||||
/* Forces a function to be always inlined. */
|
||||
-#if __GNUC_PREREQ (3,2) || __glibc_clang_has_attribute (__always_inline__)
|
||||
+#if __GNUC_PREREQ (3,2) || __glibc_has_attribute (__always_inline__)
|
||||
/* The Linux kernel defines __always_inline in stddef.h (283d7573), and
|
||||
it conflicts with this definition. Therefore undefine it first to
|
||||
allow either header to be included first. */
|
||||
@@ -356,7 +429,7 @@
|
||||
|
||||
/* Associate error messages with the source location of the call site rather
|
||||
than with the source location inside the function. */
|
||||
-#if __GNUC_PREREQ (4,3) || __glibc_clang_has_attribute (__artificial__)
|
||||
+#if __GNUC_PREREQ (4,3) || __glibc_has_attribute (__artificial__)
|
||||
# define __attribute_artificial__ __attribute__ ((__artificial__))
|
||||
#else
|
||||
# define __attribute_artificial__ /* Ignore */
|
||||
@@ -433,7 +506,7 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
-#if (__GNUC__ >= 3) || __glibc_clang_has_builtin (__builtin_expect)
|
||||
+#if (__GNUC__ >= 3) || __glibc_has_builtin (__builtin_expect)
|
||||
# define __glibc_unlikely(cond) __builtin_expect ((cond), 0)
|
||||
# define __glibc_likely(cond) __builtin_expect ((cond), 1)
|
||||
#else
|
||||
@@ -441,12 +514,6 @@
|
||||
# define __glibc_likely(cond) (cond)
|
||||
#endif
|
||||
|
||||
-#ifdef __has_attribute
|
||||
-# define __glibc_has_attribute(attr) __has_attribute (attr)
|
||||
-#else
|
||||
-# define __glibc_has_attribute(attr) 0
|
||||
-#endif
|
||||
-
|
||||
#if (!defined _Noreturn \
|
||||
&& (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
|
||||
&& !(__GNUC_PREREQ (4,7) \
|
||||
@@ -467,6 +534,16 @@
|
||||
# define __attribute_nonstring__
|
||||
#endif
|
||||
|
||||
+/* Undefine (also defined in libc-symbols.h). */
|
||||
+#undef __attribute_copy__
|
||||
+#if __GNUC_PREREQ (9, 0)
|
||||
+/* Copies attributes from the declaration or type referenced by
|
||||
+ the argument. */
|
||||
+# define __attribute_copy__(arg) __attribute__ ((__copy__ (arg)))
|
||||
+#else
|
||||
+# define __attribute_copy__(arg)
|
||||
+#endif
|
||||
+
|
||||
#if (!defined _Static_assert && !defined __cplusplus \
|
||||
&& (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
|
||||
&& (!(__GNUC_PREREQ (4, 6) || __clang_major__ >= 4) \
|
||||
@@ -476,14 +553,44 @@
|
||||
[!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })]
|
||||
#endif
|
||||
|
||||
-/* The #ifndef lets Gnulib avoid including these on non-glibc
|
||||
- platforms, where the includes typically do not exist. */
|
||||
-#ifndef __WORDSIZE
|
||||
+/* Gnulib avoids including these, as they don't work on non-glibc or
|
||||
+ older glibc platforms. */
|
||||
+#ifndef __GNULIB_CDEFS
|
||||
# include <bits/wordsize.h>
|
||||
# include <bits/long-double.h>
|
||||
#endif
|
||||
|
||||
-#if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH
|
||||
+#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
|
||||
+# ifdef __REDIRECT
|
||||
+
|
||||
+/* Alias name defined automatically. */
|
||||
+# define __LDBL_REDIR(name, proto) ... unused__ldbl_redir
|
||||
+# define __LDBL_REDIR_DECL(name) \
|
||||
+ extern __typeof (name) name __asm (__ASMNAME ("__" #name "ieee128"));
|
||||
+
|
||||
+/* Alias name defined automatically, with leading underscores. */
|
||||
+# define __LDBL_REDIR2_DECL(name) \
|
||||
+ extern __typeof (__##name) __##name \
|
||||
+ __asm (__ASMNAME ("__" #name "ieee128"));
|
||||
+
|
||||
+/* Alias name defined manually. */
|
||||
+# define __LDBL_REDIR1(name, proto, alias) ... unused__ldbl_redir1
|
||||
+# define __LDBL_REDIR1_DECL(name, alias) \
|
||||
+ extern __typeof (name) name __asm (__ASMNAME (#alias));
|
||||
+
|
||||
+# define __LDBL_REDIR1_NTH(name, proto, alias) \
|
||||
+ __REDIRECT_NTH (name, proto, alias)
|
||||
+# define __REDIRECT_NTH_LDBL(name, proto, alias) \
|
||||
+ __LDBL_REDIR1_NTH (name, proto, __##alias##ieee128)
|
||||
+
|
||||
+/* Unused. */
|
||||
+# define __REDIRECT_LDBL(name, proto, alias) ... unused__redirect_ldbl
|
||||
+# define __LDBL_REDIR_NTH(name, proto) ... unused__ldbl_redir_nth
|
||||
+
|
||||
+# else
|
||||
+_Static_assert (0, "IEEE 128-bits long double requires redirection on this platform");
|
||||
+# endif
|
||||
+#elif defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH
|
||||
# define __LDBL_COMPAT 1
|
||||
# ifdef __REDIRECT
|
||||
# define __LDBL_REDIR1(name, proto, alias) __REDIRECT (name, proto, alias)
|
||||
@@ -492,6 +599,8 @@
|
||||
# define __LDBL_REDIR1_NTH(name, proto, alias) __REDIRECT_NTH (name, proto, alias)
|
||||
# define __LDBL_REDIR_NTH(name, proto) \
|
||||
__LDBL_REDIR1_NTH (name, proto, __nldbl_##name)
|
||||
+# define __LDBL_REDIR2_DECL(name) \
|
||||
+ extern __typeof (__##name) __##name __asm (__ASMNAME ("__nldbl___" #name));
|
||||
# define __LDBL_REDIR1_DECL(name, alias) \
|
||||
extern __typeof (name) name __asm (__ASMNAME (#alias));
|
||||
# define __LDBL_REDIR_DECL(name) \
|
||||
@@ -502,11 +611,13 @@
|
||||
__LDBL_REDIR1_NTH (name, proto, __nldbl_##alias)
|
||||
# endif
|
||||
#endif
|
||||
-#if !defined __LDBL_COMPAT || !defined __REDIRECT
|
||||
+#if (!defined __LDBL_COMPAT && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0) \
|
||||
+ || !defined __REDIRECT
|
||||
# define __LDBL_REDIR1(name, proto, alias) name proto
|
||||
# define __LDBL_REDIR(name, proto) name proto
|
||||
# define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW
|
||||
# define __LDBL_REDIR_NTH(name, proto) name proto __THROW
|
||||
+# define __LDBL_REDIR2_DECL(name)
|
||||
# define __LDBL_REDIR_DECL(name)
|
||||
# ifdef __REDIRECT
|
||||
# define __REDIRECT_LDBL(name, proto, alias) __REDIRECT (name, proto, alias)
|
||||
@@ -537,7 +648,7 @@
|
||||
check is required to enable the use of generic selection. */
|
||||
#if !defined __cplusplus \
|
||||
&& (__GNUC_PREREQ (4, 9) \
|
||||
- || __glibc_clang_has_extension (c_generic_selections) \
|
||||
+ || __glibc_has_extension (c_generic_selections) \
|
||||
|| (!defined __GNUC__ && defined __STDC_VERSION__ \
|
||||
&& __STDC_VERSION__ >= 201112L))
|
||||
# define __HAVE_GENERIC_SELECTION 1
|
||||
@@ -545,4 +656,50 @@
|
||||
# define __HAVE_GENERIC_SELECTION 0
|
||||
#endif
|
||||
|
||||
+#if __GNUC_PREREQ (10, 0)
|
||||
+/* Designates a 1-based positional argument ref-index of pointer type
|
||||
+ that can be used to access size-index elements of the pointed-to
|
||||
+ array according to access mode, or at least one element when
|
||||
+ size-index is not provided:
|
||||
+ access (access-mode, <ref-index> [, <size-index>]) */
|
||||
+# define __attr_access(x) __attribute__ ((__access__ x))
|
||||
+/* For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
|
||||
+ use the access attribute to get object sizes from function definition
|
||||
+ arguments, so we can't use them on functions we fortify. Drop the object
|
||||
+ size hints for such functions. */
|
||||
+# if __USE_FORTIFY_LEVEL == 3
|
||||
+# define __fortified_attr_access(a, o, s) __attribute__ ((__access__ (a, o)))
|
||||
+# else
|
||||
+# define __fortified_attr_access(a, o, s) __attr_access ((a, o, s))
|
||||
+# endif
|
||||
+# if __GNUC_PREREQ (11, 0)
|
||||
+# define __attr_access_none(argno) __attribute__ ((__access__ (__none__, argno)))
|
||||
+# else
|
||||
+# define __attr_access_none(argno)
|
||||
+# endif
|
||||
+#else
|
||||
+# define __fortified_attr_access(a, o, s)
|
||||
+# define __attr_access(x)
|
||||
+# define __attr_access_none(argno)
|
||||
+#endif
|
||||
+
|
||||
+#if __GNUC_PREREQ (11, 0)
|
||||
+/* Designates dealloc as a function to call to deallocate objects
|
||||
+ allocated by the declared function. */
|
||||
+# define __attr_dealloc(dealloc, argno) \
|
||||
+ __attribute__ ((__malloc__ (dealloc, argno)))
|
||||
+# define __attr_dealloc_free __attr_dealloc (__builtin_free, 1)
|
||||
+#else
|
||||
+# define __attr_dealloc(dealloc, argno)
|
||||
+# define __attr_dealloc_free
|
||||
+#endif
|
||||
+
|
||||
+/* Specify that a function such as setjmp or vfork may return
|
||||
+ twice. */
|
||||
+#if __GNUC_PREREQ (4, 1)
|
||||
+# define __attribute_returns_twice__ __attribute__ ((__returns_twice__))
|
||||
+#else
|
||||
+# define __attribute_returns_twice__ /* Ignore. */
|
||||
+#endif
|
||||
+
|
||||
#endif /* sys/cdefs.h */
|
111
octave-linestyles.patch
Normal file
111
octave-linestyles.patch
Normal file
@ -0,0 +1,111 @@
|
||||
diff --git a/etc/NEWS.7.md b/etc/NEWS.7.md
|
||||
index b44e7ac..9d86936 100644
|
||||
--- a/etc/NEWS.7.md
|
||||
+++ b/etc/NEWS.7.md
|
||||
@@ -325,6 +325,10 @@ major release after 7):
|
||||
`disable_permutation_matrix` | `optimize_permutation_matrix`
|
||||
`disable_range` | `optimize_range`
|
||||
|
||||
+ For plot functions, the use of numbers to select line colors in
|
||||
+ shorthand formats was an undocumented feature that is deprecated in
|
||||
+ Octave 7 and will be removed from Octave 9.
|
||||
+
|
||||
- Operators
|
||||
|
||||
Operator | Replacement | Description
|
||||
@@ -362,7 +366,6 @@ from Octave 8 (or whatever version is the second major release after 6):
|
||||
and a warning is now emitted if it is used, but it will continue to
|
||||
work.
|
||||
|
||||
-
|
||||
### Removed functions, properties, and features
|
||||
|
||||
The following functions and properties were deprecated in Octave 5
|
||||
diff --git a/scripts/help/warning_ids.m b/scripts/help/warning_ids.m
|
||||
index 0215e67..0b46c00 100644
|
||||
--- a/scripts/help/warning_ids.m
|
||||
+++ b/scripts/help/warning_ids.m
|
||||
@@ -190,6 +190,11 @@
|
||||
## scheduled for removal from Octave.
|
||||
## By default, the @code{Octave:deprecated-keyword} warning is enabled.
|
||||
##
|
||||
+## @item Octave:deprecated-option
|
||||
+## If the @code{Octave:deprecated-option} warning is enabled, a
|
||||
+## warning is issued when an obsolete option or input to a function is used.
|
||||
+## By default, the @code{Octave:deprecated-option} warning is enabled.
|
||||
+##
|
||||
## @item Octave:deprecated-property
|
||||
## If the @code{Octave:deprecated-property} warning is enabled, a
|
||||
## warning is issued when Octave encounters a graphics property that
|
||||
diff --git a/scripts/plot/util/__pltopt__.m b/scripts/plot/util/__pltopt__.m
|
||||
index d91b52d..84d5e78 100644
|
||||
--- a/scripts/plot/util/__pltopt__.m
|
||||
+++ b/scripts/plot/util/__pltopt__.m
|
||||
@@ -158,6 +158,12 @@ function [options, valid] = decode_linespec (caller, opt, err_on_invalid)
|
||||
topt = opt(1);
|
||||
n = 1;
|
||||
|
||||
+ if (any (topt == "0":"6"))
|
||||
+ warning ("Octave:deprecated-option", ...
|
||||
+ ["%s: using numbers to select line colors is deprecated. ", ...
|
||||
+ "Use the corresponding color identifier instead."], caller);
|
||||
+ endif
|
||||
+
|
||||
## LineStyles
|
||||
if (strncmp (opt, "--", 2) || strncmp (opt, "-.", 2))
|
||||
options.linestyle = opt(1:2);
|
||||
@@ -181,21 +187,28 @@ function [options, valid] = decode_linespec (caller, opt, err_on_invalid)
|
||||
n = 9;
|
||||
endif
|
||||
endif
|
||||
+ ## Backward compatibility. Leave undocumented.
|
||||
+ if (topt == "@")
|
||||
+ warning ("Octave:deprecated-option", ...
|
||||
+ "%s: marker type '@' is deprecated. Use '+' instead.", ...
|
||||
+ caller);
|
||||
+ topt = "+";
|
||||
+ endif
|
||||
options.marker = topt;
|
||||
- ## Color specs
|
||||
- elseif (topt == "k")
|
||||
+ ## Numeric color specs are for backward compatibility. Don't document.
|
||||
+ elseif (topt == "k" || topt == "0")
|
||||
options.color = [0, 0, 0];
|
||||
- elseif (topt == "r")
|
||||
+ elseif (topt == "r" || topt == "1")
|
||||
if (strncmp (opt, "red", 3))
|
||||
n = 3;
|
||||
endif
|
||||
options.color = [1, 0, 0];
|
||||
- elseif (topt == "g")
|
||||
+ elseif (topt == "g" || topt == "2")
|
||||
if (strncmp (opt, "green", 5))
|
||||
n = 5;
|
||||
endif
|
||||
options.color = [0, 1, 0];
|
||||
- elseif (topt == "b")
|
||||
+ elseif (topt == "b" || topt == "3")
|
||||
if (strncmp (opt, "black", 5))
|
||||
options.color = [0, 0, 0];
|
||||
n = 5;
|
||||
@@ -210,17 +223,17 @@ function [options, valid] = decode_linespec (caller, opt, err_on_invalid)
|
||||
n = 6;
|
||||
endif
|
||||
options.color = [1, 1, 0];
|
||||
- elseif (topt == "m")
|
||||
+ elseif (topt == "m" || topt == "4")
|
||||
if (strncmp (opt, "magenta", 7))
|
||||
n = 7;
|
||||
endif
|
||||
options.color = [1, 0, 1];
|
||||
- elseif (topt == "c")
|
||||
+ elseif (topt == "c" || topt == "5")
|
||||
if (strncmp (opt, "cyan", 4))
|
||||
n = 4;
|
||||
endif
|
||||
options.color = [0, 1, 1];
|
||||
- elseif (topt == "w")
|
||||
+ elseif (topt == "w" || topt == "6")
|
||||
if (strncmp (opt, "white", 5))
|
||||
n = 5;
|
||||
endif
|
@ -1,375 +0,0 @@
|
||||
diff --git a/libgui/qterminal/libqterminal/unix/Emulation.cpp b/libgui/qterminal/libqterminal/unix/Emulation.cpp
|
||||
index ee301a7dae..39b0b8d922 100644
|
||||
--- a/libgui/qterminal/libqterminal/unix/Emulation.cpp
|
||||
+++ b/libgui/qterminal/libqterminal/unix/Emulation.cpp
|
||||
@@ -54,7 +54,8 @@ Emulation::Emulation() :
|
||||
_codec(nullptr),
|
||||
_decoder(nullptr),
|
||||
_keyTranslator(nullptr),
|
||||
- _usesMouse(false)
|
||||
+ _usesMouse(false),
|
||||
+ _bracketedPasteMode(false)
|
||||
{
|
||||
|
||||
// create screens with a default size
|
||||
@@ -68,6 +69,8 @@ Emulation::Emulation() :
|
||||
// listen for mouse status changes
|
||||
connect( this , SIGNAL(programUsesMouseChanged(bool)) ,
|
||||
SLOT(usesMouseChanged(bool)) );
|
||||
+ connect(this , SIGNAL(programBracketedPasteModeChanged(bool)) ,
|
||||
+ SLOT(bracketedPasteModeChanged(bool)));
|
||||
}
|
||||
|
||||
bool Emulation::programUsesMouse() const
|
||||
@@ -80,6 +83,16 @@ void Emulation::usesMouseChanged(bool usesMouse)
|
||||
_usesMouse = usesMouse;
|
||||
}
|
||||
|
||||
+bool Emulation::programBracketedPasteMode() const
|
||||
+{
|
||||
+ return _bracketedPasteMode;
|
||||
+}
|
||||
+
|
||||
+void Emulation::bracketedPasteModeChanged(bool bracketedPasteMode)
|
||||
+{
|
||||
+ _bracketedPasteMode = bracketedPasteMode;
|
||||
+}
|
||||
+
|
||||
ScreenWindow* Emulation::createWindow()
|
||||
{
|
||||
ScreenWindow* window = new ScreenWindow();
|
||||
diff --git a/libgui/qterminal/libqterminal/unix/Emulation.h b/libgui/qterminal/libqterminal/unix/Emulation.h
|
||||
index 549a5916f4..4cc62fd46c 100644
|
||||
--- a/libgui/qterminal/libqterminal/unix/Emulation.h
|
||||
+++ b/libgui/qterminal/libqterminal/unix/Emulation.h
|
||||
@@ -213,6 +213,8 @@ public:
|
||||
*/
|
||||
bool programUsesMouse() const;
|
||||
|
||||
+ bool programBracketedPasteMode() const;
|
||||
+
|
||||
public slots:
|
||||
|
||||
/** Change the size of the emulation's image */
|
||||
@@ -317,6 +319,8 @@ signals:
|
||||
*/
|
||||
void programUsesMouseChanged(bool usesMouse);
|
||||
|
||||
+ void programBracketedPasteModeChanged(bool bracketedPasteMode);
|
||||
+
|
||||
/**
|
||||
* Emitted when the contents of the screen image change.
|
||||
* The emulation buffers the updates from successive image changes,
|
||||
@@ -445,9 +449,12 @@ private slots:
|
||||
|
||||
void usesMouseChanged(bool usesMouse);
|
||||
|
||||
+ void bracketedPasteModeChanged(bool bracketedPasteMode);
|
||||
+
|
||||
private:
|
||||
|
||||
bool _usesMouse;
|
||||
+ bool _bracketedPasteMode;
|
||||
QTimer _bulkTimer1;
|
||||
QTimer _bulkTimer2;
|
||||
|
||||
diff --git a/libgui/qterminal/libqterminal/unix/TerminalModel.cpp b/libgui/qterminal/libqterminal/unix/TerminalModel.cpp
|
||||
index d5371d2af2..16be0c5eb8 100644
|
||||
--- a/libgui/qterminal/libqterminal/unix/TerminalModel.cpp
|
||||
+++ b/libgui/qterminal/libqterminal/unix/TerminalModel.cpp
|
||||
@@ -131,6 +131,11 @@ void TerminalModel::addView(TerminalView* widget)
|
||||
|
||||
widget->setUsesMouse( _emulation->programUsesMouse() );
|
||||
|
||||
+ connect( _emulation , SIGNAL(programBracketedPasteModeChanged(bool)) ,
|
||||
+ widget , SLOT(setBracketedPasteMode(bool)) );
|
||||
+
|
||||
+ widget->setBracketedPasteMode(_emulation->programBracketedPasteMode());
|
||||
+
|
||||
widget->setScreenWindow(_emulation->createWindow());
|
||||
}
|
||||
|
||||
diff --git a/libgui/qterminal/libqterminal/unix/TerminalView.cpp b/libgui/qterminal/libqterminal/unix/TerminalView.cpp
|
||||
index 17338abb7e..ac3183ae29 100644
|
||||
--- a/libgui/qterminal/libqterminal/unix/TerminalView.cpp
|
||||
+++ b/libgui/qterminal/libqterminal/unix/TerminalView.cpp
|
||||
@@ -254,6 +254,7 @@ TerminalView::TerminalView(QWidget *parent)
|
||||
,_resizing(false)
|
||||
,_terminalSizeHint(false)
|
||||
,_terminalSizeStartup(true)
|
||||
+ ,_disabledBracketedPasteMode(false)
|
||||
,_actSel(0)
|
||||
,_wordSelectionMode(false)
|
||||
,_lineSelectionMode(false)
|
||||
@@ -312,6 +313,7 @@ TerminalView::TerminalView(QWidget *parent)
|
||||
// QCursor::setAutoHideCursor( this, true );
|
||||
|
||||
setUsesMouse(true);
|
||||
+ setBracketedPasteMode(false);
|
||||
setColorTable(base_color_table);
|
||||
setMouseTracking(true);
|
||||
|
||||
@@ -2312,6 +2314,16 @@ bool TerminalView::usesMouse() const
|
||||
return _mouseMarks;
|
||||
}
|
||||
|
||||
+void TerminalView::setBracketedPasteMode(bool on)
|
||||
+{
|
||||
+ _bracketedPasteMode = on;
|
||||
+}
|
||||
+bool TerminalView::bracketedPasteMode() const
|
||||
+{
|
||||
+ return _bracketedPasteMode;
|
||||
+}
|
||||
+
|
||||
+
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* */
|
||||
/* Clipboard */
|
||||
@@ -2333,6 +2345,13 @@ void TerminalView::emitSelection(bool useXselection,bool appendReturn)
|
||||
if ( ! text.isEmpty() )
|
||||
{
|
||||
text.replace("\n", "\r");
|
||||
+ if (bracketedPasteMode() && !_disabledBracketedPasteMode)
|
||||
+ bracketText(text);
|
||||
+ else if (text.contains ("\t"))
|
||||
+ {
|
||||
+ qWarning ("converting TAB to SPC in pasted text before processing");
|
||||
+ text.replace ("\t", " ");
|
||||
+ }
|
||||
QKeyEvent e(QEvent::KeyPress, 0, Qt::NoModifier, text);
|
||||
emit keyPressedSignal(&e); // expose as a big fat keypress event
|
||||
|
||||
@@ -2340,6 +2359,12 @@ void TerminalView::emitSelection(bool useXselection,bool appendReturn)
|
||||
}
|
||||
}
|
||||
|
||||
+void TerminalView::bracketText(QString& text)
|
||||
+{
|
||||
+ text.prepend("\033[200~");
|
||||
+ text.append("\033[201~");
|
||||
+}
|
||||
+
|
||||
void TerminalView::setSelection(const QString& t)
|
||||
{
|
||||
QApplication::clipboard()->setText(t, QClipboard::Selection);
|
||||
diff --git a/libgui/qterminal/libqterminal/unix/TerminalView.h b/libgui/qterminal/libqterminal/unix/TerminalView.h
|
||||
index 84488d6b22..158fd0c641 100644
|
||||
--- a/libgui/qterminal/libqterminal/unix/TerminalView.h
|
||||
+++ b/libgui/qterminal/libqterminal/unix/TerminalView.h
|
||||
@@ -160,6 +160,9 @@ public:
|
||||
|
||||
void emitSelection(bool useXselection,bool appendReturn);
|
||||
|
||||
+ /** change and wrap text corresponding to paste mode **/
|
||||
+ void bracketText(QString& text);
|
||||
+
|
||||
/**
|
||||
* This enum describes the available shapes for the keyboard cursor.
|
||||
* See setKeyboardCursorShape()
|
||||
@@ -379,6 +382,9 @@ public:
|
||||
*/
|
||||
void visibility_changed (bool visible);
|
||||
|
||||
+ void disableBracketedPasteMode(bool disable) { _disabledBracketedPasteMode = disable; }
|
||||
+ bool bracketedPasteModeIsDisabled() const { return _disabledBracketedPasteMode; }
|
||||
+
|
||||
public slots:
|
||||
|
||||
/**
|
||||
@@ -455,6 +461,9 @@ public slots:
|
||||
/** See setUsesMouse() */
|
||||
bool usesMouse() const;
|
||||
|
||||
+ void setBracketedPasteMode(bool bracketedPasteMode);
|
||||
+ bool bracketedPasteMode() const;
|
||||
+
|
||||
signals:
|
||||
|
||||
void interrupt_signal (void);
|
||||
@@ -666,6 +675,8 @@ private:
|
||||
bool _terminalSizeHint;
|
||||
bool _terminalSizeStartup;
|
||||
bool _mouseMarks;
|
||||
+ bool _bracketedPasteMode;
|
||||
+ bool _disabledBracketedPasteMode;
|
||||
|
||||
QPoint _iPntSel; // initial selection point
|
||||
QPoint _pntSel; // current selection point
|
||||
diff --git a/libgui/qterminal/libqterminal/unix/Vt102Emulation.cpp b/libgui/qterminal/libqterminal/unix/Vt102Emulation.cpp
|
||||
index 9ff26930aa..a9d248e5ef 100644
|
||||
--- a/libgui/qterminal/libqterminal/unix/Vt102Emulation.cpp
|
||||
+++ b/libgui/qterminal/libqterminal/unix/Vt102Emulation.cpp
|
||||
@@ -752,6 +752,11 @@ switch( N )
|
||||
case TY_CSI_PR('h', 1049) : saveCursor(); _screen[1]->clearEntireScreen(); setMode(MODE_AppScreen); break; //XTERM
|
||||
case TY_CSI_PR('l', 1049) : resetMode(MODE_AppScreen); restoreCursor(); break; //XTERM
|
||||
|
||||
+ case TY_CSI_PR('h', 2004) : setMode (MODE_BracketedPaste); break; //XTERM
|
||||
+ case TY_CSI_PR('l', 2004) : resetMode (MODE_BracketedPaste); break; //XTERM
|
||||
+ case TY_CSI_PR('s', 2004) : saveMode (MODE_BracketedPaste); break; //XTERM
|
||||
+ case TY_CSI_PR('r', 2004) : restoreMode (MODE_BracketedPaste); break; //XTERM
|
||||
+
|
||||
//FIXME: weird DEC reset sequence
|
||||
case TY_CSI_PE('p' ) : /* IGNORED: reset ( ) */ break;
|
||||
|
||||
@@ -1137,6 +1142,7 @@ void Vt102Emulation::resetModes()
|
||||
resetMode(MODE_Mouse1001); saveMode(MODE_Mouse1001);
|
||||
resetMode(MODE_Mouse1002); saveMode(MODE_Mouse1002);
|
||||
resetMode(MODE_Mouse1003); saveMode(MODE_Mouse1003);
|
||||
+ resetMode(MODE_BracketedPaste); saveMode(MODE_BracketedPaste);
|
||||
|
||||
resetMode(MODE_AppScreen); saveMode(MODE_AppScreen);
|
||||
// here come obsolete modes
|
||||
@@ -1157,6 +1163,10 @@ void Vt102Emulation::setMode(int m)
|
||||
emit programUsesMouseChanged(false);
|
||||
break;
|
||||
|
||||
+ case MODE_BracketedPaste:
|
||||
+ emit programBracketedPasteModeChanged(true);
|
||||
+ break;
|
||||
+
|
||||
case MODE_AppScreen : _screen[1]->clearSelection();
|
||||
setScreen(1);
|
||||
break;
|
||||
@@ -1180,6 +1190,10 @@ void Vt102Emulation::resetMode(int m)
|
||||
emit programUsesMouseChanged(true);
|
||||
break;
|
||||
|
||||
+ case MODE_BracketedPaste:
|
||||
+ emit programBracketedPasteModeChanged(false);
|
||||
+ break;
|
||||
+
|
||||
case MODE_AppScreen : _screen[0]->clearSelection();
|
||||
setScreen(0);
|
||||
break;
|
||||
diff --git a/libgui/qterminal/libqterminal/unix/Vt102Emulation.h b/libgui/qterminal/libqterminal/unix/Vt102Emulation.h
|
||||
index a12853279f..c0c44f5146 100644
|
||||
--- a/libgui/qterminal/libqterminal/unix/Vt102Emulation.h
|
||||
+++ b/libgui/qterminal/libqterminal/unix/Vt102Emulation.h
|
||||
@@ -37,15 +37,16 @@
|
||||
#include "unix/Emulation.h"
|
||||
#include "unix/Screen.h"
|
||||
|
||||
-#define MODE_AppScreen (MODES_SCREEN+0)
|
||||
-#define MODE_AppCuKeys (MODES_SCREEN+1)
|
||||
-#define MODE_AppKeyPad (MODES_SCREEN+2)
|
||||
-#define MODE_Mouse1000 (MODES_SCREEN+3)
|
||||
-#define MODE_Mouse1001 (MODES_SCREEN+4)
|
||||
-#define MODE_Mouse1002 (MODES_SCREEN+5)
|
||||
-#define MODE_Mouse1003 (MODES_SCREEN+6)
|
||||
-#define MODE_Ansi (MODES_SCREEN+7)
|
||||
-#define MODE_total (MODES_SCREEN+8)
|
||||
+#define MODE_AppScreen (MODES_SCREEN+0)
|
||||
+#define MODE_AppCuKeys (MODES_SCREEN+1)
|
||||
+#define MODE_AppKeyPad (MODES_SCREEN+2)
|
||||
+#define MODE_Mouse1000 (MODES_SCREEN+3)
|
||||
+#define MODE_Mouse1001 (MODES_SCREEN+4)
|
||||
+#define MODE_Mouse1002 (MODES_SCREEN+5)
|
||||
+#define MODE_Mouse1003 (MODES_SCREEN+6)
|
||||
+#define MODE_Ansi (MODES_SCREEN+7)
|
||||
+#define MODE_BracketedPaste (MODES_SCREEN+8)
|
||||
+#define MODE_total (MODES_SCREEN+9)
|
||||
|
||||
struct DECpar
|
||||
{
|
||||
diff --git a/libinterp/corefcn/input.cc b/libinterp/corefcn/input.cc
|
||||
index 35a6ac65b7..187f41da42 100644
|
||||
--- a/libinterp/corefcn/input.cc
|
||||
+++ b/libinterp/corefcn/input.cc
|
||||
@@ -32,6 +32,7 @@ along with Octave; see the file COPYING. If not, see
|
||||
#include <cassert>
|
||||
|
||||
#include <iostream>
|
||||
+#include <queue>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
@@ -1000,7 +1001,7 @@ namespace octave
|
||||
public:
|
||||
|
||||
terminal_reader (base_lexer *lxr = nullptr)
|
||||
- : base_reader (lxr)
|
||||
+ : base_reader (lxr), m_eof (false), m_input_queue ()
|
||||
{ }
|
||||
|
||||
std::string get_input (bool& eof);
|
||||
@@ -1011,6 +1012,9 @@ namespace octave
|
||||
|
||||
private:
|
||||
|
||||
+ bool m_eof;
|
||||
+ std::queue<std::string> m_input_queue;
|
||||
+
|
||||
static const std::string s_in_src;
|
||||
};
|
||||
|
||||
@@ -1073,6 +1077,13 @@ namespace octave
|
||||
|
||||
const std::string terminal_reader::s_in_src ("terminal");
|
||||
|
||||
+ // If octave_gets returns multiple lines, we cache the input and
|
||||
+ // return it one line at a time. Multiple input lines may happen when
|
||||
+ // using readline and bracketed paste mode is enabled, for example.
|
||||
+ // Instead of queueing lines here, it might be better to modify the
|
||||
+ // grammar in the parser to handle multiple lines when working
|
||||
+ // interactively. See also bug #59938.
|
||||
+
|
||||
std::string
|
||||
terminal_reader::get_input (bool& eof)
|
||||
{
|
||||
@@ -1080,7 +1091,54 @@ namespace octave
|
||||
|
||||
eof = false;
|
||||
|
||||
- return octave_gets (eof);
|
||||
+ if (m_input_queue.empty ())
|
||||
+ {
|
||||
+ std::string input = octave_gets (m_eof);
|
||||
+
|
||||
+ size_t len = input.size ();
|
||||
+
|
||||
+ if (len == 0)
|
||||
+ {
|
||||
+ if (m_eof)
|
||||
+ {
|
||||
+ eof = m_eof;
|
||||
+ return input;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ // Can this happen, or will the string returned from
|
||||
+ // octave_gets always end in a newline character?
|
||||
+
|
||||
+ input = "\n";
|
||||
+ len = 1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ size_t beg = 0;
|
||||
+ while (beg < len)
|
||||
+ {
|
||||
+ size_t end = input.find ('\n', beg);
|
||||
+
|
||||
+ if (end == std::string::npos)
|
||||
+ {
|
||||
+ m_input_queue.push (input.substr (beg));
|
||||
+ break;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ m_input_queue.push (input.substr (beg, end-beg+1));
|
||||
+ beg = end + 1;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ std::string retval = m_input_queue.front ();
|
||||
+ m_input_queue.pop ();
|
||||
+
|
||||
+ if (m_input_queue.empty ())
|
||||
+ eof = m_eof;
|
||||
+
|
||||
+ return retval;
|
||||
}
|
||||
|
||||
const std::string file_reader::s_in_src ("file");
|
@ -1,504 +0,0 @@
|
||||
diff -up octave-5.1.90/configure.ac.sundials3 octave-5.1.90/configure.ac
|
||||
--- octave-5.1.90/configure.ac.sundials3 2020-01-18 11:48:59.000074162 -0700
|
||||
+++ octave-5.1.90/configure.ac 2020-01-18 11:50:21.861966968 -0700
|
||||
@@ -2220,15 +2220,15 @@ OCTAVE_CHECK_LIB(sundials_ida, [SUNDIALS
|
||||
[], [don't use SUNDIALS IDA library, solvers ode15i and ode15s will be disabled],
|
||||
[warn_sundials_ida=
|
||||
OCTAVE_CHECK_SUNDIALS_SIZEOF_REALTYPE
|
||||
- OCTAVE_CHECK_SUNDIALS_IDA_DENSE
|
||||
- OCTAVE_CHECK_SUNDIALS_IDAKLU])
|
||||
+ OCTAVE_CHECK_SUNDIALS_SUNLINSOL_DENSE
|
||||
+ OCTAVE_CHECK_SUNDIALS_SUNLINSOL_KLU])
|
||||
LIBS="$save_LIBS"
|
||||
|
||||
dnl Define this way instead of with an #if in oct-conf-post.h so that
|
||||
dnl the build features script will get the correct value.
|
||||
if test -n "$SUNDIALS_IDA_LIBS" \
|
||||
&& test -n "$SUNDIALS_NVECSERIAL_LIBS" \
|
||||
- && test $octave_cv_sundials_ida_dense = yes \
|
||||
+ && test $octave_cv_sundials_sunlinsol_dense = yes \
|
||||
&& test $octave_cv_sundials_realtype_is_double = yes; then
|
||||
AC_DEFINE(HAVE_SUNDIALS, 1, [Define to 1 if SUNDIALS is available.])
|
||||
|
||||
diff -up octave-5.1.90/libinterp/dldfcn/__ode15__.cc.sundials3 octave-5.1.90/libinterp/dldfcn/__ode15__.cc
|
||||
--- octave-5.1.90/libinterp/dldfcn/__ode15__.cc.sundials3 2019-12-21 17:01:27.000000000 -0700
|
||||
+++ octave-5.1.90/libinterp/dldfcn/__ode15__.cc 2020-01-18 11:48:59.002074159 -0700
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
|
||||
Copyright (C) 2016-2019 Francesco Faccio <francesco.faccio@mail.polimi.it>
|
||||
+Copyright (C) 2018 William Greene <w.h.greene@gmail.com>
|
||||
|
||||
This file is part of Octave.
|
||||
|
||||
@@ -44,15 +45,34 @@ along with Octave; see the file COPYING.
|
||||
# include <ida/ida.h>
|
||||
# endif
|
||||
|
||||
-# if defined (HAVE_IDA_IDA_DENSE_H)
|
||||
-# include <ida/ida_dense.h>
|
||||
+# if defined (HAVE_SUNDIALS_SUNDIALS_MATRIX_H)
|
||||
+# include <sundials/sundials_matrix.h>
|
||||
# endif
|
||||
|
||||
-# if defined (HAVE_IDA_IDA_KLU_H)
|
||||
-# include <ida/ida_klu.h>
|
||||
+# if defined (HAVE_SUNDIALS_SUNDIALS_LINEARSOLVER_H)
|
||||
+# include <sundials/sundials_linearsolver.h>
|
||||
+# endif
|
||||
+
|
||||
+# if defined (HAVE_SUNLINSOL_SUNLINSOL_DENSE_H)
|
||||
+# include <sunlinsol/sunlinsol_dense.h>
|
||||
+# endif
|
||||
+
|
||||
+# if defined (HAVE_IDA_IDA_DIRECT_H)
|
||||
+# include <ida/ida_direct.h>
|
||||
+# endif
|
||||
+
|
||||
+# if defined (HAVE_SUNDIALS_SUNDIALS_SPARSE_H)
|
||||
# include <sundials/sundials_sparse.h>
|
||||
# endif
|
||||
|
||||
+# if defined (HAVE_SUNLINSOL_SUNLINSOL_KLU_H)
|
||||
+# include <sunlinsol/sunlinsol_klu.h>
|
||||
+# endif
|
||||
+
|
||||
+# if defined (HAVE_SUNMATRIX_SUNMATRIX_SPARSE_H)
|
||||
+# include <sunmatrix/sunmatrix_sparse.h>
|
||||
+# endif
|
||||
+
|
||||
# if defined (HAVE_NVECTOR_NVECTOR_SERIAL_H)
|
||||
# include <nvector/nvector_serial.h>
|
||||
# endif
|
||||
@@ -112,7 +132,8 @@ namespace octave
|
||||
havejacsparse (false), mem (nullptr), num (), ida_fun (nullptr),
|
||||
ida_jac (nullptr), dfdy (nullptr), dfdyp (nullptr), spdfdy (nullptr),
|
||||
spdfdyp (nullptr), fun (nullptr), jacfun (nullptr), jacspfun (nullptr),
|
||||
- jacdcell (nullptr), jacspcell (nullptr)
|
||||
+ jacdcell (nullptr), jacspcell (nullptr),
|
||||
+ sunJacMatrix (nullptr), sunLinearSolver (nullptr)
|
||||
{ }
|
||||
|
||||
|
||||
@@ -122,11 +143,17 @@ namespace octave
|
||||
havejacsparse (false), mem (nullptr), num (), ida_fun (ida_fcn),
|
||||
ida_jac (nullptr), dfdy (nullptr), dfdyp (nullptr), spdfdy (nullptr),
|
||||
spdfdyp (nullptr), fun (daefun), jacfun (nullptr), jacspfun (nullptr),
|
||||
- jacdcell (nullptr), jacspcell (nullptr)
|
||||
+ jacdcell (nullptr), jacspcell (nullptr),
|
||||
+ sunJacMatrix (nullptr), sunLinearSolver (nullptr)
|
||||
{ }
|
||||
|
||||
|
||||
- ~IDA (void) { IDAFree (&mem); }
|
||||
+ ~IDA (void)
|
||||
+ {
|
||||
+ IDAFree (&mem);
|
||||
+ SUNLinSolFree(sunLinearSolver);
|
||||
+ SUNMatDestroy(sunJacMatrix);
|
||||
+ }
|
||||
|
||||
IDA&
|
||||
set_jacobian (octave_function *jac, DAEJacFuncDense j)
|
||||
@@ -184,7 +211,7 @@ namespace octave
|
||||
static N_Vector ColToNVec (const ColumnVector& data, long int n);
|
||||
|
||||
void
|
||||
- set_up (void);
|
||||
+ set_up (const ColumnVector& y);
|
||||
|
||||
void
|
||||
set_tolerance (ColumnVector& abstol, realtype reltol);
|
||||
@@ -199,25 +226,24 @@ namespace octave
|
||||
void
|
||||
resfun_impl (realtype t, N_Vector& yy,
|
||||
N_Vector& yyp, N_Vector& rr);
|
||||
-
|
||||
static int
|
||||
- jacdense (long int Neq, realtype t, realtype cj, N_Vector yy,
|
||||
- N_Vector yyp, N_Vector, DlsMat JJ, void *user_data,
|
||||
+ jacdense (realtype t, realtype cj, N_Vector yy,
|
||||
+ N_Vector yyp, N_Vector, SUNMatrix JJ, void *user_data,
|
||||
N_Vector, N_Vector, N_Vector)
|
||||
{
|
||||
IDA *self = static_cast <IDA *> (user_data);
|
||||
- self->jacdense_impl (Neq, t, cj, yy, yyp, JJ);
|
||||
+ self->jacdense_impl (t, cj, yy, yyp, JJ);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
- jacdense_impl (long int Neq, realtype t, realtype cj,
|
||||
- N_Vector& yy, N_Vector& yyp, DlsMat& JJ);
|
||||
+ jacdense_impl (realtype t, realtype cj,
|
||||
+ N_Vector& yy, N_Vector& yyp, SUNMatrix& JJ);
|
||||
|
||||
-# if defined (HAVE_SUNDIALS_IDAKLU)
|
||||
+# if defined (HAVE_SUNDIALS_SUNLINSOL_KLU)
|
||||
static int
|
||||
jacsparse (realtype t, realtype cj, N_Vector yy, N_Vector yyp,
|
||||
- N_Vector, SlsMat Jac, void *user_data, N_Vector,
|
||||
+ N_Vector, SUNMatrix Jac, void *user_data, N_Vector,
|
||||
N_Vector, N_Vector)
|
||||
{
|
||||
IDA *self = static_cast <IDA *> (user_data);
|
||||
@@ -227,7 +253,7 @@ namespace octave
|
||||
|
||||
void
|
||||
jacsparse_impl (realtype t, realtype cj, N_Vector& yy,
|
||||
- N_Vector& yyp, SlsMat& Jac);
|
||||
+ N_Vector& yyp, SUNMatrix& Jac);
|
||||
#endif
|
||||
|
||||
void set_maxstep (realtype maxstep);
|
||||
@@ -291,6 +317,8 @@ namespace octave
|
||||
DAEJacFuncSparse jacspfun;
|
||||
DAEJacCellDense jacdcell;
|
||||
DAEJacCellSparse jacspcell;
|
||||
+ SUNMatrix sunJacMatrix;
|
||||
+ SUNLinearSolver sunLinearSolver;
|
||||
};
|
||||
|
||||
int
|
||||
@@ -323,36 +351,61 @@ namespace octave
|
||||
}
|
||||
|
||||
void
|
||||
- IDA::set_up (void)
|
||||
+ IDA::set_up (const ColumnVector& y)
|
||||
{
|
||||
+ N_Vector yy = ColToNVec(y, num);
|
||||
+
|
||||
if (havejacsparse)
|
||||
{
|
||||
-# if defined (HAVE_SUNDIALS_IDAKLU)
|
||||
- if (IDAKLU (mem, num, num*num, CSC_MAT) != 0)
|
||||
- error ("IDAKLU solver not initialized");
|
||||
+#if defined (HAVE_SUNDIALS_SUNLINSOL_KLU)
|
||||
+
|
||||
+ sunJacMatrix = SUNSparseMatrix (num, num, num*num, CSC_MAT);
|
||||
+ if (! sunJacMatrix)
|
||||
+ error ("Unable to create sparse Jacobian for Sundials");
|
||||
+
|
||||
+ sunLinearSolver = SUNKLU (yy, sunJacMatrix);
|
||||
+ if (! sunLinearSolver)
|
||||
+ error ("Unable to create KLU sparse solver");
|
||||
+
|
||||
+ if (IDADlsSetLinearSolver (mem, sunLinearSolver, sunJacMatrix))
|
||||
+ error ("Unable to set sparse linear solver");
|
||||
+
|
||||
+ IDADlsSetJacFn(mem, IDA::jacsparse);
|
||||
|
||||
- IDASlsSetSparseJacFn (mem, IDA::jacsparse);
|
||||
# else
|
||||
- error ("IDAKLU is not available in this version of Octave");
|
||||
+ error ("SUNDIALS SUNLINSOL KLU is not available in this version of Octave");
|
||||
# endif
|
||||
+
|
||||
}
|
||||
else
|
||||
{
|
||||
- if (IDADense (mem, num) != 0)
|
||||
- error ("IDADense solver not initialized");
|
||||
|
||||
- if (havejac && IDADlsSetDenseJacFn (mem, IDA::jacdense) != 0)
|
||||
- error ("Dense Jacobian not set");
|
||||
+ sunJacMatrix = SUNDenseMatrix (num, num);
|
||||
+ if (! sunJacMatrix)
|
||||
+ error ("Unable to create dense Jacobian for Sundials");
|
||||
+
|
||||
+ sunLinearSolver = SUNDenseLinearSolver(yy, sunJacMatrix);
|
||||
+ if (! sunLinearSolver)
|
||||
+ error ("Unable to create dense linear solver");
|
||||
+
|
||||
+ if (IDADlsSetLinearSolver (mem, sunLinearSolver, sunJacMatrix))
|
||||
+ error ("Unable to set dense linear solver");
|
||||
+
|
||||
+ if (havejac && IDADlsSetJacFn (mem, IDA::jacdense) != 0)
|
||||
+ error("Unable to set dense Jacobian function");
|
||||
+
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
- IDA::jacdense_impl (long int Neq, realtype t, realtype cj,
|
||||
- N_Vector& yy, N_Vector& yyp, DlsMat& JJ)
|
||||
+ IDA::jacdense_impl (realtype t, realtype cj,
|
||||
+ N_Vector& yy, N_Vector& yyp, SUNMatrix& JJ)
|
||||
|
||||
{
|
||||
BEGIN_INTERRUPT_WITH_EXCEPTIONS;
|
||||
|
||||
+ long int Neq = NV_LENGTH_S(yy);
|
||||
+
|
||||
ColumnVector y = NVecToCol (yy, Neq);
|
||||
|
||||
ColumnVector yp = NVecToCol (yyp, Neq);
|
||||
@@ -366,15 +419,15 @@ namespace octave
|
||||
|
||||
std::copy (jac.fortran_vec (),
|
||||
jac.fortran_vec () + jac.numel (),
|
||||
- JJ->data);
|
||||
+ SUNDenseMatrix_Data(JJ));
|
||||
|
||||
END_INTERRUPT_WITH_EXCEPTIONS;
|
||||
}
|
||||
|
||||
-# if defined (HAVE_SUNDIALS_IDAKLU)
|
||||
+# if defined (HAVE_SUNDIALS_SUNLINSOL_KLU)
|
||||
void
|
||||
IDA::jacsparse_impl (realtype t, realtype cj, N_Vector& yy, N_Vector& yyp,
|
||||
- SlsMat& Jac)
|
||||
+ SUNMatrix& Jac)
|
||||
|
||||
{
|
||||
BEGIN_INTERRUPT_WITH_EXCEPTIONS;
|
||||
@@ -390,17 +443,18 @@ namespace octave
|
||||
else
|
||||
jac = (*jacspcell) (spdfdy, spdfdyp, cj);
|
||||
|
||||
- SparseSetMatToZero (Jac);
|
||||
- int *colptrs = *(Jac->colptrs);
|
||||
- int *rowvals = *(Jac->rowvals);
|
||||
+ SUNMatZero_Sparse (Jac);
|
||||
+ sunindextype *colptrs = SUNSparseMatrix_IndexPointers (Jac);
|
||||
+ sunindextype *rowvals = SUNSparseMatrix_IndexValues (Jac);
|
||||
|
||||
for (int i = 0; i < num + 1; i++)
|
||||
colptrs[i] = jac.cidx(i);
|
||||
|
||||
+ double *d = SUNSparseMatrix_Data (Jac);
|
||||
for (int i = 0; i < jac.nnz (); i++)
|
||||
{
|
||||
rowvals[i] = jac.ridx(i);
|
||||
- Jac->data[i] = jac.data(i);
|
||||
+ d[i] = jac.data(i);
|
||||
}
|
||||
|
||||
END_INTERRUPT_WITH_EXCEPTIONS;
|
||||
@@ -567,7 +621,7 @@ namespace octave
|
||||
|
||||
//main loop
|
||||
while (((posdirection == 1 && tsol < tend)
|
||||
- || (posdirection == 0 && tsol > tend))
|
||||
+ || (posdirection == 0 && tsol > tend))
|
||||
&& status == 0)
|
||||
{
|
||||
if (IDASolve (mem, tend, &tsol, yy, yyp, IDA_ONE_STEP) != 0)
|
||||
@@ -692,7 +746,7 @@ namespace octave
|
||||
// Linear interpolation
|
||||
ie(0) = index(0);
|
||||
te(0) = tsol - val (index(0)) * (tsol - told)
|
||||
- / (val (index(0)) - oldval (index(0)));
|
||||
+ / (val (index(0)) - oldval (index(0)));
|
||||
|
||||
ColumnVector ytemp
|
||||
= y - ((tsol - te(0)) * (y - yold) / (tsol - told));
|
||||
@@ -717,7 +771,7 @@ namespace octave
|
||||
// Linear interpolation
|
||||
ie(temp+i) = index(i);
|
||||
te(temp+i) = tsol - val(index(i)) * (tsol - told)
|
||||
- / (val(index(i)) - oldval(index(i)));
|
||||
+ / (val(index(i)) - oldval(index(i)));
|
||||
|
||||
ColumnVector ytemp
|
||||
= y - (tsol - te (temp + i)) * (y - yold) / (tsol - told);
|
||||
@@ -1096,7 +1150,7 @@ namespace octave
|
||||
event_fcn = options.getfield("Events").function_value ();
|
||||
|
||||
// Set up linear solver
|
||||
- dae.set_up ();
|
||||
+ dae.set_up (y0);
|
||||
|
||||
// Integrate
|
||||
retval = dae.integrate (numt, tspan, y0, yp0, refine,
|
||||
diff -up octave-5.1.90/m4/acinclude.m4.sundials3 octave-5.1.90/m4/acinclude.m4
|
||||
--- octave-5.1.90/m4/acinclude.m4.sundials3 2019-12-21 17:01:27.000000000 -0700
|
||||
+++ octave-5.1.90/m4/acinclude.m4 2020-01-18 11:48:59.005074156 -0700
|
||||
@@ -2215,14 +2215,11 @@ dnl Check whether SUNDIALS IDA library i
|
||||
dnl precision realtype.
|
||||
dnl
|
||||
AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SIZEOF_REALTYPE], [
|
||||
- AC_CHECK_HEADERS([ida/ida.h ida.h])
|
||||
AC_CACHE_CHECK([whether SUNDIALS IDA is configured with double precision realtype],
|
||||
[octave_cv_sundials_realtype_is_double],
|
||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#if defined (HAVE_IDA_IDA_H)
|
||||
#include <ida/ida.h>
|
||||
- #else
|
||||
- #include <ida.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
]], [[
|
||||
@@ -2238,61 +2235,72 @@ AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SIZEOF_R
|
||||
fi
|
||||
])
|
||||
dnl
|
||||
-dnl Check whether SUNDIALS IDA library is configured with IDAKLU
|
||||
+dnl Check whether SUNDIALS IDA library is configured with SUNLINSOL_KLU
|
||||
dnl enabled.
|
||||
dnl
|
||||
-AC_DEFUN([OCTAVE_CHECK_SUNDIALS_IDAKLU], [
|
||||
- AC_CHECK_HEADERS([ida/ida_klu.h ida_klu.h])
|
||||
- AC_CACHE_CHECK([whether SUNDIALS IDA is configured with IDAKLU enabled],
|
||||
- [octave_cv_sundials_idaklu],
|
||||
+AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SUNLINSOL_KLU], [
|
||||
+ AC_CHECK_HEADERS([sundials/sundials_sparse.h sunlinsol/sunlinsol_klu.h sunmatrix/sunmatrix_sparse.h])
|
||||
+ AC_CACHE_CHECK([whether SUNDIALS IDA is configured with SUNLINSOL_KLU enabled],
|
||||
+ [octave_cv_sundials_sunlinsol_klu],
|
||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
- #if defined (HAVE_IDA_IDA_KLU_H)
|
||||
- #include <ida/ida_klu.h>
|
||||
- #else
|
||||
- #include <ida_klu.h>
|
||||
+ #if defined (HAVE_IDA_IDA_H)
|
||||
+ #include <ida/ida.h>
|
||||
+ #endif
|
||||
+ #if defined (HAVE_SUNDIALS_SUNDIALS_SPARSE_H)
|
||||
+ #include <sundials/sundials_sparse.h>
|
||||
+ #endif
|
||||
+ #if defined (HAVE_SUNLINSOL_SUNLINSOL_KLU_H)
|
||||
+ #include <sunlinsol/sunlinsol_klu.h>
|
||||
#endif
|
||||
]], [[
|
||||
- IDAKLU (0, 0, 0, 0);
|
||||
+ SUNKLU (0, 0);
|
||||
]])],
|
||||
- octave_cv_sundials_idaklu=yes,
|
||||
- octave_cv_sundials_idaklu=no)
|
||||
+ octave_cv_sundials_sunlinsol_klu=yes,
|
||||
+ octave_cv_sundials_sunlinsol_klu=no)
|
||||
])
|
||||
- if test $octave_cv_sundials_idaklu = yes; then
|
||||
- AC_DEFINE(HAVE_SUNDIALS_IDAKLU, 1,
|
||||
- [Define to 1 if SUNDIALS IDA is configured with IDAKLU enabled.])
|
||||
+ if test $octave_cv_sundials_sunlinsol_klu = yes; then
|
||||
+ AC_DEFINE(HAVE_SUNDIALS_SUNLINSOL_KLU, 1,
|
||||
+ [Define to 1 if SUNDIALS IDA is configured with SUNLINSOL_KLU enabled.])
|
||||
else
|
||||
- warn_sundials_idaklu="SUNDIALS IDA library not configured with IDAKLU, ode15i and ode15s will not support the sparse Jacobian feature"
|
||||
- OCTAVE_CONFIGURE_WARNING([warn_sundials_idaklu])
|
||||
+ warn_sundials_idaklu="SUNDIALS IDA library not configured with SUNLINSOL_KLU, ode15i and ode15s will not support the sparse Jacobian feature"
|
||||
+ OCTAVE_CONFIGURE_WARNING([warn_sundials_sunlinsol_klu])
|
||||
fi
|
||||
])
|
||||
dnl
|
||||
-dnl Check whether SUNDIALS IDA library has the IDADENSE linear solver.
|
||||
+dnl Check whether SUNDIALS IDA library has the SUNLINSOL_DENSE linear solver.
|
||||
dnl The IDADENSE API was removed in SUNDIALS version 3.0.0.
|
||||
dnl
|
||||
-AC_DEFUN([OCTAVE_CHECK_SUNDIALS_IDA_DENSE], [
|
||||
- AC_CHECK_HEADERS([ida/ida_dense.h ida_dense.h])
|
||||
- AC_CACHE_CHECK([whether SUNDIALS IDA includes the IDADENSE linear solver],
|
||||
- [octave_cv_sundials_ida_dense],
|
||||
+AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SUNLINSOL_DENSE], [
|
||||
+ AC_CHECK_HEADERS([sunlinsol/sunlinsol_dense.h sundials/sundials_matrix.h sundials/sundials_linearsolver.h ida/ida_direct.h])
|
||||
+ AC_CACHE_CHECK([whether SUNDIALS IDA includes the SUNLINSOL_DENSE linear solver],
|
||||
+ [octave_cv_sundials_sunlinsol_dense],
|
||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
- #if defined (HAVE_IDA_IDA_DENSE_H)
|
||||
- #include <ida/ida_dense.h>
|
||||
- #else
|
||||
- #include <ida_dense.h>
|
||||
+ #if defined (HAVE_IDA_IDA_H)
|
||||
+ #include <ida/ida.h>
|
||||
+ #endif
|
||||
+ #if defined (HAVE_SUNDIALS_SUNDIALS_MATRIX_H)
|
||||
+ #include <sundials/sundials_matrix.h>
|
||||
+ #endif
|
||||
+ #if defined (HAVE_SUNDIALS_SUNDIALS_LINEARSOLVER_H)
|
||||
+ #include <sundials/sundials_linearsolver.h>
|
||||
#endif
|
||||
+ #if defined (HAVE_IDA_IDA_DIRECT_H)
|
||||
+ #include <ida/ida_direct.h>
|
||||
+ #endif
|
||||
]], [[
|
||||
void *mem = 0;
|
||||
long int num = 0;
|
||||
IDADense (mem, num);
|
||||
]])],
|
||||
- octave_cv_sundials_ida_dense=yes,
|
||||
- octave_cv_sundials_ida_dense=no)
|
||||
+ octave_cv_sundials_sunlinsol_dense=yes,
|
||||
+ octave_cv_sundials_sunlinsol_dense=no)
|
||||
])
|
||||
- if test $octave_cv_sundials_ida_dense = yes; then
|
||||
- AC_DEFINE(HAVE_SUNDIALS_IDADENSE, 1,
|
||||
- [Define to 1 if SUNDIALS IDA includes the IDADENSE linear solver.])
|
||||
+ if test $octave_cv_sundials_sunlinsol_dense = yes; then
|
||||
+ AC_DEFINE(HAVE_SUNDIALS_SUNLINSOL_DENSE, 1,
|
||||
+ [Define to 1 if SUNDIALS IDA includes the SUNLINSOL_DENSE linear solver.])
|
||||
else
|
||||
- warn_sundials_ida_dense="SUNDIALS IDA library does not include the IDADENSE linear solver, ode15i and ode15s will be disabled"
|
||||
- OCTAVE_CONFIGURE_WARNING([warn_sundials_ida_dense])
|
||||
+ warn_sundials_ida_dense="SUNDIALS IDA library does not include the SUNLINSOL_DENSE linear solver, ode15i and ode15s will be disabled"
|
||||
+ OCTAVE_CONFIGURE_WARNING([warn_sundials_sunlinsol_dense])
|
||||
fi
|
||||
])
|
||||
dnl
|
||||
diff -up octave-5.1.90/scripts/ode/ode15i.m.sundials3 octave-5.1.90/scripts/ode/ode15i.m
|
||||
--- octave-5.1.90/scripts/ode/ode15i.m.sundials3 2019-12-21 17:01:27.000000000 -0700
|
||||
+++ octave-5.1.90/scripts/ode/ode15i.m 2020-01-18 11:48:59.006074155 -0700
|
||||
@@ -452,7 +452,7 @@ endfunction
|
||||
%! assert ([t(end), y(end,:)], fref, 1e-3);
|
||||
|
||||
## Jacobian fun sparse
|
||||
-%!testif HAVE_SUNDIALS_IDAKLU
|
||||
+%!testif HAVE_SUNDIALS_SUNLINSOL_KLU
|
||||
%! opt = odeset ("Jacobian", @jacfunsparse, "AbsTol", 1e-7, "RelTol", 1e-7);
|
||||
%! [t, y] = ode15i (@rob, [0, 100], [1; 0; 0], [-1e-4; 1e-4; 0], opt);
|
||||
%! assert ([t(end), y(end,:)], fref, 1e-3);
|
||||
@@ -545,7 +545,7 @@ endfunction
|
||||
%! "invalid value assigned to field 'Jacobian'");
|
||||
|
||||
## Jacobian cell sparse wrong dimension
|
||||
-%!testif HAVE_SUNDIALS_IDAKLU
|
||||
+%!testif HAVE_SUNDIALS_SUNLINSOL_KLU
|
||||
%! DFDY = sparse ([-0.04, 1;
|
||||
%! 0.04, 1]);
|
||||
%! DFDYP = sparse ([-1, 0, 0;
|
||||
diff -up octave-5.1.90/scripts/ode/ode15s.m.sundials3 octave-5.1.90/scripts/ode/ode15s.m
|
||||
--- octave-5.1.90/scripts/ode/ode15s.m.sundials3 2019-12-21 17:01:27.000000000 -0700
|
||||
+++ octave-5.1.90/scripts/ode/ode15s.m 2020-01-18 11:48:59.007074154 -0700
|
||||
@@ -545,21 +545,21 @@ endfunction
|
||||
%! [t, y] = ode15s (@rob, [0, 100], [1; 0; 0], opt);
|
||||
%! assert ([t(end), y(end,:)], frefrob, 1e-3);
|
||||
|
||||
-%!testif HAVE_SUNDIALS_IDAKLU
|
||||
+%!testif HAVE_SUNDIALS_SUNLINSOL_KLU
|
||||
%! opt = odeset ("MStateDependence", "none",
|
||||
%! "Mass", [1, 0, 0; 0, 1, 0; 0, 0, 0],
|
||||
%! "Jacobian", @jacfunsparse);
|
||||
%! [t, y] = ode15s (@rob, [0, 100], [1; 0; 0], opt);
|
||||
%! assert ([t(end), y(end,:)], frefrob, 1e-3);
|
||||
|
||||
-%!testif HAVE_SUNDIALS_IDAKLU
|
||||
+%!testif HAVE_SUNDIALS_SUNLINSOL_KLU
|
||||
%! opt = odeset ("MStateDependence", "none",
|
||||
%! "Mass", sparse ([1, 0, 0; 0, 1, 0; 0, 0, 0]),
|
||||
%! "Jacobian", @jacfunsparse);
|
||||
%! [t, y] = ode15s (@rob, [0, 100], [1; 0; 0], opt);
|
||||
%! assert ([t(end), y(end,:)], frefrob, 1e-3);
|
||||
|
||||
-%!testif HAVE_SUNDIALS_IDAKLU
|
||||
+%!testif HAVE_SUNDIALS_SUNLINSOL_KLU
|
||||
%! warning ("off", "ode15s:mass_state_dependent_provided", "local");
|
||||
%! opt = odeset ("MStateDependence", "none",
|
||||
%! "Mass", @massdensefunstate,
|
||||
@@ -575,14 +575,14 @@ endfunction
|
||||
%! [t, y] = ode15s (@rob, [0, 100], [1; 0; 0], opt);
|
||||
%! assert ([t(end), y(end,:)], frefrob, 1e-3);
|
||||
|
||||
-%!testif HAVE_SUNDIALS_IDAKLU
|
||||
+%!testif HAVE_SUNDIALS_SUNLINSOL_KLU
|
||||
%! opt = odeset ("MStateDependence", "none",
|
||||
%! "Mass", @massdensefuntime,
|
||||
%! "Jacobian", @jacfunsparse);
|
||||
%! [t, y] = ode15s (@rob, [0, 100], [1; 0; 0], opt);
|
||||
%! assert ([t(end), y(end,:)], frefrob, 1e-3);
|
||||
|
||||
-%!testif HAVE_SUNDIALS_IDAKLU
|
||||
+%!testif HAVE_SUNDIALS_SUNLINSOL_KLU
|
||||
%! opt = odeset ("MStateDependence", "none",
|
||||
%! "Mass", @masssparsefuntime,
|
||||
%! "Jacobian", @jacfunsparse);
|
42
octave.spec
42
octave.spec
@ -1,18 +1,11 @@
|
||||
# From src/version.h:#define OCTAVE_API_VERSION
|
||||
%global octave_api api-v56
|
||||
%global octave_api api-v57
|
||||
|
||||
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
|
||||
|
||||
%global builddocs 1
|
||||
|
||||
# Use Qt5 on Fedora and EL7+
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
%bcond_without qt5
|
||||
%else
|
||||
%bcond_with qt5
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} >= 33
|
||||
%if 0%{?fedora}
|
||||
%bcond_without flexiblas
|
||||
%endif
|
||||
%if %{with flexiblas}
|
||||
@ -36,8 +29,8 @@
|
||||
|
||||
Name: octave
|
||||
Epoch: 6
|
||||
Version: 6.4.0
|
||||
Release: 5%{?dist}
|
||||
Version: 7.1.0
|
||||
Release: 1%{?dist}
|
||||
Summary: A high-level language for numerical computations
|
||||
License: GPLv3+
|
||||
URL: http://www.octave.org
|
||||
@ -47,8 +40,12 @@ Source0: https://ftp.gnu.org/gnu/octave/octave-%{version}.tar.lz
|
||||
# RPM macros for helping to build Octave packages
|
||||
Source1: macros.octave
|
||||
Source2: xorg.conf
|
||||
# Need updated cdefs.h from gnulib for gcc12
|
||||
Patch0: octave-gcc12.patch
|
||||
# Fix unlink failure on non-existent file in pkg build
|
||||
# https://savannah.gnu.org/bugs/index.php?62436
|
||||
Patch0: bug62436.patch
|
||||
# Deprecate rather than remove support for old numeric linestyles that broke vfrnav tests
|
||||
# https://savannah.gnu.org/bugs/index.php?62470
|
||||
Patch1: octave-linestyles.patch
|
||||
|
||||
Provides: octave(api) = %{octave_api}
|
||||
Provides: bundled(gnulib)
|
||||
@ -77,9 +74,7 @@ BuildRequires: automake
|
||||
BuildRequires: libtool
|
||||
# For validating desktop and appdata files
|
||||
BuildRequires: desktop-file-utils
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
BuildRequires: libappstream-glib
|
||||
%endif
|
||||
|
||||
BuildRequires: arpack-devel
|
||||
BuildRequires: %{blaslib}-devel
|
||||
@ -115,13 +110,9 @@ BuildRequires: pcre-devel
|
||||
BuildRequires: portaudio-devel
|
||||
BuildRequires: qhull-devel
|
||||
BuildRequires: qrupdate-devel
|
||||
%if %{with qt5}
|
||||
BuildRequires: qscintilla-qt5-devel
|
||||
BuildRequires: qt5-linguist
|
||||
BuildRequires: qt5-qttools-devel
|
||||
%else
|
||||
BuildRequires: qscintilla-devel
|
||||
%endif
|
||||
BuildRequires: readline-devel
|
||||
%if %{with blas64}
|
||||
BuildRequires: suitesparse64-devel
|
||||
@ -132,9 +123,7 @@ BuildRequires: sundials-devel
|
||||
BuildRequires: tex(dvips)
|
||||
BuildRequires: texinfo
|
||||
BuildRequires: texinfo-tex
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
BuildRequires: texlive-collection-fontsrecommended
|
||||
%endif
|
||||
%if 0%{?rhel} >= 7
|
||||
BuildRequires: texlive-ec
|
||||
BuildRequires: texlive-metapost
|
||||
@ -296,9 +285,7 @@ touch %{buildroot}%{_datadir}/%{name}/ls-R
|
||||
desktop-file-validate %{buildroot}%{_datadir}/applications/org.octave.Octave.desktop
|
||||
# RHEL7 still doesn't like the GNU project_group
|
||||
%{?el7:sed -i -e /project_group/d %{buildroot}/%{_datadir}/metainfo/org.octave.Octave.appdata.xml}
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/org.octave.Octave.appdata.xml
|
||||
%endif
|
||||
|
||||
# Create directories for add-on packages
|
||||
HOST_TYPE=`%{buildroot}%{_bindir}/octave-config -p CANONICAL_HOST_TYPE`
|
||||
@ -401,9 +388,9 @@ make check
|
||||
%{_bindir}/octave*
|
||||
%dir %{_libdir}/octave/
|
||||
%dir %{_libdir}/octave/%{version}
|
||||
%{_libdir}/octave/%{version}/liboctave.so.8*
|
||||
%{_libdir}/octave/%{version}/liboctgui.so.6*
|
||||
%{_libdir}/octave/%{version}/liboctinterp.so.9*
|
||||
%{_libdir}/octave/%{version}/liboctave.so.9*
|
||||
%{_libdir}/octave/%{version}/liboctgui.so.8*
|
||||
%{_libdir}/octave/%{version}/liboctinterp.so.10*
|
||||
%{_libdir}/octave/%{version}/mkoctfile-%{version}
|
||||
%{_libdir}/octave/%{version}/oct/
|
||||
%{_libdir}/octave/%{version}/octave-config-%{version}
|
||||
@ -447,6 +434,9 @@ make check
|
||||
%{_pkgdocdir}/refcard*.pdf
|
||||
|
||||
%changelog
|
||||
* Thu Apr 07 2022 Orion Poplawski <orion@nwra.com> - 6:7.1.0-1
|
||||
- Update to 7.1.0
|
||||
|
||||
* Mon Feb 07 2022 Orion Poplawski <orion@nwra.com> - 6:6.4.0-5
|
||||
- Update gnulib cdefs.h for gcc12 support on ppc64le
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (octave-6.4.0.tar.lz) = f0e59cf1d038e8f92801c5621800872cb6d030fd7c306eb5746a40310120c91d37096ed364428845190c1bbc08b4c75e6f57f7ecdbc06ee6659885ce634730fd
|
||||
SHA512 (octave-7.1.0.tar.lz) = 80e7f674d412a9d1300ad91109b891d276b7bf9a9f4cbf97dd6da4f684178f7f1a504f4ae780371dec031a932ac61ccd761853d29c4db60ea5e8ce2d7c71c96c
|
||||
|
Loading…
Reference in New Issue
Block a user