~ubuntu-branches/ubuntu/trusty/libxml-libxml-perl/trusty-security

« back to all changes in this revision

Viewing changes to .pc/fail-build-no-libxml2.patch/Makefile.PL

  • Committer: Package Import Robot
  • Author(s): Alessandro Ghedini
  • Date: 2012-10-16 14:10:26 UTC
  • mfrom: (1.2.26)
  • Revision ID: package-import@ubuntu.com-20121016141026-3x0th9su7cue9hl0
Tags: 2.0006+dfsg-1
* New upstream release
* Refresh patches
* Bump Standards-Version to 3.9.4 (no changes needed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
# -------------------------------------------------------------------------- #
80
80
# -------------------------------------------------------------------------- #
81
81
 
 
82
use lib qw(inc);
 
83
use Devel::CheckLib;
 
84
 
 
85
# Prompt the user here for any paths and other configuration
 
86
 
 
87
 
82
88
# -------------------------------------------------------------------------- #
83
89
# libxml2 valid versions
84
90
 
181
187
        $xml2cfg = $libprefix . '/bin/' . $xml2cfg;
182
188
    }
183
189
 
184
 
    # if a user defined INC and LIBS on the command line we must not 
 
190
    # if a user defined INC and LIBS on the command line we must not
185
191
    # override them
186
192
    if ( not defined $config{LIBS} and not defined $config{INC} ) {
187
193
        print "running xml2-config...";
197
203
                    "  - don't report errors!\n".
198
204
                    "  - don't send patches!\n\n".
199
205
                    "Check the README file for more information on versions\n".
200
 
                    "that are tested with XML::LibXML\n\n"; 
 
206
                    "that are tested with XML::LibXML\n\n";
201
207
            exit 0 unless $FORCE; # 0 recommended by http://cpantest.grango.org (Notes for CPAN Authors)
202
208
            }
203
209
            if ( $@ =~ /^UNTESTED (\S*)/ ) {
329
335
    print STDERR <<"DEATH";
330
336
libxml2, zlib, and/or the Math library (-lm) have not been found.
331
337
Try setting LIBS and INC values on the command line
332
 
Or get libxml2 from 
 
338
Or get libxml2 from
333
339
  http://xmlsoft.org/
334
340
If you install via RPMs, make sure you also install the -devel
335
341
RPMs, as this is where the headers (.h files) are.
350
356
    $config{dynamic_lib} = { OTHERLDFLAGS => " $ldflags " };
351
357
}
352
358
 
 
359
my $incpath = $config{INC};
 
360
$incpath =~ s#(\A|\s)\s*-I#$1#g;
 
361
 
 
362
check_lib_or_exit(
 
363
    # fill in what you prompted the user for here
 
364
    lib => [qw(xml2)],
 
365
    incpath => [split(/\s/,$incpath)],
 
366
    header =>
 
367
    [
 
368
        'libxml/c14n.h',
 
369
        'libxml/catalog.h',
 
370
        'libxml/entities.h',
 
371
        'libxml/globals.h',
 
372
        'libxml/HTMLparser.h',
 
373
        'libxml/HTMLtree.h',
 
374
        'libxml/parser.h',
 
375
        'libxml/parserInternals.h',
 
376
        'libxml/pattern.h',
 
377
        'libxml/relaxng.h',
 
378
        'libxml/tree.h',
 
379
        'libxml/uri.h',
 
380
        'libxml/valid.h',
 
381
        'libxml/xinclude.h',
 
382
        'libxml/xmlerror.h',
 
383
        'libxml/xmlIO.h',
 
384
        'libxml/xmlmemory.h',
 
385
        'libxml/xmlreader.h',
 
386
        'libxml/xmlregexp.h',
 
387
        'libxml/xmlschemas.h',
 
388
        'libxml/xmlversion.h',
 
389
        'libxml/xpath.h',
 
390
        'libxml/xpathInternals.h',
 
391
    ],
 
392
);
 
393
 
353
394
WriteMakefile(
354
395
              %INFOS,
355
396
              %config,
554
595
    }
555
596
    chdir(".testlink");
556
597
    {
557
 
        open(my $cfile, '>', 'Conftest.xs') 
 
598
        open(my $cfile, '>', 'Conftest.xs')
558
599
            or die "Cannot write to file Conftest.xs: $!";
559
600
        print {$cfile} <<"EOT";
560
601
#ifdef __cplusplus
579
620
        close($cfile);
580
621
    }
581
622
    {
582
 
        open(my $cfile, '>', 'Conftest.pm') 
 
623
        open(my $cfile, '>', 'Conftest.pm')
583
624
            or die "Cannot write to file Conftest.pm: $!";
584
625
        print {$cfile} <<'EOT';
585
626
package Conftest;
592
633
        close($cfile);
593
634
    }
594
635
    {
595
 
        open (my $cfile, '>', 'Makefile.PL') 
 
636
        open (my $cfile, '>', 'Makefile.PL')
596
637
            or die "Cannot write to file Makefile.PL: $!";
597
638
        print {$cfile} <<'EOT';
598
639
use ExtUtils::MakeMaker;
607
648
        close($cfile);
608
649
    }
609
650
    {
610
 
        open(my $cfile, ">test.pl") 
 
651
        open(my $cfile, ">test.pl")
611
652
            or die "Cannot write to file test.pl: $!";
612
653
        print {$cfile} <<"EOT";
613
654
use Test; BEGIN { plan tests => 1; } END { ok(\$loaded) }