File: Makefile.PL

package info (click to toggle)
libre-engine-re2-perl 0.17%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 444 kB
  • sloc: cpp: 271; perl: 80; makefile: 2; sh: 1
file content (49 lines) | stat: -rw-r--r-- 1,194 bytes parent folder | download | duplicates (3)
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
use 5.020;
use strict;
use warnings;

use Config;
use ExtUtils::MakeMaker;
use ExtUtils::CppGuess;

# TODO: Optionally use system libre2, via ExtUtils::Liblist?

my @objects = qw(RE2.o re2_xs.o);

my $guess = ExtUtils::CppGuess->new;

my %opt = (
  NAME               => 're::engine::RE2',
  AUTHOR             => 'David Leadbeater <dgl@dgl.cx>',
  VERSION_FROM       => 'lib/re/engine/RE2.pm',
  ABSTRACT_FROM      => 'lib/re/engine/RE2.pm',
  LICENSE            => 'perl',
  LDLOADLIBS         => '-lre2',
  PMLIBDIRS          => ["lib"],
  OBJECT             => join(" ", @objects),
  test               => {TESTS => 't/*.t t/ree-pcre/*.t'},
  CONFIGURE_REQUIRES => {
    "ExtUtils::CppGuess" => 0,
    "Test::More"         => 0.88,
  },
  $guess->makemaker_options
);

if(eval { ExtUtils::MakeMaker->VERSION(6.46) }) {
  $opt{META_MERGE} = {
    'meta-spec' => { version => 2 },
    resources => {
      repository => {
        type => 'git',
        web => 'https://github.com/dgl/re-engine-RE2',
      },
      bugtracker => {
        web => 'https://github.com/dgl/re-engine-RE2/issues',
      }
    }
  }
}

my $cc = (map +(/^CC=(.*)/i), @ARGV)[0] || $Config{cc};

WriteMakefile(%opt);