[libopengl-xscreensaver-perl] 03/06: Drop devel-checklib.patch, merged upstream.

gregor herrmann gregoa at debian.org
Sat Dec 21 20:38:56 UTC 2013


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libopengl-xscreensaver-perl.

commit 3dc87f7c90783ae92101b6f38f52b5fc0d79214f
Author: gregor herrmann <gregoa at debian.org>
Date:   Sat Dec 21 21:35:16 2013 +0100

    Drop devel-checklib.patch, merged upstream.
---
 debian/patches/devel-checklib.patch | 323 ------------------------------------
 debian/patches/series               |   1 -
 2 files changed, 324 deletions(-)

diff --git a/debian/patches/devel-checklib.patch b/debian/patches/devel-checklib.patch
deleted file mode 100644
index 0da3db4..0000000
--- a/debian/patches/devel-checklib.patch
+++ /dev/null
@@ -1,323 +0,0 @@
-Description: update the embedded Devel::CheckLib
-Origin: vendor
-Bug: https://rt.cpan.org/Ticket/Display.html?id=85213
-Bug-Debian: https://rt.cpan.org/Public/Bug/Display.html?id=85213
-Forwarded: not-needed
-Author: gregor herrmann <gregoa at debian.org>
-Last-Update: 2013-05-13
-
---- a/inc/Devel/CheckLib.pm
-+++ b/inc/Devel/CheckLib.pm
-@@ -1,19 +1,20 @@
- # $Id: CheckLib.pm,v 1.25 2008/10/27 12:16:23 drhyde Exp $
- 
--package #
--Devel::CheckLib;
-+package Devel::CheckLib;
- 
-+use 5.00405; #postfix foreach
- use strict;
- use vars qw($VERSION @ISA @EXPORT);
--$VERSION = '0.6';
--use Config;
-+$VERSION = '0.99';
-+use Config qw(%Config);
-+use Text::ParseWords 'quotewords';
- 
- use File::Spec;
- use File::Temp;
- 
- require Exporter;
- @ISA = qw(Exporter);
-- at EXPORT = qw(assert_lib check_lib_or_exit);
-+ at EXPORT = qw(assert_lib check_lib_or_exit check_lib);
- 
- # localising prevents the warningness leaking out of this module
- local $^W = 1;    # use warnings is a 5.6-ism
-@@ -51,15 +52,32 @@
- You pass named parameters to a function, describing to it how to build
- and link to the libraries.
- 
--It works by trying to compile this:
-+It works by trying to compile some code - which defaults to this:
- 
-     int main(void) { return 0; }
- 
- and linking it to the specified libraries.  If something pops out the end
--which looks executable, then we know that it worked.  That tiny program is
-+which looks executable, it gets executed, and if main() returns 0 we know
-+that it worked.  That tiny program is
- built once for each library that you specify, and (without linking) once
- for each header file.
- 
-+If you want to check for the presence of particular functions in a
-+library, or even that those functions return particular results, then
-+you can pass your own function body for main() thus:
-+
-+    check_lib_or_exit(
-+        function => 'foo();if(libversion() > 5) return 0; else return 1;'
-+        incpath  => ...
-+        libpath  => ...
-+        lib      => ...
-+        header   => ...
-+    );
-+
-+In that case, it will fail to build if either foo() or libversion() don't
-+exist, and main() will return the wrong value if libversion()'s return
-+value isn't what you want.
-+
- =head1 FUNCTIONS
- 
- All of these take the same named parameters and are exported by default.
-@@ -96,6 +114,11 @@
- 
- This can also be supplied on the command-line.
- 
-+=item debug
-+
-+If true - emit information during processing that can be used for
-+debugging.
-+
- =back
- 
- And libraries are no use without header files, so ...
-@@ -134,6 +157,11 @@
- result -- which is what you want if an external library dependency is not
- available.
- 
-+=head2 check_lib
-+
-+This behaves exactly the same as C<assert_lib()> except that it is silent,
-+returning false instead of dieing, or true otherwise.
-+
- =cut
- 
- sub check_lib_or_exit {
-@@ -144,6 +172,11 @@
-     }
- }
- 
-+sub check_lib {
-+    eval 'assert_lib(@_)';
-+    return $@ ? 0 : 1;
-+}
-+
- sub assert_lib {
-     my %args = @_;
-     my (@libs, @libpaths, @headers, @incpaths);
-@@ -161,7 +194,7 @@
-     # work-a-like for Makefile.PL's LIBS and INC arguments
-     # if given as command-line argument, append to %args
-     for my $arg (@ARGV) {
--        for my $mm_attr_key qw(LIBS INC) {
-+        for my $mm_attr_key (qw(LIBS INC)) {
-             if (my ($mm_attr_value) = $arg =~ /\A $mm_attr_key = (.*)/x) {
-             # it is tempting to put some \s* into the expression, but the
-             # MM command-line parser only accepts LIBS etc. followed by =,
-@@ -174,7 +207,7 @@
-     # using special form of split to trim whitespace
-     if(defined($args{LIBS})) {
-         foreach my $arg (split(' ', $args{LIBS})) {
--            die("LIBS argument badly-formed: $arg\n") unless($arg =~ /^-l/i);
-+            die("LIBS argument badly-formed: $arg\n") unless($arg =~ /^-[lLR]/);
-             push @{$arg =~ /^-l/ ? \@libs : \@libpaths}, substr($arg, 2);
-         }
-     }
-@@ -185,40 +218,68 @@
-         }
-     }
- 
--    my @cc = _findcc();
-+    my ($cc, $ld) = _findcc();
-     my @missing;
-+    my @wrongresult;
-+    my @use_headers;
- 
-     # first figure out which headers we can't find ...
-     for my $header (@headers) {
-+        push @use_headers, $header;
-         my($ch, $cfile) = File::Temp::tempfile(
-             'assertlibXXXXXXXX', SUFFIX => '.c'
-         );
--        print $ch qq{#include <$header>\nint main(void) { return 0; }\n};
-+        my $ofile = $cfile;
-+        $ofile =~ s/\.c$/$Config{_o}/;
-+        print $ch qq{#include <$_>\n} for @use_headers;
-+        print $ch qq{int main(void) { return 0; }\n};
-         close($ch);
-         my $exefile = File::Temp::mktemp( 'assertlibXXXXXXXX' ) . $Config{_exe};
-         my @sys_cmd;
-         # FIXME: re-factor - almost identical code later when linking
-         if ( $Config{cc} eq 'cl' ) {                 # Microsoft compiler
-             require Win32;
--            @sys_cmd = (@cc, $cfile, "/Fe$exefile", (map { '/I'.Win32::GetShortPathName($_) } @incpaths));
-+            @sys_cmd = (
-+                @$cc,
-+                $cfile,
-+                "/Fe$exefile",
-+                (map { '/I'.Win32::GetShortPathName($_) } @incpaths),
-+		"/link",
-+		@$ld
-+            );
-         } elsif($Config{cc} =~ /bcc32(\.exe)?/) {    # Borland
--            @sys_cmd = (@cc, (map { "-I$_" } @incpaths), "-o$exefile", $cfile);
--        } else {                                     # Unix-ish
--                                                     # gcc, Sun, AIX (gcc, cc)
--            @sys_cmd = (@cc, $cfile, (map { "-I$_" } @incpaths), "-o", "$exefile");
-+            @sys_cmd = (
-+                @$cc,
-+                @$ld,
-+                (map { "-I$_" } @incpaths),
-+                "-o$exefile",
-+                $cfile
-+            );
-+        } else { # Unix-ish: gcc, Sun, AIX (gcc, cc), ...
-+            @sys_cmd = (
-+                @$cc,
-+                @$ld,
-+                $cfile,
-+                (map { "-I$_" } @incpaths),
-+                "-o", "$exefile"
-+            );
-         }
-         warn "# @sys_cmd\n" if $args{debug};
-         my $rv = $args{debug} ? system(@sys_cmd) : _quiet_system(@sys_cmd);
--        push @missing, $header if $rv != 0 || ! -x $exefile; 
-+        push @missing, $header if $rv != 0 || ! -x $exefile;
-         _cleanup_exe($exefile);
-+        unlink $ofile if -e $ofile;
-         unlink $cfile;
-     } 
- 
--    # now do each library in turn with no headers
-+    # now do each library in turn with headers
-     my($ch, $cfile) = File::Temp::tempfile(
-         'assertlibXXXXXXXX', SUFFIX => '.c'
-     );
--    print $ch "int main(void) { return 0; }\n";
-+    my $ofile = $cfile;
-+    $ofile =~ s/\.c$/$Config{_o}/;
-+    print $ch qq{#include <$_>\n} foreach (@headers);
-+    print $ch "int main(void) { ".($args{function} || 'return 0;')." }\n";
-     close($ch);
-     for my $lib ( @libs ) {
-         my $exefile = File::Temp::mktemp( 'assertlibXXXXXXXX' ) . $Config{_exe};
-@@ -228,27 +289,54 @@
-             my @libpath = map { 
-                 q{/libpath:} . Win32::GetShortPathName($_)
-             } @libpaths; 
--            @sys_cmd = (@cc, $cfile, "${lib}.lib", "/Fe$exefile", 
--                        "/link", @libpath
-+            # this is horribly sensitive to the order of arguments
-+            @sys_cmd = (
-+                @$cc,
-+                $cfile,
-+                "${lib}.lib",
-+                "/Fe$exefile",
-+                (map { '/I'.Win32::GetShortPathName($_) } @incpaths),
-+                "/link",
-+                @$ld,
-+                (map {'/libpath:'.Win32::GetShortPathName($_)} @libpaths),
-             );
-         } elsif($Config{cc} eq 'CC/DECC') {          # VMS
-         } elsif($Config{cc} =~ /bcc32(\.exe)?/) {    # Borland
--            my @libpath = map { "-L$_" } @libpaths;
--            @sys_cmd = (@cc, "-o$exefile", "-l$lib", @libpath, $cfile);
-+            @sys_cmd = (
-+                @$cc,
-+                @$ld,
-+                "-o$exefile",
-+                (map { "-I$_" } @incpaths),
-+                (map { "-L$_" } @libpaths),
-+                "-l$lib",
-+                $cfile);
-         } else {                                     # Unix-ish
-                                                      # gcc, Sun, AIX (gcc, cc)
--            my @libpath = map { "-L$_" } @libpaths;
--            @sys_cmd = (@cc, $cfile,  "-o", "$exefile", "-l$lib", @libpath);
-+            @sys_cmd = (
-+                @$cc,
-+                @$ld,
-+                $cfile,
-+                "-o", "$exefile",
-+                (map { "-I$_" } @incpaths),
-+                (map { "-L$_" } @libpaths),
-+                "-l$lib",
-+            );
-         }
-         warn "# @sys_cmd\n" if $args{debug};
-         my $rv = $args{debug} ? system(@sys_cmd) : _quiet_system(@sys_cmd);
--        push @missing, $lib if $rv != 0 || ! -x $exefile; 
-+        push @missing, $lib if $rv != 0 || ! -x $exefile;
-+        my $absexefile = File::Spec->rel2abs($exefile);
-+        $absexefile = '"'.$absexefile.'"' if $absexefile =~ m/\s/;
-+        push @wrongresult, $lib if $rv == 0 && -x $exefile && system($absexefile) != 0;
-+        unlink $ofile if -e $ofile;
-         _cleanup_exe($exefile);
-     } 
-     unlink $cfile;
- 
-     my $miss_string = join( q{, }, map { qq{'$_'} } @missing );
--    die("Can't link/include $miss_string\n") if @missing;
-+    die("Can't link/include C library $miss_string, aborting.\n") if @missing;
-+    my $wrong_string = join( q{, }, map { qq{'$_'} } @wrongresult);
-+    die("wrong result: $wrong_string\n") if @wrongresult;
- }
- 
- sub _cleanup_exe {
-@@ -258,16 +346,37 @@
-     unlink $exefile if -f $exefile;
-     unlink $ofile if -f $ofile;
-     unlink "$exefile\.manifest" if -f "$exefile\.manifest";
-+    if ( $Config{cc} eq 'cl' ) {
-+        # MSVC also creates foo.ilk and foo.pdb
-+        my $ilkfile = $exefile;
-+        $ilkfile =~ s/$Config{_exe}$/.ilk/;
-+        my $pdbfile = $exefile;
-+        $pdbfile =~ s/$Config{_exe}$/.pdb/;
-+        unlink $ilkfile if -f $ilkfile;
-+        unlink $pdbfile if -f $pdbfile;
-+    }
-     return
- }
-     
-+# return ($cc, $ld)
-+# where $cc is an array ref of compiler name, compiler flags
-+# where $ld is an array ref of linker flags
- sub _findcc {
-+    # Need to use $keep=1 to work with MSWin32 backslashes and quotes
-+    my $Config_ccflags =  $Config{ccflags};  # use copy so ASPerl will compile
-+    my @Config_ldflags = ();
-+    for my $config_val ( @Config{qw(ldflags perllibs)} ){
-+        push @Config_ldflags, $config_val if ( $config_val =~ /\S/ );
-+    }
-+    my @ccflags = grep { length } quotewords('\s+', 1, $Config_ccflags||'');
-+    my @ldflags = grep { length } quotewords('\s+', 1, @Config_ldflags);
-     my @paths = split(/$Config{path_sep}/, $ENV{PATH});
-     my @cc = split(/\s+/, $Config{cc});
--    return @cc if -x $cc[0];
-+    return ( [ @cc, @ccflags ], \@ldflags ) if -x $cc[0];
-     foreach my $path (@paths) {
-         my $compiler = File::Spec->catfile($path, $cc[0]) . $Config{_exe};
--        return ($compiler, @cc[1 .. $#cc]) if -x $compiler;
-+        return ([ $compiler, @cc[1 .. $#cc], @ccflags ], \@ldflags)
-+            if -x $compiler;
-     }
-     die("Couldn't find your C compiler\n");
- }
-@@ -356,10 +465,14 @@
- 
- David Golden E<lt>dagolden at cpan.orgE<gt>
- 
-+Yasuhiro Matsumoto E<lt>mattn at cpan.orgE<gt>
-+
- Thanks to the cpan-testers-discuss mailing list for prompting us to write it
- in the first place;
- 
--to Chris Williams for help with Borland support.
-+to Chris Williams for help with Borland support;
-+
-+to Tony Cook for help with Microsoft compiler command-line options
- 
- =head1 COPYRIGHT and LICENCE
- 
diff --git a/debian/patches/series b/debian/patches/series
index 5f1c182..e69de29 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +0,0 @@
-devel-checklib.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libopengl-xscreensaver-perl.git



More information about the Pkg-perl-cvs-commits mailing list