perl-Tk-vl.spec 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. # if you wanna test, add " --define '_run_test 1' " option to rpmbuild command
  2. %define run_test %{?_run_test:1}%{!?_run_test:0}
  3. %define pkgname Tk
  4. Summary: A perl module for Tk.
  5. Name: perl-%{pkgname}
  6. Version: 804.036
  7. Release: 2%{_dist_release}
  8. Group: programming
  9. Vendor: Project Vine
  10. Distribution: Vine Linux
  11. License: GPL or Artistic
  12. URL: http://perltk.org/
  13. Source0: https://cpan.metacpan.org/authors/id/S/SR/SREZIC/%{pkgname}-%{version}.tar.gz
  14. Patch0: perl-Tk-widget.patch
  15. # modified version of http://ftp.de.debian.org/debian/pool/main/p/perl-tk/perl-tk_804.027-8.diff.gz
  16. Patch1: perl-Tk-debian.patch.gz
  17. # fix segfaults as in #235666 because of broken cashing code
  18. Patch2: perl-Tk-seg.patch
  19. Patch3: perl-Tk-c99.patch
  20. # Fix STRLEN vs int pointer confusion in Tcl_GetByteArrayFromObj()
  21. # It breaks tests with Perl 5.38 on s390* (BZ#2222638)
  22. Patch4: perl-Tk-Fix-STRLEN-vs-int-pointer-confusion-in-Tcl_GetByteAr.patch
  23. # Fix build with clang 16
  24. # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271521
  25. Patch5: perl-Tk-Fix-build-with-clang-16.patch
  26. # Avoid using incompatible pointer type in pregcomp2.c
  27. Patch6: perl-Tk-pregcomp2.c-Avoid-using-incompatible-pointer-type.patch
  28. # Avoid using incompatible pointer type for `old_warn`
  29. # https://github.com/eserte/perl-tk/issues/98
  30. Patch7: perl-Tk-Avoid-using-incompatible-pointer-type-for-old_warn.patch
  31. # Avoid using incompatible pointer type in function 'GetTextIndex'
  32. # https://github.com/eserte/perl-tk/issues/103
  33. Patch8: perl-Tk-Fix-incompatible-pointer-type-in-function-GetTextIndex.patch
  34. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  35. BuildRequires: libX11-devel
  36. BuildRequires: libpng-devel
  37. BuildRequires: libjpeg-turbo-devel
  38. BuildRequires: libxcrypt-devel
  39. BuildRequires: libnsl2-devel
  40. Requires: perl(:MODULE_COMPAT_%perl_abi_version)
  41. Provides: perl(Tk::LabRadio) = 4.004
  42. Provides: perl(Tk::TextReindex) = 4.004
  43. Provides: perl(Tk) = %{version}
  44. %{?perl_default_filter}
  45. # Explicity filter "useless" unversioned provides. For some reason, rpm is
  46. # detecting these both with and without version.
  47. %global __provides_exclude %{?__provides_exclude:%__provides_exclude|}perl\\(Tk\\)
  48. %global __provides_exclude %__provides_exclude|perl\\(Tk::Clipboard\\)$
  49. %global __provides_exclude %__provides_exclude|perl\\(Tk::Frame\\)$
  50. %global __provides_exclude %__provides_exclude|perl\\(Tk::Listbox\\)$
  51. %global __provides_exclude %__provides_exclude|perl\\(Tk::Scale\\)$
  52. %global __provides_exclude %__provides_exclude|perl\\(Tk::Scrollbar\\)$
  53. %global __provides_exclude %__provides_exclude|perl\\(Tk::Table\\)$
  54. %global __provides_exclude %__provides_exclude|perl\\(Tk::Toplevel\\)$
  55. %global __provides_exclude %__provides_exclude|perl\\(Tk::Widget\\)$
  56. %global __provides_exclude %__provides_exclude|perl\\(Tk::Wm\\)$
  57. %description
  58. Perl bindings to the Tk Graphical User Interface ToolKit.
  59. %debug_package
  60. %prep
  61. %setup -q -n %{pkgname}-%{version}
  62. find . -type f -exec perl -MConfig -pi -e \
  63. 's,^(#!)(/usr/local)?/bin/perl\b,$Config{startperl}, if ($. == 1)' {} \;
  64. chmod -x pod/Popup.pod Tixish/lib/Tk/balArrow.xbm
  65. # fix for widget as docs
  66. %patch -P 0
  67. perl -pi -e \
  68. 's,\@demopath\@,%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}/demos,g' demos/widget
  69. # debian patch
  70. #%%patch -P 1 -p1
  71. # patch to fix #235666 ... seems like caching code is broken
  72. %patch -P 2 -p1 -b .seg
  73. %patch -P 3 -p1 -b .c99
  74. %patch -P 4 -p1
  75. %patch -P 5 -p1
  76. %patch -P 6 -p1
  77. %patch -P 7 -p1
  78. %patch -P 8 -p1
  79. %build
  80. %{__perl} Makefile.PL INSTALLDIRS=vendor X11LIB=%{_libdir} XFT=1 NO_PACKLIST=1 NO_PERLLOCAL=1
  81. find . -name Makefile | xargs perl -pi -e 's/$/ -std=gnu99/ if /^CCFLAGS/;s/^\tLD_RUN_PATH=[^\s]+\s*/\t/'
  82. %make_build
  83. %install
  84. %make_install
  85. find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete
  86. find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null \;
  87. chmod -R u+rwX,go+rX,go-w $RPM_BUILD_ROOT/*
  88. %if %{run_test}
  89. %check
  90. xvfb-run -a make test
  91. %endif
  92. %files
  93. %license COPYING pTk/*license*
  94. %doc Changes README README.linux ToDo
  95. %doc blib/man1/widget.1
  96. %{_bindir}/p*
  97. %{_bindir}/tkjpeg
  98. %{perl_vendorarch}/auto/Tk
  99. %{perl_vendorarch}/T*
  100. %{_mandir}/man*/*
  101. %exclude %{_bindir}/gedi
  102. %exclude %{_bindir}/widget
  103. %exclude %{_mandir}/man1/widget.1*
  104. %exclude %{perl_vendorarch}/Tk/demos
  105. %changelog
  106. * Sat Jun 14 2025 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 804.036-2
  107. - rebuilt with perl-5.40.
  108. * Thu Nov 18 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 804.036-1
  109. - new upstream release.
  110. - built with perl-5.34.0.
  111. - dropped Patch4.
  112. * Fri May 17 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 804.034-1
  113. - new upstream release.
  114. - rebuilt with perl-5.26.
  115. - added BR:libxcrypt-devel,libnsl2-devel.
  116. * Wed Apr 15 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 804.033-1
  117. - new upstream release
  118. * Thu Jul 3 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 804.032-1
  119. - new upstream release.
  120. - replaced patches.
  121. * Sun May 22 2011 Shu KONNO <owa@bg.wakwak.com> 804.028-5
  122. - added BR: libjpeg-turbo-devel
  123. * Sun May 22 2011 Shu KONNO <owa@bg.wakwak.com> 804.028-4
  124. - added Patch200: perl-Tk-804.028.Xlib.patch
  125. - added Patch201: perl-Tk-804.028.pTkCallback.patch
  126. - added Patch202: perl-Tk-804.028.encGlue.patch
  127. - added Patch203: perl-Tk-804.028.tkGlue.patch
  128. - added _run_test option
  129. * Sat Jan 9 2010 IWAI, Masaharu <iwai@alib.jp> 804.028-3
  130. - add BuildRequires: libX11-devel libpng-devel : <BTS:VineLinux:866>
  131. - drop X11LIBS argument for Makefile.PL on x86_64 architecture
  132. - add documents
  133. * Mon Jan 4 2010 IWAI, Masaharu <iwai@alib.jp> 804.028-2
  134. - add patch11 for fix CPAN bug #38746: <BTS:VineLinux:866>
  135. - see http://rt.cpan.org/Public/Bug/Display.html?id=38746
  136. * Sun Aug 24 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 804.028-1
  137. - new upstream release
  138. - build with perl-8.10.0
  139. * Fri Mar 28 2008 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 804.027-3
  140. - add patch100 for fix CVE-2006-4484
  141. - with new versioning policy
  142. - add Vendor/Distribution tag
  143. * Mon Dec 31 2007 Shu KONNO <owa@bg.wakwak.com> 804.027-0vl2
  144. - added X11LIB to build (for x86_64)
  145. * Sun Oct 22 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 804.027-0vl1
  146. - updated to 804.027
  147. - build with perl-5.8.6
  148. - no noarch now (arch-dependent files/binaries are actually included)
  149. * Sun Oct 03 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 804.026-0vl1
  150. - initial build for Vine Linux