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