Blame SOURCES/po4a-0.44-use-tempfile-correctly.patch

1d3de6
diff -ur po4a-0.44.old/lib/Locale/Po4a/Po.pm po4a-0.44/lib/Locale/Po4a/Po.pm
1d3de6
--- po4a-0.44.old/lib/Locale/Po4a/Po.pm	2012-10-21 00:03:24.000000000 +0100
1d3de6
+++ po4a-0.44/lib/Locale/Po4a/Po.pm	2013-04-17 11:26:54.749652129 +0100
1d3de6
@@ -572,7 +572,8 @@
1d3de6
 
1d3de6
     if (-e $filename) {
1d3de6
         my ($tmp_filename);
1d3de6
-        (undef,$tmp_filename)=File::Temp->tempfile($filename."XXXX",
1d3de6
+        my $basename = basename($filename);
1d3de6
+        (undef,$tmp_filename)=File::Temp::tempfile($basename."XXXX",
1d3de6
                                                    DIR    => "/tmp",
1d3de6
                                                    OPEN   => 0,
1d3de6
                                                    UNLINK => 0);
1d3de6
diff -ur po4a-0.44.old/lib/Locale/Po4a/Wml.pm po4a-0.44/lib/Locale/Po4a/Wml.pm
1d3de6
--- po4a-0.44.old/lib/Locale/Po4a/Wml.pm	2012-10-21 00:03:24.000000000 +0100
1d3de6
+++ po4a-0.44/lib/Locale/Po4a/Wml.pm	2013-04-17 11:27:43.904492845 +0100
1d3de6
@@ -81,7 +81,7 @@
1d3de6
 sub read {
1d3de6
     my ($self,$filename)=@_;
1d3de6
     my $tmp_filename;
1d3de6
-    (undef,$tmp_filename)=File::Temp->tempfile("po4aXXXX",
1d3de6
+    (undef,$tmp_filename)=File::Temp::tempfile("po4aXXXX",
1d3de6
                                                 DIR    => "/tmp",
1d3de6
                                                 SUFFIX => ".xml",
1d3de6
                                                 OPEN   => 0,
1d3de6
diff -ur po4a-0.44.old/po4a po4a-0.44/po4a
1d3de6
--- po4a-0.44.old/po4a	2012-10-21 00:03:24.000000000 +0100
1d3de6
+++ po4a-0.44/po4a	2013-04-17 11:26:05.938810267 +0100
1d3de6
@@ -1209,7 +1209,7 @@
1d3de6
     chdir $po4a_opts{"srcdir"}
1d3de6
 	if (defined $po4a_opts{"srcdir"});
1d3de6
     if ($po4a_opts{"split"}) {
1d3de6
-        (undef,$pot_filename)=File::Temp->tempfile("po4aXXXX",
1d3de6
+        (undef,$pot_filename)=File::Temp::tempfile("po4aXXXX",
1d3de6
                                                    DIR    => "/tmp",
1d3de6
                                                    SUFFIX => ".pot",
1d3de6
                                                    OPEN   => 0,
1d3de6
@@ -1239,7 +1239,7 @@
1d3de6
         # Create a temporary POT, and check if the old one needs to be
1d3de6
         # updated (unless --force was specified).
1d3de6
         unless ($po4a_opts{"force"}) {
1d3de6
-            (undef,$tmp_file)=File::Temp->tempfile("po4aXXXX",
1d3de6
+            (undef,$tmp_file)=File::Temp::tempfile("po4aXXXX",
1d3de6
                                                    DIR    => "/tmp",
1d3de6
                                                    SUFFIX => ".pot",
1d3de6
                                                    OPEN   => 0,
1d3de6
@@ -1270,7 +1270,7 @@
1d3de6
     # Generate a complete .po
1d3de6
     foreach my $lang (sort keys %po_filename) {
1d3de6
         my $tmp_bigpo;
1d3de6
-        (undef,$tmp_bigpo)=File::Temp->tempfile("po4aXXXX",
1d3de6
+        (undef,$tmp_bigpo)=File::Temp::tempfile("po4aXXXX",
1d3de6
                                                 DIR    => "/tmp",
1d3de6
                                                 SUFFIX => "-$lang.po",
1d3de6
                                                 OPEN   => 0,
1d3de6
@@ -1336,7 +1336,7 @@
1d3de6
             my $tmp_file;
1d3de6
             # Create a temporary PO, and check if the old one needs to be
1d3de6
             # updated (unless --force was specified).
1d3de6
-            (undef,$tmp_file)=File::Temp->tempfile("po4aXXXX",
1d3de6
+            (undef,$tmp_file)=File::Temp::tempfile("po4aXXXX",
1d3de6
                                                    DIR    => "/tmp",
1d3de6
                                                    SUFFIX => ".po",
1d3de6
                                                    OPEN   => 0,
1d3de6
diff -ur po4a-0.44.old/po4a-updatepo po4a-0.44/po4a-updatepo
1d3de6
--- po4a-0.44.old/po4a-updatepo	2012-10-21 00:03:24.000000000 +0100
1d3de6
+++ po4a-0.44/po4a-updatepo	2013-04-17 11:26:05.938810267 +0100
1d3de6
@@ -248,7 +248,7 @@
1d3de6
 	if $_ eq '-'  && !-e '-'} @pofiles;
1d3de6
 
1d3de6
 my ($pot_filename);
1d3de6
-(undef,$pot_filename)=File::Temp->tempfile("po4a-updatepoXXXX",
1d3de6
+(undef,$pot_filename)=File::Temp::tempfile("po4a-updatepoXXXX",
1d3de6
 					   DIR    => "/tmp",
1d3de6
 					   SUFFIX => ".pot",
1d3de6
 					   OPEN   => 0,
1d3de6
diff -ur po4a-0.44.old/scripts/msguntypot po4a-0.44/scripts/msguntypot
1d3de6
--- po4a-0.44.old/scripts/msguntypot	2012-10-21 00:03:24.000000000 +0100
1d3de6
+++ po4a-0.44/scripts/msguntypot	2013-04-17 11:26:05.939810264 +0100
1d3de6
@@ -195,7 +195,7 @@
1d3de6
 
1d3de6
 # Get all po files and report differences in them
1d3de6
 my ($pofile);
1d3de6
-(undef,$pofile)=File::Temp->tempfile("po4aXXXX",
1d3de6
+(undef,$pofile)=File::Temp::tempfile("po4aXXXX",
1d3de6
     DIR    => "/tmp",
1d3de6
     SUFFIX => ".po",
1d3de6
     OPEN   => 0,