public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Patrick Monnerat <patrick@monnerat.net>
To: git-commits@fedoraproject.org
Subject: [rpms/iwidgets] rawhide: Patch "tcl9" for Tcl version 9 compatibility.
Date: Wed, 01 Jul 2026 07:48:24 GMT	[thread overview]
Message-ID: <178289210414.1.28272443330856778.rpms-iwidgets-a1a30cd41698@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/iwidgets
Branch : rawhide
Commit : a1a30cd41698648c031b6ac214544ea028aaa8c2
Author : Patrick Monnerat <patrick@monnerat.net>
Date   : 2026-07-01T09:47:45+02:00
Stats  : +97/-47 in 6 file(s)
URL    : https://src.fedoraproject.org/rpms/iwidgets/c/a1a30cd41698648c031b6ac214544ea028aaa8c2?branch=rawhide

Log:
Patch "tcl9" for Tcl version 9 compatibility.

---
diff --git a/iwidgets-4.1.1-calls.patch b/iwidgets-4.1.1-calls.patch
new file mode 100644
index 0000000..ab8e17e
--- /dev/null
+++ b/iwidgets-4.1.1-calls.patch
@@ -0,0 +1,18 @@
+diff -Naurp iwidgets-4.1.2.orig/iwidgets.tcl.in iwidgets-4.1.2.new/iwidgets.tcl.in
+--- iwidgets-4.1.2.orig/iwidgets.tcl.in	2023-02-14 01:11:10.000000000 +0100
++++ iwidgets-4.1.2.new/iwidgets.tcl.in	2025-04-15 16:26:32.204792031 +0200
+@@ -15,12 +15,12 @@
+ 
+ package require Tcl 8.0-
+ package require Tk 8.0-
+-package require Itcl @itcl_VERSION@
++package require itcl @itcl_VERSION@
+ if {[string length [package provide Itk]] == 0} {
+     package forget Itk
+     package forget itk
+ }
+-package require Itk [string index @itcl_VERSION@ 0]
++package require itk [string index @itcl_VERSION@ 0]
+ 
+ namespace eval ::iwidgets {
+     namespace export *

diff --git a/iwidgets-4.1.1-tcl9.patch b/iwidgets-4.1.1-tcl9.patch
new file mode 100644
index 0000000..366ebc7
--- /dev/null
+++ b/iwidgets-4.1.1-tcl9.patch
@@ -0,0 +1,44 @@
+diff -Naurp iwidgets-4.1.1.orig/iwidgets.tcl.in iwidgets-4.1.1.new/iwidgets.tcl.in
+--- iwidgets-4.1.1.orig/iwidgets.tcl.in	2017-09-05 16:00:05.000000000 +0200
++++ iwidgets-4.1.1.new/iwidgets.tcl.in	2025-10-27 11:26:50.629405038 +0100
+@@ -13,8 +13,8 @@
+ # See the file "license.terms" for information on usage and
+ # redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ 
+-package require Tcl 8.0
+-package require Tk 8.0
++package require Tcl 8.0-
++package require Tk 8.0-
+ package require Itcl @itcl_VERSION@
+ if {[string length [package provide Itk]] == 0} {
+     package forget Itk
+@@ -28,11 +28,11 @@ namespace eval ::iwidgets {
+     variable library [file dirname [info script]]
+     variable version @PACKAGE_VERSION@
+ 
+-    lappend auto_path $iwidgets::library
++    lappend ::auto_path $::iwidgets::library
+     variable subdir
+     foreach subdir {generic scripts} {
+-	if {[file isdirectory [file join $iwidgets::library $subdir]]} {
+-	    lappend auto_path [file join $iwidgets::library $subdir]
++	if {[file isdirectory [file join $::iwidgets::library $subdir]]} {
++	    lappend ::auto_path [file join $::iwidgets::library $subdir]
+ 	}
+     }
+     unset subdir
+diff -Naurp iwidgets-4.1.1.orig/win/iwidgets.tcl iwidgets-4.1.1.new/win/iwidgets.tcl
+--- iwidgets-4.1.1.orig/win/iwidgets.tcl	2001-09-18 20:53:09.000000000 +0200
++++ iwidgets-4.1.1.new/win/iwidgets.tcl	2025-10-27 11:25:58.275870368 +0100
+@@ -25,7 +25,7 @@ namespace eval ::iwidgets {
+     variable version 4.0.1
+ }
+ 
+-lappend auto_path $iwidgets::library \
+-                  [file join $iwidgets::library generic] \
+-                  [file join $iwidgets::library scripts]
+-package provide Iwidgets $iwidgets::version
++lappend auto_path $::iwidgets::library \
++                  [file join $::iwidgets::library generic] \
++                  [file join $::iwidgets::library scripts]
++package provide Iwidgets $::iwidgets::version

diff --git a/iwidgets-4.1.1-wish85.patch b/iwidgets-4.1.1-wish85.patch
new file mode 100644
index 0000000..808dfb5
--- /dev/null
+++ b/iwidgets-4.1.1-wish85.patch
@@ -0,0 +1,19 @@
+diff -ur iwidgets4.0.1/demos/catalog iwidgets4.0.1-wish85/demos/catalog
+--- iwidgets4.0.1/demos/catalog	2001-09-06 22:10:18.000000000 +0700
++++ iwidgets4.0.1-wish85/demos/catalog	2012-08-28 15:59:13.803922818 +0700
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/usr/bin/env tclsh
+ # ----------------------------------------------------------------------
+ #  PROGRAM: demo program for [incr Widgets]
+ # ----------------------------------------------------------------------
+@@ -9,8 +9,7 @@
+ # ======================================================================
+ #  Copyright (c) 1993-1998  Lucent Technologies, Inc.
+ # ======================================================================
+-#\
+-exec wish8.4 "$0"
++#
+ 
+ package require Iwidgets 4.0
+ 

diff --git a/iwidgets-calls.patch b/iwidgets-calls.patch
deleted file mode 100644
index 89b0ff3..0000000
--- a/iwidgets-calls.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff -up iwidgets-4.1.1/iwidgets.tcl.in.calls iwidgets-4.1.1/iwidgets.tcl.in
---- iwidgets-4.1.1/iwidgets.tcl.in.calls	2019-09-18 21:38:55.771508906 -0600
-+++ iwidgets-4.1.1/iwidgets.tcl.in	2019-09-18 21:40:05.866959302 -0600
-@@ -15,12 +15,12 @@
- 
- package require Tcl 8.0
- package require Tk 8.0
--package require Itcl @itcl_VERSION@
-+package require itcl @itcl_VERSION@
- if {[string length [package provide Itk]] == 0} {
-     package forget Itk
-     package forget itk
- }
--package require Itk [string index @itcl_VERSION@ 0]
-+package require itk [string index @itcl_VERSION@ 0]
- 
- namespace eval ::iwidgets {
-     namespace export *

diff --git a/iwidgets.spec b/iwidgets.spec
index b0808cd..d8d010e 100644
--- a/iwidgets.spec
+++ b/iwidgets.spec
@@ -1,28 +1,28 @@
-%{!?tcl_version: %define tcl_version %(echo 'puts $tcl_version' | tclsh)}
-%{!?tcl_sitelib: %define tcl_sitelib %{_datadir}/tcl%{tcl_version}}
+%{!?tcl_version: %global tcl_version %(echo 'puts $tcl_version' | tclsh || echo 0)}
+%{!?tcl_sitelib: %global tcl_sitelib %{_datadir}/tcl%{tcl_version}}
+%global abi_version  %(echo %{tcl_version} | sed 's/^\([^.]*\.[^.]*\).*/\1/')
 
 Name:           iwidgets
 Version:        4.1.1
-Release:        16%{?dist}
+Release:        17%{?dist}
 Summary:        A set of useful widgets based on itcl and itk
 
 License:        MIT
 URL:            http://incrtcl.sourceforge.net/
 Source0:        http://downloads.sourceforge.net/sourceforge/incrtcl/iwidgets-%{version}.tar.gz
-Patch0:         iwidgets-calls.patch
-Patch1:         iwidgets4.0.1-wish85.diff
+Patch0:         iwidgets-4.1.1-tcl9.patch
+Patch1:         iwidgets-4.1.1-calls.patch
+Patch2:         iwidgets-4.1.1-wish85.patch
 
 BuildArch:      noarch
-Requires:       tcl(abi) = 8.6 itk
-BuildRequires:  tcl itcl-devel
+Requires:       tcl(abi) = %{abi_version} itk
+BuildRequires:  tcl
 
 %description
 A set of useful widgets based on itcl and itk.
 
 %prep
-%setup -q
-%patch -P0 -p1 -b .calls
-%patch -P1 -p1 -b .wish85
+%autosetup -p 1
 
 %build
 # The configure script and Makefile for this package is horribly broken.
@@ -64,6 +64,9 @@ rm %{buildroot}/%{_mandir}/mann/panedwindow.n
 # This file conflicts with the one from tklib
 rm %{buildroot}/%{_mandir}/mann/datefield.n
 
+%check
+# No tests.
+
 %files
 %{tcl_sitelib}/iwidgets%{version}
 %{_mandir}/mann/*
@@ -71,6 +74,9 @@ rm %{buildroot}/%{_mandir}/mann/datefield.n
 %doc README doc/iwidgets.ps
 
 %changelog
+* Wed Jul  1 2026 Patrick Monnerat <patrick@monnerat.net> 4.1.1-17
+- Patch "tcl9" for Tcl version 9 compatibility.
+
 * Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.1-16
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
 

diff --git a/iwidgets4.0.1-wish85.diff b/iwidgets4.0.1-wish85.diff
deleted file mode 100644
index 808dfb5..0000000
--- a/iwidgets4.0.1-wish85.diff
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -ur iwidgets4.0.1/demos/catalog iwidgets4.0.1-wish85/demos/catalog
---- iwidgets4.0.1/demos/catalog	2001-09-06 22:10:18.000000000 +0700
-+++ iwidgets4.0.1-wish85/demos/catalog	2012-08-28 15:59:13.803922818 +0700
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/usr/bin/env tclsh
- # ----------------------------------------------------------------------
- #  PROGRAM: demo program for [incr Widgets]
- # ----------------------------------------------------------------------
-@@ -9,8 +9,7 @@
- # ======================================================================
- #  Copyright (c) 1993-1998  Lucent Technologies, Inc.
- # ======================================================================
--#\
--exec wish8.4 "$0"
-+#
- 
- package require Iwidgets 4.0
- 

                 reply	other threads:[~2026-07-01  7:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178289210414.1.28272443330856778.rpms-iwidgets-a1a30cd41698@fedoraproject.org \
    --to=patrick@monnerat.net \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox