File: Makefile.PL

package info (click to toggle)
libx11-xcb-perl 0.18-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 488 kB
  • sloc: perl: 2,913; makefile: 5; ansic: 4
file content (91 lines) | stat: -rw-r--r-- 2,244 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
use strict; use warnings;

# Automated testing of this module makes little sense: It requires libXau,
# libXdmcp, python2.6 and xsltproc which are typically not installed on CPAN
# smokers.
exit 0 if $ENV{AUTOMATED_TESTING};

my (@configure_req);
BEGIN{
  @configure_req = qw/
    Module::Install
    Module::Install::AuthorRequires
    Module::Install::XSUtil
    ExtUtils::Depends
    ExtUtils::PkgConfig
    XS::Object::Magic
  /;
  my %ok;

  die << '__' . (join "\n", grep { not $ok{$_} } keys %ok) . << '__'
You're running me in author mode.
Your fellow developer left a message to inform you
to please install the following packages manually:

__


Afterwards you can use your CPAN client to install the remaining dependencies,
build this module and install it (eg. `cpanm .`).
__
    if -e '.git'
       and @configure_req
           != grep { $ok{$_} = eval "require $_; 1" } @configure_req;
}

BEGIN { unshift @INC, '.'; }
use inc::Module::Install;

name 'X11-XCB';
all_from 'lib/X11/XCB.pm';

repository 'git://code.stapelberg.de/X11-XCB';

requires 'Mouse';
requires 'MouseX::NativeTraits';
requires 'Try::Tiny';

# These are build-time requirements, but there is no way to express this (that
# I know of):
requires 'XML::Simple';
requires 'XML::Descent';
requires 'Data::Dump';

test_requires 'Test::More';
test_requires 'Test::Deep';
test_requires 'Test::Exception';

configure_requires $_ for grep !/Module::Install/, @configure_req;

use_ppport;

# -Wunused-value generates too much output to use it unconditionally
cc_warnings if $ENV{X11_XCB_CC_WARNINGS};

require ExtUtils::PkgConfig;
require ExtUtils::Depends;

ExtUtils::PkgConfig->atleast_version('xcb', '1.2')
  or die "You need at least libxcb version 1.2\n";

my @xcb_libs = qw/xcb xcb-util xcb-xinerama xcb-icccm /;
@xcb_libs == grep { eval { ExtUtils::PkgConfig->find($_); 1 } } @xcb_libs
  or die "Perhaps you haven't installed the development versions?\n";

cc_libs @xcb_libs;

WriteMakefile(
  ExtUtils::Depends
    ->new('X11::XCB', 'XS::Object::Magic')
    ->get_makefile_vars
);

postamble <<'END_OF_MAKEFILE';
XCB_xs.inc:
	$(PERL) -I. -M_GenerateMyXS -E '_GenerateMyXS::generate()'

XCB.c: XCB_xs.inc XCB_util.inc XCB.inc

END_OF_MAKEFILE

# vim:sw=2:sts=2:et