File: Makefile.PL

package info (click to toggle)
libperlio-gzip-perl 0.18-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 184 kB
  • ctags: 1
  • sloc: perl: 317; makefile: 2
file content (81 lines) | stat: -rw-r--r-- 2,354 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!perl -w
use 5.008; # Stop perl 5.005 or earler barfing on the v string
# require 5.7.0;
use ExtUtils::MakeMaker;
use Config;

unless ($Config{useperlio} eq 'define' and
	(defined($Config{usesfio}) ? $Config{usesfio} : 'false') eq 'false') {
  die <<BARF;
You need perl 5.8.0 or later, configured to use perlio (and not to use sfio)
BARF
}

# OK. Is this worth it? For starters, it's somewhat potty as the "OS types" in
# RFC 1952 are actaully semi-muddled with FS types.

my $ostype;

if ($^O eq 'dos') {
  $ostype = 0;
} elsif ($^O eq 'amigaos') {
  $ostype = 1;
} elsif ($^O eq 'VMS') {
  $ostype = 2;
} elsif ($^O eq 'mint') {
  # Is this correct?
  $ostype = 5;
} elsif ($^O eq 'os2') {
  $ostype = 6;
} elsif ($^O eq 'MacOS') {
  $ostype = 7;
} elsif ($^O eq 'MSWin32' or $^O eq 'cygwin') {
  $ostype = 11;
} elsif ($^O eq 'RISCOS') {
  $ostype = 13;
} elsif ($Config{cppccsymbols} =~ /\sunix=/ or $^O eq 'darwin') {
  # Darwin is a BSD, but it has a somewhat borked gcc, so be sure to get it
  $ostype = 3;
} else {
  # Don't know.
  $ostype = ''
}

$ostype = "-DLAYERGZIP_DEFAULT_OS_TYPE=$ostype" if length $ostype;

# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
    'NAME'		=> 'PerlIO::gzip',
    'VERSION_FROM'	=> 'gzip.pm', # finds $VERSION
    'PREREQ_PM'		=> {}, # e.g., Module::Name => 1.1
    ABSTRACT_FROM	=> 'gzip.pm', # retrieve abstract from module
    AUTHOR	=> 'Nicholas Clark <nwc10+perlio-gzip@colon.colondot.net>',
    'LIBS'		=> ['-lz'],
    'DEFINE'		=> $ostype,
    ((eval $ExtUtils::MakeMaker::VERSION > 6.30) ? (LICENSE => 'perl') : ()),
#    'DEFINE'		=> '-g -Wall -DDEBUG_LAYERGZIP',
);

# Check out Radioactive::Decay at http://belfast.pm.org/Modules/
# It might be more useful than this module :-)

__END__

OS types, from RFC 1952

                 0 - FAT filesystem (MS-DOS, OS/2, NT/Win32)
                 1 - Amiga
                 2 - VMS (or OpenVMS)
                 3 - Unix
                 4 - VM/CMS
                 5 - Atari TOS
                 6 - HPFS filesystem (OS/2, NT)
                 7 - Macintosh
                 8 - Z-System
                 9 - CP/M
                10 - TOPS-20
                11 - NTFS filesystem (NT)
                12 - QDOS
                13 - Acorn RISCOS
               255 - unknown