root/psad/tags/psad-2.1.2/Date-Calc/INSTALL.txt

Revision 737, 13.7 kB (checked in by mbr, 6 years ago)

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1                      ====================================
2                        Package "Date::Calc" Version 5.3
3                      ====================================
4
5
6                   Copyright (c) 1995 - 2002 by Steffen Beyer.
7                              All rights reserved.
8
9
10 Contents:
11 ---------
12
13     +   Prerequisites
14     +   Preliminary steps for use with Perl prior to version 5.002
15     +   Preliminary steps for use with ActiveState's port of Perl 5
16     +   How to install additional languages
17     +   Installation
18
19
20 Prerequisites:
21 --------------
22
23 Perl version 5.000 or higher, and an ANSI C compiler. (!)
24                                      ^^^^^^
25 If you plan to use the modules "Date::Calendar" or
26 "Date::Calendar::Year" from this package, you will
27 also need the module "Bit::Vector" version 5.7 or
28 newer (which also needs an ANSI C compiler!).
29
30 Otherwise you may safely ignore the warning message
31 "Warning: prerequisite Bit::Vector 5.7 not found at ..."
32 when running "perl Makefile.PL".
33
34 You can install "Bit::Vector" at any time later if you
35 change your mind.
36
37 If you compile under Windows, note that you will need
38 exactly the same compiler your Perl itself was compiled
39 with! (This is also true for Unix, but rarely a problem.)
40
41 Moreover, you usually cannot build any modules under
42 Windows 95/98, the Win 95/98 command shell doesn't
43 grok the "&&" operator. You will need the Windows NT
44 command shell ("cmd.exe") or the "4DOS" shell.
45
46 Note that ActiveState provides precompiled binaries of
47 both modules (Date::Calc and Bit::Vector) for their
48 Win32 port of Perl ("ActivePerl") on their web site
49 at http://www.activestate.com/.
50
51 Note also that a "plain Perl" version of "Date::Calc" called
52 "Date::Pcalc" exists (written by J. David Eisenberg); you
53 should be able to download it from the same place where
54 you found this package, or from David's web site at
55 http://catcode.com/date/pcalc.html.
56
57
58 Preliminary steps for use with Perl prior to version 5.002:
59 -----------------------------------------------------------
60
61 Edit the file "Makefile.PL" and change the line
62
63     'VERSION_FROM'      => 'Calc.pm',
64 to
65     'VERSION'           => '5.3',
66
67 Then edit the file "Calc.pm" and change the line
68
69     bootstrap Date::Calc $VERSION;
70 to
71     bootstrap Date::Calc;
72
73 Also edit the file "t/f000.t" and change all lines of the kind
74
75     use Date::Calc 5.3;
76
77 into just
78
79     use Date::Calc;
80
81 Finally, edit the file "Calc.xs" and delete the line
82
83     PROTOTYPES: DISABLE
84
85
86 Preliminary steps for use with ActiveState's port of Perl 5:
87 ------------------------------------------------------------
88
89 (For the Win32 platform)
90
91 Edit the file "Makefile.PL" and remove all of the "#" characters
92 which currently comment out the lines involved with the setting
93 of the attributes "ABSTRACT", "AUTHOR" and "CAPI".
94
95
96 How to install additional languages:
97 ------------------------------------
98
99 Unfortunately, UNIX and Windows NT/95 lack a "Resource Fork" concept
100 as provided by the MacOS (Apple Macintosh Operating System).
101
102 Therefore you will have to re-compile this package whenever you
103 make any changes to existing resources (see the section "RESOURCES"
104 in the file "DateCalc.c" in this distribution) or if you add more
105 languages.
106
107 Fortunately, though, adding a new language is quite simple:
108
109 Edit the file "DateCalc.c", locate the "RESOURCES" section,
110 and do the following:
111
112 1) Increment the number in the line
113
114     #define DateCalc_LANGUAGES 13
115
116    as necessary.
117
118 2) Add a new entry to the bottom of the array "DateCalc_Month_to_Text_"
119    of the following form:
120
121     {
122         "???", "January", "February", "March", "April", "May", "June",
123         "July", "August", "September", "October", "November", "December"
124     }
125
126    Don't forget to add a comma after the closing brace of the immediately
127    preceding entry above.
128
129 3) Add a new entry to the bottom of the array "DateCalc_Day_of_Week_to_Text_"
130    of the following form:
131
132     {
133         "???", "Monday", "Tuesday", "Wednesday",
134         "Thursday", "Friday", "Saturday", "Sunday"
135     }
136
137    Don't forget to add a comma after the closing brace of the immediately
138    preceding entry above.
139
140 4) Add a new entry to the bottom of the array
141    "DateCalc_Day_of_Week_Abbreviation_" of the following form:
142
143     {
144         "", "", "", "", "", "", "", ""    /* 14 */
145     }
146
147    Don't forget to add a comma after the closing brace of the immediately
148    preceding entry above.
149
150    Fill this entry with values *ONLY* if you need special abbreviations
151    for the names of the days of week (i.e., if you need abbreviations
152    other than the first three letters of the entries in the array
153    "DateCalc_Day_of_Week_to_Text_" immediately above)!
154
155    If you do so, remember to fill the first (dummy) field in this entry
156    with some non-empty string (such as "???", for example), since this
157    field is used to flag the existence of special abbreviations in this
158    package.
159
160 5) Add a new entry to the bottom of the array "DateCalc_Date_Long_Format_"
161    of the following form:
162
163     "%s, %d %s %d"                      /* 14  Language    */
164
165    Don't forget to add a comma after the closing double quote of
166    the immediately preceding entry above.
167
168    You may change this format to suit your preferences, but the number,
169    type and order of variables is fixed (day of week, day, month, year).
170
171    In case you want to use a different scheme, you will have to
172    add a new "case" to the "switch()" statement in the function
173    "DateCalc_Date_to_Text_Long()" in "DateCalc.c" and provide
174    the "sprintf()" statement with the necessary arguments yourself.
175
176 6) Finally, append the name of the language you have just added
177    *WRITTEN IN THIS VERY LANGUAGE*, to the end of the array
178    "DateCalc_Language_to_Text_". (And don't forget the comma...)
179
180    The name of the language should be written in that very language
181    itself because the name for any given language usually varies
182    considerably from language to language. The only way to uniquely
183    identify any language is to use the way it is written by native
184    writers of that language itself.
185
186    The abbreviations for names of languages as defined by ISO 639 cannot
187    take account of all languages (there are only 26 * 26 = 676 possible
188    abbreviations as designated by this standard, as opposed to the many
189    thousand different languages in this world), which is the reason why
190    they are not used here.
191
192 7) Now edit the file "DateCalc.h" and set the number in the line
193
194     #define DateCalc_LANGUAGES 13
195
196    to the same value as in the file "DateCalc.c".
197
198    You may (at your option) want to apply the other changes to "DateCalc.c"
199    to the file "DateCalc.h" as well. This has no effect on the result of
200    the compilation, though, and serves only to document what changes you
201    have made.
202
203 8) If you have never built this version of this package on the current
204    machine before, just proceed with the instructions in the section
205    "Installation" following immediately below.
206
207    Otherwise, rebuild the package with "make" (as described in the
208    section below) and re-install it with "make install".
209
210    If you want to start over from scratch instead, enter the command
211    "make realclean" and proceed as described in the section below,
212    from the beginning.
213
214 9) Some additional recommendations:
215
216    a) If you want to send me your new language entry so that I can
217       add it to the next release of this module, please either:
218
219         -  send me a context "diff" for DateCalc.c (and optionally,
220            for DateCalc.h as well) which can be used by the "patch"
221            program to automatically update my corresponding file(s)
222
223            (The disadvantage of this is that frequently several
224            patches reach me at about the same time, so only one
225            of them will work, since the context will have changed
226            for the others after applying the first - and "plain"
227            diffs will not work for similar reasons)
228
229         -  send me just the (plain text) list of day and month names,
230            the new format string, the name of the language, and, if
231            necessary, the list of month name abbreviations and the code
232            you added to the function "DateCalc_Date_to_Text_Long()"
233
234       You don't need to bother sending me the changes in the documentation
235       or other files, and just sending me the list of items usually causes
236       me less work than sending in a patch, so I'd prefer the latter.
237
238    b) Please use only the ISO-Latin-1 character set if possible,
239       since my module doesn't support any other character sets yet,
240       or at least tell me which character set you used so I can
241       document this in the module's manual.
242
243
244 Installation:
245 -------------
246
247 =============================================================================
248 ALWAYS unpack and build Perl modules OUTSIDE the Perl source and installation
249 tree! (You might otherwise inadvertently corrupt your Perl installation!)
250 =============================================================================
251
252 Quick installation guide for experienced users:
253 -----------------------------------------------
254
255     UNIX:                 Win32/Borland C++:      Win32/MS Visual C++:
256     =====                 ==================      ====================
257
258     % perl Makefile.PL    % perl Makefile.PL      % perl Makefile.PL
259     % make                % dmake                 % nmake
260     % make test           % dmake test            % nmake test
261     % make install        % dmake install         % nmake install
262
263 Detailed installation guide:
264 ----------------------------
265
266  1) Change directory to the directory that has been created by unpacking this
267     package ("cd Date-Calc-5.3").
268
269  2) Type "perl Makefile.PL" (or whatever the name and path of your Perl 5
270     binary is).
271
272     This will create a "Makefile" with the appropriate parameters for your
273     system (for instance, where the install directories are, and so on).
274
275     See "man ExtUtils::MakeMaker" or "perldoc ExtUtils::MakeMaker" for
276     other useful options to this command, like setting a different
277     installation PREFIX.
278
279  3) Type "make".
280
281     (For installation under Windows NT/95, use "dmake" (Borland C++) or
282     "nmake" (MS Visual C++) instead!)
283
284     This will create a dynamically linkable library file that will be linked
285     to Perl later, at runtime, provided your system supports dynamic linking.
286
287     Please refer to the MakeMaker documentation for instructions on how
288     to build a new Perl with statically linked libraries (invoke "perldoc
289     ExtUtils::MakeMaker" for this), if your system does NOT support dynamic
290     linking!
291
292     Should you encounter any compiler warnings or errors (like the redefi-
293     nition of certain types already defined by your system), please contact
294     me via e-mail at <sb@engelschall.com>, sending me your compiler output
295     (both STDOUT and STDERR). Thank you!
296
297     ======================================================================
298        BEWARE that you need an ANSI C compiler in order to successfully
299        compile this package!
300     ======================================================================
301
302     Also note that problems may arise with the c89 compiler of HP, although
303     it allegedly supports ANSI C!
304
305     I recommend the GNU C compiler ("gcc"), which is freely available on
306     the Internet (see ftp://ftp.gnu.org/pub/gnu/ and mirror sites thereof).
307
308     (HP users are strongly recommended to install the GNU assembler "gas"
309     first before installing the GNU C compiler "gcc", according to GNU.)
310
311     Should you get the error messages
312
313     Calc.c: 15: Unable to find include file 'EXTERN.h'.
314     Calc.c: 16: Unable to find include file 'perl.h'.
315     Calc.c: 17: Unable to find include file 'XSUB.h'.
316
317     then edit the file "Makefile.PL" and add a line similar to the
318     following so that it points to your Perl 5 distribution tree:
319
320     'INC'       => '-I/usr/ctr/dlt/private/perl/perl5.003',
321
322     Then start over with the generation of the "Makefile" at 2).
323
324  4) Now issue "make test" (or "dmake test" or "nmake test", respectively).
325
326     The output should look somewhat like this:
327
328     PERL_DL_NONLAZY=1 /sw/bin/perl
329     -Iblib/arch -Iblib/lib
330     -I/sw/pkg/perl/lib/5.00503/i386-freebsd
331     -I/sw/pkg/perl/lib/5.00503
332     -e 'use Test::Harness qw(&runtests $verbose);
333     $verbose=0; runtests @ARGV;' t/*.t
334     t/f000..............ok
335     t/f001..............ok
336     t/f002..............ok
337     t/f003..............ok
338     t/f004..............ok
339     t/f005..............ok
340     t/f006..............ok
341     t/f007..............ok
342     t/f008..............ok
343     t/f009..............ok
344     t/f010..............ok
345     t/f011..............ok
346     t/f012..............ok
347     t/f013..............ok
348     t/f014..............ok
349     t/f015..............ok
350     t/f016..............ok
351     t/f017..............ok
352     t/f018..............ok
353     t/f019..............ok
354     t/f020..............ok
355     t/f021..............ok
356     t/f022..............ok
357     t/f023..............ok
358     t/f024..............ok
359     t/f025..............ok
360     t/f026..............ok
361     t/f027..............ok
362     t/f028..............ok
363     t/f029..............ok
364     t/f030..............ok
365     t/f031..............ok
366     t/f032..............ok
367     t/f033..............ok
368     t/f034..............ok
369     t/f035..............ok
370     t/f036..............ok
371     t/m001..............ok
372     t/m002..............ok
373     t/m003..............ok
374     t/m004..............ok
375     t/m005..............ok
376     t/m006..............ok
377     t/m007..............ok
378     t/m008..............ok
379     t/m009..............ok
380     t/m010..............ok
381     t/m011..............ok
382     All tests successful.
383     Files=48,  Tests=2716, 28 wallclock secs
384     (26.12 cusr +  1.29 csys = 27.41 CPU)
385
386  5) At last, type "make install" (or "dmake install", "nmake install").
387
388  6) Now you can run the example applications from the "examples"
389     subdirectory in this distribution.
390
391     Please refer to the file "EXAMPLES.txt" in this distribution for
392     more details!
393
394  7) Share and enjoy!
395
396
Note: See TracBrowser for help on using the browser.