perl-Tk-vl.spec 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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.032
  7. Release: 1%{_dist_release}
  8. Group: Development/Libraries
  9. License: GPL or Artistic
  10. URL: http://perltk.org/
  11. Source0: %{pkgname}-%{version}.tar.gz
  12. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  13. BuildRequires: libX11-devel
  14. BuildRequires: libpng-devel
  15. BuildRequires: libjpeg-turbo-devel
  16. Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
  17. Patch0: perl-Tk-widget.patch
  18. # modified version of http://ftp.de.debian.org/debian/pool/main/p/perl-tk/perl-tk_804.027-8.diff.gz
  19. Patch1: perl-Tk-debian.patch.gz
  20. # fix segfaults as in #235666 because of broken cashing code
  21. Patch2: perl-Tk-seg.patch
  22. # Fix freetype detection with 2.5
  23. Patch4: perl-Tk-freetype25.patch
  24. Provides: perl(Tk::LabRadio) = 4.004
  25. Provides: perl(Tk::TextReindex) = 4.004
  26. Vendor: Project Vine
  27. Distribution: Vine Linux
  28. %description
  29. Perl bindings to the Tk Graphical User Interface ToolKit.
  30. %prep
  31. %setup -q -n %{pkgname}-%{version}
  32. %{__mkdir} pTk.docs
  33. %{__cp} pTk/Tix.license pTk/license.terms pTk/license.html_lib pTk.docs
  34. # fix for widget as docs
  35. %patch0
  36. %{__perl} -pi -e \
  37. 's,\@demopath\@,%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}/demo
  38. s,g' demos/widget
  39. # debian patch
  40. %patch1 -p1
  41. # patch to fix #235666 ... seems like caching code is broken
  42. %patch2 -p1 -b .seg
  43. # freetype-2.5 detection
  44. %patch4 -p1
  45. %build
  46. find . -type f -exec %{__perl} -pi -e 's|^#!/.*bin/perl\S*|#!%{__perl}|i;' {} \;
  47. CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL PREFIX=$RPM_BUILD_ROOT%{_prefix} INSTALLDIRS=vendor
  48. #make %{?_smp_mflags}
  49. make
  50. %if %{run_test}
  51. make test
  52. #-------------------------------#
  53. # Sun May 22 2011 ..last tested #
  54. # Result: PASS
  55. #-------------------------------#
  56. %endif
  57. %install
  58. rm -rf $RPM_BUILD_ROOT
  59. make install
  60. [ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress
  61. find $RPM_BUILD_ROOT%{_prefix} -type f -print | \
  62. sed "s@^$RPM_BUILD_ROOT@@g" | \
  63. grep -v perllocal.pod | \
  64. grep -v "\.packlist" > %{pkgname}-%{version}-filelist
  65. if [ "$(cat %{pkgname}-%{version}-filelist)X" = "X" ] ; then
  66. echo "ERROR: EMPTY FILE LIST"
  67. exit -1
  68. fi
  69. %clean
  70. rm -rf $RPM_BUILD_ROOT
  71. %files -f %{pkgname}-%{version}-filelist
  72. %defattr(-,root,root)
  73. %doc README MANIFEST COPYING Change.log Changes README.linux pTk.docs
  74. %exclude %{perl_archlib}/perllocal.pod
  75. %exclude %{perl_vendorarch}/auto/Tk/.packlist
  76. %changelog
  77. * Thu Jul 3 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 804.032-1
  78. - new upstream release.
  79. - replaced patches.
  80. * Sun May 22 2011 Shu KONNO <owa@bg.wakwak.com> 804.028-5
  81. - added BR: libjpeg-turbo-devel
  82. * Sun May 22 2011 Shu KONNO <owa@bg.wakwak.com> 804.028-4
  83. - added Patch200: perl-Tk-804.028.Xlib.patch
  84. - added Patch201: perl-Tk-804.028.pTkCallback.patch
  85. - added Patch202: perl-Tk-804.028.encGlue.patch
  86. - added Patch203: perl-Tk-804.028.tkGlue.patch
  87. - added _run_test option
  88. * Sat Jan 9 2010 IWAI, Masaharu <iwai@alib.jp> 804.028-3
  89. - add BuildRequires: libX11-devel libpng-devel : <BTS:VineLinux:866>
  90. - drop X11LIBS argument for Makefile.PL on x86_64 architecture
  91. - add documents
  92. * Mon Jan 4 2010 IWAI, Masaharu <iwai@alib.jp> 804.028-2
  93. - add patch11 for fix CPAN bug #38746: <BTS:VineLinux:866>
  94. - see http://rt.cpan.org/Public/Bug/Display.html?id=38746
  95. * Sun Aug 24 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 804.028-1
  96. - new upstream release
  97. - build with perl-8.10.0
  98. * Fri Mar 28 2008 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 804.027-3
  99. - add patch100 for fix CVE-2006-4484
  100. - with new versioning policy
  101. - add Vendor/Distribution tag
  102. * Mon Dec 31 2007 Shu KONNO <owa@bg.wakwak.com> 804.027-0vl2
  103. - added X11LIB to build (for x86_64)
  104. * Sun Oct 22 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 804.027-0vl1
  105. - updated to 804.027
  106. - build with perl-5.8.6
  107. - no noarch now (arch-dependent files/binaries are actually included)
  108. * Sun Oct 03 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 804.026-0vl1
  109. - initial build for Vine Linux