forked from pool/perl-Tk
Compare commits
7 Commits
8a28d71188
...
slfo-1.2
Author | SHA256 | Date | |
---|---|---|---|
6c46406e96 | |||
f1a8145ddf | |||
d070003be1 | |||
015ab028af | |||
0585fcd30f | |||
084469835d | |||
18cd79b804 |
43
Tk-804.036-fix-strlen-vs-int-pointer-confusion.patch
Normal file
43
Tk-804.036-fix-strlen-vs-int-pointer-confusion.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
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 objGlue.c objGlue.c
|
||||
index d4927ea..dbd6a50 100644
|
||||
--- objGlue.c
|
||||
+++ 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
|
39
cpanspec.yml
39
cpanspec.yml
@@ -1,7 +1,13 @@
|
||||
---
|
||||
#description_paragraphs: 3
|
||||
#description: |-
|
||||
# override description from CPAN
|
||||
description: |-
|
||||
This a re-port of a perl interface to Tk8.4.
|
||||
C code is derived from Tcl/Tk8.4.5.
|
||||
It also includes all the C code parts of Tix8.1.4 from SourceForge.
|
||||
The perl code corresponding to Tix's Tcl code is not fully implemented.
|
||||
|
||||
Perl API is essentially the same as Tk800 series Tk800.025 but has not
|
||||
been verified as compliant. There ARE differences see pod/804delta.pod.
|
||||
#summary: override summary from CPAN
|
||||
#no_testing: broken upstream
|
||||
#sources:
|
||||
@@ -12,12 +18,15 @@ patches:
|
||||
Tk-804.029-macro.diff: -p0
|
||||
Tk-804.029-null.diff: -p0
|
||||
Tk-804.029-refcnt.diff: -p0
|
||||
Tk-804.036-fix-strlen-vs-int-pointer-confusion.patch: -p0
|
||||
preamble: |-
|
||||
BuildRequires: libX11-devel
|
||||
BuildRequires: libXft-devel
|
||||
BuildRequires: liberation-fonts
|
||||
BuildRequires: libjpeg-devel
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: pkgconfig(x11)
|
||||
BuildRequires: pkgconfig(xft)
|
||||
BuildRequires: pkgconfig(xproto)
|
||||
BuildRequires: pkgconfig(xt)
|
||||
BuildRequires: xkeyboard-config
|
||||
%if 0%{?suse_version} >= 01550
|
||||
BuildRequires: xvfb-run
|
||||
@@ -28,7 +37,6 @@ preamble: |-
|
||||
BuildRequires: xorg-x11
|
||||
BuildRequires: xorg-x11-Xnest
|
||||
BuildRequires: xorg-x11-Xvfb
|
||||
BuildRequires: xorg-x11-devel
|
||||
BuildRequires: xorg-x11-fonts
|
||||
BuildRequires: xorg-x11-fonts-100dpi
|
||||
BuildRequires: xorg-x11-fonts-scalable
|
||||
@@ -38,9 +46,9 @@ preamble: |-
|
||||
%ifnarch s390 s390x
|
||||
BuildRequires: xorg-x11-server
|
||||
%endif
|
||||
#post_prep: |-
|
||||
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
|
||||
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
|
||||
post_prep: |-
|
||||
find . -type f -name "Tcl-pTk" -print0 | xargs -0 chmod +x
|
||||
find . -type f -name "mkVFunc" -print0 | xargs -0 chmod +x
|
||||
#post_build: |-
|
||||
# rm unused.files
|
||||
#post_install: |-
|
||||
@@ -74,3 +82,18 @@ custom_test: |-
|
||||
%endif
|
||||
#startserver && make test
|
||||
#ignore_requires: Bizarre::Module
|
||||
misc: |-
|
||||
%exclude %{perl_vendorarch}/Tk/pTk
|
||||
%exclude %{perl_vendorarch}/Tk/*.h
|
||||
|
||||
%package devel
|
||||
Summary: Development files for perl-Tk
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
%description devel
|
||||
Development files for Tk - a graphical user interface toolkit for Perl
|
||||
|
||||
%files devel
|
||||
%{perl_vendorarch}/Tk/pTk
|
||||
%{perl_vendorarch}/Tk/*.h
|
||||
skip_doc: add_version build_ptk checklen check_source check_syms cleanup copydate db57 debug debug.bat dupsyms exetype fixfunc gdb.plx gedi generate hackMM keyWords menubug mkExt mkppm.bat myConfig needed perlfiles ptked ptksh r README-ActiveState.txt README.AIX README.cygwin README.darwin README.HPUX README.IRIX README.OpenBSD README.os2 README.OSF README.SCO README.Solaris README-Strawberry.txt README.SVR4 README.ultrix rebuild sm stripblib submethods symbols tcl2perl tkGlue.def tkGlue.exc tkGlue.m tkGlue.t TkXSUB.def uninstall vg vtab.def wal
|
||||
|
@@ -1,3 +1,31 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 12 10:31:19 UTC 2024 - Pedro Monreal <pmonreal@suse.com>
|
||||
|
||||
- Fix an STRLEN vs int pointer confusion in function
|
||||
Tcl_GetByteArrayFromObj(): [bsc#1218600]
|
||||
* Perl 5.37.2, since commit github.com/Perl/perl5/commit/1ef9039b
|
||||
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.
|
||||
* Add patch from Debian:
|
||||
- Tk-804.036-fix-strlen-vs-int-pointer-confusion.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 8 13:44:48 UTC 2023 - Frederic Crozat <fcrozat@suse.com>
|
||||
|
||||
- Drop BuildRequires on xorg-x11, not needed anymore.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 11 16:06:33 UTC 2023 - Dirk Stoecker <opensuse@dstoecker.de>
|
||||
|
||||
- update cpanspec.yml and recreate spec file
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun May 7 10:49:47 UTC 2023 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Replace xorg-x11 devel requires by pkgconfig(...)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 18 15:14:28 UTC 2021 - Pedro Monreal <pmonreal@suse.com>
|
||||
|
||||
|
55
perl-Tk.spec
55
perl-Tk.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package perl-Tk
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -20,37 +20,37 @@
|
||||
Name: perl-Tk
|
||||
Version: 804.036
|
||||
Release: 0
|
||||
Summary: Graphical user interface toolkit for Perl
|
||||
#Upstream: SUSE-Public-Domain
|
||||
License: (Artistic-1.0 OR GPL-1.0-or-later) AND Zlib
|
||||
Summary: Tk - a Graphical User Interface Toolkit
|
||||
URL: https://metacpan.org/release/%{cpan_name}
|
||||
Source0: https://cpan.metacpan.org/authors/id/S/SR/SREZIC/%{cpan_name}-%{version}.tar.gz
|
||||
Source1: cpanspec.yml
|
||||
# MANUAL BEGIN
|
||||
Patch0: Tk-804.029-event.diff
|
||||
Patch1: Tk-804.029-macro.diff
|
||||
Patch2: Tk-804.029-null.diff
|
||||
Patch3: Tk-804.029-refcnt.diff
|
||||
# MANUAL END
|
||||
Patch4: Tk-804.036-fix-strlen-vs-int-pointer-confusion.patch
|
||||
BuildRequires: perl
|
||||
BuildRequires: perl-macros
|
||||
%{perl_requires}
|
||||
# MANUAL BEGIN
|
||||
BuildRequires: libX11-devel
|
||||
BuildRequires: libXft-devel
|
||||
BuildRequires: liberation-fonts
|
||||
BuildRequires: libjpeg-devel
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: xkeyboard-config
|
||||
BuildRequires: pkgconfig(x11)
|
||||
BuildRequires: pkgconfig(xft)
|
||||
BuildRequires: pkgconfig(xproto)
|
||||
BuildRequires: pkgconfig(xt)
|
||||
%if 0%{?suse_version} >= 01550
|
||||
BuildRequires: xvfb-run
|
||||
BuildRequires: perl(Devel::Leak)
|
||||
BuildRequires: perl(Test::More)
|
||||
BuildRequires: perl(Test::Pod)
|
||||
%endif
|
||||
BuildRequires: xorg-x11
|
||||
BuildRequires: xorg-x11-Xnest
|
||||
BuildRequires: xorg-x11-Xvfb
|
||||
BuildRequires: xorg-x11-devel
|
||||
BuildRequires: xorg-x11-fonts
|
||||
BuildRequires: xorg-x11-fonts-100dpi
|
||||
BuildRequires: xorg-x11-fonts-scalable
|
||||
@@ -71,20 +71,14 @@ The perl code corresponding to Tix's Tcl code is not fully implemented.
|
||||
Perl API is essentially the same as Tk800 series Tk800.025 but has not
|
||||
been verified as compliant. There ARE differences see pod/804delta.pod.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for perl-Tk
|
||||
Group: Development/Libraries/Perl
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
%description devel
|
||||
Development files for Tk - a graphical user interface toolkit for Perl
|
||||
|
||||
%prep
|
||||
%autosetup -n %{cpan_name}-%{version} -p0
|
||||
|
||||
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644
|
||||
# MANUAL BEGIN
|
||||
find . -type f -name "Tcl-pTk" -print0 | xargs -0 chmod +x
|
||||
find . -type f -name "mkVFunc" -print0 | xargs -0 chmod +x
|
||||
# MANUAL END
|
||||
|
||||
%build
|
||||
find -name "*.orig" -exec rm {} \;
|
||||
@@ -100,7 +94,6 @@ for file in `find -type f` ; do
|
||||
grep -q "%{_prefix}/local/bin/new/perl" $file && \
|
||||
sed -i -e "s@%{_prefix}/local/bin/new/perl@%{_bindir}/perl@g" "$file"
|
||||
done
|
||||
|
||||
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" XFT=1
|
||||
make %{?_smp_mflags} CFLAGS="%{optflags} -Wall -fpic"
|
||||
|
||||
@@ -117,28 +110,22 @@ DISPLAY=:95 make test %{?_smp_mflags}
|
||||
%install
|
||||
%perl_make_install
|
||||
%perl_process_packlist
|
||||
rm -f %{buildroot}/%{perl_vendorarch}/fix_4_os2.pl
|
||||
find %{buildroot} -type f -name '*.bs' -size 0 -delete
|
||||
%perl_gen_filelist
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,755)
|
||||
%license COPYING pTk/*license*
|
||||
%doc Changes Change.log Funcs.doc PPM-HowTo README README.linux ToDo demos/widget VERSIONS
|
||||
%doc blib/man1/widget.1
|
||||
%{_mandir}/man?/*
|
||||
%{_bindir}/p*
|
||||
%{_bindir}/tkjpeg
|
||||
%{_bindir}/gedi
|
||||
%{_bindir}/widget
|
||||
%{perl_vendorarch}/Tie
|
||||
%{perl_vendorarch}/Tk
|
||||
%{perl_vendorarch}/Tk.*
|
||||
%{perl_vendorarch}/auto/Tk
|
||||
%files -f %{name}.files
|
||||
%doc Change.log Changes examples Funcs.doc PPM-HowTo README README.linux ToDo VERSIONS
|
||||
%license COPYING
|
||||
%exclude %{perl_vendorarch}/Tk/pTk
|
||||
%exclude %{perl_vendorarch}/Tk/*.h
|
||||
|
||||
%package devel
|
||||
Summary: Development files for perl-Tk
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
%description devel
|
||||
Development files for Tk - a graphical user interface toolkit for Perl
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%{perl_vendorarch}/Tk/pTk
|
||||
%{perl_vendorarch}/Tk/*.h
|
||||
|
||||
|
Reference in New Issue
Block a user