diff --git a/.cvsignore b/.cvsignore index e69de29..f1d0038 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +Tk-804.027.tar.gz diff --git a/perl-Tk-widget.patch b/perl-Tk-widget.patch new file mode 100644 index 0000000..24eaa44 --- /dev/null +++ b/perl-Tk-widget.patch @@ -0,0 +1,23 @@ +--- demos/widget.orig 2005-06-16 22:57:11.000000000 +0200 ++++ demos/widget 2005-06-16 23:43:23.000000000 +0200 +@@ -6,7 +6,7 @@ + use 5.008; + use Config; + use Tk 804.000; +-use lib Tk->findINC( 'demos/widget_lib' ); ++use lib "@demopath@/widget_lib"; + use Tk::widgets qw/ DialogBox ErrorDialog LabEntry ROText /; + use WidgetDemo; + use subs qw/ +@@ -44,9 +44,9 @@ + $MW->title('Perl/Tk Widget Demonstration'); + $MW->iconname('widget'); + $FONT = 'Helvetica 12'; +-my $widget_lib = Tk->findINC('demos/widget_lib'); ++my $widget_lib = "@demopath@/widget_lib"; + my $wd = "$widget_lib/WidgetDemo.pm"; +-$WIDTRIB = Tk->findINC('demos/widtrib'); ++$WIDTRIB = "@demopath@/widtrib"; + unless (Tk::tainting) { + $WIDTRIB = $ENV{WIDTRIB} if defined $ENV{WIDTRIB}; + $WIDTRIB = $ARGV[0] if defined $ARGV[0]; diff --git a/perl-Tk.spec b/perl-Tk.spec new file mode 100644 index 0000000..02a3d3f --- /dev/null +++ b/perl-Tk.spec @@ -0,0 +1,107 @@ +%{!?perl_vendorarch: %define perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)} +%define perlver %(eval "`%{__perl} -V:version`"; echo $version) + +Name: perl-Tk +Version: 804.027 +Release: 5 +Summary: Perl Graphical User Interface ToolKit + +Group: Development/Libraries +License: GPL or Artistic +URL: http://search.cpan.org/dist/Tk/ +Source0: http://search.cpan.org/CPAN/authors/id/N/NI/NI-S/Tk-804.027.tar.gz +Patch0: perl-Tk-widget.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +# Versions before this have Unicode issues +BuildRequires: perl >= 3:5.8.3 +BuildRequires: xorg-x11-devel +BuildRequires: libjpeg-devel +BuildRequires: libpng-devel + +Requires: perl(:MODULE_COMPAT_%{perlver}) +Provides: perl(Tk::LabRadio) = 4.004 +Provides: perl(Tk::TextReindex) + +%description +This a re-port of a perl interface to Tk8.4. +C code is derived from Tcl/Tk8.4.5. +It also includes all the C code parts of Tix8.1.4 from SourceForge. +The perl code corresponding to Tix's Tcl code is not fully implemented. + +Perl API is essentially the same as Tk800 series Tk800.025 but has not +been verified as compliant. There ARE differences see pod/804delta.pod. + +%prep +%setup -q -n Tk-%{version} +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 +%patch0 +%{__perl} -pi -e \ +'s,\@demopath\@,%{_datadir}/doc/%{name}-%{version}/demos,g' \ +%{_builddir}/Tk-%{version}/demos/widget + +%build +%{__perl} Makefile.PL INSTALLDIRS=vendor X11LIB=/usr/X11R6/%{_lib} XFT=1 +find . -name Makefile | xargs %{__perl} -pi -e 's/^\tLD_RUN_PATH=[^\s]+\s*/\t/' +make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT + +make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT + +find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \; +find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \; +find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null \; + +chmod -R u+rwX,go+rX,go-w $RPM_BUILD_ROOT/* +mkdir __demos +cp -pR $RPM_BUILD_ROOT%{perl_vendorarch}/Tk/demos __demos +find __demos/ -type f -perm 555 -exec chmod 444 {} \; + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%doc Changes README README.linux ToDo pTk/*license* __demos/demos demos/widget +%{_bindir}/p* +%{_bindir}/tkjpeg +%{perl_vendorarch}/auto/Tk +%{perl_vendorarch}/T* +%{_mandir}/man*/* +%exclude %{_bindir}/gedi +%exclude %{_bindir}/widget +%exclude %{perl_vendorarch}/fix_4_os2.pl +%exclude %{perl_vendorarch}/Tk/demos +%exclude %{perl_vendorarch}/Tk/reindex.pl + +%changelog +* Thu Jun 16 2005 Andreas Bierfert +804.027-5 +- exclude gedi +- move widget to doc dir and patch it to work from there + +* Wed Jun 15 2005 Andreas Bierfert +804.027-4 +- more cleanups from Ville Skyttä + +* Wed Jun 15 2005 Andreas Bierfert +804.027-3 +- more cleanups + +* Tue Jun 14 2005 Andreas Bierfert +804.027-2 +- add some stuff (e.g. xft) suggested by Steven Pritchard + +* Tue Jun 14 2005 Andreas Bierfert +804.027-1 +- rebuild for fc4 + +* Fri Jun 04 2004 Andreas Bierfert +0:804.027-0.fdr.1 +- Initial Version (thanks to perl-Archive-Zip spec) diff --git a/sources b/sources index e69de29..d603442 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +d1ca4a6bff6dae4d937fabde4e86256b Tk-804.027.tar.gz