SHA256
8
0
forked from pool/perl-Tk

Compare commits

...

7 Commits

Author SHA256 Message Date
6c46406e96 Accepting request 1139404 from devel:languages:perl
OBS-URL: https://build.opensuse.org/request/show/1139404
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Tk?expand=0&rev=41
2024-01-17 21:14:28 +00:00
f1a8145ddf Accepting request 1138819 from home:pmonrealgonzalez:branches:devel:languages:perl
- 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

OBS-URL: https://build.opensuse.org/request/show/1138819
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Tk?expand=0&rev=49
2024-01-17 09:00:58 +00:00
d070003be1 Accepting request 1132159 from devel:languages:perl
OBS-URL: https://build.opensuse.org/request/show/1132159
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Tk?expand=0&rev=40
2023-12-09 21:49:32 +00:00
015ab028af Accepting request 1132114 from home:fcrozat:branches:devel:languages:perl
- Drop BuildRequires on xorg-x11, not needed anymore.

OBS-URL: https://build.opensuse.org/request/show/1132114
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Tk?expand=0&rev=47
2023-12-08 18:09:51 +00:00
0585fcd30f Accepting request 1086586 from devel:languages:perl
- update cpanspec.yml and recreate spec file
- Replace xorg-x11 devel requires by pkgconfig(...)

OBS-URL: https://build.opensuse.org/request/show/1086586
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Tk?expand=0&rev=39
2023-05-12 18:32:33 +00:00
084469835d update cpanspec.yml and recreate spec file
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Tk?expand=0&rev=45
2023-05-11 16:07:14 +00:00
18cd79b804 Accepting request 1085306 from home:jengelh:branches:devel:languages:perl
- Replace xorg-x11 devel requires by pkgconfig(...)

OBS-URL: https://build.opensuse.org/request/show/1085306
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Tk?expand=0&rev=44
2023-05-11 15:43:19 +00:00
4 changed files with 123 additions and 42 deletions

View 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

View File

@@ -1,7 +1,13 @@
--- ---
#description_paragraphs: 3 #description_paragraphs: 3
#description: |- description: |-
# override description from CPAN 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 #summary: override summary from CPAN
#no_testing: broken upstream #no_testing: broken upstream
#sources: #sources:
@@ -12,12 +18,15 @@ patches:
Tk-804.029-macro.diff: -p0 Tk-804.029-macro.diff: -p0
Tk-804.029-null.diff: -p0 Tk-804.029-null.diff: -p0
Tk-804.029-refcnt.diff: -p0 Tk-804.029-refcnt.diff: -p0
Tk-804.036-fix-strlen-vs-int-pointer-confusion.patch: -p0
preamble: |- preamble: |-
BuildRequires: libX11-devel
BuildRequires: libXft-devel
BuildRequires: liberation-fonts BuildRequires: liberation-fonts
BuildRequires: libjpeg-devel BuildRequires: libjpeg-devel
BuildRequires: libpng-devel BuildRequires: libpng-devel
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xft)
BuildRequires: pkgconfig(xproto)
BuildRequires: pkgconfig(xt)
BuildRequires: xkeyboard-config BuildRequires: xkeyboard-config
%if 0%{?suse_version} >= 01550 %if 0%{?suse_version} >= 01550
BuildRequires: xvfb-run BuildRequires: xvfb-run
@@ -28,7 +37,6 @@ preamble: |-
BuildRequires: xorg-x11 BuildRequires: xorg-x11
BuildRequires: xorg-x11-Xnest BuildRequires: xorg-x11-Xnest
BuildRequires: xorg-x11-Xvfb BuildRequires: xorg-x11-Xvfb
BuildRequires: xorg-x11-devel
BuildRequires: xorg-x11-fonts BuildRequires: xorg-x11-fonts
BuildRequires: xorg-x11-fonts-100dpi BuildRequires: xorg-x11-fonts-100dpi
BuildRequires: xorg-x11-fonts-scalable BuildRequires: xorg-x11-fonts-scalable
@@ -38,9 +46,9 @@ preamble: |-
%ifnarch s390 s390x %ifnarch s390 s390x
BuildRequires: xorg-x11-server BuildRequires: xorg-x11-server
%endif %endif
#post_prep: |- post_prep: |-
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'` find . -type f -name "Tcl-pTk" -print0 | xargs -0 chmod +x
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL find . -type f -name "mkVFunc" -print0 | xargs -0 chmod +x
#post_build: |- #post_build: |-
# rm unused.files # rm unused.files
#post_install: |- #post_install: |-
@@ -74,3 +82,18 @@ custom_test: |-
%endif %endif
#startserver && make test #startserver && make test
#ignore_requires: Bizarre::Module #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

View File

@@ -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> Tue May 18 15:14:28 UTC 2021 - Pedro Monreal <pmonreal@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package perl-Tk # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -20,37 +20,37 @@
Name: perl-Tk Name: perl-Tk
Version: 804.036 Version: 804.036
Release: 0 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 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} URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/S/SR/SREZIC/%{cpan_name}-%{version}.tar.gz Source0: https://cpan.metacpan.org/authors/id/S/SR/SREZIC/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml Source1: cpanspec.yml
# MANUAL BEGIN
Patch0: Tk-804.029-event.diff Patch0: Tk-804.029-event.diff
Patch1: Tk-804.029-macro.diff Patch1: Tk-804.029-macro.diff
Patch2: Tk-804.029-null.diff Patch2: Tk-804.029-null.diff
Patch3: Tk-804.029-refcnt.diff Patch3: Tk-804.029-refcnt.diff
# MANUAL END Patch4: Tk-804.036-fix-strlen-vs-int-pointer-confusion.patch
BuildRequires: perl BuildRequires: perl
BuildRequires: perl-macros BuildRequires: perl-macros
%{perl_requires} %{perl_requires}
# MANUAL BEGIN # MANUAL BEGIN
BuildRequires: libX11-devel
BuildRequires: libXft-devel
BuildRequires: liberation-fonts BuildRequires: liberation-fonts
BuildRequires: libjpeg-devel BuildRequires: libjpeg-devel
BuildRequires: libpng-devel BuildRequires: libpng-devel
BuildRequires: xkeyboard-config BuildRequires: xkeyboard-config
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xft)
BuildRequires: pkgconfig(xproto)
BuildRequires: pkgconfig(xt)
%if 0%{?suse_version} >= 01550 %if 0%{?suse_version} >= 01550
BuildRequires: xvfb-run BuildRequires: xvfb-run
BuildRequires: perl(Devel::Leak) BuildRequires: perl(Devel::Leak)
BuildRequires: perl(Test::More) BuildRequires: perl(Test::More)
BuildRequires: perl(Test::Pod) BuildRequires: perl(Test::Pod)
%endif %endif
BuildRequires: xorg-x11
BuildRequires: xorg-x11-Xnest BuildRequires: xorg-x11-Xnest
BuildRequires: xorg-x11-Xvfb BuildRequires: xorg-x11-Xvfb
BuildRequires: xorg-x11-devel
BuildRequires: xorg-x11-fonts BuildRequires: xorg-x11-fonts
BuildRequires: xorg-x11-fonts-100dpi BuildRequires: xorg-x11-fonts-100dpi
BuildRequires: xorg-x11-fonts-scalable 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 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. 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 %prep
%autosetup -n %{cpan_name}-%{version} -p0 %autosetup -n %{cpan_name}-%{version} -p0
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644 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 "Tcl-pTk" -print0 | xargs -0 chmod +x
find . -type f -name "mkVFunc" -print0 | xargs -0 chmod +x find . -type f -name "mkVFunc" -print0 | xargs -0 chmod +x
# MANUAL END
%build %build
find -name "*.orig" -exec rm {} \; find -name "*.orig" -exec rm {} \;
@@ -100,7 +94,6 @@ for file in `find -type f` ; do
grep -q "%{_prefix}/local/bin/new/perl" $file && \ grep -q "%{_prefix}/local/bin/new/perl" $file && \
sed -i -e "s@%{_prefix}/local/bin/new/perl@%{_bindir}/perl@g" "$file" sed -i -e "s@%{_prefix}/local/bin/new/perl@%{_bindir}/perl@g" "$file"
done done
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" XFT=1 perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" XFT=1
make %{?_smp_mflags} CFLAGS="%{optflags} -Wall -fpic" make %{?_smp_mflags} CFLAGS="%{optflags} -Wall -fpic"
@@ -117,28 +110,22 @@ DISPLAY=:95 make test %{?_smp_mflags}
%install %install
%perl_make_install %perl_make_install
%perl_process_packlist %perl_process_packlist
rm -f %{buildroot}/%{perl_vendorarch}/fix_4_os2.pl %perl_gen_filelist
find %{buildroot} -type f -name '*.bs' -size 0 -delete
%files %files -f %{name}.files
%defattr(-,root,root,755) %doc Change.log Changes examples Funcs.doc PPM-HowTo README README.linux ToDo VERSIONS
%license COPYING pTk/*license* %license COPYING
%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
%exclude %{perl_vendorarch}/Tk/pTk %exclude %{perl_vendorarch}/Tk/pTk
%exclude %{perl_vendorarch}/Tk/*.h %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 %files devel
%defattr(-,root,root)
%{perl_vendorarch}/Tk/pTk %{perl_vendorarch}/Tk/pTk
%{perl_vendorarch}/Tk/*.h %{perl_vendorarch}/Tk/*.h