3 use ExtUtils::MakeMaker;
7 my $verbose = $ENV{IM_VERBOSE};
11 GetOptions("incpath=s", \@incpaths,
12 "libpath=s" => \@libpaths,
13 "verbose|v" => \$verbose);
18 my $MM_ver = eval $ExtUtils::MakeMaker::VERSION;
22 NAME => 'Imager::Font::T1',
23 VERSION_FROM => 'T1.pm',
24 OBJECT => 'T1.o imt1.o',
25 clean => { FILES => 'testout' },
28 if (eval { ExtUtils::MakeMaker->VERSION('6.46'); 1 }) {
29 $opts{LICENSE} = "perl_5";
30 $opts{AUTHOR} = 'Tony Cook <tonyc@cpan.org>';
31 $opts{ABSTRACT} = 'T1Lib font driver for Imager';
37 url => "https://metacpan.org/pod/CPAN::Meta::Spec",
41 homepage => "http://imager.perl.org/",
45 url => "git://github.com/tonycoz/imager.git",
46 web => "https://github.com/tonycoz/imager.git",
50 web => "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Imager",
51 mailto => 'bug-Imager@rt.cpan.org',
58 if ($BUILDING_IMAGER) {
60 unshift @INC, "../lib";
64 print "T1Lib: building independently\n";
65 require Imager::ExtUtils;
66 push @inc, Imager::ExtUtils->includes;
67 $opts{TYPEMAPS} = [ Imager::ExtUtils->typemap ];
69 # Imager required configure through use
70 my @Imager_req = ( Imager => "0.95" );
71 if (eval { ExtUtils::MakeMaker->VERSION('6.46'); 1 }) {
72 $opts{META_MERGE}{prereqs} =
86 "Test::More" => "0.47",
100 "Test::More" => "0.47",
112 require Imager::Probe;
118 sub { -e File::Spec->catfile($_[0], "t1lib.h") },
120 testcode => _t1_test_code(),
121 testcodeheaders => [ "stdio.h", "string.h", "t1lib.h" ],
122 incpath => \@incpaths,
123 libpath => \@libpaths,
127 my $probe_res = Imager::Probe->probe(\%probe);
129 $IMAGER_LIBS{T1} = 1;
131 push @inc, $probe_res->{INC};
132 $opts{LIBS} = $probe_res->{LIBS};
133 $opts{DEFINE} = $probe_res->{DEFINE};
136 WriteMakefile(%opts);
139 $IMAGER_LIBS{T1} = 0;
141 if ($BUILDING_IMAGER) {
142 ExtUtils::MakeMaker::WriteEmptyMakefile(%opts);
146 die "OS unsupported: T1Lib headers/libraries not found\n";
153 if (T1_InitLib(IGNORE_CONFIGFILE|IGNORE_FONTDATABASE) == NULL) {
154 fprintf(stderr, "T1Lib: Cannot initialize\n");