apply patch from MozBug for fixing encoding of utf-8 files 816809, cpan#76843

This commit is contained in:
Marcela Mašláňová 2012-04-27 13:32:44 +02:00
parent 96f0d3f675
commit 56d74b890c
2 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,19 @@
diff -up File-DesktopEntry-0.04/lib/File/DesktopEntry.pm.old File-DesktopEntry-0.04/lib/File/DesktopEntry.pm
--- File-DesktopEntry-0.04/lib/File/DesktopEntry.pm.old 2007-11-04 21:34:20.000000000 +0100
+++ File-DesktopEntry-0.04/lib/File/DesktopEntry.pm 2012-04-27 13:28:58.403493320 +0200
@@ -3,6 +3,7 @@ package File::DesktopEntry;
use strict;
use vars qw/$AUTOLOAD/;
use Carp;
+use Encode;
use File::Spec;
use File::BaseDir 0.03 qw/data_files data_home/;
@@ -333,6 +334,7 @@ sub parse_Exec {
push @exec, '--icon', $icon if defined($icon);
}
else { # expand with word ( e.g. --input=%f )
+ $_ = encode_utf8($_);
my $bad;
s/\%(.)/
($1 eq '%') ? '%' :

View File

@ -1,12 +1,14 @@
Name: perl-File-DesktopEntry
Version: 0.04
Release: 15%{?dist}
Release: 16%{?dist}
Summary: Object to handle .desktop files
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/File-DesktopEntry/
Source0: http://www.cpan.org/authors/id/P/PA/PARDUS/File-DesktopEntry/File-DesktopEntry-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
#http://rt.cpan.org/Public/Bug/Display.html?id=76843
Patch0: File-DesktopEntry-encode.patch
BuildArch: noarch
BuildRequires: perl(ExtUtils::MakeMaker) perl(Module::Build)
BuildRequires: perl(Test::More) perl(Test::Pod) perl(Test::Pod::Coverage)
@ -21,6 +23,7 @@ module version 0.9.4 of the specification was used.
%prep
%setup -q -n File-DesktopEntry-%{version}
%patch0 -p1
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
@ -49,6 +52,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man3/*
%changelog
* Fri Apr 27 2012 Marcela Mašláňová <mmaslano@redhat.com> - 0.04-15
- apply patch from MozBug for fixing encoding of utf-8 files 816809, cpan#76843
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.04-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild