Compare commits

...

No commits in common. 'c9' and 'cs10' have entirely different histories.
c9 ... cs10

2
.gitignore vendored

@ -1,2 +1,2 @@
SOURCES/Tk-804.035.tar.gz
SOURCES/Tk-804.036.tar.gz
SOURCES/perl-Tk-debian.patch.gz

@ -1,2 +1,2 @@
31b5fac38361049dda20e2fbd6d4ae044291f412 SOURCES/Tk-804.035.tar.gz
fbb27fdaf21c38e680f37297e26fc6aa2ca0d754 SOURCES/Tk-804.036.tar.gz
219fc1765a7868e00ed86b6778e46c67f95ae0c1 SOURCES/perl-Tk-debian.patch.gz

@ -0,0 +1,46 @@
From c4cd966ed0997e2acb1fdcaf112c55a78ed50847 Mon Sep 17 00:00:00 2001
From: Christopher Chavez <chrischavez@gmx.us>
Date: Mon, 19 Feb 2024 14:18:43 -0600
Subject: [PATCH] Avoid using incompatible pointer type for `old_warn`
See https://github.com/eserte/perl-tk/issues/98#issuecomment-1944054296
---
Event/Event.xs | 2 +-
tkGlue.c | 7 +------
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/Event/Event.xs b/Event/Event.xs
index 82bbb244..f2c95234 100644
--- a/Event/Event.xs
+++ b/Event/Event.xs
@@ -1532,7 +1532,7 @@ PROTOTYPES: DISABLE
BOOT:
{
#ifdef pWARN_NONE
- SV *old_warn = PL_curcop->cop_warnings;
+ void *old_warn = PL_curcop->cop_warnings;
PL_curcop->cop_warnings = pWARN_NONE;
#endif
newXS("Tk::Event::INIT", XS_Tk__Event_INIT, file);
diff --git a/tkGlue.c b/tkGlue.c
index 68a7e0fa..ca4a13aa 100644
--- a/tkGlue.c
+++ b/tkGlue.c
@@ -5543,13 +5543,8 @@ _((pTHX))
char *XEventMethods = "abcdfhkmopstvwxyABDEKNRSTWXY#";
char buf[128];
CV *cv;
-#if PERL_REVISION > 5 || (PERL_REVISION == 5 && PERL_VERSION >= 9)
-#define COP_WARNINGS_TYPE STRLEN*
-#else
-#define COP_WARNINGS_TYPE SV*
-#endif
#ifdef pWARN_NONE
- COP_WARNINGS_TYPE old_warn = PL_curcop->cop_warnings;
+ void *old_warn = PL_curcop->cop_warnings;
PL_curcop->cop_warnings = pWARN_NONE;
#endif
--
2.43.0

@ -0,0 +1,45 @@
From a26233c844c52f49ef9cca5f88dd9063aac60d0f Mon Sep 17 00:00:00 2001
From: Niko Tyni <ntyni@debian.org>
Date: Thu, 11 Jan 2024 18:28:58 +0000
Subject: [PATCH] Fix STRLEN vs int pointer confusion in
Tcl_GetByteArrayFromObj()
Perl 5.37.2, more precisely commit
https://github.com/Perl/perl5/commit/1ef9039bccbfe64f47f201b6cfb7d6d23e0b08a7
changed the implementation of SvPV() et al., breaking t/balloon.t,
t/canvas2.t and t/photo.t on big-endian 64-bit architectures such as
ppc64 and s390x because StringMatchGIF() no longer recognized GIF files.
This is because Tcl_GetByteArrayFromObj() was calling SvPV() with an int
pointer instead of a correct STRLEN pointer, and the new implementation
is more sensitive to this: it assigns the pointers as-is, resulting in
the int pointer pointing at the wrong end of the 64-bit length.
Other functions taking a length pointer, at least Tcl_GetStringFromObj()
already seem to do things correctly, so presumably this is not a
systematic issue.
---
objGlue.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/objGlue.c b/objGlue.c
index d4927ea..dbd6a50 100644
--- a/objGlue.c
+++ b/objGlue.c
@@ -627,7 +627,10 @@ Tcl_GetByteArrayFromObj(Tcl_Obj * objPtr, int * lengthPtr)
sv_utf8_downgrade(objPtr, 0);
if (lengthPtr)
{
- return (unsigned char *) SvPV(objPtr, *lengthPtr);
+ STRLEN len;
+ unsigned char *s = SvPV(objPtr, len);
+ *lengthPtr = len;
+ return s;
}
else
{
--
2.30.2

@ -0,0 +1,12 @@
diff -up Tk-804.036/pTk/Xlib.t.orig Tk-804.036/pTk/Xlib.t
--- Tk-804.036/pTk/Xlib.t.orig 2024-02-15 10:07:51.542657507 +0100
+++ Tk-804.036/pTk/Xlib.t 2024-02-15 10:08:51.500167194 +0100
@@ -331,7 +331,7 @@ VFUNC(int,XIntersectRegion,V_XIntersectR
#endif /* !DO_X_EXCLUDE */
#ifndef XKeycodeToKeysym
-VFUNC(KeySym,XKeycodeToKeysym,V_XKeycodeToKeysym,_ANSI_ARGS_((Display *, unsigned int, int)))
+VFUNC(KeySym,XKeycodeToKeysym,V_XKeycodeToKeysym,_ANSI_ARGS_((Display *, KeyCode, int)))
#endif /* #ifndef XKeycodeToKeysym */
#ifndef XKeysymToString

@ -0,0 +1,12 @@
diff -up Tk-804.036/pTk/mTk/generic/tkCanvText.c.orig Tk-804.036/pTk/mTk/generic/tkCanvText.c
--- Tk-804.036/pTk/mTk/generic/tkCanvText.c.orig 2024-02-16 13:50:00.966946199 +0100
+++ Tk-804.036/pTk/mTk/generic/tkCanvText.c 2024-02-16 13:50:26.060152547 +0100
@@ -1234,7 +1234,7 @@ GetTextIndex(interp, canvas, itemPtr, ob
* index. */
{
TextItem *textPtr = (TextItem *) itemPtr;
- size_t length;
+ int length;
int c;
TkCanvas *canvasPtr = (TkCanvas *) canvas;
Tk_CanvasTextInfo *textInfoPtr = textPtr->textInfoPtr;

@ -0,0 +1,81 @@
Avoid implicit ints and implicit function declarations. These
language features have been removed from C in 1999. Future compilers
are likely to stop accepting these constructs by default.
Submitted upstream: <https://github.com/eserte/perl-tk/pull/91>
diff -ur Tk-804.036.orig/config/signedchar.c Tk-804.036/config/signedchar.c
--- Tk-804.036.orig/config/signedchar.c 2023-02-24 10:48:08.060779006 +0100
+++ Tk-804.036/config/signedchar.c 2023-02-24 10:48:58.315268904 +0100
@@ -1,4 +1,4 @@
-main()
+int main(void)
{
signed char x = 'a';
return (x - 'a');
diff -ur Tk-804.036.orig/config/unsigned.c Tk-804.036/config/unsigned.c
--- Tk-804.036.orig/config/unsigned.c 2023-02-24 10:48:08.054779067 +0100
+++ Tk-804.036/config/unsigned.c 2023-02-24 10:49:27.580971854 +0100
@@ -1,15 +1,16 @@
+#include <stdio.h>
int main()
{
char x[] = "\377";
if (x[0] > 0)
{
printf("char is unsigned type\n");
- exit(0);
+ return 0;
}
else
{
printf("char is signed type\n");
- exit(1);
+ return 1;
}
}
diff -ur Tk-804.036.orig/pTk/config/Hstrdup.c Tk-804.036/pTk/config/Hstrdup.c
--- Tk-804.036.orig/pTk/config/Hstrdup.c 2023-02-24 10:48:08.010779514 +0100
+++ Tk-804.036/pTk/config/Hstrdup.c 2023-02-24 10:53:04.326771841 +0100
@@ -6,7 +6,7 @@
{char *e;
char *p = strdup(STRING);
if (!p || strcmp(p,STRING))
- exit(1);
+ return 1;
return 0;
}
diff -ur Tk-804.036.orig/pTk/config/Hstrtoul.c Tk-804.036/pTk/config/Hstrtoul.c
--- Tk-804.036.orig/pTk/config/Hstrtoul.c 2023-02-24 10:48:08.013779483 +0100
+++ Tk-804.036/pTk/config/Hstrtoul.c 2023-02-24 10:50:13.205508745 +0100
@@ -1,4 +1,5 @@
#include <stdlib.h>
+#include <string.h>
int main()
{char *e;
diff -ur Tk-804.036.orig/pTk/mTk/generic/tkEvent.c Tk-804.036/pTk/mTk/generic/tkEvent.c
--- Tk-804.036.orig/pTk/mTk/generic/tkEvent.c 2023-02-24 10:48:07.324786476 +0100
+++ Tk-804.036/pTk/mTk/generic/tkEvent.c 2023-02-24 10:54:20.859995000 +0100
@@ -1153,6 +1153,7 @@
Time
TkCurrentTime(dispPtr, fallbackCurrent)
TkDisplay *dispPtr; /* Display for which the time is desired. */
+ int fallbackCurrent;
{
register XEvent *eventPtr;
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
diff -ur Tk-804.036.orig/pTk/mTk/generic/tkImage.c Tk-804.036/pTk/mTk/generic/tkImage.c
--- Tk-804.036.orig/pTk/mTk/generic/tkImage.c 2023-02-24 10:48:07.321786507 +0100
+++ Tk-804.036/pTk/mTk/generic/tkImage.c 2023-02-24 10:55:56.174027554 +0100
@@ -1083,6 +1083,8 @@
int y;
int width;
int height;
+int imgWidth;
+int imgHeight;
{
Tk_Tile tile = (Tk_Tile) clientData;
Tk_TileChange *handler;

@ -0,0 +1,24 @@
From 5c646b1cc55e18648918f101961afd1589a58168 Mon Sep 17 00:00:00 2001
From: Christopher Chavez <chrischavez@gmx.us>
Date: Mon, 19 Feb 2024 13:50:44 -0600
Subject: [PATCH] pregcomp2.c: Avoid using incompatible pointer type
See https://github.com/eserte/perl-tk/issues/98#issuecomment-1948125587
---
config/pregcomp2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/pregcomp2.c b/config/pregcomp2.c
index 98506999..bb0b4539 100644
--- a/config/pregcomp2.c
+++ b/config/pregcomp2.c
@@ -4,5 +4,5 @@
int main() {
SV* sv = newSViv(0);
- regexp* rx = pregcomp(sv, 0);
+ void* rx = pregcomp(sv, 0);
}
--
2.43.0

@ -1,14 +1,14 @@
%{!?perl_vendorarch: %define perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)}
%define perlver %(eval "`%{__perl} -V:version`"; echo $version)
%global use_x11_tests 1
%if 0%{?fedora} || 0%{?rhel} > 9
%global use_xwayland_run 1
%endif
Name: perl-Tk
Version: 804.035
Release: 7%{?dist}
Version: 804.036
Release: 17%{?dist}
Summary: Perl Graphical User Interface ToolKit
License: (GPL+ or Artistic) and SWL
License: (GPL-1.0-or-later OR Artistic-1.0-Perl) AND SWL
URL: https://metacpan.org/release/Tk
Source0: https://cpan.metacpan.org/authors/id/S/SR/SREZIC/Tk-%{version}.tar.gz
Patch0: perl-Tk-widget.patch
@ -16,7 +16,22 @@ Patch0: perl-Tk-widget.patch
Patch1: perl-Tk-debian.patch.gz
# fix segfaults as in #235666 because of broken cashing code
Patch2: perl-Tk-seg.patch
Patch3: perl-Tk-c99.patch
# Fix STRLEN vs int pointer confusion in Tcl_GetByteArrayFromObj()
# It breaks tests with Perl 5.38 on s390* (BZ#2222638)
Patch4: perl-Tk-Fix-STRLEN-vs-int-pointer-confusion-in-Tcl_GetByteAr.patch
# Fix build with clang 16
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271521
Patch5: perl-Tk-Fix-build-with-clang-16.patch
# Avoid using incompatible pointer type in pregcomp2.c
Patch6: perl-Tk-pregcomp2.c-Avoid-using-incompatible-pointer-type.patch
# Avoid using incompatible pointer type for `old_warn`
# https://github.com/eserte/perl-tk/issues/98
Patch7: perl-Tk-Avoid-using-incompatible-pointer-type-for-old_warn.patch
# Avoid using incompatible pointer type in function 'GetTextIndex'
# https://github.com/eserte/perl-tk/issues/103
Patch8: perl-Tk-Fix-incompatible-pointer-type-in-function-GetTextIndex.patch
# Versions before this have Unicode issues
BuildRequires: make
@ -62,8 +77,14 @@ BuildRequires: perl(XSLoader)
# Tests:
# X11 tests:
%if 0%{?use_xwayland_run}
BuildRequires: xwayland-run
BuildRequires: mutter
BuildRequires: mesa-dri-drivers
%else
BuildRequires: xorg-x11-server-Xvfb
BuildRequires: xorg-x11-xinit
%endif
BuildRequires: google-noto-sans-fonts
BuildRequires: font(:lang=en)
# Specific font is needed for tests, bug #1141117, CPAN RT#98831
BuildRequires: liberation-sans-fonts
@ -84,7 +105,6 @@ BuildRequires: perl(utf8)
BuildRequires: perl(MIME::Base64)
%endif
Requires: perl(:MODULE_COMPAT_%{perlver})
Requires: perl(locale)
Provides: perl(Tk::LabRadio) = 4.004
Provides: perl(Tk) = %{version}
@ -103,6 +123,9 @@ Provides: perl(Tk) = %{version}
%global __provides_exclude %__provides_exclude|perl\\(Tk::Widget\\)$
%global __provides_exclude %__provides_exclude|perl\\(Tk::Wm\\)$
# Filter modules bundled for tests
%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_libexecdir}
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(TkTest\\)
%description
This a re-port of a perl interface to Tk8.4.
@ -120,53 +143,118 @@ Requires: perl-Tk = %{version}-%{release}
%description devel
%{summary}
%package tests
Summary: Tests for %{name}
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: perl-Test-Harness
# X11 tests:
%if 0%{?use_xwayland_run}
Requires: xwayland-run
Requires: mutter
Requires: mesa-dri-drivers
%else
Requires: xorg-x11-server-Xvfb
%endif
Requires: google-noto-sans-fonts
Requires: font(:lang=en)
Requires: liberation-sans-fonts
%description tests
Tests from %{name}. Execute them
with "%{_libexecdir}/%{name}/test".
%prep
%setup -q -n Tk-%{version}
find . -type f -exec %{__perl} -pi -e \
's,^(#!)(/usr/local)?/bin/perl\b,$1%{__perl}, if ($. == 1)' {} \;
find . -type f -exec perl -MConfig -pi -e \
's,^(#!)(/usr/local)?/bin/perl\b,$Config{startperl}, if ($. == 1)' {} \;
chmod -x pod/Popup.pod Tixish/lib/Tk/balArrow.xbm
# fix for widget as docs
%patch0
%{__perl} -pi -e \
%patch -P 0
perl -pi -e \
's,\@demopath\@,%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}/demos,g' demos/widget
# debian patch
#%%patch1 -p1
#%%patch -P 1 -p1
# patch to fix #235666 ... seems like caching code is broken
%patch2 -p1 -b .seg
%patch -P 2 -p1 -b .seg
%patch -P 3 -p1 -b .c99
%patch -P 4 -p1
%patch -P 5 -p1
%patch -P 6 -p1
%patch -P 7 -p1
%patch -P 8 -p1
# Help generators to recognize Perl scripts
for F in t/*.t; do
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F"
chmod +x "$F"
done
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor X11LIB=%{_libdir} XFT=0
find . -name Makefile | xargs %{__perl} -pi -e 's/^\tLD_RUN_PATH=[^\s]+\s*/\t/'
make %{?_smp_mflags}
perl Makefile.PL INSTALLDIRS=vendor X11LIB=%{_libdir} XFT=1 NO_PACKLIST=1 NO_PERLLOCAL=1
find . -name Makefile | xargs perl -pi -e 's/^\tLD_RUN_PATH=[^\s]+\s*/\t/'
%{make_build}
%check
%if %{use_x11_tests}
xvfb-run -a make test
%if 0%{?use_xwayland_run}
xwfb-run -c mutter -- make test
%else
xvfb-run -d make test
%endif
%endif
%install
make pure_install DESTDIR=$RPM_BUILD_ROOT
%{make_install}
find $RPM_BUILD_ROOT -type f -name .packlist -delete
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete
find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null \;
find %{buildroot} -type f -name '*.bs' -size 0 -delete
chmod -R u+rwX,go+rX,go-w $RPM_BUILD_ROOT/*
chmod -R u+rwX,go+rX,go-w %{buildroot}/*
mkdir __demos
cp -pR $RPM_BUILD_ROOT%{perl_vendorarch}/Tk/demos __demos
cp -pR %{buildroot}%{perl_vendorarch}/Tk/demos __demos
find __demos/ -type f -exec chmod -x {} \;
# Install tests
mkdir -p %{buildroot}%{_libexecdir}/%{name}
cp -a t %{buildroot}%{_libexecdir}/%{name}
rm %{buildroot}%{_libexecdir}/%{name}/t/pod.t
mkdir -p %{buildroot}%{_libexecdir}/%{name}/demos/demos/images
cp demos/demos/images/cursor* %{buildroot}%{_libexecdir}/%{name}/demos/demos/images
perl -i -pe 's{-Mblib", "blib/script}{%{_bindir}}' %{buildroot}%{_libexecdir}/%{name}/t/exefiles.t
perl -i -ne 'print $_ unless m{gedi}' %{buildroot}%{_libexecdir}/%{name}/t/exefiles.t
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
#!/bin/bash
set -e
# Some tests write into temporary files/directories
DIR=$(mktemp -d)
pushd "$DIR"
cp -a %{_libexecdir}/%{name}/* ./
%if 0%{?use_xwayland_run}
xwfb-run -c mutter -- prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
%else
xvfb-run -d prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
%endif
popd
rm -rf "$DIR"
EOF
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
%files
%doc Changes README README.linux ToDo pTk/*license* __demos/demos demos/widget COPYING
%doc blib/man1/widget.1
%{_bindir}/p*
%{_bindir}/tkjpeg
%{perl_vendorarch}/auto/Tk
%{perl_vendorarch}/T*
%{perl_vendorarch}/Tie*
%{perl_vendorarch}/Tk*
%exclude %{perl_vendorarch}/Tk/MMutil.pm
%exclude %{perl_vendorarch}/Tk/install.pm
%exclude %{perl_vendorarch}/Tk/MakeDepend.pm
%{_mandir}/man*/*
%{_mandir}/man1/ptked*
%{_mandir}/man1/ptksh*
%{_mandir}/man1/tkjpeg*
%{_mandir}/man3/Tie*
%{_mandir}/man3/Tk*
%exclude %{_mandir}/man1/widget.1*
%exclude %{_bindir}/gedi
%exclude %{_bindir}/widget
@ -178,14 +266,65 @@ find __demos/ -type f -exec chmod -x {} \;
%{perl_vendorarch}/Tk/install.pm
%{perl_vendorarch}/Tk/MakeDepend.pm
%files tests
%{_libexecdir}/%{name}
%changelog
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 804.035-7
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 804.036-17
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Thu Aug 08 2024 Troy Dawson <tdawson@redhat.com> - 804.036-16
- Bump release for Aug 2024 java mass rebuild
* Mon Jul 08 2024 Jitka Plesnikova <jplesnik@redhat.com> - 804.036-15
- Resolves: RHEL-36643, RHEL-41058
- Move away from xvfb-run
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 804.036-14
- Bump release for June 2024 mass rebuild
* Fri Mar 22 2024 Jitka Plesnikova <jplesnik@redhat.com> - 804.036-13
- Fix failing build and tests
- Resolves: RHEL-25977
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 804.036-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jul 11 2023 Jitka Plesnikova <jplesnik@redhat.com> - 804.036-11
- Perl 5.38 rebuild
* Thu Jun 01 2023 Michal Josef Špaček <mspacek@redhat.com> - 804.036-10
- Fix %%patch macro
- Update license to SPDX format
* Fri Feb 24 2023 Florian Weimer <fweimer@redhat.com> - 804.036-9
- Port to C99
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 804.036-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 804.036-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon May 30 2022 Jitka Plesnikova <jplesnik@redhat.com> - 804.036-6
- Perl 5.36 rebuild
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 804.036-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 804.036-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon Jun 28 2021 Xavier Bachelot <xavier@bachelot.org> - 804.036-3
- Add specfile patch from Mauro Carvalho Chehab to fix building with FreeType
support (RHBZ#1803711, RHBZ#1853802)
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 804.036-2
- Perl 5.34 rebuild
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 804.035-6
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Feb 17 2021 Xavier Bachelot <xavier@bachelot.org> - 804.036-1
- Update to 0.36 (RHBZ#1928507)
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 804.035-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

Loading…
Cancel
Save