commit:     990e89e1330f15ce6395128056c560722a2e3f24
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sat May 28 21:07:44 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Sat May 28 21:19:44 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=990e89e1

dev-octave/strings: add 1.2.0_p20211128, drop 1.2.0

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 dev-octave/strings/files/strings-1.2.0-156.patch   | 224 +++++++++++++
 dev-octave/strings/files/strings-1.2.0-157.patch   | 351 +++++++++++++++++++++
 dev-octave/strings/files/strings-1.2.0-158.patch   |  17 +
 dev-octave/strings/files/strings-1.2.0-160.patch   |  20 ++
 .../strings-1.2.0-build-against-octave-6.patch     |  30 --
 .../strings-1.2.0-err-instead-of-gripes.patch      |  16 -
 ...1.2.0.ebuild => strings-1.2.0_p20211128.ebuild} |  15 +-
 7 files changed, 625 insertions(+), 48 deletions(-)

diff --git a/dev-octave/strings/files/strings-1.2.0-156.patch 
b/dev-octave/strings/files/strings-1.2.0-156.patch
new file mode 100644
index 000000000..a72fd5ce8
--- /dev/null
+++ b/dev-octave/strings/files/strings-1.2.0-156.patch
@@ -0,0 +1,224 @@
+changeset:   156:db1ee7036df0
+user:        Oliver Heimlich <[email protected]>
+date:        Tue Jul 07 22:46:46 2015 +0200
+summary:     base64decode.m: Cleanup of function code and fix of bug #38974
+
+--- a/NEWS
++++ b/NEWS
+@@ -1,3 +1,11 @@
++Summary of important user-visible changes for strings 1.2.1:
++-------------------------------------------------------------------
++
++ ** The function base64decode has been almost rewritten and no longer returns
++    trailing zeros which have been introduced by padding (bug #38974), returns
++    uint8 vectors instead of binary64 vectors, and should perform faster.
++
++
+ Summary of important user-visible changes for strings 1.2.0:
+ -------------------------------------------------------------------
+ 
+--- a/inst/base64decode.m
++++ b/inst/base64decode.m
+@@ -1,4 +1,5 @@
+ ## Copyright (C) 2007 Muthiah Annamalai <[email protected]>
++## Copyright (C) 2015 Oliver Heimlich <[email protected]>
+ ##
+ ## This program is free software; you can redistribute it and/or modify it 
under
+ ## the terms of the GNU General Public License as published by the Free 
Software
+@@ -18,7 +19,8 @@
+ ## @deftypefnx {Function File} {@var{rval} =} base64decode (@var{code}, 
@var{as_string})
+ ## Convert a base64 @var{code}  (a string of printable characters according 
to RFC 2045) 
+ ## into the original ASCII data set of range 0-255. If option @var{as_string} 
is 
+-## passed, the return value is converted into a string.
++## passed, the return value is converted into a string. Otherwise, the return
++## value is a uint8 row vector.
+ ##
+ ## @example
+ ## @group
+@@ -32,125 +34,84 @@
+ ## @seealso {base64encode}
+ ## @end deftypefn
+ 
+-function z = base64decode (X, as_string)
+-  if (nargin < 1 )
++function Z = base64decode (X, as_string)
++  if (nargin < 1 || nargin > 2)
+     print_usage;
+-  elseif nargin == 1
+-    as_string=false;
++  elseif (nargin == 1)
++    as_string = false;
+   endif
+ 
+-  if ( any(X(:) < 0) || any(X(:) > 255))
+-    error("base64decode is expecting integers in the range 0 .. 255");
++  ## strip white space
++  X((X == ' ') | (X == "\n") | (X == "\r")) = [];
++
++  if (any (X(:) < 0) || any(X(:) > 255))
++    error ("base64decode is expecting integers in the range 0 .. 255");
+   endif
+ 
+-  ## decompose strings into the 4xN matrices 
+-  ## formatting issues.
+-  if( rows(X) == 1 )
+-    Y=[];
+-    L=length(X);
+-    for z=4:4:L
+-        Y=[Y X(z-3:z)']; #keep adding columns
+-    end
+-    if min(size(Y))==1
+-        Y=reshape(Y,[L, 1]);
+-    else
+-        Y=reshape(Y,[4,L/4]);
+-    end
+-    X=Y;
+-    Y=[];
+-  end
+-
+-  X = toascii(X);
+-  Xa= X;
+-
+-  ## Work backwards. Starting at step in table,
+-  ## lookup the index of the element in the table.
++  ## convert into ascii code and 8 bit integers to save memory
++  X = uint8 (X);
+ 
+-  ## 6-bit encoding table, plus 1 for padding
+-  ## 26*2 + 10 + 2 + 1  = 64 + 1, '=' is EOF stop mark.
+-  table = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
+-
+-  S=size(X);
+-  SRows=S(1);
+-  SCols=S(2);
+-  Y=zeros(S);
+-
+-  ## decode the incoming matrix & 
++  ## decompose into the 4xN matrices - separation of encoded 3 byte blocks
++  if (rows (X) ~= 4)
++    if (rem (numel (X), 4) ~= 0)
++      error ("base64decode is expecting blocks of 4 characters to decode");
++    endif
++    X = reshape (X, [4, numel(X)./4]);
++  endif
++  
++  ## decode 6-bit values from the incoming matrix & 
+   ## write the values into Va matrix.
+-  Va = -1*ones(size(Xa));
++  Va = ones (size(X), 'uint8') .* 65;
+ 
+-  iAZ = (Xa >= 'A').*(Xa <= 'Z') > 0; 
+-  Va(iAZ)=Xa(iAZ)-'A';
+-
+-  iaz = (Xa >= 'a').*(Xa <= 'z') > 0;
+-  Va(iaz)=Xa(iaz)-'a'+26;
++  iAZ = ((X >= 'A') & (X <= 'Z'));
++  Va(iAZ) = X(iAZ) - 'A';
+ 
+-  i09 = (Xa >= '0').*(Xa <= '9') > 0;
+-  Va(i09)=Xa(i09)-'0'+52;
++  iaz = ((X >= 'a') & (X <= 'z'));
++  Va(iaz) = X(iaz) - 'a' + 26;
+ 
+-  is = (Xa == '/') ;  Va(is) = 63;
+-  ip = (Xa == '+') ;  Va(ip) = 62;
+-  ieq = (Xa == '=') ;  Va(ieq) = 0;
+-  clear is; clear ieq; clear ip; clear i09;
+-  clear iaz; clear iAZ;  clear Xa; clear X;
++  i09 = ((X >= '0') & (X <= '9'));
++  Va(i09) = X(i09) - '0' + 52;
+ 
+-  Y=Va; clear Va;
+-  Y1=Y(1,:);
+-  if (SRows > 1)
+-     Y2=Y(2,:);
+-  else 
+-     Y2=zeros(1,SCols);
+-  end;
+-
+-  if (SRows > 2)
+-     Y3=Y(3,:);
+-  else 
+-     Y3=zeros(1,SCols);
+-  end;
+-
+-  if (SRows > 3)
+-     Y4=Y(4,:);
+-  else 
+-     Y4=zeros(1,SCols);
+-  end;
++  Va(X == '+') = 62;
++  Va(X == '/') = 63;
++  
++  padding = (X == '=');
++  Va(padding) = 0;
++  
++  if (any (any (Va == 65)))
++    error ('base64decode is expecting valid characters A..Za..z0..9+/=');
++  endif
++  
++  if (not (isempty (X)) && ...
++      (find (padding, 1) < numel (X) - 1 || ...
++        (X(end - 1) == '=' && X(end) ~= '=')))
++    error ('base64decode is expecting max two padding characters at the end');
++  endif
++  
++  ## decode 4x6 bit into 3x8 bit
++  B = vertcat (...
++        Va(1, :) .* 4 + (Va(2, :) - rem (Va(2, :), 16)) ./ 16, ...
++        rem (Va(2, :), 16) .* 16 + (Va(3, :) - rem (Va(3, :), 4)) ./ 4, ...
++        rem (Va(3, :), 4) .* 64 + Va(4, :));
+ 
+-  ## +1 not required due to ASCII subtraction
+-  ## actual decoding work
+-  b1 = Y1*4 + fix(Y2/16);
+-  b2 = mod(Y2,16)*16+fix(Y3/4);
+-  b3 = mod(Y3,4)*64 + Y4;
+-
+-  ZEROS=sum(sum(Y==0));
+-  L=length(b1)*3;
+-  z=zeros(1,L);
+-  z(1:3:end)=b1;
+-  if (SRows > 1)
+-     z(2:3:end)=b2;
+-  else
+-     z(2:3:end)=[];
+-  end;
+-
+-  if (SRows > 2)
+-     z(3:3:end)=b3;
+-  else
+-     z(3:3:end)=[];
+-  end
+-
+-  ## FIXME
+-  ## is this expected behaviour?
+-  if ( as_string )
+-    L=length(z);
+-    while ( ( L > 0) && ( z(L)==0 ) )
+-      L=L-1;
+-    end
+-    z=char(z(1:L));
++  ## Convert blocks into row vector
++  Z = B(:).';
++  
++  ## Remove byte blocks which have been introduced by padding
++  if (not (isempty (X)))
++    Z(end - sum (padding(end - 1 : end)) + 1 : end) = [];
++  endif
++  
++  if (as_string)
++    Z = char (Z);
+   end
+ 
+ endfunction
+ 
+ %!assert(base64decode(base64encode('Hakuna Matata'),true),'Hakuna Matata')
+-%!assert(base64decode(base64encode([1:255])),[1:255])
++%!assert(base64decode(base64encode([1:255])),uint8([1:255]))
+ %!assert(base64decode(base64encode('taken'),true),'taken')
+ %!assert(base64decode(base64encode('sax'),true),'sax')
+ %!assert(base64decode(base64encode('H'),true),'H')
++%!assert(base64decode(base64encode('H'),false),uint8('H'))
+ %!assert(base64decode(base64encode('Ta'),true),'Ta')
+

diff --git a/dev-octave/strings/files/strings-1.2.0-157.patch 
b/dev-octave/strings/files/strings-1.2.0-157.patch
new file mode 100644
index 000000000..b323816ab
--- /dev/null
+++ b/dev-octave/strings/files/strings-1.2.0-157.patch
@@ -0,0 +1,351 @@
+changeset:   157:e1a7916b66a9
+user:        John Donoghue
+date:        Thu Jan 09 16:37:00 2020 -0500
+summary:     Add configure scripts to detect new octave functionality (Bug 
#55385)
+
+--- a/NEWS
++++ b/NEWS
+@@ -1,3 +1,8 @@
++Summary of important user-visible changes for strings 1.2.1+:
++-------------------------------------------------------------------
++
++ ** Update package to compile in GNU Octave 5+
++
+ Summary of important user-visible changes for strings 1.2.1:
+ -------------------------------------------------------------------
+ 
+@@ -5,7 +10,6 @@
+     trailing zeros which have been introduced by padding (bug #38974), returns
+     uint8 vectors instead of binary64 vectors, and should perform faster.
+ 
+-
+ Summary of important user-visible changes for strings 1.2.0:
+ -------------------------------------------------------------------
+ 
+--- a/src/Makefile
++++ /dev/null
+@@ -1,11 +0,0 @@
+-OCTAVE ?= octave
+-MKOCTFILE ?= mkoctfile -Wall
+-
+-PCRE_SWITCHES := $(shell $(OCTAVE) \
+-      --no-gui --no-init-file --no-site-file --silent --no-history \
+-      --eval 'disp (octave_config_info ("PCRE_LIBS"));' \
+-      --eval 'disp (octave_config_info ("PCRE_CPPFLAGS"));' \
+-      )
+-
+-pcregexp.oct: %.oct: %.cc
+-      $(MKOCTFILE) $(PCRE_SWITCHES) -o $@ $<
+--- /dev/null
++++ b/src/Makefile.in
+@@ -0,0 +1,42 @@
++# Makefile for strings package for Octave
++#
++# Copyright (C) 2019 John Donoghue 
++#
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3 of the License, or
++# (at your option) any later version.
++#
++# This program 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.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, see <http://www.gnu.org/licenses/>.
++
++
++# before cross building, pre-build at least $(TEXIFILE) natively,
++# e.g. with targets 'doc', 'html', or 'prebuild'
++
++PCRE_CXXFLAGS ?= @PCRE_CFLAGS@
++PCRE_LIBS ?= @PCRE_LIBS@
++
++MKOCTFILE ?= @MKOCTFILE@
++
++.PHONY: all clean distclean maintainer-clean
++
++all: pcregexp.oct
++
++%.oct: %.cc
++      $(MKOCTFILE) -o $@ $< $(PCRE_CXXFLAGS) $(PCRE_LIBS)
++
++clean:
++      $(RM) *.o octave-core *.oct *~
++
++distclean: clean
++      $(RM) config.h config.log config.status Makefile oct-alt-includes.h
++      $(RM) -r autom4te.cache
++
++maintainer-clean: distclean
++      $(RM) configure config.h.in aclocal.m4
+--- /dev/null
++++ b/src/bootstrap
+@@ -0,0 +1,7 @@
++#! /bin/sh
++
++aclocal
++
++autoconf
++
++autoheader -f
+--- /dev/null
++++ b/src/configure.ac
+@@ -0,0 +1,102 @@
++#                                               -*- Autoconf -*-
++# Process this file with autoconf to produce a configure script.
++#
++### Copyright (C) 2015-2018 Olaf Till <[email protected]>
++### Copyright (C) 2019 John Donoghue <[email protected]>
++###
++### This program is free software; you can redistribute it and/or
++### modify it under the terms of the GNU General Public License as
++### published by the Free Software Foundation; either version 3 of the
++### License, or (at your option) any later version.
++###
++### This program 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.
++###
++### You should have received a copy of the GNU General Public License
++### along with this program; if not, see
++### <http://www.gnu.org/licenses/>.
++
++AC_PREREQ([2.67])
++AC_INIT([strings], [1.2.0])
++AC_CONFIG_SRCDIR([pcregexp.cc])
++AC_CONFIG_HEADERS([config.h])
++
++# Avoid warnings for redefining AH-generated preprocessor symbols of
++# Octave.
++AH_TOP([#include "undef-ah-octave.h"])
++
++AC_CONFIG_MACRO_DIRS([m4])
++
++# Checks for programs.
++AC_CHECK_PROG(MKOCTFILE, mkoctfile, mkoctfile)
++if test -z "$MKOCTFILE"; then
++AC_MSG_ERROR([mkoctfile not found], 1);
++fi
++AC_CHECK_PROG(OCTAVE_CONFIG, octave-config, octave-config)
++if test -z "$OCTAVE_CONFIG"; then
++AC_MSG_ERROR([octave-config not found], 1);
++fi
++
++#AC_CHECK_TOOL(PKG_CONFIG, pkg-config, [])
++#if test -z "$PKG_CONFIG"; then
++#    AC_MSG_ERROR([pkg-config not found], 1);
++#fi
++
++
++# The same value of CXX as Octave was compiled with is supposed to be used.
++CXX=${CXX:-`${MKOCTFILE} -p CXX`}
++AC_PROG_CXX
++  
++AC_PROG_CXXCPP
++
++# Checks for typedefs, structures, and compiler characteristics.
++
++# Checks for library functions.
++PKG_CHECK_MODULES([PCRE],[libpcre],
++ [],
++ [AC_MSG_ERROR([libpcre not found])]
++)
++
++
++# Start of checks for Octave features, preparations for checks.
++OCTLIBDIR=${OCTLIBDIR:-`$OCTAVE_CONFIG -p OCTLIBDIR`}
++## We need Octaves include path both with and without '/octave'
++## appended. The path without '/octave' is needed to selectively test
++## for Octave headers, like octave/....h. The path with '/octave' is
++## needed since some Octave headers contain include directives for
++## other Octave headers with <> instead of "".
++OCTINCLUDEDIR=${OCTINCLUDEDIR:-`$MKOCTFILE -p INCFLAGS`}
++AC_LANG_PUSH([C++])
++TCXXFLAGS=$CXXFLAGS
++TLDFLAGS=$LDFLAGS
++TLIBS=$LIBS
++TCPPFLAGS=$CPPFLAGS
++LDFLAGS="-L$OCTLIBDIR $LDFLAGS"
++LIBS="-loctinterp $LIBS"
++# CXXFLAGS=
++CPPFLAGS="$OCTINCLUDEDIR $CPPFLAGS"
++
++## Simple symbol alternatives of different Octave versions.
++OF_OCTAVE_LIST_ALT_SYMS([
++[dnl
++  [gripe_wrong_type_arg],
++  [err_wrong_type_arg],
++  [[err_wrong_type_arg("test");]],
++  [OCTAVE__WRONG_TYPE_ARG],
++  [],
++  []
++]
++],
++   [oct-alt-includes.h])
++
++LIBS=$TLIBS
++LDFLAGS=$TLDFLAGS
++CXXFLAGS=$TCXXFLAGS
++CPPFLAGS=$TCPPFLAGS
++AC_LANG_POP([C++])
++# End of checks for Octave features.
++
++AC_CONFIG_FILES([Makefile])
++AC_OUTPUT
+--- /dev/null
++++ b/src/m4/octave-forge.m4
+@@ -0,0 +1,93 @@
++# Copyright (C) 2017-2018 Olaf Till <[email protected]>
++# Modifications to print what is searching for by JohnD
++#
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3 of the License, or
++# (at your option) any later version.
++#
++# This program 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.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, see <http://www.gnu.org/licenses/>.
++
++# arguments of OF_OCTAVE_ALT_SYMS (see also description of
++# OF_OCTAVE_LIST_ALT_SYMS below):
++#
++# $1: symbol version 1
++# $2: symbol version 2
++# $3: test for symbol version 2
++# $4: macro name to access alternative symbols
++# $5: include directives for symbol version 1
++# $6: include directives for symbol version 2
++# (a list of lists of args 1--6 is $1 of OF_OCTAVE_LIST_ALT_SYMS)
++# $7: name of generated include file with alternatives of Octave headers
++# (arg7 is $2 of OF_OCTAVE_LIST_ALT_SYMS)
++AC_DEFUN([OF_OCTAVE_ALT_SYMS], [
++AC_MSG_CHECKING([$1 or $2])
++  AC_COMPILE_IFELSE(
++    [AC_LANG_PROGRAM([[#include <octave/oct.h>]
++                      $6],
++                     [$3])],
++    [AC_DEFINE($4,
++               [[$2]],
++               [macro for alternative Octave symbols])
++     AC_MSG_RESULT([$2])
++     echo '$6' >> $7],
++    [AC_DEFINE($4,
++               [[$1]],
++               [macro for alternative Octave symbols])
++     AC_MSG_RESULT([$1])
++     echo '$5' >> $7]
++)
++])
++
++
++# OF_OCTAVE_LIST_ALT_SYMS is called in the following way:
++#
++# OF_OCTAVE_LIST_ALT_SYMS([
++# [dnl
++#   [old_octave_symbol],
++#   [new_octave_symbol],
++#   [[compilation test]
++#    [for new_octave_symbol]],
++#   [NAME_OF_GENERATED_MACRO____WILL_EXPAND_TO_OLD_OR_NEW_SYMBOL],
++#   [[include directives]
++#    [except #include <octave/oct.h>]
++#    [necessary to compile with old_octave_symbol]],
++#   [[include directives]
++#    [except #include <octave/oct.h>]
++#    [nessary to compile with new_octave_symbol]
++#    [and to compile the test]]
++# ],
++#
++# ... further such lists as the above
++#
++# ],
++#
++# [name-of-header-file-for-alternative-octave-iclude-directives.h])
++#
++#
++# This file should be put into src/m4/, and the line
++#
++# AC_CONFIG_MACRO_DIRS([m4])
++#
++# should be put into src/configure.ac. The package should use
++# autoheader to generate config.h.in (src/bootstrap should contain the
++# lines 'aclocal', 'autoconf', and 'autoheader -f'). Package code
++# should include config.h and use the generated macros to access the
++# alternative symbols of Octave. An example of a call to
++# OF_OCTAVE_LIST_ALT_SYMS in src/configure.ac is available together
++# with this file.
++AC_DEFUN([OF_OCTAVE_LIST_ALT_SYMS], [
++
++echo '/* generated by configure */' > $2
++
++m4_foreach([it], [$1], [m4_apply([OF_OCTAVE_ALT_SYMS], [it, $2])])
++
++AH_BOTTOM([#include "$2"])
++
++])
+--- a/src/pcregexp.cc
++++ b/src/pcregexp.cc
+@@ -1,4 +1,4 @@
+-// Copyright (C) 2004 Stefan van der Walt <[email protected]>
++// Copyright (C) 2004-2019 Stefan van der Walt <[email protected]>
+ // All rights reserved.
+ //
+ // Redistribution and use in source and binary forms, with or without
+@@ -26,6 +26,8 @@
+ #include <iostream>
+ #include <vector>
+ 
++#include "config.h"
++
+ //FIXME This function needs some documentation
+ DEFUN_DLD(pcregexp, args, nargout, "\
+ -*- texinfo -*-\n\
+@@ -49,7 +51,7 @@
+     std::string pattern = args(0).string_value();
+     std::string input = args(1).string_value();
+     if (error_state) {
+-        gripe_wrong_type_arg("pcregexp", args(0));
++        OCTAVE__WRONG_TYPE_ARG("pcregexp", args(0));
+         return retval;
+     }
+ 
+--- /dev/null
++++ b/src/undef-ah-octave.h
+@@ -0,0 +1,27 @@
++/* To be included at the top of config.h (by autoheader). Avoid
++   warnings for redefining AH-generated preprocessor symbols of
++   Octave. */
++
++#ifdef PACKAGE_BUGREPORT
++#undef PACKAGE_BUGREPORT
++#endif
++
++#ifdef PACKAGE_NAME
++#undef PACKAGE_NAME
++#endif
++
++#ifdef PACKAGE_STRING
++#undef PACKAGE_STRING
++#endif
++
++#ifdef PACKAGE_TARNAME
++#undef PACKAGE_TARNAME
++#endif
++
++#ifdef PACKAGE_URL
++#undef PACKAGE_URL
++#endif
++
++#ifdef PACKAGE_VERSION
++#undef PACKAGE_VERSION
++#endif
+

diff --git a/dev-octave/strings/files/strings-1.2.0-158.patch 
b/dev-octave/strings/files/strings-1.2.0-158.patch
new file mode 100644
index 000000000..47b30834b
--- /dev/null
+++ b/dev-octave/strings/files/strings-1.2.0-158.patch
@@ -0,0 +1,17 @@
+changeset:   158:2db1dbb75557
+user:        John Donoghue
+date:        Thu Jan 09 16:38:52 2020 -0500
+summary:     * inst/base64encode.m: dont use depreciated toascii
+
+--- a/inst/base64encode.m
++++ b/inst/base64encode.m
+@@ -46,7 +46,7 @@
+   endif
+   
+   if (ischar (X))
+-    X = toascii (X);
++    X = double (X);
+   endif
+   
+   if (any (X != fix (X)) || any (X < 0 | X > 255))
+

diff --git a/dev-octave/strings/files/strings-1.2.0-160.patch 
b/dev-octave/strings/files/strings-1.2.0-160.patch
new file mode 100644
index 000000000..35c4917c6
--- /dev/null
+++ b/dev-octave/strings/files/strings-1.2.0-160.patch
@@ -0,0 +1,20 @@
+changeset:   160:98fa88db1ba8
+tag:         tip
+user:        Markus Mützel <[email protected]>
+date:        Sun Nov 28 22:02:20 2021 +0100
+summary:     Fix compilation with Octave 8 (bug #61578).
+
+--- a/src/pcregexp.cc
++++ b/src/pcregexp.cc
+@@ -50,10 +50,6 @@
+ 
+     std::string pattern = args(0).string_value();
+     std::string input = args(1).string_value();
+-    if (error_state) {
+-        OCTAVE__WRONG_TYPE_ARG("pcregexp", args(0));
+-        return retval;
+-    }
+ 
+     // Compile expression
+     pcre *re;
+

diff --git 
a/dev-octave/strings/files/strings-1.2.0-build-against-octave-6.patch 
b/dev-octave/strings/files/strings-1.2.0-build-against-octave-6.patch
deleted file mode 100644
index 1390153b4..000000000
--- a/dev-octave/strings/files/strings-1.2.0-build-against-octave-6.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Description: Build against Octave 6.1
- Replace the calls to the deprecated function toascii by double.
-Author: Rafael Laboissière <[email protected]>
-Origin: upstream, 
https://sourceforge.net/p/octave/strings/ci/2db1dbb75557eef94605cb4ac682783ab78ac8d8/
-Bug-Debian: https://bugs.debian.org/976200
-Forwarded: not-needed
-Last-Update: 2020-12-01
-
---- octave-strings-1.2.0.orig/inst/base64encode.m
-+++ octave-strings-1.2.0/inst/base64encode.m
-@@ -46,7 +46,7 @@ function Y = base64encode (X, row_vector
-   endif
-   
-   if (ischar (X))
--    X = toascii (X);
-+    X = double (X);
-   endif
-   
-   if (any (X != fix (X)) || any (X < 0 | X > 255))
---- octave-strings-1.2.0.orig/inst/base64decode.m
-+++ octave-strings-1.2.0/inst/base64decode.m
-@@ -60,7 +60,7 @@ function z = base64decode (X, as_string)
-     Y=[];
-   end
- 
--  X = toascii(X);
-+  X = double(X);
-   Xa= X;
- 
-   ## Work backwards. Starting at step in table,

diff --git a/dev-octave/strings/files/strings-1.2.0-err-instead-of-gripes.patch 
b/dev-octave/strings/files/strings-1.2.0-err-instead-of-gripes.patch
deleted file mode 100644
index 9b9017cad..000000000
--- a/dev-octave/strings/files/strings-1.2.0-err-instead-of-gripes.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Description: Use err_* functions instead of the deprecated gripes_*
-Author: Rafael Laboissiere <[email protected]>
-Forwarded: https://savannah.gnu.org/bugs/index.php?57000
-Last-Update: 2019-10-05
-
---- octave-strings-1.2.0.orig/src/pcregexp.cc
-+++ octave-strings-1.2.0/src/pcregexp.cc
-@@ -49,7 +49,7 @@ Check your system's @code{pcre} man page
-     std::string pattern = args(0).string_value();
-     std::string input = args(1).string_value();
-     if (error_state) {
--        gripe_wrong_type_arg("pcregexp", args(0));
-+        err_wrong_type_arg("pcregexp", args(0));
-         return retval;
-     }
- 

diff --git a/dev-octave/strings/strings-1.2.0.ebuild 
b/dev-octave/strings/strings-1.2.0_p20211128.ebuild
similarity index 60%
rename from dev-octave/strings/strings-1.2.0.ebuild
rename to dev-octave/strings/strings-1.2.0_p20211128.ebuild
index 4096b09d4..3a96a84df 100644
--- a/dev-octave/strings/strings-1.2.0.ebuild
+++ b/dev-octave/strings/strings-1.2.0_p20211128.ebuild
@@ -3,10 +3,15 @@
 
 EAPI=8
 
+MYPV="$(ver_cut 1-3)"
+MYP="${PN}-${MYPV}"
+
 inherit octaveforge
 
 DESCRIPTION="Additional functions for manipulation and analysis of strings"
 HOMEPAGE="https://octave.sourceforge.io/strings/index.html";
+SRC_URI="mirror://sourceforge/octave/${MYP}.tar.gz"
+S="${WORKDIR}/${MYP}"
 
 LICENSE="GPL-3+ BSD-2"
 SLOT="0"
@@ -19,6 +24,12 @@ DEPEND="
 RDEPEND="${DEPEND}"
 
 PATCHES=(
-       "${FILESDIR}/${P}-build-against-octave-6.patch"
-       "${FILESDIR}/${P}-err-instead-of-gripes.patch"
+       "${FILESDIR}/${MYP}-156.patch"
+       "${FILESDIR}/${MYP}-157.patch"
+       "${FILESDIR}/${MYP}-158.patch"
+       "${FILESDIR}/${MYP}-160.patch"
 )
+
+src_unpack() {
+       default
+}

Reply via email to