File: Build.PL

package info (click to toggle)
libimage-imlib2-perl 2.03-1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, jessie, jessie-kfreebsd, sid, stretch, wheezy
  • size: 252 kB
  • ctags: 38
  • sloc: perl: 305; ansic: 112; makefile: 9
file content (38 lines) | stat: -rw-r--r-- 1,045 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
use Module::Build;
use strict;

# We need to find imlib2-config
my $CONFIG = "imlib2-config";

my $version = `$CONFIG --version`;
if (!$version) {
  warn 'You must install the imlib2 library before you can install
Image::Imlib2. You can obtain imlib2 from
http://sourceforge.net/projects/enlightenment/

Alternatively, if you have downloaded and installed imlib2 and this
still will not work, modify the $CONFIG variable inside Build.PL to
point to the imlib2-config program that provides.
';
  exit 0;
} else {
  print "Found imlib2 $version";
}

my $libs = `$CONFIG --libs`;
my $cflags = "-DX_DISPLAY_MISSING " . `$CONFIG --cflags`;

my $build = Module::Build->new(
  c_source     => './lib/Image',
  create_makefile_pl => 'passthrough',
  extra_compiler_flags => $cflags,
  extra_linker_flags => $libs,
  license     => 'perl',
  module_name => 'Image::Imlib2',
  requires    => {
    'Module::Build' => '0.20',
    'Test::More' => '0.01',
  },
  add_to_cleanup => [qw( t/test1.jpg t/test2.jpg t/test3.jpg )],
);
$build->create_build_script;