line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Alien::MuPDF; |
2
|
|
|
|
|
|
|
$Alien::MuPDF::VERSION = '0.012'; |
3
|
2
|
|
|
2
|
|
107483
|
use strict; |
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
50
|
|
4
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
49
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
374
|
use parent qw(Alien::Base); |
|
2
|
|
|
|
|
263
|
|
|
2
|
|
|
|
|
10
|
|
7
|
2
|
|
|
2
|
|
54152
|
use File::Spec; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
385
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub mutool_path { |
10
|
1
|
|
|
1
|
1
|
1306
|
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
|
27
|
return [ 'mupdf/fitz.h' ]; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub cflags { |
19
|
2
|
|
|
2
|
1
|
55
|
my ($self) = @_; |
20
|
2
|
|
|
|
|
55
|
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
|
|
|
|
|
1524
|
return "-I$top_include"; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub libs { |
29
|
|
|
|
|
|
|
# third party |
30
|
2
|
|
|
2
|
1
|
16
|
"-lcrypto"; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub Inline { |
34
|
2
|
|
|
2
|
0
|
1207222
|
my ($self, $lang) = @_; |
35
|
|
|
|
|
|
|
|
36
|
2
|
50
|
|
|
|
38
|
if( $lang eq 'C' ) { |
37
|
2
|
|
|
|
|
27
|
my $params = Alien::Base::Inline(@_); |
38
|
|
|
|
|
|
|
$params->{MYEXTLIB} .= ' ' . |
39
|
|
|
|
|
|
|
join( " ", |
40
|
2
|
|
|
|
|
28
|
map { File::Spec->catfile( |
|
4
|
|
|
|
|
537
|
|
41
|
|
|
|
|
|
|
File::Spec->rel2abs(Alien::MuPDF->dist_dir), |
42
|
|
|
|
|
|
|
'lib', $_ ) } |
43
|
|
|
|
|
|
|
qw(libmupdf.a libmupdf-third.a) |
44
|
|
|
|
|
|
|
); |
45
|
2
|
|
|
|
|
492
|
$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
|
|
|
|
|
15
|
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.012 |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 METHODS |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head2 mutool_path |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Returns a C<Str> which contains the absolute path |
74
|
|
|
|
|
|
|
to the C<mutool> binary. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 Inline support |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
This module supports L<Inline's with functionality|Inline/"Playing 'with' Others">. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 SEE ALSO |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
L<MuPDF|http://mupdf.com/> |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 AUTHOR |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Zakariyya Mughal <zmughal@cpan.org> |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
This software is copyright (c) 2013 by Zakariyya Mughal. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
93
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=cut |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
__END__ |
98
|
|
|
|
|
|
|
# ABSTRACT: Alien package for the MuPDF PDF rendering library |
99
|
|
|
|
|
|
|
|