Compare commits

...

33 Commits
master ... f36

Author SHA1 Message Date
Orion Poplawski 6e0f7eae89 Update gnulib cdefs.h for gcc12 support on ppc64le 2022-02-06 20:16:00 -07:00
Jiri 2d9eb03a84 Rebuilt for java-17-openjdk as system jdk
https://fedoraproject.org/wiki/Changes/Java17
2022-02-05 23:11:30 +01:00
Fedora Release Engineering 6e5bf0d512 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 22:03:02 +00:00
Orion Poplawski fdb892c23b Rebuild for hdf5 1.12.1 2021-11-20 21:43:05 -07:00
Orion Poplawski f016c5866a Update to 6.4.0 2021-11-03 06:38:32 -06:00
Antonio Trande d8840441f4 Rebuild for sundials-5.8.0 2021-10-20 14:19:02 +02:00
Orion Poplawski 1ef35b6275 Tests segfault on ppc64le 2021-08-10 16:45:25 -06:00
Orion Poplawski 9c0483f765 Update to 6.3.0 2021-08-09 19:41:28 -06:00
Orion Poplawski 66154bafb2 Update to 6.2.0 2021-08-09 19:21:53 -06:00
Fedora Release Engineering f16d5f212d - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 16:54:59 +00:00
Orion Poplawski 928bdda92c Use brp-strip instead of brp-strip-shared (bz#1955380) 2021-05-30 12:42:39 -06:00
Orion Poplawski a28ba48aa8 Backport readline 8.1 support (bz#1946773) 2021-04-08 19:39:20 -06:00
Fedora Release Engineering 3fece7d82f - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 22:13:20 +00:00
Tom Stellard 48c10ba011 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-07 06:21:37 +00:00
Orion Poplawski 6e6a468c74 Rebuild for sundials 5.6.1 2021-01-06 07:47:12 -07:00
Orion Poplawski 488d26821f Rebuild for sundials 5.5.0 2020-11-22 09:24:56 -07:00
Orion Poplawski e398d9c7e7 Rebuild for sundials 5.4.0 2020-10-05 19:59:46 -06:00
Iñaki Úcar 61b2f46ac0 https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager 2020-08-13 14:27:15 +02:00
Adam Jackson 2621de214a Drop unnecessary (apparently unused) BuildRequires: xorg-x11-apps 2020-07-28 15:12:19 -04:00
Fedora Release Engineering c3b96d5a03 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 12:24:50 +00:00
Jiri a67f79d80a Rebuilt for JDK-11 2020-07-11 03:36:02 +02:00
Orion Poplawski e1cf3afa97 Rebuild for hdf5 1.10.6 2020-06-25 14:25:29 -06:00
Timm Bäder 0f98426a15 spec: Rely on default -flto values instead of using auto
According to the GCC docs[1], -flto=auto does:

> Use -flto=auto to use GNU make’s job server, if available, or
> otherwise fall back to autodetection of the number of CPU threads
> present in your system.

clang does not support -flto=auto (or -flto=jobserver for that matter),
so using this option breaks the build with non-gcc compilers. Pass just
-flto instead and rely on gcc doing the right thing.

[1] https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
2020-06-25 10:06:08 +00:00
Orion Poplawski f82faf5f58 Own %{_pkgdocdir} 2020-05-24 16:26:21 -06:00
Orion Poplawski f89a01037a Rebuild for sundials 5.2.0 2020-04-12 19:57:46 -06:00
Orion Poplawski 4161884180 Upload new docs sources 2020-02-09 20:57:38 -07:00
Orion Poplawski be55d20164 Update to 5.2.0 2020-02-03 21:53:14 -07:00
Fedora Release Engineering b1d97f35c3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-29 19:53:36 +00:00
Orion Poplawski 733302f86a Enable 64-bit array indexes 2019-11-03 08:47:48 -07:00
Orion Poplawski 104f111ea2 Enable LTO optimisations 2019-11-02 19:37:27 -06:00
Vasiliy Glazov e6e1baf1c0 Enable LTO optimisations
This change enable gcc LTO optimisations.
It helps reduce RAM usege and rpms size.

For example on F31 octave rpm with LTO 17MB vs 18MB without LTO.
And octave-debuginfo rpm with LTO 117MB vs 128MB without LTO.

Enabling it has no any issue in runtime but can take some more time to build (but not critical).
2019-10-30 08:20:41 +00:00
Orion Poplawski 2c1fd845b6 Rebuild for suitesparse 5.4.0 2019-10-14 16:02:54 -06:00
Orion Poplawski fe99995595 Use Qt5 on EL8+ 2019-09-13 21:00:02 -06:00
8 changed files with 1071 additions and 81 deletions

7
.gitignore vendored
View File

@ -32,3 +32,10 @@ octave-3.2.4.tar.bz2
/octave-4.4.1-docs.tar.gz
/octave-5.1.0.tar.lz
/octave-5.1.0-docs.tar.lz
/octave-5.2.0.tar.lz
/octave-5.2.0-docs.tar.lz
/octave-6.1.0.tar.lz
/octave-6.1.0-docs.tar.lz
/octave-6.2.0.tar.lz
/octave-6.3.0.tar.lz
/octave-6.4.0.tar.lz

View File

@ -67,7 +67,7 @@ fi \
# any shared objects.
%octave_pkg_check \
%octave_cmd pkg("prefix","%{buildroot}%{octprefix}","%{buildroot}%{octarchprefix}");pkg("local_list",fullfile("%{buildroot}%{octshareprefix}","octave_packages"));pkg("list");pkg("install","-verbose",glob("%{_builddir}/%{buildsubdir}/build/%{octpkg}-%{version}-*.tar.gz"){1,1});pkg("load","%{octpkg}");pkg("list");runtests("%{buildroot}%{octpkgdir}");unlink(pkg("local_list")); \
/usr/lib/rpm/brp-strip-shared %{__strip} \
/usr/lib/rpm/brp-strip %{__strip} \
%{nil}
# preun script - we need to remove our uninstall protection and perhaps

View File

@ -1,28 +0,0 @@
# HG changeset patch
# User Mike Miller <mtmiller@octave.org>
# Date 1554238576 25200
# Node ID c3716220d5b93c49e1c7cc8ebe0b76dd961f4ec7
# Parent fc73dafece570f201c18a4eb4a8729a654cfcfbb
fix pause and kbhit with glibc 2.28 end-of-file state behavior (bug #55029)
* sysdep.cc (octave::kbhit): Call "clearerr (stdin)" on end-of-file condition
in addition to "std::cin.clear ()". In glibc 2.28, end-of-file is persistent
and must be cleared by the application.
diff --git a/libinterp/corefcn/sysdep.cc b/libinterp/corefcn/sysdep.cc
--- a/libinterp/corefcn/sysdep.cc
+++ b/libinterp/corefcn/sysdep.cc
@@ -566,7 +566,10 @@
int c = std::cin.get ();
if (std::cin.fail () || std::cin.eof ())
- std::cin.clear ();
+ {
+ std::cin.clear ();
+ clearerr (stdin);
+ }
// Restore it, enabling system call restarts (if possible).
octave::set_interrupt_handler (saved_interrupt_handler, true);

522
octave-gcc12.patch Normal file
View File

@ -0,0 +1,522 @@
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 */

375
octave-readline.patch Normal file
View File

@ -0,0 +1,375 @@
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");

View File

@ -1,6 +1,6 @@
diff -up octave-5.0.91/configure.ac.sundials3 octave-5.0.91/configure.ac
--- octave-5.0.91/configure.ac.sundials3 2019-02-04 10:50:20.000000000 -0700
+++ octave-5.0.91/configure.ac 2019-02-05 22:05:44.096260529 -0700
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=
@ -19,10 +19,10 @@ diff -up octave-5.0.91/configure.ac.sundials3 octave-5.0.91/configure.ac
+ && 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.])
fi
diff -up octave-5.0.91/libinterp/dldfcn/__ode15__.cc.sundials3 octave-5.0.91/libinterp/dldfcn/__ode15__.cc
--- octave-5.0.91/libinterp/dldfcn/__ode15__.cc.sundials3 2019-02-04 10:50:20.000000000 -0700
+++ octave-5.0.91/libinterp/dldfcn/__ode15__.cc 2019-02-05 22:06:48.074012827 -0700
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 @@
/*
@ -312,10 +312,10 @@ diff -up octave-5.0.91/libinterp/dldfcn/__ode15__.cc.sundials3 octave-5.0.91/lib
// Integrate
retval = dae.integrate (numt, tspan, y0, yp0, refine,
diff -up octave-5.0.91/m4/acinclude.m4.sundials3 octave-5.0.91/m4/acinclude.m4
--- octave-5.0.91/m4/acinclude.m4.sundials3 2019-02-04 10:50:20.000000000 -0700
+++ octave-5.0.91/m4/acinclude.m4 2019-02-05 22:05:44.100260576 -0700
@@ -2210,14 +2210,11 @@ dnl Check whether SUNDIALS IDA library i
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], [
@ -330,7 +330,7 @@ diff -up octave-5.0.91/m4/acinclude.m4.sundials3 octave-5.0.91/m4/acinclude.m4
#endif
#include <assert.h>
]], [[
@@ -2233,61 +2230,72 @@ AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SIZEOF_R
@@ -2238,61 +2235,72 @@ AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SIZEOF_R
fi
])
dnl
@ -436,9 +436,9 @@ diff -up octave-5.0.91/m4/acinclude.m4.sundials3 octave-5.0.91/m4/acinclude.m4
fi
])
dnl
diff -up octave-5.0.91/scripts/ode/ode15i.m.sundials3 octave-5.0.91/scripts/ode/ode15i.m
--- octave-5.0.91/scripts/ode/ode15i.m.sundials3 2019-02-04 10:50:20.000000000 -0700
+++ octave-5.0.91/scripts/ode/ode15i.m 2019-02-05 22:05:44.101260588 -0700
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);
@ -457,9 +457,9 @@ diff -up octave-5.0.91/scripts/ode/ode15i.m.sundials3 octave-5.0.91/scripts/ode/
%! DFDY = sparse ([-0.04, 1;
%! 0.04, 1]);
%! DFDYP = sparse ([-1, 0, 0;
diff -up octave-5.0.91/scripts/ode/ode15s.m.sundials3 octave-5.0.91/scripts/ode/ode15s.m
--- octave-5.0.91/scripts/ode/ode15s.m.sundials3 2019-02-04 10:50:20.000000000 -0700
+++ octave-5.0.91/scripts/ode/ode15s.m 2019-02-05 22:05:44.102260599 -0700
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);

View File

@ -1,17 +1,29 @@
# From src/version.h:#define OCTAVE_API_VERSION
%global octave_api api-v53
%global octave_api api-v56
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
%global builddocs 1
# Use Qt5 on F26+
%if 0%{?fedora}
# Use Qt5 on Fedora and EL7+
%if 0%{?fedora} || 0%{?rhel} >= 7
%bcond_without qt5
%else
%bcond_with qt5
%endif
%if 0%{?fedora} >= 33
%bcond_without flexiblas
%endif
%if %{with flexiblas}
%global blaslib flexiblas
%else
%global blaslib openblas
%endif
# Compile with ILP64 BLAS - not yet working
%bcond_with blas64
# For rc versions, change release manually
#global rcver 2
%if 0%{?rcver:1}
@ -19,10 +31,13 @@
%global relsuf .rc%{?rcver}
%endif
%global optflags %{optflags}
%global build_ldflags %{build_ldflags} -flto
Name: octave
Epoch: 6
Version: 5.1.0
Release: 2%{?rcver:.rc%{rcver}}%{?dist}
Version: 6.4.0
Release: 5%{?dist}
Summary: A high-level language for numerical computations
License: GPLv3+
URL: http://www.octave.org
@ -32,15 +47,8 @@ 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
# Prebuilt docs from Fedora for EPEL
Source3: octave-5.1.0-docs.tar.lz
# SUNDIALS 3 support
# https://savannah.gnu.org/bugs/?52475
Patch1: octave-sundials3.patch
# Proper EOF handling
# https://bugzilla.redhat.com/show_bug.cgi?id=1705129
# https://hg.savannah.gnu.org/hgweb/octave/rev/c3716220d5b9
Patch2: octave-eof.patch
# Need updated cdefs.h from gnulib for gcc12
Patch0: octave-gcc12.patch
Provides: octave(api) = %{octave_api}
Provides: bundled(gnulib)
@ -61,6 +69,7 @@ Provides: bundled(slatec-err)
Provides: bundled(slatec-fn)
# For Source0
BuildRequires: make
BuildRequires: lzip
# For autoreconf
@ -73,7 +82,7 @@ BuildRequires: libappstream-glib
%endif
BuildRequires: arpack-devel
BuildRequires: openblas-devel
BuildRequires: %{blaslib}-devel
BuildRequires: bison
BuildRequires: bzip2-devel
BuildRequires: curl-devel
@ -114,7 +123,11 @@ BuildRequires: qt5-qttools-devel
BuildRequires: qscintilla-devel
%endif
BuildRequires: readline-devel
%if %{with blas64}
BuildRequires: suitesparse64-devel
%else
BuildRequires: suitesparse-devel
%endif
BuildRequires: sundials-devel
BuildRequires: tex(dvips)
BuildRequires: texinfo
@ -129,7 +142,6 @@ BuildRequires: texlive-metapost
BuildRequires: zlib-devel
# For check
BuildRequires: mesa-dri-drivers
BuildRequires: xorg-x11-apps
%ifnarch s390 s390x
BuildRequires: xorg-x11-drv-dummy
%endif
@ -184,7 +196,7 @@ Requires: gcc-c++
Requires: gcc-gfortran
Requires: fftw-devel%{?_isa}
Requires: hdf5-devel%{?_isa}
Requires: openblas-devel%{?_isa}
Requires: %{blaslib}-devel%{?_isa}
Requires: readline-devel%{?_isa}
Requires: zlib-devel
Requires: libappstream-glib
@ -202,18 +214,15 @@ BuildArch: noarch
This package contains documentation for Octave.
%prep
%setup -q -n %{name}-%{version}%{?rctag}
%patch2 -p1 -b .eof
# EPEL7's autoconf/automake is too old so don't do
# unneeded patches there
%if 0%{?fedora}
%patch1 -p1 -b .sundials3
autoreconf -i
%autosetup -p1 -n %{name}-%{version}%{?rctag}
%if %{with blas64}
sed -i -e 's/OCTAVE_CHECK_LIB(suitesparseconfig,/OCTAVE_CHECK_LIB(suitesparseconfig64,/' configure.ac
%endif
%build
%global enable64 no
export AR=%{_bindir}/gcc-ar
export RANLIB=%{_bindir}/gcc-ranlib
export NM=%{_bindir}/gcc-nm
export F77=gfortran
# TODO: some items appear to be bundled in libcruft..
# gl2ps.c is bundled. Anything else?
@ -230,10 +239,19 @@ export CPPFLAGS=-I%{_includedir}/suitesparse
# Disable _GLIBCXX_ASSERTIONS for now
# https://savannah.gnu.org/bugs/?55547
export CXXFLAGS="$(echo %optflags | sed s/-Wp,-D_GLIBCXX_ASSERTIONS//)"
%configure --enable-shared --disable-static --enable-64=%enable64 \
verstr=$(%{__cxx} --version | head -1)
if [[ "$verstr" == *"GCC"* ]]; then
CXXFLAGS="$CXXFLAGS -flto=auto"
else
CXXFLAGS="$CXXFLAGS -flto"
fi
%configure --enable-shared --disable-static \
--enable-float-truncate \
%{?disabledocs} \
--disable-silent-rules \
--with-blas=%{blaslib}%{?with_blas64:64} \
--with-java-includedir=/usr/lib/jvm/java/include \
--with-java-libdir=$libjvm \
--with-qrupdate \
@ -260,12 +278,11 @@ mkdir -p %{buildroot}%{_pkgdocdir}
cp -ar AUTHORS BUGS ChangeLog examples NEWS README %{buildroot}%{_pkgdocdir}/
cp -a doc/refcard/*.pdf %{buildroot}%{_pkgdocdir}/
find %{buildroot}%{_libdir} -name \*.la -delete
# No info directory
rm -f %{buildroot}%{_infodir}/dir
# EL7's makeinfo doesn't support @sortas, so use prebuilt docs
%{?el7:tar xvf %SOURCE3 -C %{buildroot}}
# Make library links
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
echo "%{_libdir}/octave/%{version}%{?rctag}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/octave-%{_arch}.conf
@ -361,12 +378,19 @@ fi
$Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./xorg.log -config ./xorg.conf :99 &
sleep 2
export DISPLAY=:99
make check %{?el7:|| :}
export FLEXIBLAS=netlib
%ifarch ppc64le
# liboctave/array/dMatrix.cc-tst segfaults
make check || :
%else
make check
%endif
%ldconfig_scriptlets
%files
%license COPYING
%dir %{_pkgdocdir}
%{_pkgdocdir}/AUTHORS
%{_pkgdocdir}/BUGS
%{_pkgdocdir}/ChangeLog
@ -375,7 +399,17 @@ make check %{?el7:|| :}
# FIXME: Create an -emacs package that has the emacs addon
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/octave-*.conf
%{_bindir}/octave*
%{_libdir}/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}/mkoctfile-%{version}
%{_libdir}/octave/%{version}/oct/
%{_libdir}/octave/%{version}/octave-config-%{version}
%{_libdir}/octave/%{version}/site/
%{_libdir}/octave/packages/
%{_libdir}/octave/site/
%{_libexecdir}/octave/
%{_mandir}/man1/octave*.1.*
%{_infodir}/liboctave.info*
@ -397,6 +431,9 @@ make check %{?el7:|| :}
%{_bindir}/mkoctfile
%{_bindir}/mkoctfile-%{version}%{?rctag}
%{_includedir}/octave-%{version}%{?rctag}/
%{_libdir}/octave/%{version}/liboctave.so
%{_libdir}/octave/%{version}/liboctgui.so
%{_libdir}/octave/%{version}/liboctinterp.so
%{_libdir}/pkgconfig/octave.pc
%{_libdir}/pkgconfig/octinterp.pc
%{_mandir}/man1/mkoctfile.1.*
@ -410,6 +447,84 @@ make check %{?el7:|| :}
%{_pkgdocdir}/refcard*.pdf
%changelog
* Mon Feb 07 2022 Orion Poplawski <orion@nwra.com> - 6:6.4.0-5
- Update gnulib cdefs.h for gcc12 support on ppc64le
* Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 6:6.4.0-4
- Rebuilt for java-17-openjdk as system jdk
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6:6.4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Sun Nov 21 2021 Orion Poplawski <orion@nwra.com> - 6:6.4.0-2
- Rebuild for hdf5 1.12.1
* Wed Nov 03 2021 Orion Poplawski <orion@nwra.com> - 6:6.4.0-1
- Update to 6.4.0
* Wed Oct 20 2021 Antonio Trande <sagitter@fedoraproject.org> - 6:6.3.0-2
- Rebuild for sundials-5.8.0
* Tue Aug 10 2021 Orion Poplawski <orion@nwra.com> - 6:6.3.0-1
- Update to 6.3.0
* Mon Aug 09 2021 Orion Poplawski <orion@nwra.com> - 6:6.2.0-1
- Update to 6.2.0
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6:5.2.0-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Sun May 30 2021 Orion Poplawski <orion@nwra.com> - 6:5.2.0-13
- Use brp-strip instead of brp-strip-shared (bz#1955380)
* Tue Apr 06 2021 Orion Poplawski <orion@nwra.com> - 6:5.2.0-12
- Backport readline 8.1 support (bz#1946773)
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6:5.2.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jan 06 2021 Orion Poplawski <orion@nwra.com> - 6:5.2.0-10
- Rebuild for sundials 5.6.1
* Sun Nov 22 2020 Orion Poplawski <orion@nwra.com> - 6:5.2.0-9
- Rebuild for sundials 5.5.0
* Mon Oct 05 2020 Orion Poplawski <orion@nwra.com> - 6:5.2.0-8
- Rebuild for sundials 5.4.0
* Thu Aug 13 2020 Iñaki Úcar <iucar@fedoraproject.org> - 5.2.0-7
- https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager
* Tue Jul 28 2020 Adam Jackson <ajax@redhat.com> - 5.2.0-6
- Drop unnecessary (apparently unused) BuildRequires: xorg-x11-apps
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6:5.2.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Sat Jul 11 2020 Jiri Vanek <jvanek@redhat.com> - 6:5.2.0-4
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
* Thu Jun 25 2020 Orion Poplawski <orion@cora.nwra.com> - 6:5.2.0-3
- Rebuild for hdf5 1.10.6
* Mon Apr 13 2020 Orion Poplawski <orion@nwra.com> - 6:5.2.0-2
- Rebuild for sundials 5.2.0
* Mon Feb 03 2020 Orion Poplawski <orion@nwra.com> - 6:5.2.0-1
- Update to 5.2.0
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6:5.1.0-4.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sat Nov 2 2019 Orion Poplawski <orion@nwra.com> - 6:5.1.0-4
- Enable 64-bit array indexes
* Sat Nov 2 2019 Orion Poplawski <orion@nwra.com> - 6:5.1.0-3
- Enable LTO optimisations
* Mon Oct 14 2019 Orion Poplawski <orion@nwra.com> - 6:5.1.0-2.1
- Rebuild for suitesparse 5.4.0
* Wed Jul 31 2019 Orion Poplawski <orion@nwra.com> - 6:5.1.0-2
- Drop use of %%buildarch in macros.octave (bugz#1733898)

View File

@ -1,2 +1 @@
SHA512 (octave-5.1.0.tar.lz) = 34facc20ffceaead05e62e16cc70bd603919c7e52c7489faa17b5c969a160c655f50c4aeb41ecee2e2d0a6245cc3364cf9009ddd3cecb17b9e06bbdacaa0a516
SHA512 (octave-5.1.0-docs.tar.lz) = 6bf24ed95d5d2957271abb8902a156edc588962b95218b05936858fafe8205f4295f072388f7331ad5700946fbae701bd0c3f2a59c258f390ea92c85eb87fdd2
SHA512 (octave-6.4.0.tar.lz) = f0e59cf1d038e8f92801c5621800872cb6d030fd7c306eb5746a40310120c91d37096ed364428845190c1bbc08b4c75e6f57f7ecdbc06ee6659885ce634730fd