SHA256
8
0
forked from pool/perl-Tk

5 Commits

Author SHA256 Message Date
8a5cf39c49 Accepting request 1270025 from devel:languages:perl
Fix build with gcc15
See also https://build.opensuse.org/requests/1269266 (forwarded request 1269956 from tinita)

OBS-URL: https://build.opensuse.org/request/show/1270025
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Tk?expand=0&rev=43
2025-04-18 14:14:18 +00:00
5ae29ad594 Fix build with gcc15
See also https://build.opensuse.org/requests/1269266

OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Tk?expand=0&rev=54
2025-04-16 12:51:03 +00:00
879962fe52 Accepting request 1186446 from devel:languages:perl
OBS-URL: https://build.opensuse.org/request/show/1186446
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Tk?expand=0&rev=42
2024-07-10 14:48:01 +00:00
80cd1c702b - mirror last changes in cpanspec.yml
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Tk?expand=0&rev=52
2024-07-09 15:39:09 +00:00
4fc5d2cf52 - Compile with -fpermissive to work around issues which GCC 14
considers errors (and not warnings as before) and add
  Tk-804-config-C99.diff to actually fix the problems in the
  conffigury snippets (which are not compiled with the options
  requested in optflags).  [boo#1225909]

Note that I was able to come up with a patch with which -fpermissive
could be omitted, it is attached to the bugzilla.  But I think the
issues should be fixed upstream.  I'll keep the bug open even after
accepting the patch so that the need for -fpermissive can be reviewed
in the future.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Tk?expand=0&rev=51
2024-07-07 19:48:35 +00:00
5 changed files with 230 additions and 6 deletions

50
Tk-804-config-C99.diff Normal file
View File

@@ -0,0 +1,50 @@
Index: config/signedchar.c
===================================================================
--- config/signedchar.c.orig
+++ config/signedchar.c
@@ -1,4 +1,4 @@
-main()
+int main()
{
signed char x = 'a';
return (x - 'a');
Index: config/unsigned.c
===================================================================
--- config/unsigned.c.orig
+++ config/unsigned.c
@@ -1,3 +1,5 @@
+#include <stdlib.h>
+
int main()
{
char x[] = "\377";
Index: pTk/config/Hstrdup.c
===================================================================
--- pTk/config/Hstrdup.c.orig
+++ pTk/config/Hstrdup.c
@@ -1,4 +1,5 @@
#include <string.h>
+#include <stdlib.h>
#define STRING "Whatever"
Index: pTk/config/Hstrtoul.c
===================================================================
--- pTk/config/Hstrtoul.c.orig
+++ pTk/config/Hstrtoul.c
@@ -1,3 +1,4 @@
+#include <string.h>
#include <stdlib.h>
int main()
Index: config/pregcomp2.c
===================================================================
--- config/pregcomp2.c.orig
+++ config/pregcomp2.c
@@ -4,5 +4,5 @@
int main() {
SV* sv = newSViv(0);
- regexp* rx = pregcomp(sv, 0);
+ void *rx = (void *) pregcomp(sv, 0);
}

12
Tk-804.036-gcc15.patch Normal file
View File

@@ -0,0 +1,12 @@
Index: pTk/mTk/additions/ClientWin.c
===================================================================
--- pTk/mTk/additions/ClientWin.c.orig
+++ pTk/mTk/additions/ClientWin.c
@@ -30,7 +30,7 @@ in this Software without prior written a
#include <X11/Xlib.h>
#include <X11/Xatom.h>
-static Window TryChildren();
+static Window TryChildren (Display* dpy, Window win, Atom WM_STATE);
/* Find a window with WM_STATE, else return win itself, as per ICCCM */

View File

@@ -19,6 +19,8 @@ patches:
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 Tk-804.036-fix-strlen-vs-int-pointer-confusion.patch: -p0
Tk-804-config-C99.diff: -p0 PATCH-FIX-UPSTREAM fix gcc14 build error https://github.com/eserte/perl-tk/issues/98
Tk-804.036-gcc15.patch: -p0 PATCH-FIX-UPSTREAM fix gcc15 build error https://github.com/eserte/perl-tk/issues/112
preamble: |- preamble: |-
BuildRequires: liberation-fonts BuildRequires: liberation-fonts
BuildRequires: libjpeg-devel BuildRequires: libjpeg-devel
@@ -34,7 +36,6 @@ preamble: |-
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-fonts BuildRequires: xorg-x11-fonts
@@ -56,6 +57,9 @@ post_prep: |-
license: (GPL-1.0-or-later OR Artistic-1.0) AND Zlib license: (GPL-1.0-or-later OR Artistic-1.0) AND Zlib
#skip_noarch: 1 #skip_noarch: 1
custom_build: |- custom_build: |-
# Work around boo#1225909, see the bug for more details
%global optflags %{optflags} -fpermissive
find -name "*.orig" -exec rm {} \; find -name "*.orig" -exec rm {} \;
for file in `find -type f` ; do for file in `find -type f` ; do
grep -q "%{_prefix}/local/bin/perl" $file && \ grep -q "%{_prefix}/local/bin/perl" $file && \

View File

@@ -1,3 +1,22 @@
-------------------------------------------------------------------
Tue Apr 15 21:47:41 UTC 2025 - Tina Müller <tina.mueller@suse.com>
- Add Tk-804.036-gcc15.patch, https://github.com/eserte/perl-tk/issues/112
-------------------------------------------------------------------
Mon Jul 8 12:40:38 UTC 2024 - pgajdos@suse.com
- mirror last changes in cpanspec.yml
-------------------------------------------------------------------
Wed Jul 3 18:38:05 UTC 2024 - Martin Jambor <mjambor@suse.com>
- Compile with -fpermissive to work around issues which GCC 14
considers errors (and not warnings as before) and add
Tk-804-config-C99.diff to actually fix the problems in the
conffigury snippets (which are not compiled with the options
requested in optflags). [boo#1225909]
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jan 12 10:31:19 UTC 2024 - Pedro Monreal <pmonreal@suse.com> Fri Jan 12 10:31:19 UTC 2024 - 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) 2024 SUSE LLC # Copyright (c) 2025 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
@@ -18,21 +18,150 @@
%define cpan_name Tk %define cpan_name Tk
Name: perl-Tk Name: perl-Tk
Version: 804.036 Version: 804.36.0
Release: 0 Release: 0
# 804.036 -> normalize -> 804.36.0
%define cpan_version 804.036
#Upstream: SUSE-Public-Domain #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 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}-%{cpan_version}.tar.gz
Source1: cpanspec.yml Source1: cpanspec.yml
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
Patch4: Tk-804.036-fix-strlen-vs-int-pointer-confusion.patch Patch4: Tk-804.036-fix-strlen-vs-int-pointer-confusion.patch
# PATCH-FIX-UPSTREAM fix gcc15 build error https://github.com/eserte/perl-tk/issues/112
Patch5: Tk-804.036-gcc15.patch
# PATCH-FIX-UPSTREAM fix gcc14 build error https://github.com/eserte/perl-tk/issues/98
Patch6: Tk-804-config-C99.diff
BuildRequires: perl BuildRequires: perl
BuildRequires: perl-macros BuildRequires: perl-macros
Provides: perl(Tie::Watch)
Provides: perl(Tk) = %{version}
Provides: perl(Tk::Adjuster) = 4.8.0
Provides: perl(Tk::After) = 4.8.0
Provides: perl(Tk::Animation) = 4.8.0
Provides: perl(Tk::Balloon) = 4.13.0
Provides: perl(Tk::Bitmap) = 4.4.0
Provides: perl(Tk::BrowseEntry) = 4.15.0
Provides: perl(Tk::Button) = 4.10.0
Provides: perl(Tk::Canvas) = 4.13.0
Provides: perl(Tk::Checkbutton) = 4.6.0
Provides: perl(Tk::Clipboard) = 4.9.0
Provides: perl(Tk::CmdLine) = 4.7.0
Provides: perl(Tk::ColorDialog) = 4.14.0
Provides: perl(Tk::ColorEditor) = 4.14.0
Provides: perl(Tk::ColorSelect) = 4.14.0
Provides: perl(Tk::Compound) = 4.4.0
Provides: perl(Tk::Configure) = 4.9.0
Provides: perl(Tk::Derived) = 4.11.0
Provides: perl(Tk::Dialog) = 4.5.0
Provides: perl(Tk::DialogBox) = 4.16.0
Provides: perl(Tk::DirTree) = 4.22.0
Provides: perl(Tk::DirTreeDialog)
Provides: perl(Tk::Dirlist) = 4.4.0
Provides: perl(Tk::DragDrop) = 4.15.0
Provides: perl(Tk::DragDrop::Common) = 4.5.0
Provides: perl(Tk::DragDrop::Local) = 4.4.0
Provides: perl(Tk::DragDrop::Rect) = 4.12.0
Provides: perl(Tk::DragDrop::SunConst) = 4.4.0
Provides: perl(Tk::DragDrop::SunDrop) = 4.6.0
Provides: perl(Tk::DragDrop::SunSite) = 4.7.0
Provides: perl(Tk::DragDrop::Win32Drop) = 4.4.0
Provides: perl(Tk::DragDrop::Win32Site) = 4.9.0
Provides: perl(Tk::DragDrop::XDNDDrop) = 4.7.0
Provides: perl(Tk::DragDrop::XDNDSite) = 4.7.0
Provides: perl(Tk::DropSite) = 4.8.0
Provides: perl(Tk::DummyEncode) = 4.7.0
Provides: perl(Tk::DummyEncode::X11ControlChars)
Provides: perl(Tk::DummyEncode::iso8859_1)
Provides: perl(Tk::English) = 4.6.0
Provides: perl(Tk::Entry) = 4.18.0
Provides: perl(Tk::ErrorDialog) = 4.8.0
Provides: perl(Tk::Event) = 4.40.0
Provides: perl(Tk::Event::IO) = 4.9.0
Provides: perl(Tk::FBox) = 4.21.0
Provides: perl(Tk::FileSelect) = 4.18.0
Provides: perl(Tk::FloatEntry) = 4.4.0
Provides: perl(Tk::Font) = 4.4.0
Provides: perl(Tk::Frame) = 4.10.0
Provides: perl(Tk::HList) = 4.15.0
Provides: perl(Tk::IO) = 4.6.0
Provides: perl(Tk::IconList) = 4.7.0
Provides: perl(Tk::Image) = 4.11.0
Provides: perl(Tk::InputO) = 4.4.0
Provides: perl(Tk::ItemStyle) = 4.4.0
Provides: perl(Tk::JPEG) = 4.3.0
Provides: perl(Tk::LabEntry) = 4.6.0
Provides: perl(Tk::LabFrame) = 4.10.0
Provides: perl(Tk::LabRadiobutton) = 4.4.0
Provides: perl(Tk::Label) = 4.6.0
Provides: perl(Tk::LabeledEntryLabeledRadiobutton) = 4.4.0
Provides: perl(Tk::Labelframe) = 4.3.0
Provides: perl(Tk::Listbox) = 4.15.0
Provides: perl(Tk::MMtry) = 4.11.0
Provides: perl(Tk::MMutil) = 4.26.0
Provides: perl(Tk::MainWindow) = 4.15.0
Provides: perl(Tk::MakeDepend) = 4.16.0
Provides: perl(Tk::Menu) = 4.23.0
Provides: perl(Tk::Menu::Button)
Provides: perl(Tk::Menu::Cascade)
Provides: perl(Tk::Menu::Checkbutton)
Provides: perl(Tk::Menu::Item) = 4.6.0
Provides: perl(Tk::Menu::Radiobutton)
Provides: perl(Tk::Menu::Separator)
Provides: perl(Tk::Menubar) = 4.6.0
Provides: perl(Tk::Menubutton) = 4.5.0
Provides: perl(Tk::Message) = 4.6.0
Provides: perl(Tk::MsgBox) = 4.2.0
Provides: perl(Tk::Mwm) = 4.4.0
Provides: perl(Tk::NBFrame) = 4.4.0
Provides: perl(Tk::NoteBook) = 4.12.0
Provides: perl(Tk::Optionmenu) = 4.14.0
Provides: perl(Tk::PNG) = 4.4.0
Provides: perl(Tk::Pane) = 4.7.0
Provides: perl(Tk::Panedwindow) = 4.4.0
Provides: perl(Tk::Photo) = 4.6.0
Provides: perl(Tk::Pixmap) = 4.4.0
Provides: perl(Tk::Pretty) = 4.6.0
Provides: perl(Tk::ProgressBar) = 4.15.0
Provides: perl(Tk::ROText) = 4.11.0
Provides: perl(Tk::Radiobutton) = 4.6.0
Provides: perl(Tk::Region) = 4.6.0
Provides: perl(Tk::Reindex) = 4.6.0
Provides: perl(Tk::ReindexedROText) = 4.4.0
Provides: perl(Tk::ReindexedText) = 4.4.0
Provides: perl(Tk::Scale) = 4.4.0
Provides: perl(Tk::Scrollbar) = 4.10.0
Provides: perl(Tk::Spinbox) = 4.7.0
Provides: perl(Tk::Stats) = 4.4.0
Provides: perl(Tk::Submethods) = 4.5.0
Provides: perl(Tk::TList) = 4.6.0
Provides: perl(Tk::Table) = 4.16.0
Provides: perl(Tk::Text) = 4.31.0
Provides: perl(Tk::Text::Tag) = 4.4.0
Provides: perl(Tk::TextEdit) = 4.5.0
Provides: perl(Tk::TextList) = 4.6.0
Provides: perl(Tk::TextUndo) = 4.15.0
Provides: perl(Tk::Tiler) = 4.13.0
Provides: perl(Tk::TixGrid) = 4.10.0
Provides: perl(Tk::Toplevel) = 4.6.0
Provides: perl(Tk::Trace) = 4.9.0
Provides: perl(Tk::Tree) = 4.720.0
Provides: perl(Tk::Widget) = 4.37.0
Provides: perl(Tk::WinPhoto) = 4.5.0
Provides: perl(Tk::Wm) = 4.15.0
Provides: perl(Tk::X) = 4.5.0
Provides: perl(Tk::X11Font) = 4.7.0
Provides: perl(Tk::Xlib) = 4.4.0
Provides: perl(Tk::Xrm) = 4.5.0
Provides: perl(Tk::install) = 4.4.0
Provides: perl(Tk::widgets) = 4.5.0
Provides: perl(WidgetDemo) = 4.12.0
%undefine __perllib_provides
%{perl_requires} %{perl_requires}
# MANUAL BEGIN # MANUAL BEGIN
BuildRequires: liberation-fonts BuildRequires: liberation-fonts
@@ -72,15 +201,25 @@ 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.
%prep %prep
%autosetup -n %{cpan_name}-%{version} -p0 %autosetup -n %{cpan_name}-%{cpan_version} -N
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/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644
%patch -P0 -p0
%patch -P1 -p0
%patch -P2 -p0
%patch -P3 -p0
%patch -P4 -p0
%patch -P5 -p0
%patch -P6 -p0
# MANUAL BEGIN # 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 # MANUAL END
%build %build
# Work around boo#1225909, see the bug for more details
%global optflags %{optflags} -fpermissive
find -name "*.orig" -exec rm {} \; find -name "*.orig" -exec rm {} \;
for file in `find -type f` ; do for file in `find -type f` ; do
grep -q "%{_prefix}/local/bin/perl" $file && \ grep -q "%{_prefix}/local/bin/perl" $file && \