]> git.pld-linux.org Git - packages/libreoffice.git/blobdiff - openoffice-pld-package-lang.patch
- up
[packages/libreoffice.git] / openoffice-pld-package-lang.patch
index d4caf033eb64f00d806543e14fb8e5782286c3c7..092df56e1ed2cc51ac4de8689bbba80677ade2a9 100644 (file)
@@ -1,14 +1,21 @@
 diff -urN ooo-build-1.1.54.org/bin/package-lang ooo-build-1.1.54/bin/package-lang
---- ooo-build-1.1.54.org/bin/package-lang      2004-04-30 02:50:20.270649456 +0200
-+++ ooo-build-1.1.54/bin/package-lang  2004-05-01 01:11:01.139778560 +0200
-@@ -117,6 +117,10 @@
+--- ooo-build-1.1.54.org/bin/package-lang      2004-04-30 02:50:20.000000000 +0200
++++ ooo-build-1.1.54/bin/package-lang  2004-05-03 15:29:28.605269720 +0200
+@@ -27,6 +27,7 @@
+ }
+ my $UnzipCommand = "/usr/bin/unzip";
++my $BuildDir = $setup_vars{'BUILDDIR'};
+ my $DestDir = $setup_vars{'OOINSTDIR'};
+ my $Xlate = $setup_vars{'TOOLSDIR'}. "/bin/openoffice-xlate-lang";
+ my @Langs = split (' ', `$Xlate -p all`);
+@@ -117,6 +118,9 @@
  
  sub BuildLang {
        my $lang = shift;
 +      my $lang_iso = `$Xlate -i $lang`;
 +      chomp ($lang_iso);
 +      $lang_iso =~ s/\r//;
-+      my $BaseDir = $setup_vars{'BUILDDIR'};
        my $SetupDir = $setup_vars{'OOBUILDDIR'} . "/instsetoo/$Target/$lang/normal";
        my $SolverDir = $setup_vars{'OOBUILDDIR'} . "/solver/$Id/$Target";
        my $SetupConf = "$SetupDir/setup.ins";
@@ -16,7 +23,7 @@ diff -urN ooo-build-1.1.54.org/bin/package-lang ooo-build-1.1.54/bin/package-lan
        die "$UnzipCommand not found, please set the full path to the unzip command\n" if
            ( ! -x "$UnzipCommand" );
  
-+      $langl_file = $BaseDir . '/lang_' . $lang_iso . '_list.txt';
++      $langl_file = $BuildDir . '/lang_' . $lang_iso . '_list.txt';
 +      open(LANGL, ">>$langl_file");
 +              
        while (my ($key, $value) = each (%{$setup->{File}})) {
@@ -31,17 +38,24 @@ diff -urN ooo-build-1.1.54.org/bin/package-lang ooo-build-1.1.54/bin/package-lan
                                
                                # Try to link file first
                                if(link($fileToCopy,$destFile)) {
-@@ -165,6 +174,9 @@
+@@ -165,6 +174,16 @@
                            else {
                                my $fileToUnzip = $SolverDir . '/pck/' . $value->{Name};
                                if( -r $fileToUnzip ) {
 +
-+                                  # also put archive files into LANGL (TODO)
++                                  open(UNZIP, "$UnzipCommand -qq -l $fileToUnzip |");
++                                  while (<UNZIP>) {
++                                      #    907346  08-19-03 20:29   th_fr_FR.dat
++                                      if ($_ =~ m/\s+\d+\s+\d+-\d+-\d+\s+\d+:\d+\s+(\S+)/m) {
++                                          print LANGL "$outpath/$1\n";
++                                      }
++                                  }
++                                  close(UNZIP);
 +                                  
                                    $action = "Unzip";
                                    system("$UnzipCommand -qq -o $fileToUnzip -d $outpath");
                                }
-@@ -176,6 +188,7 @@
+@@ -176,12 +195,15 @@
                        }
                    }
            }
@@ -49,3 +63,11 @@ diff -urN ooo-build-1.1.54.org/bin/package-lang ooo-build-1.1.54/bin/package-lan
  
        print "done";
  
+       return 0;
+ }
++system("rm -f $BuildDir/lang_*_list.txt");
++
+ for $a (@Langs) {
+       $a eq '01' && next; # English built-in
This page took 0.151963 seconds and 4 git commands to generate.