Group :: Development/Perl
RPM: perl-Locale-gettext
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: perl-Locale-gettext-1.07-alt1.1.1.patch
Download
Download
.gear/rules | 2 +
.../tags/51b87370ab71b53a35fc8226eff66154ff13fef2 | 13 +++
.gear/tags/list | 1 +
gettext.pm | 44 ++------
gettext.xs | 1 +
perl-Locale-gettext.spec | 115 +++++++++++++++++++++
6 files changed, 138 insertions(+), 38 deletions(-)
diff --git a/.gear/rules b/.gear/rules
new file mode 100644
index 0000000..e162009
--- /dev/null
+++ b/.gear/rules
@@ -0,0 +1,2 @@
+tar: @version@:. name=gettext-@version@
+diff: @version@:. .
diff --git a/.gear/tags/51b87370ab71b53a35fc8226eff66154ff13fef2 b/.gear/tags/51b87370ab71b53a35fc8226eff66154ff13fef2
new file mode 100644
index 0000000..d5d810c
--- /dev/null
+++ b/.gear/tags/51b87370ab71b53a35fc8226eff66154ff13fef2
@@ -0,0 +1,13 @@
+object dbc49011e0c88cc21c7d124547bbb135647533b1
+type commit
+tag 1.07
+tagger Igor Vlasenko <viy@altlinux.org> 1447276511 +0200
+
+1.07
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.15 (GNU/Linux)
+
+iEYEABECAAYFAlZDr+AACgkQDX9MpIRaJ2O0NgCeIsnrSgTpcHiYVYffvu4hvxe0
+WLYAn1TC+Q2ErtNIhB16DnIKIj0JohcX
+=Fqy8
+-----END PGP SIGNATURE-----
diff --git a/.gear/tags/list b/.gear/tags/list
new file mode 100644
index 0000000..df99150
--- /dev/null
+++ b/.gear/tags/list
@@ -0,0 +1 @@
+51b87370ab71b53a35fc8226eff66154ff13fef2 1.07
diff --git a/gettext.pm b/gettext.pm
index 63bfb1f..eba710b 100644
--- a/gettext.pm
+++ b/gettext.pm
@@ -35,16 +35,7 @@ use Carp;
use POSIX qw(:locale_h);
require Exporter;
-require DynaLoader;
-@ISA = qw(Exporter DynaLoader);
-
-BEGIN {
- eval {
- require Encode;
- $encode_available = 1;
- };
- import Encode if ($encode_available);
-}
+@ISA = qw(Exporter);
$VERSION = "1.07" ;
@@ -61,7 +52,8 @@ Exporter::export_tags();
@EXPORT_OK = qw(
);
-bootstrap Locale::gettext $VERSION;
+require XSLoader;
+XSLoader::load(__PACKAGE__, $VERSION);
sub AUTOLOAD {
local $! = 0;
@@ -99,18 +91,9 @@ sub domain_raw {
sub domain {
my ($class, $domain) = @_;
- unless ($encode_available) {
- croak "Encode module not available, cannot use Locale::gettext->domain";
- }
my $self = { domain => $domain, raw => 0 };
bless $self, $class;
- eval { bind_textdomain_codeset($self->{domain}, "UTF-8"); };
- if ($@ =~ /not implemented/) {
- # emulate it
- $self->{emulate} = 1;
- } elsif ($@ ne '') {
- die; # some other problem
- }
+ bind_textdomain_codeset($self->{domain}, "UTF-8");
$self;
}
@@ -208,23 +191,8 @@ sub codeset {
sub _convert {
my ($self, $str) = @_;
return $str if ($self->{raw});
- # thanks to the use of UTF-8 in bind_textdomain_codeset, the
- # result should always be valid UTF-8 when raw mode is not used.
- if ($self->{emulate}) {
- delete $self->{emulate};
- $self->{raw} = 1;
- my $null = $self->get("");
- if ($null =~ /charset=(\S+)/) {
- $self->{decode_from} = $1;
- $self->{raw} = 0;
- } #else matches the behaviour of glibc - no null entry
- # means no conversion is done
- }
- if ($self->{decode_from}) {
- return decode($self->{decode_from}, $str);
- } else {
- return decode_utf8($str);
- }
+ require Encode;
+ return Encode::decode_utf8($str);
}
sub DESTROY {
diff --git a/gettext.xs b/gettext.xs
index adf6203..97b3671 100644
--- a/gettext.xs
+++ b/gettext.xs
@@ -52,6 +52,7 @@ constant(char *name, int arg)
#endif
#if ANY_MISSING
+#error missing gettext functions
static int
not_here(char *s)
{
diff --git a/perl-Locale-gettext.spec b/perl-Locale-gettext.spec
new file mode 100644
index 0000000..b32075f
--- /dev/null
+++ b/perl-Locale-gettext.spec
@@ -0,0 +1,115 @@
+%define dist gettext
+Name: perl-Locale-gettext
+Version: 1.07
+Release: alt1.1.1
+
+Summary: Gettext routines for Perl
+License: GPL or Artistic
+Group: Development/Perl
+
+URL: %CPAN %dist
+Source: %dist-%version.tar
+Patch: perl-Locale-gettext-%version-%release.patch
+
+# Automatically added by buildreq on Tue Oct 11 2011
+BuildRequires: perl-Encode perl-devel
+
+%description
+Locale::gettext module permits access from perl to the gettext() family
+of functions for retrieving message strings from databases constructed
+to internationalize software.
+
+%prep
+%setup -n %dist-%version
+%patch -p1
+
+%build
+# non-POSIX locale required for tests
+export LC_ALL=en_US
+%perl_vendor_build LIBS=
+
+%install
+%perl_vendor_install
+
+%files
+%doc README
+%perl_vendor_autolib/Locale
+%perl_vendor_archlib/Locale
+
+%changelog
+* Fri Feb 03 2017 Igor Vlasenko <viy@altlinux.ru> 1.07-alt1.1.1
+- rebuild with new perl 5.24.1
+
+* Wed Nov 25 2015 Igor Vlasenko <viy@altlinux.ru> 1.07-alt1.1
+- rebuild with new perl 5.22.0
+
+* Wed Nov 11 2015 Igor Vlasenko <viy@altlinux.ru> 1.07-alt1
+- new version
+
+* Tue Dec 09 2014 Igor Vlasenko <viy@altlinux.ru> 1.05-alt7.1
+- rebuild with new perl 5.20.1
+
+* Thu Aug 29 2013 Vladimir Lettiev <crux@altlinux.ru> 1.05-alt7
+- built for perl 5.18
+
+* Sun Sep 02 2012 Vladimir Lettiev <crux@altlinux.ru> 1.05-alt6
+- rebuilt for perl-5.16
+
+* Tue Oct 11 2011 Alexey Tourbin <at@altlinux.ru> 1.05-alt5
+- rebuilt for perl-5.14
+
+* Sun Dec 26 2010 Dmitry V. Levin <ldv@altlinux.org> 1.05-alt4
+- Fixed conflict between Locale::Gettext and POSIX
+ (closes: #24826).
+- Resurrected changes lost in 1.05-alt3.
+
+* Sat Nov 06 2010 Vladimir Lettiev <crux@altlinux.ru> 1.05-alt3.1
+- rebuilt with perl 5.12
+
+* Sun Apr 12 2009 Alexey Tourbin <at@altlinux.ru> 1.05-alt3
+- rebuild
+
+* Thu Apr 19 2007 Alexey Tourbin <at@altlinux.ru> 1.05-alt2
+- cleanup
+
+* Thu Jun 02 2005 Alexey Tourbin <at@altlinux.ru> 1.05-alt1
+- 1.04 -> 1.05
+- removed emulation code
+- clarified dependency on Encode
+
+* Wed Feb 02 2005 Alexey Tourbin <at@altlinux.ru> 1.04-alt1
+- 1.03 -> 1.04
+- manual pages not packaged (use perldoc)
+
+* Mon Aug 09 2004 Alexey Tourbin <at@altlinux.ru> 1.03-alt1
+- 1.01 -> 1.03
+- renamed: perl-%dist -> %name
+
+* Thu Sep 11 2003 Alexey Tourbin <at@altlinux.ru> 1.01-alt3
+- buildreq applied
+
+* Fri Nov 01 2002 Sergey V Turchin <zerg@altlinux.org> 1.01-alt2
+- rebuild with new perl
+
+* Tue Aug 21 2001 Stanislav Ievlev <inger@altlinux.ru> 1.01-alt1
+- 1.01
+
+* Thu Jun 14 2001 Pixel <pixel@mandrakesoft.com> 1.0-9mdk
+- rebuild for new rpm
+
+* Fri Jun 01 2001 Stefan van der Eijk <stefan@eijk.nu> 1.0-8mdk
+- BuildRequires: gettext-devel perl-devel
+
+* Thu Mar 22 2001 Pixel <pixel@mandrakesoft.com> 1.0-7mdk
+- require perl-base instead of perl
+
+* Thu Feb 22 2001 Pixel <pixel@mandrakesoft.com> 1.0-6mdk
+- a lot of cleanup
+
+* Wed Feb 14 2001 Pablo Saratxaga <pablo@mandrakesoft.com> 1.0-5mdk
+- adapted to mdk
+- cleaned and fixed the spec file
+
+* Wed Aug 11 1999 Motonobu Ichimura <g95j0116@mn.waseda.ac.jp>
+- use BuildRoot and some changes added
+- fixed .packlist