import perl-ExtUtils-CBuilder-0.280240-510.el10

c10-beta imports/c10-beta/perl-ExtUtils-CBuilder-0.280240-510.el10
MSVSphere Packaging Team 3 months ago
commit c4ef0e0d6e
Signed by: sys_gitsync
GPG Key ID: B2B0B9F29E528FE8

1
.gitignore vendored

@ -0,0 +1 @@
SOURCES/ExtUtils-CBuilder-0.280236.tar.gz

@ -0,0 +1 @@
95f879ef2ac89a02f25df9194ea0876fd7767bd7 SOURCES/ExtUtils-CBuilder-0.280236.tar.gz

@ -0,0 +1,64 @@
From f55b546a261651ad76a2a339768a599a4d84b4f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Wed, 3 Jul 2013 11:01:02 +0200
Subject: [PATCH] Link XS modules to libperl.so with EU::CBuilder on Linux
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
<https://bugzilla.redhat.com/show_bug.cgi?id=960048>
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=327585#50>
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
MANIFEST | 1 +
lib/ExtUtils/CBuilder/Platform/linux.pm | 25 +++++++++++++++++++++++++
2 files changed, 26 insertions(+)
create mode 100644 lib/ExtUtils/CBuilder/Platform/linux.pm
diff --git a/MANIFEST b/MANIFEST
index fdc8bd9..a7de63a 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -25,6 +25,7 @@ lib/ExtUtils/CBuilder/Platform/android.pm
lib/ExtUtils/CBuilder/Platform/cygwin.pm
lib/ExtUtils/CBuilder/Platform/darwin.pm
lib/ExtUtils/CBuilder/Platform/dec_osf.pm
+lib/ExtUtils/CBuilder/Platform/linux.pm
lib/ExtUtils/CBuilder/Platform/os2.pm
t/00-have-compiler.t
t/01-basic.t
diff --git a/lib/ExtUtils/CBuilder/Platform/linux.pm b/lib/ExtUtils/CBuilder/Platform/linux.pm
new file mode 100644
index 0000000..823f852
--- /dev/null
+++ b/lib/ExtUtils/CBuilder/Platform/linux.pm
@@ -0,0 +1,25 @@
+package ExtUtils::CBuilder::Platform::linux;
+
+use strict;
+use ExtUtils::CBuilder::Platform::Unix;
+use File::Spec;
+
+our $VERSION = '0.280230';
+our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
+
+sub link {
+ my ($self, %args) = @_;
+ my $cf = $self->{config};
+
+ # Link XS modules to libperl.so explicitly because multiple
+ # dlopen(, RTLD_LOCAL) hides libperl symbols from XS module.
+ local $cf->{lddlflags} = $cf->{lddlflags};
+ if ($ENV{PERL_CORE}) {
+ $cf->{lddlflags} .= ' -L' . $self->perl_inc();
+ }
+ $cf->{lddlflags} .= ' -lperl';
+
+ return $self->SUPER::link(%args);
+}
+
+1;
--
2.13.6

@ -0,0 +1,381 @@
From fd23ba47d6ac8702c4bb498c9cbc3f8c583bab8e Mon Sep 17 00:00:00 2001
From: Jitka Plesnikova <jplesnik@redhat.com>
Date: Tue, 16 May 2023 16:45:36 +0200
Subject: [PATCH] Upgrade to 0.280238
---
Changes | 14 +++++++++
LICENSE | 6 ++--
Makefile.PL | 4 +--
lib/ExtUtils/CBuilder.pm | 3 +-
lib/ExtUtils/CBuilder/Base.pm | 19 ++++++++++--
lib/ExtUtils/CBuilder/Platform/Unix.pm | 3 +-
lib/ExtUtils/CBuilder/Platform/VMS.pm | 2 +-
lib/ExtUtils/CBuilder/Platform/Windows.pm | 31 ++++++++++++++++---
lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm | 2 +-
lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm | 2 +-
.../CBuilder/Platform/Windows/MSVC.pm | 2 +-
lib/ExtUtils/CBuilder/Platform/aix.pm | 2 +-
lib/ExtUtils/CBuilder/Platform/android.pm | 2 +-
lib/ExtUtils/CBuilder/Platform/cygwin.pm | 2 +-
lib/ExtUtils/CBuilder/Platform/darwin.pm | 19 +++++++++++-
lib/ExtUtils/CBuilder/Platform/dec_osf.pm | 2 +-
lib/ExtUtils/CBuilder/Platform/os2.pm | 2 +-
17 files changed, 90 insertions(+), 27 deletions(-)
diff --git a/Changes b/Changes
index 2ee209a..5c5c7ce 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,19 @@
Revision history for Perl extension ExtUtils::CBuilder.
+0.280238
+
+ Fix:
+
+ - use -isyswithroot option for the CORE directory for the system perl on darwin.
+ The compiler would fail to find EXTERN.h with -I.
+ Came up while working on a fix for the similar issue in
+ https://github.com/Perl/perl5/issues/20362
+
+0.280237 - 2022-05-09
+
+ - when not set to quiet, print commands being run in a usable form.
+ https://github.com/Perl/perl5/pull/19701
+
0.280236 - 2021-02-12
Fix:
diff --git a/LICENSE b/LICENSE
index 1102da8..1bffb03 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-This software is copyright (c) 2021 by Ken Williams.
+This software is copyright (c) 2020 by Ken Williams.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
@@ -12,7 +12,7 @@ b) the "Artistic License"
--- The GNU General Public License, Version 1, February 1989 ---
-This software is Copyright (c) 2021 by Ken Williams.
+This software is Copyright (c) 2020 by Ken Williams.
This is free software, licensed under:
@@ -272,7 +272,7 @@ That's all there is to it!
--- The Artistic License 1.0 ---
-This software is Copyright (c) 2021 by Ken Williams.
+This software is Copyright (c) 2020 by Ken Williams.
This is free software, licensed under:
diff --git a/Makefile.PL b/Makefile.PL
index 4177e21..5b7dd5d 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.017.
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.015.
use strict;
use warnings;
@@ -29,7 +29,7 @@ my %WriteMakefileArgs = (
"TEST_REQUIRES" => {
"Test::More" => "0.47"
},
- "VERSION" => "0.280236",
+ "VERSION" => "0.280235",
"test" => {
"TESTS" => "t/*.t"
}
diff --git a/lib/ExtUtils/CBuilder.pm b/lib/ExtUtils/CBuilder.pm
index 8b4fc4c..705d30a 100644
--- a/lib/ExtUtils/CBuilder.pm
+++ b/lib/ExtUtils/CBuilder.pm
@@ -1,5 +1,4 @@
package ExtUtils::CBuilder;
-our $VERSION = '0.280236'; # VERSION
use File::Spec ();
use File::Path ();
@@ -8,7 +7,7 @@ use Perl::OSType qw/os_type/;
use warnings;
use strict;
-
+our $VERSION = '0.280238'; # VERSION
our @ISA;
# We only use this once - don't waste a symbol table entry on it.
diff --git a/lib/ExtUtils/CBuilder/Base.pm b/lib/ExtUtils/CBuilder/Base.pm
index e42226f..0494caf 100644
--- a/lib/ExtUtils/CBuilder/Base.pm
+++ b/lib/ExtUtils/CBuilder/Base.pm
@@ -9,8 +9,7 @@ use Text::ParseWords;
use IPC::Cmd qw(can_run);
use File::Temp qw(tempfile);
-our $VERSION = '0.280236'; # VERSION
-
+our $VERSION = '0.280238'; # VERSION
# More details about C/C++ compilers:
# http://developers.sun.com/sunstudio/documentation/product/compiler.jsp
@@ -336,10 +335,24 @@ sub _do_link {
return wantarray ? ($out, @temp_files) : $out;
}
+sub quote_literal {
+ my ($self, $string) = @_;
+
+ if (length $string && $string !~ /[^a-zA-Z0-9,._+@%\/-]/) {
+ return $string;
+ }
+
+ $string =~ s{'}{'\\''}g;
+
+ return "'$string'";
+}
sub do_system {
my ($self, @cmd) = @_;
- print "@cmd\n" if !$self->{quiet};
+ if (!$self->{quiet}) {
+ my $full = join ' ', map $self->quote_literal($_), @cmd;
+ print $full . "\n";
+ }
return !system(@cmd);
}
diff --git a/lib/ExtUtils/CBuilder/Platform/Unix.pm b/lib/ExtUtils/CBuilder/Platform/Unix.pm
index 974903d..2eaf591 100644
--- a/lib/ExtUtils/CBuilder/Platform/Unix.pm
+++ b/lib/ExtUtils/CBuilder/Platform/Unix.pm
@@ -4,8 +4,7 @@ use warnings;
use strict;
use ExtUtils::CBuilder::Base;
-our $VERSION = '0.280236'; # VERSION
-
+our $VERSION = '0.280238'; # VERSION
our @ISA = qw(ExtUtils::CBuilder::Base);
sub link_executable {
diff --git a/lib/ExtUtils/CBuilder/Platform/VMS.pm b/lib/ExtUtils/CBuilder/Platform/VMS.pm
index d9b1fbd..d09a608 100644
--- a/lib/ExtUtils/CBuilder/Platform/VMS.pm
+++ b/lib/ExtUtils/CBuilder/Platform/VMS.pm
@@ -4,7 +4,7 @@ use warnings;
use strict;
use ExtUtils::CBuilder::Base;
-our $VERSION = '0.280236'; # VERSION
+our $VERSION = '0.280238'; # VERSION
our @ISA = qw(ExtUtils::CBuilder::Base);
use File::Spec::Functions qw(catfile catdir);
diff --git a/lib/ExtUtils/CBuilder/Platform/Windows.pm b/lib/ExtUtils/CBuilder/Platform/Windows.pm
index b81384f..2fffc83 100644
--- a/lib/ExtUtils/CBuilder/Platform/Windows.pm
+++ b/lib/ExtUtils/CBuilder/Platform/Windows.pm
@@ -8,7 +8,7 @@ use File::Spec;
use ExtUtils::CBuilder::Base;
use IO::File;
-our $VERSION = '0.280236'; # VERSION
+our $VERSION = '0.280238'; # VERSION
our @ISA = qw(ExtUtils::CBuilder::Base);
=begin comment
@@ -51,6 +51,22 @@ sub _compiler_type {
: 'GCC');
}
+# native quoting, not shell quoting
+sub quote_literal {
+ my ($self, $string) = @_;
+
+ # some of these characters don't need to be quoted for "native" quoting, but
+ # quote them anyway so they are more likely to make it through cmd.exe
+ if (length $string && $string !~ /[ \t\n\x0b"|<>%]/) {
+ return $string;
+ }
+
+ $string =~ s{(\\*)(?="|\z)}{$1$1}g;
+ $string =~ s{"}{\\"}g;
+
+ return qq{"$string"};
+}
+
sub split_like_shell {
# Since Windows will pass the whole command string (not an argument
# array) to the target program and make the program parse it itself,
@@ -65,10 +81,15 @@ sub split_like_shell {
sub do_system {
# See above
my $self = shift;
- my $cmd = join(" ",
- grep length,
- map {$a=$_;$a=~s/\t/ /g;$a=~s/^\s+|\s+$//;$a}
- grep defined, @_);
+ my $cmd = join ' ',
+ grep length,
+ map {$a=$_;$a=~s/\t/ /g;$a=~s/^\s+|\s+$//;$a}
+ grep defined, @_;
+
+ if (!$self->{quiet}) {
+ print $cmd . "\n";
+ }
+ local $self->{quiet} = 1;
return $self->SUPER::do_system($cmd);
}
diff --git a/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm b/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm
index 657241a..6ab48ba 100644
--- a/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm
+++ b/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm
@@ -1,6 +1,6 @@
package ExtUtils::CBuilder::Platform::Windows::BCC;
-our $VERSION = '0.280236'; # VERSION
+our $VERSION = '0.280238'; # VERSION
use strict;
use warnings;
diff --git a/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm b/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm
index 52664c7..c3eb7a0 100644
--- a/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm
+++ b/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm
@@ -1,6 +1,6 @@
package ExtUtils::CBuilder::Platform::Windows::GCC;
-our $VERSION = '0.280236'; # VERSION
+our $VERSION = '0.280238'; # VERSION
use warnings;
use strict;
diff --git a/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm b/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm
index 6cbcc9b..ce5e99f 100644
--- a/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm
+++ b/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm
@@ -1,6 +1,6 @@
package ExtUtils::CBuilder::Platform::Windows::MSVC;
-our $VERSION = '0.280236'; # VERSION
+our $VERSION = '0.280238'; # VERSION
use warnings;
use strict;
diff --git a/lib/ExtUtils/CBuilder/Platform/aix.pm b/lib/ExtUtils/CBuilder/Platform/aix.pm
index 2ef8b38..35de7fa 100644
--- a/lib/ExtUtils/CBuilder/Platform/aix.pm
+++ b/lib/ExtUtils/CBuilder/Platform/aix.pm
@@ -5,7 +5,7 @@ use strict;
use ExtUtils::CBuilder::Platform::Unix;
use File::Spec;
-our $VERSION = '0.280236'; # VERSION
+our $VERSION = '0.280238'; # VERSION
our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
sub need_prelink { 1 }
diff --git a/lib/ExtUtils/CBuilder/Platform/android.pm b/lib/ExtUtils/CBuilder/Platform/android.pm
index 8500ab9..44ad646 100644
--- a/lib/ExtUtils/CBuilder/Platform/android.pm
+++ b/lib/ExtUtils/CBuilder/Platform/android.pm
@@ -6,7 +6,7 @@ use File::Spec;
use ExtUtils::CBuilder::Platform::Unix;
use Config;
-our $VERSION = '0.280236'; # VERSION
+our $VERSION = '0.280238'; # VERSION
our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
# The Android linker will not recognize symbols from
diff --git a/lib/ExtUtils/CBuilder/Platform/cygwin.pm b/lib/ExtUtils/CBuilder/Platform/cygwin.pm
index 3c8beac..14d814c 100644
--- a/lib/ExtUtils/CBuilder/Platform/cygwin.pm
+++ b/lib/ExtUtils/CBuilder/Platform/cygwin.pm
@@ -5,7 +5,7 @@ use strict;
use File::Spec;
use ExtUtils::CBuilder::Platform::Unix;
-our $VERSION = '0.280236'; # VERSION
+our $VERSION = '0.280238'; # VERSION
our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
# TODO: If a specific exe_file name is requested, if the exe created
diff --git a/lib/ExtUtils/CBuilder/Platform/darwin.pm b/lib/ExtUtils/CBuilder/Platform/darwin.pm
index e050e32..7e8ae7a 100644
--- a/lib/ExtUtils/CBuilder/Platform/darwin.pm
+++ b/lib/ExtUtils/CBuilder/Platform/darwin.pm
@@ -3,10 +3,14 @@ package ExtUtils::CBuilder::Platform::darwin;
use warnings;
use strict;
use ExtUtils::CBuilder::Platform::Unix;
+use Config;
-our $VERSION = '0.280236'; # VERSION
+our $VERSION = '0.280238'; # VERSION
our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
+my ($osver) = split /\./, $Config{osvers};
+my $apple_cor = $^X eq "/usr/bin/perl" && $osver >= 18;
+
sub compile {
my $self = shift;
my $cf = $self->{config};
@@ -22,5 +26,18 @@ sub compile {
$self->SUPER::compile(@_);
}
+sub arg_include_dirs {
+ my $self = shift;
+
+ if ($apple_cor) {
+ my $perl_inc = $self->perl_inc;
+ return map {
+ $_ eq $perl_inc ? ("-iwithsysroot", $_ ) : "-I$_"
+ } @_;
+ }
+ else {
+ return $self->SUPER::arg_include_dirs(@_);
+ }
+}
1;
diff --git a/lib/ExtUtils/CBuilder/Platform/dec_osf.pm b/lib/ExtUtils/CBuilder/Platform/dec_osf.pm
index 971cf93..6b97095 100644
--- a/lib/ExtUtils/CBuilder/Platform/dec_osf.pm
+++ b/lib/ExtUtils/CBuilder/Platform/dec_osf.pm
@@ -5,7 +5,7 @@ use strict;
use ExtUtils::CBuilder::Platform::Unix;
use File::Spec;
-our $VERSION = '0.280236'; # VERSION
+our $VERSION = '0.280238'; # VERSION
our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
sub link_executable {
diff --git a/lib/ExtUtils/CBuilder/Platform/os2.pm b/lib/ExtUtils/CBuilder/Platform/os2.pm
index 58d316b..a7d11dc 100644
--- a/lib/ExtUtils/CBuilder/Platform/os2.pm
+++ b/lib/ExtUtils/CBuilder/Platform/os2.pm
@@ -4,7 +4,7 @@ use warnings;
use strict;
use ExtUtils::CBuilder::Platform::Unix;
-our $VERSION = '0.280236'; # VERSION
+our $VERSION = '0.280238'; # VERSION
our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
sub need_prelink { 1 }
--
2.40.1

@ -0,0 +1,335 @@
From a53c889b6bfb04a998a2fd2504de358cbb293530 Mon Sep 17 00:00:00 2001
From: Jitka Plesnikova <jplesnik@redhat.com>
Date: Thu, 9 May 2024 15:06:30 +0200
Subject: [PATCH] Upgrade to 0.280240
---
Changes | 6 +++
lib/ExtUtils/CBuilder.pm | 2 +-
lib/ExtUtils/CBuilder/Base.pm | 12 ++++--
lib/ExtUtils/CBuilder/Platform/Unix.pm | 2 +-
lib/ExtUtils/CBuilder/Platform/VMS.pm | 2 +-
lib/ExtUtils/CBuilder/Platform/Windows.pm | 4 +-
lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm | 2 +-
lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm | 39 ++-----------------
.../CBuilder/Platform/Windows/MSVC.pm | 2 +-
lib/ExtUtils/CBuilder/Platform/aix.pm | 2 +-
lib/ExtUtils/CBuilder/Platform/android.pm | 2 +-
lib/ExtUtils/CBuilder/Platform/cygwin.pm | 2 +-
lib/ExtUtils/CBuilder/Platform/darwin.pm | 2 +-
lib/ExtUtils/CBuilder/Platform/dec_osf.pm | 2 +-
lib/ExtUtils/CBuilder/Platform/os2.pm | 2 +-
t/00-have-compiler.t | 3 +-
t/03-cplusplus.t | 2 +-
17 files changed, 34 insertions(+), 54 deletions(-)
diff --git a/Changes b/Changes
index 5c5c7ce..14aa6e5 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,11 @@
Revision history for Perl extension ExtUtils::CBuilder.
+0.280239
+
+ - make the definition of boot_compilet() in the probe code generated
+ by have_compiler() a prototype to prevent warnings.
+ https://github.com/Perl/perl5/issues/21109
+
0.280238
Fix:
diff --git a/lib/ExtUtils/CBuilder.pm b/lib/ExtUtils/CBuilder.pm
index 705d30a..ddaf24d 100644
--- a/lib/ExtUtils/CBuilder.pm
+++ b/lib/ExtUtils/CBuilder.pm
@@ -7,7 +7,7 @@ use Perl::OSType qw/os_type/;
use warnings;
use strict;
-our $VERSION = '0.280238'; # VERSION
+our $VERSION = '0.280240'; # VERSION
our @ISA;
# We only use this once - don't waste a symbol table entry on it.
diff --git a/lib/ExtUtils/CBuilder/Base.pm b/lib/ExtUtils/CBuilder/Base.pm
index 0494caf..3024de5 100644
--- a/lib/ExtUtils/CBuilder/Base.pm
+++ b/lib/ExtUtils/CBuilder/Base.pm
@@ -9,7 +9,7 @@ use Text::ParseWords;
use IPC::Cmd qw(can_run);
use File::Temp qw(tempfile);
-our $VERSION = '0.280238'; # VERSION
+our $VERSION = '0.280240'; # VERSION
# More details about C/C++ compilers:
# http://developers.sun.com/sunstudio/documentation/product/compiler.jsp
@@ -202,10 +202,16 @@ sub have_compiler {
binmode $FH;
if ( $is_cplusplus ) {
- print $FH "class Bogus { public: int boot_compilet() { return 1; } };\n";
+ print $FH q<namespace Bogus { extern "C" int boot_compilet() { return 1; } };> . "\n";
}
else {
- print $FH "int boot_compilet() { return 1; }\n";
+ # Use extern "C" if "cc" was set to a C++ compiler.
+ print $FH <<EOF;
+#ifdef __cplusplus
+extern "C"
+#endif
+int boot_compilet(void) { return 1; }
+EOF
}
close $FH;
diff --git a/lib/ExtUtils/CBuilder/Platform/Unix.pm b/lib/ExtUtils/CBuilder/Platform/Unix.pm
index 2eaf591..bc7a4fe 100644
--- a/lib/ExtUtils/CBuilder/Platform/Unix.pm
+++ b/lib/ExtUtils/CBuilder/Platform/Unix.pm
@@ -4,7 +4,7 @@ use warnings;
use strict;
use ExtUtils::CBuilder::Base;
-our $VERSION = '0.280238'; # VERSION
+our $VERSION = '0.280240'; # VERSION
our @ISA = qw(ExtUtils::CBuilder::Base);
sub link_executable {
diff --git a/lib/ExtUtils/CBuilder/Platform/VMS.pm b/lib/ExtUtils/CBuilder/Platform/VMS.pm
index d09a608..f7579a2 100644
--- a/lib/ExtUtils/CBuilder/Platform/VMS.pm
+++ b/lib/ExtUtils/CBuilder/Platform/VMS.pm
@@ -4,7 +4,7 @@ use warnings;
use strict;
use ExtUtils::CBuilder::Base;
-our $VERSION = '0.280238'; # VERSION
+our $VERSION = '0.280240'; # VERSION
our @ISA = qw(ExtUtils::CBuilder::Base);
use File::Spec::Functions qw(catfile catdir);
diff --git a/lib/ExtUtils/CBuilder/Platform/Windows.pm b/lib/ExtUtils/CBuilder/Platform/Windows.pm
index 2fffc83..3ad649d 100644
--- a/lib/ExtUtils/CBuilder/Platform/Windows.pm
+++ b/lib/ExtUtils/CBuilder/Platform/Windows.pm
@@ -8,7 +8,7 @@ use File::Spec;
use ExtUtils::CBuilder::Base;
use IO::File;
-our $VERSION = '0.280238'; # VERSION
+our $VERSION = '0.280240'; # VERSION
our @ISA = qw(ExtUtils::CBuilder::Base);
=begin comment
@@ -238,7 +238,7 @@ sub link {
my @cmds = $self->format_linker_cmd(%spec);
while ( my $cmd = shift @cmds ) {
- $self->do_system( @$cmd );
+ $self->do_system( @$cmd ) or die "error building $output from @objects"
}
$spec{output} =~ tr/'"//d;
diff --git a/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm b/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm
index 6ab48ba..737448f 100644
--- a/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm
+++ b/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm
@@ -1,6 +1,6 @@
package ExtUtils::CBuilder::Platform::Windows::BCC;
-our $VERSION = '0.280238'; # VERSION
+our $VERSION = '0.280240'; # VERSION
use strict;
use warnings;
diff --git a/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm b/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm
index c3eb7a0..d2da1ed 100644
--- a/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm
+++ b/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm
@@ -1,6 +1,6 @@
package ExtUtils::CBuilder::Platform::Windows::GCC;
-our $VERSION = '0.280238'; # VERSION
+our $VERSION = '0.280240'; # VERSION
use warnings;
use strict;
@@ -47,42 +47,12 @@ sub format_linker_cmd {
$path = "-L$path";
}
- my @cmds; # Stores the series of commands needed to build the module.
-
- my $DLLTOOL = $cf->{dlltool} || 'dlltool';
-
- push @cmds, [
- $DLLTOOL, '--def' , $spec{def_file},
- '--output-exp' , $spec{explib}
- ];
-
# split off any -arguments included in ld
my @ld = split / (?=-)/, $spec{ld};
- push @cmds, [ grep {defined && length} (
- @ld ,
- '-o', $spec{output} ,
- "-Wl,--base-file,$spec{base_file}" ,
- "-Wl,--enable-auto-image-base" ,
- @{$spec{lddlflags}} ,
- @{$spec{libpath}} ,
- @{$spec{startup}} ,
- @{$spec{objects}} ,
- @{$spec{other_ldflags}} ,
- $spec{libperl} ,
- @{$spec{perllibs}} ,
- $spec{explib} ,
- $spec{map_file} ? ('-Map', $spec{map_file}) : ''
- ) ];
-
- push @cmds, [
- $DLLTOOL, '--def' , $spec{def_file},
- '--output-exp' , $spec{explib},
- '--base-file' , $spec{base_file}
- ];
-
- push @cmds, [ grep {defined && length} (
+ return [ grep {defined && length} (
@ld ,
+ $spec{def_file} ,
'-o', $spec{output} ,
"-Wl,--enable-auto-image-base" ,
@{$spec{lddlflags}} ,
@@ -92,11 +62,8 @@ sub format_linker_cmd {
@{$spec{other_ldflags}} ,
$spec{libperl} ,
@{$spec{perllibs}} ,
- $spec{explib} ,
$spec{map_file} ? ('-Map', $spec{map_file}) : ''
) ];
-
- return @cmds;
}
sub write_linker_script {
diff --git a/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm b/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm
index ce5e99f..2acca7a 100644
--- a/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm
+++ b/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm
@@ -1,6 +1,6 @@
package ExtUtils::CBuilder::Platform::Windows::MSVC;
-our $VERSION = '0.280238'; # VERSION
+our $VERSION = '0.280240'; # VERSION
use warnings;
use strict;
diff --git a/lib/ExtUtils/CBuilder/Platform/aix.pm b/lib/ExtUtils/CBuilder/Platform/aix.pm
index 35de7fa..373d025 100644
--- a/lib/ExtUtils/CBuilder/Platform/aix.pm
+++ b/lib/ExtUtils/CBuilder/Platform/aix.pm
@@ -5,7 +5,7 @@ use strict;
use ExtUtils::CBuilder::Platform::Unix;
use File::Spec;
-our $VERSION = '0.280238'; # VERSION
+our $VERSION = '0.280240'; # VERSION
our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
sub need_prelink { 1 }
diff --git a/lib/ExtUtils/CBuilder/Platform/android.pm b/lib/ExtUtils/CBuilder/Platform/android.pm
index 44ad646..5eec4e5 100644
--- a/lib/ExtUtils/CBuilder/Platform/android.pm
+++ b/lib/ExtUtils/CBuilder/Platform/android.pm
@@ -6,7 +6,7 @@ use File::Spec;
use ExtUtils::CBuilder::Platform::Unix;
use Config;
-our $VERSION = '0.280238'; # VERSION
+our $VERSION = '0.280240'; # VERSION
our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
# The Android linker will not recognize symbols from
diff --git a/lib/ExtUtils/CBuilder/Platform/cygwin.pm b/lib/ExtUtils/CBuilder/Platform/cygwin.pm
index 14d814c..175d22a 100644
--- a/lib/ExtUtils/CBuilder/Platform/cygwin.pm
+++ b/lib/ExtUtils/CBuilder/Platform/cygwin.pm
@@ -5,7 +5,7 @@ use strict;
use File::Spec;
use ExtUtils::CBuilder::Platform::Unix;
-our $VERSION = '0.280238'; # VERSION
+our $VERSION = '0.280240'; # VERSION
our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
# TODO: If a specific exe_file name is requested, if the exe created
diff --git a/lib/ExtUtils/CBuilder/Platform/darwin.pm b/lib/ExtUtils/CBuilder/Platform/darwin.pm
index 7e8ae7a..42f28b1 100644
--- a/lib/ExtUtils/CBuilder/Platform/darwin.pm
+++ b/lib/ExtUtils/CBuilder/Platform/darwin.pm
@@ -5,7 +5,7 @@ use strict;
use ExtUtils::CBuilder::Platform::Unix;
use Config;
-our $VERSION = '0.280238'; # VERSION
+our $VERSION = '0.280240'; # VERSION
our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
my ($osver) = split /\./, $Config{osvers};
diff --git a/lib/ExtUtils/CBuilder/Platform/dec_osf.pm b/lib/ExtUtils/CBuilder/Platform/dec_osf.pm
index 6b97095..f020dca 100644
--- a/lib/ExtUtils/CBuilder/Platform/dec_osf.pm
+++ b/lib/ExtUtils/CBuilder/Platform/dec_osf.pm
@@ -5,7 +5,7 @@ use strict;
use ExtUtils::CBuilder::Platform::Unix;
use File::Spec;
-our $VERSION = '0.280238'; # VERSION
+our $VERSION = '0.280240'; # VERSION
our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
sub link_executable {
diff --git a/lib/ExtUtils/CBuilder/Platform/os2.pm b/lib/ExtUtils/CBuilder/Platform/os2.pm
index a7d11dc..53e63b9 100644
--- a/lib/ExtUtils/CBuilder/Platform/os2.pm
+++ b/lib/ExtUtils/CBuilder/Platform/os2.pm
@@ -4,7 +4,7 @@ use warnings;
use strict;
use ExtUtils::CBuilder::Platform::Unix;
-our $VERSION = '0.280238'; # VERSION
+our $VERSION = '0.280240'; # VERSION
our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
sub need_prelink { 1 }
diff --git a/t/00-have-compiler.t b/t/00-have-compiler.t
index e4706a0..bd2ed10 100644
--- a/t/00-have-compiler.t
+++ b/t/00-have-compiler.t
@@ -62,7 +62,8 @@ my $b3 = ExtUtils::CBuilder->new(quiet => 1);
configure_fake_present_compilers($b3);
is( $b3->have_compiler, 1, "have_compiler: fake present cc" );
}
-{
+SKIP: {
+skip 'C++ test is broken on windows', 1 if $^O eq 'MSWin32';
my $b4 = ExtUtils::CBuilder->new(quiet => 1);
configure_fake_present_compilers($b4);
is( $b4->have_cplusplus, 1, "have_cpp_compiler: fake present c++" );
diff --git a/t/03-cplusplus.t b/t/03-cplusplus.t
index 0c05ae2..2fae11f 100644
--- a/t/03-cplusplus.t
+++ b/t/03-cplusplus.t
@@ -33,7 +33,7 @@ ok $b->have_cplusplus, "have_cplusplus";
$source_file = File::Spec->catfile('t', 'cplust.cc');
{
open my $FH, '>', $source_file or die "Can't create $source_file: $!";
- print $FH "class Bogus { public: int boot_cplust() { return 1; } };\n";
+ print $FH q<namespace Bogus { extern "C" int boot_cplust() { return 1; } };> . "\n";
close $FH;
}
ok -e $source_file, "source file '$source_file' created";
--
2.45.0

@ -0,0 +1,264 @@
%global base_version 0.280236
Name: perl-ExtUtils-CBuilder
# Compete with perl.spec
Epoch: 1
# Mimic perl.spec
Version: 0.280240
Release: 510%{?dist}
Summary: Compile and link C code for Perl modules
License: GPL-1.0-or-later OR Artistic-1.0-Perl
URL: https://metacpan.org/release/ExtUtils-CBuilder
Source0: https://cpan.metacpan.org/authors/id/A/AM/AMBS/ExtUtils-CBuilder-%{base_version}.tar.gz
# Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048
Patch0: ExtUtils-CBuilder-0.280230-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch
# Unbundled from perl 5.37.11
Patch1: ExtUtils-CBuilder-0.280236-Upgrade-to-0.280238.patch
# Unbundled from perl 5.40.0-RC1
Patch2: ExtUtils-CBuilder-0.280238-Upgrade-to-0.280240.patch
BuildArch: noarch
BuildRequires: make
BuildRequires: perl-generators
BuildRequires: perl-interpreter
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: perl(strict)
BuildRequires: perl(warnings)
# Run-time:
BuildRequires: perl-devel
BuildRequires: perl(Config)
BuildRequires: perl(Cwd)
BuildRequires: perl(DynaLoader)
# ExtUtils::Mksymlists 6.30 not used at test time
BuildRequires: perl(File::Basename)
BuildRequires: perl(File::Path)
BuildRequires: perl(File::Spec) >= 3.13
# File::Spec::Functions not used at test time
BuildRequires: perl(File::Temp)
# IO::File not used at test time
BuildRequires: perl(IPC::Cmd)
BuildRequires: perl(Perl::OSType) >= 1
BuildRequires: perl(Text::ParseWords)
# Optional run-time:
# C and C++ compilers are highly recommended because compiling code is the
# purpose of ExtUtils::CBuilder, bug #1547165
BuildRequires: gcc
BuildRequires: gcc-c++
# Tests:
BuildRequires: perl(Test::More) >= 0.47
# vmsish not used
# C and C++ compilers are highly recommended because compiling code is the
# purpose of ExtUtils::CBuilder, bug #1547165
Requires: gcc
Requires: gcc-c++
Requires: perl-devel
Requires: perl(DynaLoader)
Requires: perl(ExtUtils::Mksymlists) >= 6.30
Requires: perl(File::Spec) >= 3.13
Requires: perl(Perl::OSType) >= 1
%{?perl_default_filter}
# Remove under-specified dependencies
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\((File::Spec|Perl::OSType)\\)$
%description
This module can build the C portions of Perl modules by invoking the
appropriate compilers and linkers in a cross-platform manner. It was motivated
by the Module::Build project, but may be useful for other purposes as well.
%package tests
Summary: Tests for %{name}
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: perl-Test-Harness
%description tests
Tests from %{name}-%{version}. Execute them
with "%{_libexecdir}/%{name}/test".
%prep
%autosetup -p1 -n ExtUtils-CBuilder-%{base_version}
# Normalize shebangs
for F in t/*.t; do
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F"
chmod +x "$F"
done
%build
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
%{make_build}
%install
%{make_install}
%{_fixperms} %{buildroot}/*
# Install tests
mkdir -p %{buildroot}/%{_libexecdir}/%{name}
cp -a t %{buildroot}/%{_libexecdir}/%{name}
cat > %{buildroot}/%{_libexecdir}/%{name}/test << 'EOF'
#!/bin/bash
set -e
# Tests write into temporary files/directories. The solution is to copy the
# tests into a writable directory and execute them from there.
DIR=$(mktemp -d)
pushd "$DIR"
cp -a %{_libexecdir}/%{name}/* ./
prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
popd
rm -rf "$DIR"
EOF
chmod +x %{buildroot}/%{_libexecdir}/%{name}/test
%check
make test
%files
%license LICENSE
%doc Changes CONTRIBUTING README README.mkdn
%dir %{perl_vendorlib}/ExtUtils
%{perl_vendorlib}/ExtUtils/CBuilder*
%{_mandir}/man3/ExtUtils::CBuilder*
%files tests
%{_libexecdir}/%{name}
%changelog
* Thu Jul 18 2024 Jitka Plesnikova <jplesnik@redhat.com> - 1:0.280240-510
- Increase release to favour standalone package
* Wed Jul 17 2024 Jitka Plesnikova <jplesnik@redhat.com> - 1:0.280240-503
- Upgrade to 0.280240 as provided in 5.40.0-RC1
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1:0.280238-503
- Bump release for June 2024 mass rebuild
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.280238-502
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.280238-501
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.280238-500
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jul 11 2023 Jitka Plesnikova <jplesnik@redhat.com> - 1:0.280238-499
- Increase release to favour standalone package
* Tue May 16 2023 Jitka Plesnikova <jplesnik@redhat.com> - 1:0.280238-1
- Upgrade to 0.280238 as provided in perl-5.37.11
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.280236-491
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Dec 02 2022 Jitka Plesnikova <jplesnik@redhat.com> - 1:0.280236-490
- Update license to SPDX format
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.280236-489
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon May 30 2022 Jitka Plesnikova <jplesnik@redhat.com> - 1:0.280236-488
- Increase release to favour standalone package
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.280236-479
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.280236-478
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1:0.280236-477
- Increase release to favour standalone package
* Tue Feb 16 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1:0.280236-2
- Package tests
* Mon Feb 15 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1:0.280236-1
- 0.280236 bump
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.280235-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Nov 02 2020 Jitka Plesnikova <jplesnik@redhat.com> - 1:0.280235-1
- 0.280235 bump
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.280234-457
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jun 22 2020 Jitka Plesnikova <jplesnik@redhat.com> - 1:0.280234-456
- Increase release to favour standalone package
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.280234-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Jan 21 2020 Petr Pisar <ppisar@redhat.com> - 1:0.280234-1
- 0.280234 bump
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.280231-439
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu May 30 2019 Jitka Plesnikova <jplesnik@redhat.com> - 1:0.280231-438
- Increase release to favour standalone package
* Wed Apr 03 2019 Petr Pisar <ppisar@redhat.com> - 1:0.280231-1
- 0.280231 bump
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.280230-418
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.280230-417
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Jun 27 2018 Jitka Plesnikova <jplesnik@redhat.com> - 1:0.280230-416
- Increase release to favour standalone package
* Fri Feb 23 2018 Petr Pisar <ppisar@redhat.com> - 1:0.280230-3
- Add a dependency on gcc and gcc-c++ (bug #1547165)
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.280230-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Nov 23 2017 Petr Pisar <ppisar@redhat.com> - 1:0.280230-1
- 0.280230 bump
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.280226-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Mon Jul 17 2017 Petr Pisar <ppisar@redhat.com> - 1:0.280226-1
- 0.280226 bump
* Sat Jun 03 2017 Jitka Plesnikova <jplesnik@redhat.com> - 1:0.280225-393
- Perl 5.26 rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.280225-366
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Sat May 14 2016 Jitka Plesnikova <jplesnik@redhat.com> - 1:0.280225-365
- Increase release to favour standalone package
* Wed May 11 2016 Jitka Plesnikova <jplesnik@redhat.com> - 1:0.280225-1
- 0.280225 bump in order to dual-live with perl 5.24
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.280224-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Mon Oct 12 2015 Petr Pisar <ppisar@redhat.com> - 1:0.280224-1
- 0.280224 bump
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.280223-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Thu Jun 04 2015 Jitka Plesnikova <jplesnik@redhat.com> - 1:0.280223-2
- Perl 5.22 rebuild
* Thu Jun 04 2015 Petr Pisar <ppisar@redhat.com> - 1:0.280223-1
- 0.280223 bump
* Wed Jun 03 2015 Jitka Plesnikova <jplesnik@redhat.com> - 1:0.280221-2
- Perl 5.22 rebuild
* Wed May 06 2015 Petr Pisar <ppisar@redhat.com> - 1:0.280221-1
- 0.280221 bump in order to dual-live with perl 5.22
* Mon Nov 03 2014 Petr Pisar <ppisar@redhat.com> - 1:0.280220-1
- 0.280220 bump
* Thu Sep 18 2014 Petr Pisar <ppisar@redhat.com> - 1:0.280219-1
- Specfile autogenerated by cpanspec 1.78.
Loading…
Cancel
Save