File: Makefile.PL

package info (click to toggle)
libtk-gbarr-perl 2.08-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 284 kB
  • ctags: 229
  • sloc: perl: 1,875; makefile: 17
file content (63 lines) | stat: -rw-r--r-- 1,342 bytes parent folder | download | duplicates (4)
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
use ExtUtils::MakeMaker;

#--- MY package

sub MY::libscan
{
 my($self,$path) = @_;

 return '' 
	if($path =~ m:/(RCS|CVS|SCCS|alpha)/: ||
	   $path =~ m:[~%]$: ||
	   $path =~ m:\.(orig|rej|nfs[0-9A-Za-z]+|b[ac]k)$:
	  );

 $path;
}

#--- Write the Makefile

my %pm = map { ($_ => '$(INST_LIB)/Tk/' . $_) }
    qw(Cloth.pm FireButton.pm NumEntry.pm NumEntryPlain.pm TFrame.pm);
for (qw(cloth firebutton numentry numentryplain tframe)) {
    $pm{"examples/$_"} = ($] >= 5.005
			  ? '$(INST_ARCHLIB)'
			  : '$(INST_LIB)') . '/Tk/demos/widtrib/' . $_ . '.pl';
}

WriteMakefile(
	PREREQ_PM => { 'Tk' => '402.002' }, # Tk/NumEntry need it
	NAME	=> 'Tk::GBARR',
	DISTNAME => 'Tk-GBARR',
	VERSION	=> "2.08",
	PM => \%pm,
	'dist'	=> {
			COMPRESS 	=> 'gzip -9f',
			SUFFIX   	=> '.gz', 
			#DIST_DEFAULT 	=> 'all tardist',
		   },
	ABSTRACT => 'Additional Tk widgets (NumEntry, FireButton, Cloth...)',
);

sub MY::postamble {
    my $postamble = "";

    if (defined $ENV{USER} && $ENV{USER} eq 'eserte' && $^O =~ /bsd/i && -f "../../perl.release.mk") {
	$postamble .= <<'EOF';

.include "../../perl.release.mk"
.include "../../perl.cvs.mk"

EOF
    }


	if (0) { # not yet XXX
	$postamble .= '
demo :: pure_all
	$(FULLPERL) -w -I$(SITELIBEXP)/Tk/demos/widget_lib -I$(SITEARCHEXP)/Tk/demos/widget_lib -Mblib demos/date.pl

';
	}
    $postamble;
}