commit octave-forge-strings for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package octave-forge-strings for openSUSE:Factory checked in at 2023-10-31 20:25:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/octave-forge-strings (Old) and /work/SRC/openSUSE:Factory/.octave-forge-strings.new.17445 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "octave-forge-strings" Tue Oct 31 20:25:35 2023 rev:4 rq:1121343 version:1.3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/octave-forge-strings/octave-forge-strings.changes 2022-07-12 11:12:57.551739259 +0200 +++ /work/SRC/openSUSE:Factory/.octave-forge-strings.new.17445/octave-forge-strings.changes 2023-10-31 20:25:49.470214951 +0100 @@ -1,0 +2,7 @@ +Thu Oct 19 06:44:46 UTC 2023 - Atri Bhattacharya <badshah400@gmail.com> + +- Update to version 1.3.1: + * Update for pcre detection when no pkg-config available + * Bugfix pcregexp memory leaks + +------------------------------------------------------------------- Old: ---- strings-1.3.0.tar.gz New: ---- strings-1.3.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ octave-forge-strings.spec ++++++ --- /var/tmp/diff_new_pack.2Jnjos/_old 2023-10-31 20:25:50.722260939 +0100 +++ /var/tmp/diff_new_pack.2Jnjos/_new 2023-10-31 20:25:50.734261380 +0100 @@ -1,7 +1,7 @@ # # spec file for package octave-forge-strings # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,12 +18,12 @@ %define octpkg strings Name: octave-forge-%{octpkg} -Version: 1.3.0 +Version: 1.3.1 Release: 0 Summary: Additional manipulation functions for Octave -License: GPL-3.0-or-later AND BSD-2-Clause +License: BSD-2-Clause AND GPL-3.0-or-later Group: Productivity/Scientific/Math -Url: http://octave.sourceforge.net +URL: https://gnu-octave.github.io/packages/%{octpkg}/ Source0: http://downloads.sourceforge.net/octave/%{octpkg}-%{version}.tar.gz BuildRequires: gcc-c++ BuildRequires: hdf5-devel ++++++ strings-1.3.0.tar.gz -> strings-1.3.1.tar.gz ++++++ ++++ 4846 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/strings-1.3.0/DESCRIPTION new/strings-1.3.1/DESCRIPTION --- old/strings-1.3.0/DESCRIPTION 2022-06-28 14:21:04.000000000 +0200 +++ new/strings-1.3.1/DESCRIPTION 2023-06-09 14:53:08.000000000 +0200 @@ -1,6 +1,6 @@ Name: strings -Version: 1.3.0 -Date: 2022-06-28 +Version: 1.3.1 +Date: 2023-06-09 Author: various authors Maintainer: John Donoghue <john.donoghue@ieee.org> Title: String Handling. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/strings-1.3.0/NEWS new/strings-1.3.1/NEWS --- old/strings-1.3.0/NEWS 2022-06-28 14:21:04.000000000 +0200 +++ new/strings-1.3.1/NEWS 2023-06-09 14:53:08.000000000 +0200 @@ -1,3 +1,10 @@ +Summary of important user-visible changes for strings 1.3.1: +------------------------------------------------------------------- + + ** Update for pcre detection when no pkg-config available + + ** Bugfix pcregexp memory leaks + Summary of important user-visible changes for strings 1.3.0: ------------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/strings-1.3.0/src/config.h.in new/strings-1.3.1/src/config.h.in --- old/strings-1.3.0/src/config.h.in 2022-06-28 14:21:04.000000000 +0200 +++ new/strings-1.3.1/src/config.h.in 2023-06-09 14:53:08.000000000 +0200 @@ -2,6 +2,45 @@ #include "undef-ah-octave.h" +/* Define to 1 if you have the <inttypes.h> header file. */ +#undef HAVE_INTTYPES_H + +/* unwind_action */ +#undef HAVE_OCTAVE_UNWIND_ACTION + +/* Define to 1 if you have the <pcre2.h> header file. */ +#undef HAVE_PCRE2_H + +/* Define to 1 if you have the <pcre.h> header file. */ +#undef HAVE_PCRE_H + +/* Define to 1 if you have the <stdint.h> header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the <stdio.h> header file. */ +#undef HAVE_STDIO_H + +/* Define to 1 if you have the <stdlib.h> header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the <strings.h> header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the <string.h> header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the <sys/types.h> header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the <unistd.h> header file. */ +#undef HAVE_UNISTD_H + +/* macro for alternative Octave symbols */ +#undef OCTAVE__UNWIND_PROTECT + /* macro for alternative Octave symbols */ #undef OCTAVE__WRONG_TYPE_ARG @@ -23,4 +62,9 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#undef STDC_HEADERS + #include "oct-alt-includes.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/strings-1.3.0/src/configure.ac new/strings-1.3.1/src/configure.ac --- old/strings-1.3.0/src/configure.ac 2022-06-28 14:21:04.000000000 +0200 +++ new/strings-1.3.1/src/configure.ac 2023-06-09 14:53:08.000000000 +0200 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. # ### Copyright (C) 2015-2018 Olaf Till <i7tiol@t-online.de> -### Copyright (C) 2019-2022 John Donoghue <john.donoghue@ieee.org> +### Copyright (C) 2019-2023 John Donoghue <john.donoghue@ieee.org> ### ### This program is free software; you can redistribute it and/or ### modify it under the terms of the GNU General Public License as @@ -19,7 +19,7 @@ ### <http://www.gnu.org/licenses/>. AC_PREREQ([2.67]) -AC_INIT([strings], [1.3.0]) +AC_INIT([strings], [1.3.1]) AC_CONFIG_SRCDIR([pcregexp.cc]) AC_CONFIG_HEADERS([config.h]) @@ -62,7 +62,7 @@ [ PKG_CHECK_MODULES([PCRE],[libpcre], [], - [AC_MSG_ERROR([libpcre and libpre2 not found])]) + [PCRE_CFLAGS=""]) ] ) if test x$USE_PCRE2 == xyes; then @@ -70,7 +70,21 @@ PCRE_LIBS=$PCRE2_LIBS fi +if test -z "$PKG_CONFIG"; then + # fallback detection if no pkg-config + if test -z "$PCRE_CFLAGS"; then + AC_CHECK_HEADERS([pcre2.h], + [AC_CHECK_LIB([pcre2-8], [pcre2_config_8], [PCRE_CFLAGS="-DUSE_PCRE2"; PCRE_LIBS=-lpcre2-8], [])], [], [[#define PCRE2_CODE_UNIT_WIDTH 8]]) + if test -z "$PCRE_CFLAGS"; then + AC_CHECK_HEADERS([pcre.h], + [AC_CHECK_LIB([pcre], [pcre_config], [PCRE_CFLAGS=""; PCRE_LIBS=-lpcre], [])], []) + fi + fi +fi +if test -z "$PCRE_CFLAGS$PCRE_LIBS"; then + AC_MSG_ERROR([libpcre and libpre2 not found]) +fi # Start of checks for Octave features, preparations for checks. OCTLIBDIR=${OCTLIBDIR:-`$OCTAVE_CONFIG -p OCTLIBDIR`} @@ -99,10 +113,37 @@ [OCTAVE__WRONG_TYPE_ARG], [], [] +], +[dnl + [unwind_protect], + [octave::unwind_protect], + [[octave::unwind_protect frame;]], + [OCTAVE__UNWIND_PROTECT], + [], + [] ] ], [oct-alt-includes.h]) +AC_MSG_CHECKING([for octave::unwind_action]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include <octave/oct.h> + #include <octave/unwind-prot.h> + #ifdef HAVE_CONFIG_H + # include "config.h" + #endif + void test_f() {} + ]],[ + octave::unwind_action u(test_f); + ])], + [octave_unwind_action=yes], + [octave_unwind_action=no] +) +AC_MSG_RESULT([$octave_unwind_action]) +if test $octave_unwind_action = yes; then + AC_DEFINE([HAVE_OCTAVE_UNWIND_ACTION],[1],[unwind_action]) +fi + LIBS=$TLIBS LDFLAGS=$TLDFLAGS CXXFLAGS=$TCXXFLAGS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/strings-1.3.0/src/pcregexp.cc new/strings-1.3.1/src/pcregexp.cc --- old/strings-1.3.0/src/pcregexp.cc 2022-06-28 14:21:04.000000000 +0200 +++ new/strings-1.3.1/src/pcregexp.cc 2023-06-09 14:53:08.000000000 +0200 @@ -23,6 +23,7 @@ #include <octave/oct.h> #ifdef USE_PCRE2 +#include <octave/unwind-prot.h> #define PCRE2_DATA_WIDTH 8 #define PCRE2_CODE_UNIT_WIDTH 8 #include <pcre2.h> @@ -75,12 +76,25 @@ pcre2_match_data *match_data; PCRE2_SIZE *ovector; match_data = pcre2_match_data_create_from_pattern(re, NULL); + +#ifdef HAVE_OCTAVE_UNWIND_ACTION + octave::unwind_action cleanup + ([=] () { + // Free memory + pcre2_match_data_free(match_data); + pcre2_code_free(re); + }); +#else + OCTAVE__UNWIND_PROTECT cleanup; + cleanup.add_fcn (pcre2_match_data_free, match_data); + cleanup.add_fcn (pcre2_code_free, re); +#endif + int matches = pcre2_match(re, (PCRE2_SPTR)input.c_str(), input.length(), 0, 0, match_data, NULL); if (matches == PCRE2_ERROR_NOMATCH) { for (int i=nargout-1; i>=0; i--) retval(i) = ""; retval(0) = Matrix(); - pcre2_code_free(re); return retval; } else if (matches < -1) { error("pcregexp: internal error calling pcre_exec"); @@ -104,10 +118,6 @@ retval(i) = std::string(input.c_str() + ovector[2*i], ovector[2*i+1] - ovector[2*i]); - // Free memory - pcre2_match_data_free(match_data); - pcre2_code_free(re); - #else pcre *re; const char *err;
participants (1)
-
Source-Sync