$ git diff --patch-with-stat --summary 4e829e61cc999d3eb1043506fc01017e369db5f6..afeb47515dfaa90bec22d1b327bbf840a8751b4d
.abf.yml | 2 +-
...ve-2.1.36-emac.lisp => octave-2.1.36-emacs.lisp | 0
octave-8.1.0-libgnu.patch | 78 ++++++++++++++++++++++
octave-java2.patch | 17 ++---
octave.macros | 4 +-
octave.spec | 19 +++---
6 files changed, 99 insertions(+), 21 deletions(-)
rename octave-2.1.36-emac.lisp => octave-2.1.36-emacs.lisp (100%)
create mode 100644 octave-8.1.0-libgnu.patch
diff --git a/.abf.yml b/.abf.yml
index c041100..e83b469 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,2 +1,2 @@
sources:
- octave-7.2.0.tar.xz: 15cf0629355b8baff7ed24ec28bce01783a9e5f2
+ octave-8.1.0.tar.xz: 6e457678c6fe95ec68e39d56404ada3337a4e968
diff --git a/octave-2.1.36-emac.lisp b/octave-2.1.36-emacs.lisp
similarity index 100%
rename from octave-2.1.36-emac.lisp
rename to octave-2.1.36-emacs.lisp
diff --git a/octave-8.1.0-libgnu.patch b/octave-8.1.0-libgnu.patch
new file mode 100644
index 0000000..98e81e6
--- /dev/null
+++ b/octave-8.1.0-libgnu.patch
@@ -0,0 +1,78 @@
+--- a/libgnu/cdefs.h
++++ b/libgnu/cdefs.h
+@@ -685,7 +685,7 @@
+ # define __attr_access_none(argno)
+ #endif
+
+-#if __GNUC_PREREQ (11, 0)
++#if __GNUC_PREREQ (11, 0) && !defined(__clang__)
+ /* Designates dealloc as a function to call to deallocate objects
+ allocated by the declared function. */
+ # define __attr_dealloc(dealloc, argno) \
+--- a/m4/gnulib-common.m4
++++ b/m4/gnulib-common.m4
+@@ -182,7 +182,7 @@
+ _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that
+ can be freed via 'free'; it can be used only after declaring 'free'. */
+ /* Applies to: functions. Cannot be used on inline functions. */
+-#if _GL_GNUC_PREREQ (11, 0)
++#if _GL_GNUC_PREREQ (11, 0) && !defined(__clang__)
+ # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
+ #else
+ # define _GL_ATTRIBUTE_DEALLOC(f, i)
+--- a/config.in.h
++++ b/config.in.h
+@@ -3074,7 +3074,7 @@
+ _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that
+ can be freed via 'free'; it can be used only after declaring 'free'. */
+ /* Applies to: functions. Cannot be used on inline functions. */
+-#if _GL_GNUC_PREREQ (11, 0)
++#if _GL_GNUC_PREREQ (11, 0) && !defined(__clang__)
+ # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
+ #else
+ # define _GL_ATTRIBUTE_DEALLOC(f, i)
+--- a/libgnu/stdio.in.h
++++ b/libgnu/stdio.in.h
+@@ -94,7 +94,7 @@
+ that can be freed by passing them as the Ith argument to the
+ function F. */
+ #ifndef _GL_ATTRIBUTE_DEALLOC
+-# if __GNUC__ >= 11
++# if __GNUC__ >= 11 && !defined(__clang__)
+ # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
+ # else
+ # define _GL_ATTRIBUTE_DEALLOC(f, i)
+--- a/libgnu/stdlib.in.h
++++ b/libgnu/stdlib.in.h
+@@ -103,7 +103,7 @@
+ that can be freed by passing them as the Ith argument to the
+ function F. */
+ #ifndef _GL_ATTRIBUTE_DEALLOC
+-# if __GNUC__ >= 11
++# if __GNUC__ >= 11 && !defined(__clang__)
+ # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
+ # else
+ # define _GL_ATTRIBUTE_DEALLOC(f, i)
+--- a/libgnu/wchar.in.h
++++ b/libgnu/wchar.in.h
+@@ -87,7 +87,7 @@
+ that can be freed by passing them as the Ith argument to the
+ function F. */
+ #ifndef _GL_ATTRIBUTE_DEALLOC
+-# if __GNUC__ >= 11
++# if __GNUC__ >= 11 && !defined(__clang__)
+ # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
+ # else
+ # define _GL_ATTRIBUTE_DEALLOC(f, i)
+--- a/libgnu/dirent.in.h
++++ b/libgnu/dirent.in.h
+@@ -59,7 +59,7 @@
+ that can be freed by passing them as the Ith argument to the
+ function F. */
+ #ifndef _GL_ATTRIBUTE_DEALLOC
+-# if __GNUC__ >= 11
++# if __GNUC__ >= 11 && !defined(__clang__)
+ # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
+ # else
+ # define _GL_ATTRIBUTE_DEALLOC(f, i)
+
diff --git a/octave-java2.patch b/octave-java2.patch
index 79fc0f6..60f2cfb 100644
--- a/octave-java2.patch
+++ b/octave-java2.patch
@@ -1,14 +1,15 @@
--- a/configure.ac
+++ b/configure.ac
-@@ -2446,12 +2446,12 @@
- AC_MSG_CHECKING([for Java version])
- java_version=[`"$JAVA" -version 2>&1 | $SED -n -e 's/^[^ ]* version[^0-9"]*"\([^"]*\)".*/\1/p'`]
- AC_MSG_RESULT([$java_version])
-- java_major=[`echo $java_version | $SED -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*$/\1/'`]
-- java_minor=[`echo $java_version | $SED -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*$/\2/'`]
+@@ -2446,13 +2446,13 @@
+ [octave_cv_java_version=[`"$JAVA" -version 2>&1 | $SED -n -e 's/^[^ ]* version[^0-9"]*"\([^"]*\)".*/\1/p'`]
+ ])
+
+- java_major=[`echo $octave_cv_java_version | $SED -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*$/\1/'`]
+- java_minor=[`echo $octave_cv_java_version | $SED -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*$/\2/'`]
++ java_major=[`echo $octave_cv_java_version | $SED -e 's/^\([0-9][0-9]*\).*$/\1/'`]
++ #java_minor=[`echo $octave_cv_java_version | $SED -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*$/\2/'`]
+
- if test $java_major -gt 1 || (test $java_major -eq 1 && test $java_minor -ge 5); then
-+ java_major=[`echo $java_version | $SED -e 's/^\([0-9][0-9]*\).*$/\1/'`]
-+ #java_minor=[`echo $java_version | $SED -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*$/\2/'`]
+ if test $java_major -gt 2; then
: # Version is OK. Do nothing.
else
diff --git a/octave.macros b/octave.macros
index efea796..49110e7 100644
--- a/octave.macros
+++ b/octave.macros
@@ -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("install","-nodeps","-verbose",glob("%{_builddir}/%{buildsubdir}/build/%{octpkg}-%{version}-*.tar.gz"){1,1});unlink(pkg("global_list")); \
+%octave_cmd pkg("prefix","%{buildroot}%{octprefix}","%{buildroot}%{octarchprefix}");pkg("global_list",fullfile("%{buildroot}%{octarchprefix}","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")); \
if [ -e %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m ] \
then \
mv %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m.orig \
@@ -67,7 +67,7 @@ fi \
# octave can find the package, then remove 'octave_packages' again, and re-strip
# 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")); \
+%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");oruntests("%{buildroot}%{octpkgdir}");unlink(pkg("local_list")); \
/usr/lib/rpm/brp-strip %{__strip} \
%{nil}
diff --git a/octave.spec b/octave.spec
index 6892503..7ddfa0a 100644
--- a/octave.spec
+++ b/octave.spec
@@ -1,7 +1,7 @@
# Can't mix clang (C/C++) and gcc (fortran) when using LTO
%global _disable_lto 1
-%global octave_api api-v57
+%global octave_api api-v58
%bcond_with atlas
%bcond_without docs
@@ -11,7 +11,7 @@
Summary: High-level language for numerical computations
Name: octave
-Version: 7.2.0
+Version: 8.1.0
Release: 4
License: GPLv3+
Group: Sciences/Mathematics
@@ -19,9 +19,9 @@ Url: https://www.octave.org/
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
# from fedora with slight modification
Source10: %{name}.macros
-Source20: octave-2.1.36-emac.lisp
-# Based on https://hg.savannah.gnu.org/hgweb/octave/raw-rev/b876de975edf
-#Patch0: octave-sundials6.patch
+Source20: octave-2.1.36-emacs.lisp
+# make libgnu compatible with clang
+Patch0: octave-8.1.0-libgnu.patch
# fix java check
Patch1: octave-java2.patch
# This patch is required when installing all sagemath dependencies,
@@ -77,7 +77,7 @@ BuildRequires: pkgconfig(glu)
BuildRequires: pkgconfig(GraphicsMagick)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(lapack)
-BuildRequires: pkgconfig(libpcre)
+BuildRequires: pkgconfig(libpcre2-8)
BuildRequires: pkgconfig(ncurses)
#BuildRequires: pkgconfig(ompi)
#BuildRequires: pkgconfig(osmesa)
@@ -195,7 +195,7 @@ Requires: pkgconfig(glu)
Requires: pkgconfig(GraphicsMagick)
Requires: pkgconfig(lapack)
Requires: pkgconfig(appstream-glib)
-Requires: pkgconfig(libpcre)
+Requires: pkgconfig(libpcre2-8)
Requires: pkgconfig(libcurl)
Requires: pkgconfig(readline)
Requires: pkgconfig(zlib)
@@ -205,7 +205,6 @@ Requires: suitesparse-devel
Requires: texinfo
Requires: transfig
-
%description devel
The octave-devel package contains files needed for developing
applications which use GNU Octave.
@@ -253,8 +252,8 @@ This package contains documentation of Octave in various formats.
%build
# FIXME: gnulib fails with clang compiler
-export CC=gcc
-export CXX=g++
+#export CC=gcc
+#export CXX=g++
%configure \
--enable-shared \