perl-Thread-Tie-vl.spec 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. %define real_name Thread-Tie
  2. Summary: Tie variables into a thread of their own
  3. Name: perl-Thread-Tie
  4. Version: 0.13
  5. Release: 2%{?_dist_release}
  6. License: Artistic or GPL+
  7. Group: Development/Libraries
  8. URL: http://search.cpan.org/dist/Thread-Tie/
  9. Source: http://search.cpan.org/CPAN/authors/id/E/EL/ELIZABETH/Thread-Tie-%{version}.tar.gz
  10. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  11. BuildArch: noarch
  12. BuildRequires: perl(ExtUtils::MakeMaker)
  13. BuildRequires: perl(Thread::Serialize) >= 0.07
  14. BuildRequires: perl(load) >= 0.11
  15. Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
  16. Requires: perl(Thread::Serialize) >= 0.07
  17. Requires: perl(load) >= 0.11
  18. %description
  19. The standard shared variable scheme used by Perl, is based on tie-ing
  20. the variable to some very special dark magic. This dark magic ensures
  21. that shared variables, which are copied just as any other variable
  22. when a thread is started, update values in all of the threads where
  23. they exist as soon as the value of a shared variable is changed.
  24. Needless to say, this could use some improvement.
  25. The Thread::Tie module is a proof-of-concept implementation of another
  26. approach to shared variables. Instead of having shared variables exist
  27. in all the threads from which they are accessible, shared variable
  28. exist as "normal", unshared variables in a seperate thread. Only a
  29. tied object exists in each thread from which the shared variable is
  30. accesible.
  31. Through the use of a client-server model, any thread can fetch and/or
  32. update variables living in that thread. This client-server
  33. functionality is hidden under the hood of tie().
  34. This module only functions on Perl versions 5.8.0 and later.
  35. And then only when threads are enabled with -Dusethreads. It
  36. is of no use with any version of Perl before 5.8.0 or without
  37. threads enabled.
  38. %prep
  39. %setup -q -n %{real_name}-%{version}
  40. %build
  41. %{expand: %%define optflags %{optflags} -fPIC}
  42. perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
  43. make %{?_smp_mflags}
  44. %install
  45. rm -rf %{buildroot}
  46. make pure_install DESTDIR=%{buildroot}
  47. find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
  48. find %{buildroot} -depth -type d -exec rmdir {} ';' 2>/dev/null
  49. %{_fixperms} %{buildroot}
  50. %check
  51. make test
  52. %clean
  53. rm -rf %{buildroot}
  54. %files
  55. %defattr(-, root, root, 0755)
  56. %doc MANIFEST README CHANGELOG TODO
  57. %{perl_vendorlib}/*
  58. %{_mandir}/man3/*
  59. %changelog
  60. * Sat Oct 11 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 0.13-2
  61. - rebuild with perl 5.16.3
  62. - moved to Development/Libraries Group
  63. * Sat Mar 10 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.13-1
  64. - initial build for Vine Linux