File: Makefile.PL

package info (click to toggle)
libtext-hunspell-perl 2.09-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 180 kB
  • ctags: 381
  • sloc: cpp: 789; perl: 34; makefile: 2
file content (37 lines) | stat: -rwxr-xr-x 1,362 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
use ExtUtils::MakeMaker;
use ExtUtils::PkgConfig;

my $CC = $ENV{'CXX'} || 'g++';

my $shlib_location = ExtUtils::PkgConfig->libs_only_l('hunspell');
my $header_location = ExtUtils::PkgConfig->cflags_only_I('hunspell');

if ($shlib_location ne '' && $header_location ne '') {
    WriteMakefile(
        NAME          => 'Text::Hunspell',
        VERSION_FROM  => 'Hunspell.pm',
        LIBS          => [$shlib_location],
        CC            => $CC,
        LD            => '$(CC)',
        PREREQ_PM     => {
            'ExtUtils::PkgConfig' => 0,
        },
        XSOPT         => '-C++',
        TYPEMAPS      => ['perlobject.map', 'typemap'],
        META_MERGE    => {
            resources => {
                repository => 'https://github.com/cosimo/perl5-text-hunspell',
            },
            keywords  => [ qw(hunspell spelling spell-checker text-processing) ],
        },
    );
}
else {
    # By default, ExtUtils::PkgConfig provides a verbose warning about
    # being unable to locate the pkgconfig file and such. This adds an
    # additional comment after that output.
    warn "\n=========================================================\n";
    warn "NOTE: You may need to install the libhunspell-dev package\n";
    warn "(or the equivalent on your OS).\n";
    warn "=========================================================\n";
}