-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.PL
More file actions
75 lines (65 loc) · 1.74 KB
/
Makefile.PL
File metadata and controls
75 lines (65 loc) · 1.74 KB
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
# created from Makefile.PL of Gtk2::Ex::Simple::List and Gtk2::Ex::Simple::Tree
# Original authors: Gtk2-Perl team
# Adapted by: Thomas Funk <t.funk@web.de>
use 5.008;
use strict;
use warnings;
use ExtUtils::MakeMaker;
# minimum required version of dependencies we need to build
our %build_reqs = (
'perl-Gtk2' => '1.060',
'perl-Gtk2-Ex-Simple-List' => '0.01',
'perl-Gtk2-Ex-Simple-Tree' => '0.01',
);
# Writing a fake Makefile ensures that CPAN will pick up the correct
# dependencies and install them.
unless (eval "use Glib::MakeHelper; use Gtk2; 1")
{
warn "$@\n";
WriteMakefile(
PREREQ_FATAL => 1,
PREREQ_PM =>
{
'Glib' => '1.00',
'Gtk2' => '1.00',
'Gtk2::Ex::Simple::List' => '0.01',
'Gtk2::Ex::Simple::Tree' => '0.01',
},
);
exit 1; # not reached
}
WriteMakefile(
NAME => 'SimpleGtk2',
VERSION_FROM => 'lib/SimpleGtk2.pm',
ABSTRACT_FROM => 'lib/SimpleGtk2.pm',
AUTHOR => 'Thomas Funk <t.funk@web.de>'
);
package MY;
# rule to build the documentation
sub postamble
{
my $text = Glib::MakeHelper->postamble_clean ()
. Glib::MakeHelper->postamble_rpms (
'PERL_GTK' => $build_reqs{'perl-Gtk2'},
'PERL_GTK_EX_SIMPLE_LIST' =>
$build_reqs{'perl-Gtk2-Ex-Simple-List'},
'PERL_GTK_EX_SIMPLE_TREE' =>
$build_reqs{'perl-Gtk2-Ex-Simple-Tree'},
);
# this installation stuff doesn't make sense on windows, where
# we don't really have a /usr. also, nmake barfs on $+.
unless ($^O eq 'MSWin32') {
$text .= "
# the tmp-xxx stuff is just so that only the pl files get installed
install-\%: %
\@\$(MKPATH) tmp-\$+/
\@\$(CP) \$+/*.* tmp-\$+/
\@\$(MOD_INSTALL) ./tmp-\$+/ \\
\$(PREFIX)/share/doc/perl-\$(DISTNAME)/\$+
\@\$(RM_RF) tmp-\$+/
";
}
return $text;
}
1;
__END__