Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package perl-Curses for openSUSE:Factory checked in at 2022-12-12 17:39:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Curses (Old) and /work/SRC/openSUSE:Factory/.perl-Curses.new.1835 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Curses" Mon Dec 12 17:39:49 2022 rev:33 rq:1042288 version:1.43 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Curses/perl-Curses.changes 2022-08-24 15:11:52.184545428 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Curses.new.1835/perl-Curses.changes 2022-12-12 17:42:00.509897207 +0100 @@ -1,0 +2,18 @@ +Thu Dec 8 03:06:50 UTC 2022 - Tina Müller <timueller+p...@suse.de> + +- updated to 1.43 + see /usr/share/doc/packages/perl-Curses/ChangeLog + + New in 1.43 (Released December 08, 2022) + Fix missing file introduced in 1.42 that prevents all builds from working. + New in 1.42 (Released December 07, 2022) + Add missing return type declarations so it works with modern C compilers. + Fix build failure with newer compilers: test compiles to find Curses library + capabilities fail because necessary header files are not included because + C_PANELFUNCTION etc are not defined because the test compiles do not include + CursesFun.h, which they can't because the test compiles are part of creating + CursesFun.h. Solution: put C_PANELFUNCTION, etc in new config.h. + Rename test.syms program to testsyms, because it is a more conventional + name format. + +------------------------------------------------------------------- Old: ---- Curses-1.41.tar.gz New: ---- Curses-1.43.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Curses.spec ++++++ --- /var/tmp/diff_new_pack.VMMr8r/_old 2022-12-12 17:42:00.917899501 +0100 +++ /var/tmp/diff_new_pack.VMMr8r/_new 2022-12-12 17:42:00.921899524 +0100 @@ -18,7 +18,7 @@ %define cpan_name Curses Name: perl-Curses -Version: 1.41 +Version: 1.43 Release: 0 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Terminal screen handling and optimization @@ -44,9 +44,9 @@ %autosetup -n %{cpan_name}-%{version} find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644 # MANUAL BEGIN -sed -i '1s|../../perl|%{__perl}|' test.syms sed -i '1s| /usr//bin/perl|%{__perl}|' demo.form -sed -i '1s| /usr/bin/perl|%{__perl}|' demo* gdc +sed -i '1s| /usr/bin/perl|%{__perl}|' demo* gdc testsyms +chmod +x makeConfig # MANUAL END %build @@ -64,7 +64,7 @@ %perl_gen_filelist %files -f %{name}.files -%doc ChangeLog demo demo2 demo.form demo.menu demo.panel gdc gen.tar HISTORY list.syms MAINTENANCE README testcurses test.syms +%doc ChangeLog demo demo2 demo.form demo.menu demo.panel HISTORY MAINTENANCE README %license Artistic Copying %changelog ++++++ Curses-1.41.tar.gz -> Curses-1.43.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Curses-1.41/ChangeLog new/Curses-1.43/ChangeLog --- old/Curses-1.41/ChangeLog 2022-08-18 18:05:19.000000000 +0200 +++ new/Curses-1.43/ChangeLog 2022-12-08 01:18:11.000000000 +0100 @@ -4,6 +4,23 @@ Note that the filename "ChangeLog" is recognized by the CPAN machinery as the name of a change log. +New in 1.43 (Released December 08, 2022) + + Fix missing file introduced in 1.42 that prevents all builds from working. + +New in 1.42 (Released December 07, 2022) + + Add missing return type declarations so it works with modern C compilers. + + Fix build failure with newer compilers: test compiles to find Curses library + capabilities fail because necessary header files are not included because + C_PANELFUNCTION etc are not defined because the test compiles do not include + CursesFun.h, which they can't because the test compiles are part of creating + CursesFun.h. Solution: put C_PANELFUNCTION, etc in new config.h. + + Rename test.syms program to testsyms, because it is a more conventional + name format. + New in 1.41 (Released August 18, 2022) Fix bug in previous release causing non-GNU make to fail. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Curses-1.41/Curses.c new/Curses-1.43/Curses.c --- old/Curses-1.41/Curses.c 2022-08-05 04:40:25.000000000 +0200 +++ new/Curses-1.43/Curses.c 2022-12-07 05:43:11.000000000 +0100 @@ -14,9 +14,10 @@ and having bool already defined seems to stop Curses header files from doing that. See further discussion of 'bool' below. */ +#include "config.h" +#include "c-config.h" #include "CursesDef.h" #include "CursesTyp.h" -#include "c-config.h" /* c-config.h above includes Ncurses header files that define macro 'instr'. Unfortunately, perl.h (below) also defines 'instr'. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Curses-1.41/Curses.pm new/Curses-1.43/Curses.pm --- old/Curses-1.41/Curses.pm 2022-08-18 18:04:08.000000000 +0200 +++ new/Curses-1.43/Curses.pm 2022-12-08 01:18:23.000000000 +0100 @@ -51,7 +51,7 @@ package Curses; -$VERSION = '1.41'; # Makefile.PL picks this up +$VERSION = '1.43'; # Makefile.PL picks this up use Carp; require Exporter; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Curses-1.41/INSTALL new/Curses-1.43/INSTALL --- old/Curses-1.41/INSTALL 2022-08-18 18:03:53.000000000 +0200 +++ new/Curses-1.43/INSTALL 2022-12-07 04:19:05.000000000 +0100 @@ -126,7 +126,7 @@ 6) make 'make' starts off by creating the file "CursesDef.h", by running the - program 'test.syms'. You will see hundreds of messages telling you which + program 'testsyms'. You will see hundreds of messages telling you which functions it found in your system Curses library and which ones it didn't. It is a very common build failure mode for it not to find any of the functions. If you see that happening, stop and see TROUBLESHOOTING below. @@ -213,22 +213,22 @@ not finding any of the Curses functions. The first thing 'make' does is create the file "CursesDef.h" by running the - program 'test.syms', which investigates what the Curses libraries are like + program 'testsyms', which investigates what the Curses libraries are like on your system. - test.syms is very brittle -- it works via test compiles, and if any number + 'testsyms' is very brittle -- it works via test compiles, and if any number of things goes wrong with the test compile, it makes bad assumptions, usually that you don't have a certain function in your Curses library. If - test.syms tells you it can't find functions that you think you have, run - the make with variable TEST_SYMS_OPTS set to "-v": + 'testsyms' tells you it can't find functions that you think you have, run + the make with variable TESTSYMS_OPTS set to "-v": - $ make TEST_SYMS_OPTS=-v + $ make TESTSYMS_OPTS=-v That will show you the error messages from the test compiles and you can figure out what's going wrong and fix it. Typically, you'll find that you need to do better on your CURSES_* environment variables (see above). - Alternatively, if you see that test.syms is picking the wrong values, you + Alternatively, if you see that 'testsyms' is picking the wrong values, you can edit "CursesDef.h" by hand and follow the directions. If you have to "roll your own", be sure to save a copy. A "make clean" will delete "CursesDef.h". diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Curses-1.41/MAINTENANCE new/Curses-1.43/MAINTENANCE --- old/Curses-1.41/MAINTENANCE 2022-08-18 01:31:06.000000000 +0200 +++ new/Curses-1.43/MAINTENANCE 2022-12-07 19:16:34.000000000 +0100 @@ -27,7 +27,8 @@ Or do: - $ cpan-upload-http -user ... -mailto ... /tmp/Curses-1.33.tgz + $ cpan-upload-http -user ... -mailto ... /tmp/Curses-1.33.tar.gz \ + -verbose (Get cpan-upload-http from CPAN) It goes into CPAN in the directory belonging to the user who uploaded it. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Curses-1.41/MANIFEST new/Curses-1.43/MANIFEST --- old/Curses-1.41/MANIFEST 2022-08-18 18:06:50.000000000 +0200 +++ new/Curses-1.43/MANIFEST 2022-12-08 01:21:05.000000000 +0100 @@ -54,12 +54,13 @@ INSTALL list.syms MAINTENANCE +makeConfig Makefile.PL MANIFEST ppport.h README t/00-load.t -test.syms +testsyms testcurses testint.c testsym.c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Curses-1.41/META.json new/Curses-1.43/META.json --- old/Curses-1.41/META.json 2022-08-18 18:06:50.000000000 +0200 +++ new/Curses-1.43/META.json 2022-12-08 01:21:05.000000000 +0100 @@ -32,6 +32,6 @@ } }, "release_status" : "stable", - "version" : "1.41", + "version" : "1.43", "x_serialization_backend" : "JSON::PP version 4.04" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Curses-1.41/META.yml new/Curses-1.43/META.yml --- old/Curses-1.41/META.yml 2022-08-18 18:06:50.000000000 +0200 +++ new/Curses-1.43/META.yml 2022-12-08 01:21:04.000000000 +0100 @@ -17,5 +17,5 @@ directory: - t - inc -version: '1.41' +version: '1.43' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Curses-1.41/Makefile.PL new/Curses-1.43/Makefile.PL --- old/Curses-1.41/Makefile.PL 2022-08-18 18:00:35.000000000 +0200 +++ new/Curses-1.43/Makefile.PL 2022-12-07 05:32:46.000000000 +0100 @@ -380,7 +380,7 @@ -sub makeConfigH($) { +sub makeCConfigH($) { my ($libType) = @_; #----------------------------------------------------------------------------- # $libType is the kind of Curses library we are using - e.g. 'bsd', @@ -396,7 +396,7 @@ if (!defined($libClass)) { print STDERR ("Internal error: invalid library type '$libType' " . - "in makeConfigH()\n"); + "in makeCConfigH()\n"); exit 1; } } @@ -518,7 +518,7 @@ } if (not -e "c-config.h") { - makeConfigH($libType); + makeCConfigH($libType); } # Major cheese alert. Any -L for the curses library is probably @@ -572,7 +572,8 @@ print("file.\n"); } -my $clean = 'CursesDef.h c-config.h cdemo testsym testint testtyp *.i *.s'; +my $clean = + 'config.h CursesDef.h c-config.h cdemo testsym testint testtyp *.i *.s'; my $realc = $gen ? 'list.syms Curses.pm ' . 'CursesFun.c CursesVar.c CursesCon.c CursesTyp.h CursesBoot.c' @@ -602,13 +603,16 @@ my $objext = $OSNAME eq 'MSWin32' ? 'obj' : 'o'; my $mf = <<EOM; -CursesDef.h: c-config.h Makefile.PL list.syms +config.h: + ./makeConfig $args{COMPONENTS} >\$@ + +CursesDef.h: c-config.h Makefile.PL list.syms config.h CC='\$(CC)' \\ INC='\$(INC)' \\ CCFLAGS='\$(CCFLAGS)' \\ LDLOADLIBS='\$(LDLOADLIBS)' \\ LDDLFLAGS='\$(LDDLFLAGS)' \\ - \$(PERL) test.syms \$(TEST_SYMS_OPTS) $args{COMPONENTS} + \$(PERL) testsyms \$(TESTSYMS_OPTS) c-config.h: @ $echo "You need to make a c-config.h. See the INSTALL document."; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Curses-1.41/cdemo.c new/Curses-1.43/cdemo.c --- old/Curses-1.41/cdemo.c 2022-08-13 02:44:13.000000000 +0200 +++ new/Curses-1.43/cdemo.c 2022-12-07 05:42:38.000000000 +0100 @@ -6,13 +6,14 @@ ** or the GNU General Public License, as specified in the README file. */ -#include "CursesDef.h" +#include "config.h" #include "c-config.h" #ifdef WIN32 #include <Windows.h> #else #include <unistd.h> #endif +#include "CursesDef.h" static void sleepSeconds(unsigned int seconds) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Curses-1.41/makeConfig new/Curses-1.43/makeConfig --- old/Curses-1.41/makeConfig 1970-01-01 01:00:00.000000000 +0100 +++ new/Curses-1.43/makeConfig 2022-12-07 05:33:15.000000000 +0100 @@ -0,0 +1,70 @@ +#! /usr/bin/perl +############################################################################### +# makeconfig +############################################################################### +# Generate config.h. +# +# Our arguments tell what to put in it. +############################################################################### + +use strict; +use warnings; +use English; + +my $TRUE=1; my $FALSE = 0; + +############################################################################### +# MAINLINE +############################################################################### + +my $panels; +my $menus; +my $forms; + +while (@ARGV) { + my $arg = shift; + + $arg eq 'PANELS' and ++$panels and next; + $arg eq 'MENUS' and ++$menus and next; + $arg eq 'FORMS' and ++$forms and next; + Usage("Unknown argument: '$arg'"); +} + +print <<'EOHDR'; +/*============================================================================ + config.h +============================================================================== + + This file defines C macros that tell how the user has configured the build. + + ==> This file was automatically generated by a make rule; changes will be + ==> lost when 'make clean' runs. + + If you need to edit this file because 'testsyms' didn't do a good job, be + sure to save a copy of your changes. + + The "define"s below are simply educated guesses. If you are having problems + compiling, check the appropriate symbol to see if it was set correctly: For + each line, if the answer to the question is "no", that line should start + with "#undef"; if the answer is yes, it should start with "#define". +=============================================================================*/ + +EOHDR + + + +print($panels ? "#define " : "#undef ", + "C_PANELFUNCTION ", + "/* Include panel library function? */", + "\n\n"); + +print($menus ? "#define " : "#undef ", + "C_MENUFUNCTION ", + "/* Include menu library function? */", + "\n\n"); + +print($forms ? "#define " : "#undef ", + "C_FORMFUNCTION ", + "/* Include form library function? */", + "\n\n"); + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Curses-1.41/test.syms new/Curses-1.43/test.syms --- old/Curses-1.41/test.syms 2022-08-17 01:17:42.000000000 +0200 +++ new/Curses-1.43/test.syms 1970-01-01 01:00:00.000000000 +0100 @@ -1,295 +0,0 @@ -#!../../perl -## -## test.syms -- test for function/variable symbols -## -## Set the environment variable CURSES_VERBOSE to see the details of the -## testing. - -## Copyright (c) 1994-2000 William Setzer -## -## You may distribute under the terms of either the Artistic License -## or the GNU General Public License, as specified in the README file. -## -## This program is modelled after parts of the dist-3.0 distribution. -## In many cases I just hand-converted the sh script to perl, so this -## program probably falls under the Artistic license. At the very least, -## it has the "look and feel". Will I be sued? :-) -## -## Thanks to Raphael Manfredi and the other contributors of dist-3.0. -## -## VMS patches thanks to Peter Prymmer <p...@forte.com> - -use strict; -use warnings; -use English; - -my $verbose; - -sub makeCompileCommand($) { - my ($compileR) = @_; - - # Get a compile command so we can test for curses symbols. - # (There has got to be an easier way. Blech.) - # - - my $compile = '#CC# #DEFS# #INCS# #CFLAGS# #FILE# #LFLAGS# #LIBS#' . - ($verbose ? '' : '#NULL#'); - - my $cc = $ENV{'CC'}; - my $inc = $ENV{'INC'}; - my $ccflags = $ENV{'CCFLAGS'}; - my $ldloadlibs = $ENV{'LDLOADLIBS'}; - my $lddlflags = $ENV{'LDDLFLAGS'}; - - if (defined($cc)) { - $compile =~ s{#CC#}{$cc}; - } - if (defined($inc)) { - $compile =~ s{#INCS#}{$inc}; - } - if (defined($ccflags)) { - $compile =~ s{#CFLAGS#}{$ccflags}; - } - if (defined($ldloadlibs)) { - $compile =~ s{#LIBS#}{$ldloadlibs}; - } else { - $compile =~ s{#LIBS#}{}; - } - if (defined($lddlflags)) { - ## Only get -L's. Other options can cause strange link behavior. - ## (I shoulda stayed in bed.) - # - my $lflags; - $lflags = ''; # initial value - while ($lddlflags =~ m{(-L\S+)}g) { - $lflags .= " $1"; - } - $compile =~ s{#LFLAGS#}{$lflags}; - } - - # Left to handle: DEFS/FILE/NULL - # DEFS => "cc" define of "SYM" to "_C_SYM_" - # FILE => "cc" compile of file _C_FILE_.c into executable _C_FILE_ - # NULL => output of system call to dev null - # - # _C_SYM_ and _C_FILE_ will be filled in later - - if ($OSNAME =~ m{VMS}i) { - $compile =~ s{#DEFS#}{DEFINE=SYM="_C_SYM_"}; - $compile =~ s{#FILE#}{_C_FILE_.c}; - $compile =~ s{#NULL#}{}; # no non-verbose way - } - elsif ($OSNAME eq 'MSWin32') { - $compile =~ s{#DEFS#}{-DSYM="_C_SYM_"}; - $compile =~ s{#FILE#}{_C_FILE_.c}; - $compile =~ s{#NULL#}{>nul 2>&1}; - } - else { - $compile =~ s{#DEFS#}{-DSYM="_C_SYM_"}; - $compile =~ s{#FILE#}{-o _C_FILE_ _C_FILE_.c}; - $compile =~ s{#NULL#}{>/dev/null 2>&1}; - } - - if ($compile =~ m{#.+#}) { - die "OOPS: internal error constructing a compile command. " . - "We failed to substitute for a #xxx# substitution variable " . - "and thus ended up with this: '$compile'\n"; - } - $$compileR = $compile; -} - - - -############################################################################### -# MAINLINE # -############################################################################### - -print("Checking capabilities of the Ncurses libraries.\n"); -print("Set CURSES_VERBOSE environment variable to see the details of the " . - "tests.\n"); -print("\n"); - -my $panels; -my $menus; -my $forms; - -if ($ENV{CURSES_VERBOSE}) { - $verbose = 1; -} else { - $verbose = 0; -} - -open IN, "list.syms" or die "Can't open list.syms: $!\n"; -open(OUTH, ">CursesDef.h") or die "Can't open CursesDef.h: $!\n"; -open LOG, ">&STDERR" or die "Can't redirect to STDERR: $!\n"; - -while (@ARGV) { - my $arg = shift; - - $arg eq 'PANELS' and ++$panels and next; - $arg eq 'MENUS' and ++$menus and next; - $arg eq 'FORMS' and ++$forms and next; - $arg =~ /^-h/ and Usage(); - $arg =~ /^-v/ and ++$verbose and next; - $arg =~ /^-l/ and do { - my $logfile = shift or Usage("<-l> needs a filename"); - open LOG, ">$logfile" or die "Can't open file '$logfile': $!\n"; - open STDERR, ">&LOG" or die "Can't redirect STDERR: $!\n"; - - next; - }; - $arg =~ /^-/ and Usage("Unknown option: $arg"); - Usage("Unknown argument: $arg"); -} -if (@ARGV) { Usage() } - -select LOG; -$| = 1; - -# Prep compile stage - -makeCompileCommand(\my $compile); - -print STDOUT "Doing test compiles with the compile command '$compile'\n"; - - -### -## Now generate the .h file -# - -print OUTH <<'EOHDR'; -/* This file is automatically generated; changes will be lost. -** -** If you need to edit this file because "test.syms" didn't do a good -** job, be sure to save a copy of your changes. -** -** The "define"s below are simply educated guesses. If you are -** having problems compiling, check the appropriate symbol to see if -** it was set correctly: For each line, if the answer to the question -** is "no", that line should start with "#undef"; if the answer is -** yes, it should start with "#define". -*/ - -EOHDR - -print OUTH - $panels ? "#define " : "#undef ", - "C_PANELFUNCTION /* Add in panel library function? */", - "\n\n"; - -print OUTH - $menus ? "#define " : "#undef ", - "C_MENUFUNCTION /* Add in menu library function? */", - "\n\n"; - -print OUTH - $forms ? "#define " : "#undef ", - "C_FORMFUNCTION /* Add in form library function? */", - "\n\n"; - -# Some functions return either int or void, depending on what compiler -# and libcurses.a you are using. For the int/void test, if the -# compiler doesn't complain about assigning the sym to an int -# variable, we assume the function returns int. Otherwise, we assume -# it returns void. - -my %tstfile = qw( E testsym - I testint - V testsym - T testtyp); -while (<IN>) { - next if /^\S*#/; - next unless /\S/; - - my ($action, $sym, $args) = /^([A-Z])\s+(\w+)\s*(\(.*\))?/; - my $file = $tstfile{$action}; - - unless (defined $sym and defined $file) { - warn "WARNING: internal error on symbol $_\n"; - } - - my $cmd; - $cmd = $compile; # initial value - my $symargs = $sym . (defined($args) ? $args : ''); - $cmd =~ s{_C_SYM_}{$symargs}ge; - $cmd =~ s{_C_FILE_}{$file}g; - - print LOG $cmd, "\n" if $verbose; - my $ret = qx{$cmd}; - my $rc = $?; - print LOG $ret if $verbose; - print LOG "(rc = $rc)\n" if $verbose; - - my $ssym = $sym; - $ssym =~ s/^w//; - - my $c_sym; - my $comment; - - if ($action eq 'E') { - print LOG "function '$sym' ", ($rc ? "NOT " : ""), "found\n"; - - $c_sym = uc "C_$ssym"; - $comment = "Does function '$ssym' exist?"; - } - elsif ($action eq 'I') { - print LOG "function '$sym' returns ", ($rc ? "void" : "int"), "\n"; - - $c_sym = uc "C_INT$ssym"; - $comment = "Does function '$ssym' return 'int'?"; - } - elsif ($action eq 'V') { - print LOG "variable '$sym' ", ($rc ? "NOT " : ""), "found\n"; - - $c_sym = uc "C_$ssym"; - $comment = "Does variable '$ssym' exist?"; - } - elsif ($action eq 'T') { - print LOG "typedef '$sym' ", ($rc ? "NOT " : ""), "found\n"; - - $c_sym = uc "C_TYP$ssym"; - $comment = "Does typedef '$ssym' exist?"; - } - else { - warn "WARNING: internal error on symbol $_\n"; - } - - print OUTH - $rc ? "#undef " : "#define ", - $c_sym, " " x (24 - length $c_sym), - "/* ", - $comment, " " x (42 - length $comment), - "*/\n"; -} - -unlink "testsym"; -unlink "testint"; -unlink "testtyp"; - -1 while unlink "testsym.obj"; # Possibly pointless VMSism -1 while unlink "testint.obj"; # Possibly pointless VMSism -1 while unlink "testtyp.obj"; # Possibly pointless VMSism - -close IN; -close OUTH; -close LOG; -exit 0; - -### -## Helper functions -# - -sub Usage { - print LOG @_, "\n"; - print LOG <<EOM; -Usage: find_syms [options] -where options include: - - -h This message. - -v Verbose. Tell you more than you want to know about - how the Curses symbols are being determined. - -l <file> Create file <file> and dump output into it. -EOM -} - -__END__ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Curses-1.41/testint.c new/Curses-1.43/testint.c --- old/Curses-1.41/testint.c 2021-07-21 02:55:33.000000000 +0200 +++ new/Curses-1.43/testint.c 2022-12-07 05:37:27.000000000 +0100 @@ -1,13 +1,15 @@ -/* This is a program that 'test.syms' test-compiles to determine if a function +/* This is a program that 'testsyms' test-compiles to determine if a function has an integer return value. - 'test.syms' defines macro SYM on the compile command. + 'testsyms' defines macro SYM on the compile command. */ #define _XOPEN_SOURCE_EXTENDED 1 /* We expect wide character functions */ +#include "config.h" #include "c-config.h" +int main() { int ret; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Curses-1.41/testsym.c new/Curses-1.43/testsym.c --- old/Curses-1.41/testsym.c 2022-08-17 22:36:17.000000000 +0200 +++ new/Curses-1.43/testsym.c 2022-12-07 05:37:21.000000000 +0100 @@ -1,11 +1,12 @@ -/* This is a program that 'test.syms' test-compiles to determine if a symbol +/* This is a program that 'testsyms' test-compiles to determine if a symbol exists in the Curses library. - 'test.syms' defines macro SYM on the compile command. + 'testsyms' defines macro SYM on the compile command. */ #define _XOPEN_SOURCE_EXTENDED 1 /* We expect wide character functions */ +#include "config.h" #include "c-config.h" int diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Curses-1.41/testsyms new/Curses-1.43/testsyms --- old/Curses-1.41/testsyms 1970-01-01 01:00:00.000000000 +0100 +++ new/Curses-1.43/testsyms 2022-12-07 05:41:07.000000000 +0100 @@ -0,0 +1,331 @@ +#! /usr/bin/perl +## +## testsyms -- test for function/variable symbols +## +## Set the environment variable CURSES_VERBOSE to see the details of the +## testing. + +## Copyright (c) 1994-2000 William Setzer +## +## You may distribute under the terms of either the Artistic License +## or the GNU General Public License, as specified in the README file. +## +## This program is modelled after parts of the dist-3.0 distribution. +## In many cases I just hand-converted the sh script to perl, so this +## program probably falls under the Artistic license. At the very least, +## it has the "look and feel". Will I be sued? :-) +## +## Thanks to Raphael Manfredi and the other contributors of dist-3.0. +## +## VMS patches thanks to Peter Prymmer <p...@forte.com> + +use strict; +use warnings; +use English; + +my $verbose; + +sub makeCompileCommand($) { + my ($compileR) = @_; + + # Get a compile command so we can test for curses symbols. + # (There has got to be an easier way. Blech.) + # + + my $compile = '#CC# #DEFS# #INCS# #CFLAGS# #FILE# #LFLAGS# #LIBS#' . + ($verbose ? '' : '#NULL#'); + + my $cc = $ENV{'CC'}; + my $inc = $ENV{'INC'}; + my $ccflags = $ENV{'CCFLAGS'}; + my $ldloadlibs = $ENV{'LDLOADLIBS'}; + my $lddlflags = $ENV{'LDDLFLAGS'}; + + if (defined($cc)) { + $compile =~ s{#CC#}{$cc}; + } + if (defined($inc)) { + $compile =~ s{#INCS#}{$inc}; + } + if (defined($ccflags)) { + $compile =~ s{#CFLAGS#}{$ccflags}; + } + if (defined($ldloadlibs)) { + $compile =~ s{#LIBS#}{$ldloadlibs}; + } else { + $compile =~ s{#LIBS#}{}; + } + if (defined($lddlflags)) { + ## Only get -L's. Other options can cause strange link behavior. + ## (I shoulda stayed in bed.) + # + my $lflags; + $lflags = ''; # initial value + while ($lddlflags =~ m{(-L\S+)}g) { + $lflags .= " $1"; + } + $compile =~ s{#LFLAGS#}{$lflags}; + } + + # Left to handle: DEFS/FILE/NULL + # DEFS => "cc" define of "SYM" to "_C_SYM_" + # FILE => "cc" compile of file _C_FILE_.c into executable _C_FILE_ + # NULL => output of system call to dev null + # + # _C_SYM_ and _C_FILE_ will be filled in later + + if ($OSNAME =~ m{VMS}i) { + $compile =~ s{#DEFS#}{DEFINE=SYM="_C_SYM_"}; + $compile =~ s{#FILE#}{_C_FILE_.c}; + $compile =~ s{#NULL#}{}; # no non-verbose way + } + elsif ($OSNAME eq 'MSWin32') { + $compile =~ s{#DEFS#}{-DSYM="_C_SYM_"}; + $compile =~ s{#FILE#}{_C_FILE_.c}; + $compile =~ s{#NULL#}{>nul 2>&1}; + } + else { + $compile =~ s{#DEFS#}{-DSYM="_C_SYM_"}; + $compile =~ s{#FILE#}{-o _C_FILE_ _C_FILE_.c}; + $compile =~ s{#NULL#}{>/dev/null 2>&1}; + } + + if ($compile =~ m{#.+#}) { + die "OOPS: internal error constructing a compile command. " . + "We failed to substitute for a #xxx# substitution variable " . + "and thus ended up with this: '$compile'\n"; + } + $$compileR = $compile; +} + + + +sub completeCompileCmd($$$$) { + my ($template, $sym, $args, $file) = @_; +#----------------------------------------------------------------------------- +# The complete ready-to-execute compile command. +# +# $compile is a template for the compile command, with some variables in it +# that need to be replaced based on the values of $sym, $args, and $file. +# ----------------------------------------------------------------------------- + my $retval; + + $retval = $template; # initial value + + my $symargs = $sym . (defined($args) ? $args : ''); + + $retval =~ s{_C_SYM_}{$symargs}ge; + $retval =~ s{_C_FILE_}{$file}g; + + return $retval; +} + + + +sub writeHeader($) { + my ($cursesDefFh) = @_; + + print $cursesDefFh <<'EOHDR'; +/*============================================================================ + CursesDef.h +============================================================================== + + This file defines C macros that tell which Curses functions are available + (in the C Curses library) on the target platform and some information about + what variant is implemented. + + ==> This file was automatically generated by the program 'testsyms'; changes + ==> will be lost the next time 'testsyms' runs. + + If you need to edit this file because 'testsyms' didn't do a good job, be + sure to save a copy of your changes. + + This method of determining what is implemented on this system (trying to + compile something and noting whether the compile succeeds or fails) is quite + sloppy and prone to error. If you are having problems compiling, check the + appropriate symbol to see if it was set correctly: For each line, if the + answer to the question is "no", that line should start with "#undef"; if the + answer is yes, it should start with "#define". +============================================================================*/ +EOHDR +} + + +my %tstfile = qw( E testsym + I testint + V testsym + T testtyp); + + + +sub testCompile($$$$$$) { + my ($action, $sym, $args, $compile, $logFh, $compFailedR) = @_; + + my $file = $tstfile{$action}; + + unless (defined $sym and defined $file) { + warn "WARNING: internal error on symbol $_\n"; + } + + my $cmd = completeCompileCmd($compile, $sym, $args, $file); + + print $logFh $cmd, "\n" if $verbose; + + my $cmdStdout = qx{$cmd}; my $termStat = $?; + + if ($verbose) { + print $logFh ("Stdout: '$cmdStdout' "); + print $logFh ("(term status = $termStat)"); + print $logFh ("\n"); + } + + $$compFailedR = ($termStat != 0); +} + + + +############################################################################### +# MAINLINE # +############################################################################### + +print("Checking capabilities of the Ncurses libraries.\n"); +print("Set CURSES_VERBOSE environment variable to see the details of the " . + "tests.\n"); +print("\n"); + +if ($ENV{CURSES_VERBOSE}) { + $verbose = 1; +} else { + $verbose = 0; +} + +open(my $listSymsFh, '<', 'list.syms') + or die "Can't open list.syms: $!"; +open(my $cursesDefFh, '>', 'CursesDef.h') + or die "Can't open CursesDef.h for output: $!"; +open(my $logFh, ">&STDERR") + or die "Can't redirect to STDERR: $!\n"; + +my $logFileNm; + +while (@ARGV) { + my $arg = shift; + + $arg =~ /^-h/ and Usage(); + $arg =~ /^-v/ and ++$verbose and next; + $arg =~ /^-l/ and do { + $logFileNm = shift or Usage("<-l> needs a filename"); + next; + }; + $arg =~ /^-/ and Usage("Unknown option: $arg"); + Usage("Unknown argument: $arg"); +} +if (@ARGV) { Usage() } + +if (defined($logFileNm)) { + open($logFh, '>', $logFileNm) + or die "Can't open file '$logFileNm': $!"; + open STDERR, ">&$logFh" + or die "Can't redirect STDERR: $!"; +} else { + open($logFh, ">&STDERR"); +} + + +select $logFh; +$| = 1; + + +makeCompileCommand(\my $compile); + +print $logFh ("Doing test compiles with the compile command '$compile'\n"); + +writeHeader($cursesDefFh); + +while (<$listSymsFh>) { + next if /^\S*#/; + next unless /\S/; + + my ($action, $sym, $args) = /^([A-Z])\s+(\w+)\s*(\(.*\))?/; + + testCompile($action, $sym, $args, $compile, $logFh, \my $compFailed); + + my $ssym = $sym; + $ssym =~ s/^w//; + + my $c_sym; + my $comment; + + if ($action eq 'E') { + print $logFh ("function '$sym' ", + ($compFailed ? "NOT " : ""), "found\n"); + + $c_sym = uc "C_$ssym"; + $comment = "Does function '$ssym' exist?"; + } elsif ($action eq 'I') { + # Some functions return either int or void, depending on what compiler + # and libcurses.a you are using. For the int/void test, if the + # compiler doesn't complain about assigning the sym to an int + # variable, we assume the function returns int. Otherwise, we assume + # it returns void. + + print $logFh ("function '$sym' returns ", + ($compFailed ? "void" : "int"), "\n"); + + $c_sym = uc "C_INT$ssym"; + $comment = "Does function '$ssym' return 'int'?"; + } elsif ($action eq 'V') { + print $logFh ("variable '$sym' ", + ($compFailed ? "NOT " : ""), "found\n"); + + $c_sym = uc "C_$ssym"; + $comment = "Does variable '$ssym' exist?"; + } elsif ($action eq 'T') { + print $logFh ("typedef '$sym' ", + ($compFailed ? "NOT " : ""), "found\n"); + + $c_sym = uc "C_TYP$ssym"; + $comment = "Does typedef '$ssym' exist?"; + } else { + warn "WARNING: internal error on symbol $_\n"; + } + + print $cursesDefFh + $compFailed ? "#undef " : "#define ", + $c_sym, " " x (24 - length $c_sym), + "/* ", + $comment, " " x (42 - length $comment), + "*/\n"; +} + +unlink "testsym"; +unlink "testint"; +unlink "testtyp"; + +1 while unlink "testsym.obj"; # Possibly pointless VMSism +1 while unlink "testint.obj"; # Possibly pointless VMSism +1 while unlink "testtyp.obj"; # Possibly pointless VMSism + +close($listSymsFh); +close($cursesDefFh); +close($logFh); +exit 0; + +### +## Helper functions +# + +sub Usage { + print LOG @_, "\n"; + print LOG <<EOM; +Usage: testsyms [options] +where options are + + -h This message. + -v Verbose. Tell you more than you want to know about + how the Curses symbols are being determined. + -l <file> Create file <file> and dump output into it. +EOM +} + +__END__ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Curses-1.41/testtyp.c new/Curses-1.43/testtyp.c --- old/Curses-1.41/testtyp.c 2021-07-21 02:55:33.000000000 +0200 +++ new/Curses-1.43/testtyp.c 2022-12-07 05:37:13.000000000 +0100 @@ -1,13 +1,15 @@ -/* This is a program that 'test.syms' test-compiles to determine if a type +/* This is a program that 'testsyms' test-compiles to determine if a type is defined in curses.h. - 'test.syms' defines macro SYM on the compile command. + 'testsyms' defines macro SYM on the compile command. */ #define _XOPEN_SOURCE_EXTENDED 1 /* We expect wide character functions */ +#include "config.h" #include "c-config.h" +int main() { typedef SYM c_sym_t; } ++++++ cpanspec.yml ++++++ --- /var/tmp/diff_new_pack.VMMr8r/_old 2022-12-12 17:42:01.053900266 +0100 +++ /var/tmp/diff_new_pack.VMMr8r/_new 2022-12-12 17:42:01.053900266 +0100 @@ -13,9 +13,9 @@ preamble: |- BuildRequires: ncurses5-devel post_prep: |- - sed -i '1s|../../perl|%{__perl}|' test.syms sed -i '1s| /usr//bin/perl|%{__perl}|' demo.form - sed -i '1s| /usr/bin/perl|%{__perl}|' demo* gdc + sed -i '1s| /usr/bin/perl|%{__perl}|' demo* gdc testsyms + chmod +x makeConfig #post_build: |- # rm unused.files #post_install: |- @@ -30,4 +30,5 @@ #custom_test: |- #startserver && make test #ignore_requires: Bizarre::Module +skip_doc: gdc gen.tar list.syms makeConfig testcurses testsyms