123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- # if you wanna test, add " --define '_run_test 1' " option to rpmbuild command
- %define run_test %{?_run_test:1}%{!?_run_test:0}
- %define pkgname Tk
- Summary: A perl module for Tk.
- Name: perl-%{pkgname}
- Version: 804.036
- Release: 2%{_dist_release}
- Group: programming
- Vendor: Project Vine
- Distribution: Vine Linux
- License: GPL or Artistic
- URL: http://perltk.org/
- Source0: https://cpan.metacpan.org/authors/id/S/SR/SREZIC/%{pkgname}-%{version}.tar.gz
- Patch0: perl-Tk-widget.patch
- # modified version of http://ftp.de.debian.org/debian/pool/main/p/perl-tk/perl-tk_804.027-8.diff.gz
- 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
- BuildRoot: %{_tmppath}/%{name}-%{version}-root
- BuildRequires: libX11-devel
- BuildRequires: libpng-devel
- BuildRequires: libjpeg-turbo-devel
- BuildRequires: libxcrypt-devel
- BuildRequires: libnsl2-devel
- Requires: perl(:MODULE_COMPAT_%perl_abi_version)
- Provides: perl(Tk::LabRadio) = 4.004
- Provides: perl(Tk::TextReindex) = 4.004
- Provides: perl(Tk) = %{version}
- %{?perl_default_filter}
- # Explicity filter "useless" unversioned provides. For some reason, rpm is
- # detecting these both with and without version.
- %global __provides_exclude %{?__provides_exclude:%__provides_exclude|}perl\\(Tk\\)
- %global __provides_exclude %__provides_exclude|perl\\(Tk::Clipboard\\)$
- %global __provides_exclude %__provides_exclude|perl\\(Tk::Frame\\)$
- %global __provides_exclude %__provides_exclude|perl\\(Tk::Listbox\\)$
- %global __provides_exclude %__provides_exclude|perl\\(Tk::Scale\\)$
- %global __provides_exclude %__provides_exclude|perl\\(Tk::Scrollbar\\)$
- %global __provides_exclude %__provides_exclude|perl\\(Tk::Table\\)$
- %global __provides_exclude %__provides_exclude|perl\\(Tk::Toplevel\\)$
- %global __provides_exclude %__provides_exclude|perl\\(Tk::Widget\\)$
- %global __provides_exclude %__provides_exclude|perl\\(Tk::Wm\\)$
- %description
- Perl bindings to the Tk Graphical User Interface ToolKit.
- %debug_package
- %prep
- %setup -q -n %{pkgname}-%{version}
- find . -type f -exec perl -MConfig -pi -e \
- 's,^(#!)(/usr/local)?/bin/perl\b,$Config{startperl}, if ($. == 1)' {} \;
- chmod -x pod/Popup.pod Tixish/lib/Tk/balArrow.xbm
- # fix for widget as docs
- %patch -P 0
- perl -pi -e \
- 's,\@demopath\@,%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}/demos,g' demos/widget
- # debian patch
- #%%patch -P 1 -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
- %build
- %{__perl} Makefile.PL INSTALLDIRS=vendor X11LIB=%{_libdir} XFT=1 NO_PACKLIST=1 NO_PERLLOCAL=1
- find . -name Makefile | xargs perl -pi -e 's/$/ -std=gnu99/ if /^CCFLAGS/;s/^\tLD_RUN_PATH=[^\s]+\s*/\t/'
- %make_build
- %install
- %make_install
- 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 $RPM_BUILD_ROOT/*
- %if %{run_test}
- %check
- xvfb-run -a make test
- %endif
- %files
- %license COPYING pTk/*license*
- %doc Changes README README.linux ToDo
- %doc blib/man1/widget.1
- %{_bindir}/p*
- %{_bindir}/tkjpeg
- %{perl_vendorarch}/auto/Tk
- %{perl_vendorarch}/T*
- %{_mandir}/man*/*
- %exclude %{_bindir}/gedi
- %exclude %{_bindir}/widget
- %exclude %{_mandir}/man1/widget.1*
- %exclude %{perl_vendorarch}/Tk/demos
- %changelog
- * Sat Jun 14 2025 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 804.036-2
- - rebuilt with perl-5.40.
- * Thu Nov 18 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 804.036-1
- - new upstream release.
- - built with perl-5.34.0.
- - dropped Patch4.
- * Fri May 17 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 804.034-1
- - new upstream release.
- - rebuilt with perl-5.26.
- - added BR:libxcrypt-devel,libnsl2-devel.
- * Wed Apr 15 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 804.033-1
- - new upstream release
- * Thu Jul 3 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 804.032-1
- - new upstream release.
- - replaced patches.
- * Sun May 22 2011 Shu KONNO <owa@bg.wakwak.com> 804.028-5
- - added BR: libjpeg-turbo-devel
- * Sun May 22 2011 Shu KONNO <owa@bg.wakwak.com> 804.028-4
- - added Patch200: perl-Tk-804.028.Xlib.patch
- - added Patch201: perl-Tk-804.028.pTkCallback.patch
- - added Patch202: perl-Tk-804.028.encGlue.patch
- - added Patch203: perl-Tk-804.028.tkGlue.patch
- - added _run_test option
- * Sat Jan 9 2010 IWAI, Masaharu <iwai@alib.jp> 804.028-3
- - add BuildRequires: libX11-devel libpng-devel : <BTS:VineLinux:866>
- - drop X11LIBS argument for Makefile.PL on x86_64 architecture
- - add documents
- * Mon Jan 4 2010 IWAI, Masaharu <iwai@alib.jp> 804.028-2
- - add patch11 for fix CPAN bug #38746: <BTS:VineLinux:866>
- - see http://rt.cpan.org/Public/Bug/Display.html?id=38746
- * Sun Aug 24 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 804.028-1
- - new upstream release
- - build with perl-8.10.0
- * Fri Mar 28 2008 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 804.027-3
- - add patch100 for fix CVE-2006-4484
- - with new versioning policy
- - add Vendor/Distribution tag
- * Mon Dec 31 2007 Shu KONNO <owa@bg.wakwak.com> 804.027-0vl2
- - added X11LIB to build (for x86_64)
- * Sun Oct 22 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 804.027-0vl1
- - updated to 804.027
- - build with perl-5.8.6
- - no noarch now (arch-dependent files/binaries are actually included)
- * Sun Oct 03 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 804.026-0vl1
- - initial build for Vine Linux
|