line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Alien::MuPDF; |
2
|
|
|
|
|
|
|
$Alien::MuPDF::VERSION = '0.010'; |
3
|
2
|
|
|
2
|
|
95898
|
use strict; |
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
42
|
|
4
|
2
|
|
|
2
|
|
6
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
42
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
338
|
use parent qw(Alien::Base); |
|
2
|
|
|
|
|
237
|
|
|
2
|
|
|
|
|
8
|
|
7
|
2
|
|
|
2
|
|
44443
|
use File::Spec; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
359
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub mutool_path { |
10
|
1
|
|
|
1
|
1
|
1280
|
my ($self) = @_; |
11
|
1
|
|
|
|
|
7
|
File::Spec->catfile( File::Spec->rel2abs($self->dist_dir) , 'bin', 'mutool' ); |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub inline_auto_include { |
15
|
4
|
|
|
4
|
1
|
44
|
return [ 'mupdf/fitz.h' ]; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub cflags { |
19
|
2
|
|
|
2
|
1
|
39
|
my ($self) = @_; |
20
|
2
|
|
|
|
|
66
|
my $top_include = File::Spec->catfile( File::Spec->rel2abs($self->dist_dir), qw(include) ); |
21
|
|
|
|
|
|
|
# We do not include $self->SUPER::cflags() because that adds too many |
22
|
|
|
|
|
|
|
# header files to the path. In particular, it adds -Imupdf/fitz, which |
23
|
|
|
|
|
|
|
# leads to "mupdf/fitz/math.h" being included when trying to include |
24
|
|
|
|
|
|
|
# the C standard "math.h" header. |
25
|
2
|
|
|
|
|
920
|
return "-I$top_include"; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub libs { |
29
|
|
|
|
|
|
|
# third party |
30
|
2
|
|
|
2
|
1
|
24
|
"-lcrypto"; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub Inline { |
34
|
2
|
|
|
2
|
0
|
1105937
|
my ($self, $lang) = @_; |
35
|
|
|
|
|
|
|
|
36
|
2
|
|
|
|
|
10
|
if('C') { |
37
|
2
|
|
|
|
|
27
|
my $params = Alien::Base::Inline(@_); |
38
|
|
|
|
|
|
|
$params->{MYEXTLIB} .= ' ' . |
39
|
|
|
|
|
|
|
join( " ", |
40
|
2
|
|
|
|
|
24
|
map { File::Spec->catfile( |
|
4
|
|
|
|
|
440
|
|
41
|
|
|
|
|
|
|
File::Spec->rel2abs(Alien::MuPDF->dist_dir), |
42
|
|
|
|
|
|
|
'lib', $_ ) } |
43
|
|
|
|
|
|
|
qw(libmupdf.a libmupdfthird.a) |
44
|
|
|
|
|
|
|
); |
45
|
2
|
|
|
|
|
419
|
$params->{PRE_HEAD} = <<' EOF'; |
46
|
|
|
|
|
|
|
#if defined(_MSC_VER) || defined(__MINGW32__) |
47
|
|
|
|
|
|
|
# define NO_XSLOCKS /* To avoid PerlProc_setjmp/PerlProc_longjmp unresolved symbols */ |
48
|
|
|
|
|
|
|
#endif |
49
|
|
|
|
|
|
|
EOF |
50
|
|
|
|
|
|
|
|
51
|
2
|
|
|
|
|
8
|
return $params; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=pod |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=encoding UTF-8 |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 NAME |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Alien::MuPDF - Alien package for the MuPDF PDF rendering library |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 VERSION |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
version 0.010 |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 METHODS |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head2 mutool_path |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Returns a C which contains the absolute path |
74
|
|
|
|
|
|
|
to the C binary. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 Inline support |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
This module supports L. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 SEE ALSO |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
L |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
L |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 AUTHOR |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Zakariyya Mughal |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
This software is copyright (c) 2013 by Zakariyya Mughal. |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
95
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=cut |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
__END__ |