File: Makefile.PL

package info (click to toggle)
libtext-bidi-perl 2.09-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,652 kB
  • ctags: 427
  • sloc: ansic: 2,810; perl: 891; makefile: 21
file content (131 lines) | stat: -rw-r--r-- 4,470 bytes parent folder | download
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
use strict;
use warnings;

use 5.010000;

use ExtUtils::MakeMaker 6.30;

my (%fribidi, $libs, $cflags);
eval { require ExtUtils::PkgConfig };
if ( $@ ) {
    warn $@;
} else {
    %fribidi = eval { ExtUtils::PkgConfig->find('fribidi') };
}
if ( %fribidi ) {
    $libs = $fribidi{'libs'};
    $cflags = $fribidi{'cflags'};
} else {
    unless ( -r '/usr/include/fribidi/fribidi.h' ) {
        warn <<'EOF';

It seems that fribidi is missing. 

fribidi should be installed prior to the installation of this module.

EOF
        exit 0;

    }
    warn "Using heuristic values for CFLAGS and LIBS\n";
    $libs = '-lfribidi';
    $cflags = '-I/usr/include/fribidi -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include';
}

my %WriteMakefileArgs = (
                       'MIN_PERL_VERSION' => '5.010000',
                       'CONFIGURE_REQUIRES' => {
                                                 'ExtUtils::MakeMaker' => '6.30'
                                               },
                       'LICENSE' => 'perl',
                       'DISTNAME' => 'Text-Bidi',
                       'test' => {
                                   'TESTS' => 't/*.t'
                                 },
                       'NAME' => 'Text::Bidi::private',
                       'TEST_REQUIRES' => {
                                            'List::Util' => '0',
                                            'Test::More' => '0',
                                            'ExtUtils::MakeMaker' => '0',
                                            'File::Spec' => '0',
                                            'IO::Handle' => '0',
                                            'Data::Dumper' => '0',
                                            'charnames' => '0',
                                            'File::Spec::Functions' => '0',
                                            'version' => '0.77',
                                            'utf8' => '0',
                                            'File::Temp' => '0',
                                            'IPC::Open3' => '0'
                                          },
                       'AUTHOR' => 'Moshe Kamensky <kamensky@cpan.org>',
                       'BUILD_REQUIRES' => {},
                       'EXE_FILES' => [
                                        'bin/fribidi.pl'
                                      ],
                       'PREREQ_PM' => {
                                        'DynaLoader' => '0',
                                        'Tie::Array' => '0',
                                        'warnings' => '0',
                                        'base' => '0',
                                        'open' => '0',
                                        'Carp' => '0',
                                        'strict' => '0',
                                        'Exporter' => '0',
                                        'Getopt::Long' => '0',
                                        'overload' => '0',
                                        'Encode' => '0',
                                        'integer' => '0'
                                      },
                       'VERSION' => '2.09',
                       'ABSTRACT' => 'Unicode bidi algorithm using libfribidi'
                     );


%WriteMakefileArgs = (%WriteMakefileArgs,
    INC => $cflags,
    LIBS => $libs,
    OBJECT => 'private.o',
);

unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
  my $tr = delete $WriteMakefileArgs{TEST_REQUIRES};
  my $br = $WriteMakefileArgs{BUILD_REQUIRES};
  for my $mod ( keys %$tr ) {
    if ( exists $br->{$mod} ) {
      $br->{$mod} = $tr->{$mod} if $tr->{$mod} > $br->{$mod};
    }
    else {
      $br->{$mod} = $tr->{$mod};
    }
  }
}

unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
  my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
  my $pp = $WriteMakefileArgs{PREREQ_PM};
  for my $mod ( keys %$br ) {
    if ( exists $pp->{$mod} ) {
      $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
    }
    else {
      $pp->{$mod} = $br->{$mod};
    }
  }
}

delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
  unless eval { ExtUtils::MakeMaker->VERSION(6.52) };

WriteMakefile(%WriteMakefileArgs);

sub MY::postamble {
    <<EOF;
private.c: swig/fribidi.i
	-/usr/bin/swig -perl -Wall -I/usr/include $cflags -outdir lib/Text/Bidi/ -o \$@ \$<

swig-clean: clean
	-rm private.c lib/Text/Bidi/private.pm

EOF
}