|
|
|
@ -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.036
|
|
|
|
|
Release: 17%{?dist}
|
|
|
|
|
Version: 804.035
|
|
|
|
|
Release: 7%{?dist}
|
|
|
|
|
Summary: Perl Graphical User Interface ToolKit
|
|
|
|
|
|
|
|
|
|
License: (GPL-1.0-or-later OR Artistic-1.0-Perl) AND SWL
|
|
|
|
|
License: (GPL+ or Artistic) 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,22 +16,7 @@ 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
|
|
|
|
@ -77,14 +62,8 @@ 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
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: google-noto-sans-fonts
|
|
|
|
|
BuildRequires: xorg-x11-xinit
|
|
|
|
|
BuildRequires: font(:lang=en)
|
|
|
|
|
# Specific font is needed for tests, bug #1141117, CPAN RT#98831
|
|
|
|
|
BuildRequires: liberation-sans-fonts
|
|
|
|
@ -105,6 +84,7 @@ 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}
|
|
|
|
@ -123,9 +103,6 @@ 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.
|
|
|
|
@ -143,118 +120,53 @@ 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 -MConfig -pi -e \
|
|
|
|
|
's,^(#!)(/usr/local)?/bin/perl\b,$Config{startperl}, if ($. == 1)' {} \;
|
|
|
|
|
find . -type f -exec %{__perl} -pi -e \
|
|
|
|
|
's,^(#!)(/usr/local)?/bin/perl\b,$1%{__perl}, if ($. == 1)' {} \;
|
|
|
|
|
chmod -x pod/Popup.pod Tixish/lib/Tk/balArrow.xbm
|
|
|
|
|
# fix for widget as docs
|
|
|
|
|
%patch -P 0
|
|
|
|
|
perl -pi -e \
|
|
|
|
|
%patch0
|
|
|
|
|
%{__perl} -pi -e \
|
|
|
|
|
's,\@demopath\@,%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}/demos,g' demos/widget
|
|
|
|
|
# debian patch
|
|
|
|
|
#%%patch -P 1 -p1
|
|
|
|
|
#%%patch1 -p1
|
|
|
|
|
# patch to fix #235666 ... seems like caching code is broken
|
|
|
|
|
%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
|
|
|
|
|
%patch2 -p1 -b .seg
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
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}
|
|
|
|
|
%{__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}
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%if %{use_x11_tests}
|
|
|
|
|
%if 0%{?use_xwayland_run}
|
|
|
|
|
xwfb-run -c mutter -- make test
|
|
|
|
|
%else
|
|
|
|
|
xvfb-run -d make test
|
|
|
|
|
%endif
|
|
|
|
|
xvfb-run -a make test
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%{make_install}
|
|
|
|
|
make pure_install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
|
|
find %{buildroot} -type f -name '*.bs' -size 0 -delete
|
|
|
|
|
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 \;
|
|
|
|
|
|
|
|
|
|
chmod -R u+rwX,go+rX,go-w %{buildroot}/*
|
|
|
|
|
chmod -R u+rwX,go+rX,go-w $RPM_BUILD_ROOT/*
|
|
|
|
|
mkdir __demos
|
|
|
|
|
cp -pR %{buildroot}%{perl_vendorarch}/Tk/demos __demos
|
|
|
|
|
cp -pR $RPM_BUILD_ROOT%{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}/Tie*
|
|
|
|
|
%{perl_vendorarch}/Tk*
|
|
|
|
|
%{perl_vendorarch}/T*
|
|
|
|
|
%exclude %{perl_vendorarch}/Tk/MMutil.pm
|
|
|
|
|
%exclude %{perl_vendorarch}/Tk/install.pm
|
|
|
|
|
%exclude %{perl_vendorarch}/Tk/MakeDepend.pm
|
|
|
|
|
%{_mandir}/man1/ptked*
|
|
|
|
|
%{_mandir}/man1/ptksh*
|
|
|
|
|
%{_mandir}/man1/tkjpeg*
|
|
|
|
|
%{_mandir}/man3/Tie*
|
|
|
|
|
%{_mandir}/man3/Tk*
|
|
|
|
|
%{_mandir}/man*/*
|
|
|
|
|
%exclude %{_mandir}/man1/widget.1*
|
|
|
|
|
%exclude %{_bindir}/gedi
|
|
|
|
|
%exclude %{_bindir}/widget
|
|
|
|
@ -266,65 +178,14 @@ chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
|
|
|
|
%{perl_vendorarch}/Tk/install.pm
|
|
|
|
|
%{perl_vendorarch}/Tk/MakeDepend.pm
|
|
|
|
|
|
|
|
|
|
%files tests
|
|
|
|
|
%{_libexecdir}/%{name}
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* 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
|
|
|
|
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 804.035-7
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
|
|
|
|
|
* Wed Feb 17 2021 Xavier Bachelot <xavier@bachelot.org> - 804.036-1
|
|
|
|
|
- Update to 0.36 (RHBZ#1928507)
|
|
|
|
|
* 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 Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 804.035-5
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|