]> git.pld-linux.org Git - packages/libreoffice.git/blob - openoffice-pld-package-lang.patch
- DON'T hardcode java paths!
[packages/libreoffice.git] / openoffice-pld-package-lang.patch
1 diff -urN ooo-build-1.1.54.org/bin/package-lang ooo-build-1.1.54/bin/package-lang
2 --- ooo-build-1.1.54.org/bin/package-lang       2004-04-30 02:50:20.000000000 +0200
3 +++ ooo-build-1.1.54/bin/package-lang   2004-05-03 15:29:28.605269720 +0200
4 @@ -27,6 +27,7 @@
5  }
6  
7  my $UnzipCommand = "/usr/bin/unzip";
8 +my $BuildDir = $setup_vars{'BUILDDIR'};
9  my $DestDir = $setup_vars{'OOINSTDIR'};
10  my $Xlate = $setup_vars{'TOOLSDIR'}. "/bin/openoffice-xlate-lang";
11  my @Langs = split (' ', `$Xlate -p all`);
12 @@ -117,6 +118,9 @@
13  
14  sub BuildLang {
15         my $lang = shift;
16 +       my $lang_iso = `$Xlate -i $lang`;
17 +       chomp ($lang_iso);
18 +       $lang_iso =~ s/\r//;
19         my $SetupDir = $setup_vars{'OOBUILDDIR'} . "/instsetoo/$Target/$lang/normal";
20         my $SolverDir = $setup_vars{'OOBUILDDIR'} . "/solver/$Id/$Target";
21         my $SetupConf = "$SetupDir/setup.ins";
22 @@ -135,6 +139,9 @@
23         die "$UnzipCommand not found, please set the full path to the unzip command\n" if
24             ( ! -x "$UnzipCommand" );
25  
26 +       $langl_file = $BuildDir . '/lang_' . $lang_iso . '_list.txt';
27 +       open(LANGL, ">>$langl_file");
28 +               
29         while (my ($key, $value) = each (%{$setup->{File}})) {
30                 if ($value->{PackedName}) {
31                         # Find language-specific candidates
32 @@ -152,6 +159,8 @@
33                                 if( -f $destFile ) {
34                                     unlink $destFile or die "Can't delete $destFile";
35                                 }
36 +
37 +                               print LANGL "$destFile\n";
38                                 
39                                 # Try to link file first
40                                 if(link($fileToCopy,$destFile)) {
41 @@ -165,6 +174,16 @@
42                             else {
43                                 my $fileToUnzip = $SolverDir . '/pck/' . $value->{Name};
44                                 if( -r $fileToUnzip ) {
45 +
46 +                                   open(UNZIP, "$UnzipCommand -qq -l $fileToUnzip |");
47 +                                   while (<UNZIP>) {
48 +                                       #    907346  08-19-03 20:29   th_fr_FR.dat
49 +                                       if ($_ =~ m/\s+\d+\s+\d+-\d+-\d+\s+\d+:\d+\s+(\S+)/m) {
50 +                                           print LANGL "$outpath/$1\n";
51 +                                       }
52 +                                   }
53 +                                   close(UNZIP);
54 +                                   
55                                     $action = "Unzip";
56                                     system("$UnzipCommand -qq -o $fileToUnzip -d $outpath");
57                                 }
58 @@ -176,12 +195,15 @@
59                         }
60                     }
61             }
62 +           close(LANGL);
63  
64         print "done";
65  
66         return 0;
67  }
68  
69 +system("rm -f $BuildDir/lang_*_list.txt");
70 +
71  for $a (@Langs) {
72         $a eq '01' && next; # English built-in
73  
This page took 0.046863 seconds and 3 git commands to generate.