~ubuntu-branches/ubuntu/oneiric/enigmail/oneiric-updates

« back to all changes in this revision

Viewing changes to config/outofdate.pl

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack
  • Date: 2010-04-10 01:42:24 UTC
  • Revision ID: james.westby@ubuntu.com-20100410014224-fbq9ui5x3b0h2t36
Tags: 2:1.0.1-0ubuntu1
* First releaase of enigmail 1.0.1 for tbird/icedove 3
  (LP: #527138)
* redo packaging from scratch 
  + add debian/make-orig target that uses xulrunner provided
    buildsystem + enigmail tarball to produce a proper orig.tar.gz
  + use debhelper 7 with mozilla-devscripts
  + use debian source format 3.0 (quilt)
  + patch enigmail to use frozen API only
    - add debian/patches/frozen_api.diff
  + patch build system to not link against -lxul - which isnt
    available for sdks produced by all-static apps like tbird
    - add debian/patches/build_system_dont_link_libxul.diff
  + add minimal build-depends to control

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!perl
 
2
#
 
3
# ***** BEGIN LICENSE BLOCK *****
 
4
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
5
#
 
6
# The contents of this file are subject to the Mozilla Public License Version
 
7
# 1.1 (the "License"); you may not use this file except in compliance with
 
8
# the License. You may obtain a copy of the License at
 
9
# http://www.mozilla.org/MPL/
 
10
#
 
11
# Software distributed under the License is distributed on an "AS IS" basis,
 
12
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 
13
# for the specific language governing rights and limitations under the
 
14
# License.
 
15
#
 
16
# The Original Code is mozilla.org code.
 
17
#
 
18
# The Initial Developer of the Original Code is
 
19
# Netscape Communications Corporation.
 
20
# Portions created by the Initial Developer are Copyright (C) 1998
 
21
# the Initial Developer. All Rights Reserved.
 
22
#
 
23
# Contributor(s):
 
24
#
 
25
# Alternatively, the contents of this file may be used under the terms of
 
26
# either of the GNU General Public License Version 2 or later (the "GPL"),
 
27
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 
28
# in which case the provisions of the GPL or the LGPL are applicable instead
 
29
# of those above. If you wish to allow use of your version of this file only
 
30
# under the terms of either the GPL or the LGPL, and not to allow others to
 
31
# use your version of this file under the terms of the MPL, indicate your
 
32
# decision by deleting the provisions above and replace them with the notice
 
33
# and other provisions required by the GPL or the LGPL. If you do not delete
 
34
# the provisions above, a recipient may use your version of this file under
 
35
# the terms of any one of the MPL, the GPL or the LGPL.
 
36
#
 
37
# ***** END LICENSE BLOCK *****
 
38
 
 
39
#
 
40
#Input: [-d dir] foo1.java foo2.java
 
41
#Compares with: foo1.class foo2.class (if -d specified, checks in 'dir', 
 
42
#  otherwise assumes .class files in same directory as .java files)
 
43
#Returns: list of input arguments which are newer than corresponding class
 
44
#files (non-existant class files are considered to be real old :-)
 
45
#
 
46
 
 
47
$found = 1;
 
48
 
 
49
# GLOBALS
 
50
$SEP = 0; # the paltform independent path separator
 
51
$CFG = 0; # the value of the -cfg flag
 
52
 
 
53
# determine the path separator
 
54
$_ = $ENV{"PATH"};
 
55
if (m|/|) {
 
56
        $SEP = "/";
 
57
}
 
58
else {
 
59
        $SEP = "\\";
 
60
}
 
61
 
 
62
if ($ARGV[0] eq '-d') {
 
63
    $classdir = $ARGV[1];
 
64
    $classdir .= $SEP;
 
65
    shift;
 
66
    shift;
 
67
} else {
 
68
    $classdir = "." . $SEP;
 
69
}
 
70
 
 
71
# if -cfg is specified, print out the contents of the cfg file to stdout
 
72
if ($ARGV[0] eq '-cfg') {
 
73
    $CFG = $ARGV[1];
 
74
    shift;
 
75
    shift;
 
76
 
77
 
 
78
$_ = $ARGV[0];
 
79
if (m/\*.java/) {
 
80
        # Account for the fact that the shell didn't expand *.java by doing it
 
81
        # manually.
 
82
        &manuallyExpandArgument("java");
 
83
}
 
84
 
 
85
$printFile = 0;
 
86
 
 
87
foreach $filename (@ARGV) {
 
88
    $classfilename = $classdir;
 
89
    $classfilename .= $filename;
 
90
    $classfilename =~ s/.java$/.class/;
 
91
# workaround to only build sun/io/* classes when necessary
 
92
# change the pathname of target file to be consistent
 
93
# with sun/io subdirectories
 
94
#
 
95
# sun/io was always getting rebuilt because the java files
 
96
# were split into subdirectories, but the package names
 
97
# remained the same.  This was confusing outofdate.pl
 
98
#
 
99
    $classfilename =~ s/sun\/io\/extended.\//sun\/io\//;
 
100
    $classfilename =~ s/\.\.\/\.\.\/sun-java\/classsrc\///;
 
101
    ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,
 
102
     $ctime,$blksize,$blocks) = stat($filename);
 
103
    ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$classmtime,
 
104
     $ctime,$blksize,$blocks) = stat($classfilename);
 
105
#    print $filename, " ", $mtime, ", ", $classfilename, " ", $classmtime, "\n";
 
106
    if ($mtime > $classmtime) {
 
107
 
 
108
                # Only print the file header if we actually have some files to
 
109
                # compile.
 
110
                if (!$printFile) {
 
111
                        $printFile = 1;
 
112
                        &printFile($CFG);
 
113
                }
 
114
        print $filename, " ";
 
115
        $found = 0;
 
116
    }
 
117
}
 
118
 
 
119
print "\n";
 
120
 
 
121
# push onto $ARG array all filenames with extension $ext
 
122
 
 
123
# @param ext the extension of the file
 
124
 
 
125
sub manuallyExpandArgument {
 
126
        local($ext) = @_;
 
127
        $ext = "\." . $ext;                     # put it in regexp
 
128
 
 
129
        $result = opendir(DIR, ".");
 
130
 
 
131
        @allfiles = grep(/$ext/, readdir(DIR));
 
132
        $i = 0;
 
133
        foreach $file (@allfiles) {
 
134
                #skip emacs save files
 
135
                $_ = $file;
 
136
                if (!/~/) {
 
137
                        $ARGV[$i++] = $file;
 
138
                }
 
139
        }
 
140
}
 
141
 
 
142
sub printFile {
 
143
        local($file) = @_;
 
144
 
 
145
        $result = open(CFG, $file);
 
146
        while (<CFG>) {
 
147
                chop;
 
148
                print $_;
 
149
        }
 
150
}