File: Makefile.PL

package info (click to toggle)
libdata-stag-perl 0.11-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 1,292 kB
  • ctags: 697
  • sloc: perl: 6,345; lisp: 141; xml: 116; ansic: 55; makefile: 55; sh: 2
file content (109 lines) | stat: -rw-r--r-- 3,250 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# $Id: Makefile.PL,v 1.10 2008/06/03 17:25:25 cmungall Exp $

use ExtUtils::MakeMaker;
require 5.005;
#use Config;

%packages =
  (
   'Tk'                       => '0.0/Tk/tree viewer/stag-view.pl',
   'GD'                       => '1.3/Graphical Drawing Toolkit/drawing trees/stag-drawtree.pl',
   'XML::LibXSLT'             => '0.0/XSLT/XSLT Transformations/Data::Stag::XSLTHandler',
   'Storable'          => '0.0/storage of data structures/storing stag trees/Data::Stag::StagDB',
   'MLDBM'          => '0.0/multilevel hash store/indexing stag nodes/Data::Stag::StagDB',
   'Graph::Directed'          => '0.0/Generic Graph data stucture and algorithms/transforming stag trees to graphs/Data::Stag::GraphHandler',
   'XML::Parser::PerlSAX'  => '0.0/SAX Handler/parsing XML/Data::Stag::XMLParser', 
   'IO::String'         => '0.0/String handling/parsing strings containing stag data/Data::Stag',

  );


sub check_package {
    my ($name,$str) = @_;
    my ($ver,$desc,$expl,$module) = split( /\// , $str);
    if( !eval "require($name)") {
	print "External Module $name, $desc,\n is not installed on this computer.\n  $module in Data::Stag needs it for $expl\n\n";
	return 1;
    }

    return 0;
}
$error = 0;
print "\n";
foreach $name ( keys %packages ) {
    if( &check_package($name,$packages{$name}) == 1 ) {
	$error = 1;
    }
}
if( $error == 1 ) {
    print <<QQ_ERROR_QQ;

Information:

   There are some external packages and perl modules, listed above, which 
   stag uses. This only effects the functionality which is listed above:
   the rest of stag will work fine, which includes nearly all of the
   core functionality.

   Enjoy the rest of stag, which you can use after going 'make install'

QQ_ERROR_QQ
}

eval {
    require "IO/String.pm";
};
if ($@) {
    print <<FAIL;

** Missing vital module: IO::String **

This module is required by Data::Stag. Please install this module from CPAN

FAIL
}

WriteMakefile(
	      'NAME'         => "Data",
	      'DISTNAME'         => "Data-Stag",
	      'ABSTRACT'     => 'Structured Tags',
	      'AUTHOR'       => 'Chris Mungall <cjm AT fruitfly DOT org>',
	      'VERSION_FROM' => "Data/Stag.pm",
	      'PREREQ_PM'    => {
                                 'IO::String'=>0,
				},
	      'EXE_FILES'    => [
                                 qw(
				    scripts/stag-autoschema.pl
				    scripts/stag-db.pl
				    scripts/stag-diff.pl
				    scripts/stag-drawtree.pl
				    scripts/stag-filter.pl
				    scripts/stag-findsubtree.pl
				    scripts/stag-flatten.pl
				    scripts/stag-grep.pl
				    scripts/stag-handle.pl
				    scripts/stag-itext2simple.pl
				    scripts/stag-itext2sxpr.pl
				    scripts/stag-itext2xml.pl
				    scripts/stag-join.pl
				    scripts/stag-merge.pl
				    scripts/stag-mogrify.pl
				    scripts/stag-parse.pl
				    scripts/stag-query.pl
				    scripts/stag-splitter.pl
				    scripts/stag-view.pl
				    scripts/stag-xml2itext.pl
				    scripts/stag-itext2simple.pl
                                   )
				],
	      'dist'         => { 
				 'SUFFIX'       => ".gz",
				 'DIST_DEFAULT' => 'all tardist',
				 'COMPRESS'     => "gzip -9f" 
				},
	      clean => {
			FILES => 'Data-Stag-$(VERSION).tar.gz',
		       },
	     );