]> git.pld-linux.org Git - packages/libreoffice.git/blame - openoffice-pld-package-lang.patch
- up
[packages/libreoffice.git] / openoffice-pld-package-lang.patch
CommitLineData
69874f6f 1diff -urN ooo-build-1.1.54.org/bin/package-lang ooo-build-1.1.54/bin/package-lang
544f95d7
AM
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
965b21c2
AM
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 @@
69874f6f
AM
13
14 sub BuildLang {
15 my $lang = shift;
16+ my $lang_iso = `$Xlate -i $lang`;
eb432ff3
AM
17+ chomp ($lang_iso);
18+ $lang_iso =~ s/\r//;
69874f6f
AM
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";
eb432ff3 22@@ -135,6 +139,9 @@
69874f6f
AM
23 die "$UnzipCommand not found, please set the full path to the unzip command\n" if
24 ( ! -x "$UnzipCommand" );
25
965b21c2 26+ $langl_file = $BuildDir . '/lang_' . $lang_iso . '_list.txt';
69874f6f
AM
27+ open(LANGL, ">>$langl_file");
28+
29 while (my ($key, $value) = each (%{$setup->{File}})) {
30 if ($value->{PackedName}) {
31 # Find language-specific candidates
eb432ff3 32@@ -152,6 +159,8 @@
69874f6f
AM
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)) {
544f95d7 41@@ -165,6 +174,16 @@
69874f6f
AM
42 else {
43 my $fileToUnzip = $SolverDir . '/pck/' . $value->{Name};
44 if( -r $fileToUnzip ) {
45+
544f95d7
AM
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);
69874f6f
AM
54+
55 $action = "Unzip";
56 system("$UnzipCommand -qq -o $fileToUnzip -d $outpath");
57 }
544f95d7 58@@ -176,12 +195,15 @@
69874f6f
AM
59 }
60 }
61 }
62+ close(LANGL);
63
64 print "done";
65
8b876a4f
AM
66 return 0;
67 }
965b21c2 68
8b876a4f
AM
69+system("rm -f $BuildDir/lang_*_list.txt");
70+
71 for $a (@Langs) {
72 $a eq '01' && next; # English built-in
965b21c2 73
This page took 0.142512 seconds and 4 git commands to generate.