Hello community,
here is the log from the commit of package perl-Devel-CheckCompiler for
openSUSE:Factory checked in at 2015-07-02 22:50:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Devel-CheckCompiler (Old)
and /work/SRC/openSUSE:Factory/.perl-Devel-CheckCompiler.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Devel-CheckCompiler"
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-Devel-CheckCompiler/perl-Devel-CheckCompiler.changes
2014-09-17 17:26:48.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Devel-CheckCompiler.new/perl-Devel-CheckCompiler.changes
2015-07-03 00:12:33.000000000 +0200
@@ -1,0 +2,12 @@
+Tue Jun 30 14:25:45 UTC 2015 - [email protected]
+
+- updated to 0.06
+ see /usr/share/doc/packages/perl-Devel-CheckCompiler/Changes
+
+ 0.06 2015-06-30T05:22:51Z
+ - More strict C99 check code
+ (tokuhirom)
+ - Fix for older GCC(< 5.0)
+ (Syohei YOSHIDA)
+
+-------------------------------------------------------------------
Old:
----
Devel-CheckCompiler-0.05.tar.gz
New:
----
Devel-CheckCompiler-0.06.tar.gz
cpanspec.yml
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Devel-CheckCompiler.spec ++++++
--- /var/tmp/diff_new_pack.e175Fj/_old 2015-07-03 00:12:33.000000000 +0200
+++ /var/tmp/diff_new_pack.e175Fj/_new 2015-07-03 00:12:33.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-Devel-CheckCompiler
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,22 +17,21 @@
Name: perl-Devel-CheckCompiler
-Version: 0.05
+Version: 0.06
Release: 0
%define cpan_name Devel-CheckCompiler
Summary: Check the compiler's availability
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Devel-CheckCompiler/
-Source:
http://www.cpan.org/authors/id/S/SY/SYOHEX/%{cpan_name}-%{version}.tar.gz
+Source0:
http://www.cpan.org/authors/id/S/SY/SYOHEX/%{cpan_name}-%{version}.tar.gz
+Source1: cpanspec.yml
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
-BuildRequires: perl(CPAN::Meta)
-BuildRequires: perl(CPAN::Meta::Prereqs)
BuildRequires: perl(ExtUtils::CBuilder)
-BuildRequires: perl(Module::Build) >= 0.38
+BuildRequires: perl(Module::Build) >= 0.380000
BuildRequires: perl(Test::More) >= 0.98
BuildRequires: perl(Test::Requires)
BuildRequires: perl(parent)
@@ -59,6 +58,6 @@
%files -f %{name}.files
%defattr(-,root,root,755)
-%doc Changes cpanfile LICENSE README.md
+%doc Changes LICENSE README.md
%changelog
++++++ Devel-CheckCompiler-0.05.tar.gz -> Devel-CheckCompiler-0.06.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-CheckCompiler-0.05/Build.PL
new/Devel-CheckCompiler-0.06/Build.PL
--- old/Devel-CheckCompiler-0.05/Build.PL 2013-12-03 23:52:49.000000000
+0100
+++ new/Devel-CheckCompiler-0.06/Build.PL 2015-06-30 07:26:29.000000000
+0200
@@ -12,8 +12,6 @@
use Module::Build;
use File::Basename;
use File::Spec;
-use CPAN::Meta;
-use CPAN::Meta::Prereqs;
my %args = (
license => 'perl',
@@ -34,7 +32,7 @@
test_files => ((-d '.git' || $ENV{RELEASE_TESTING}) && -d 'xt')
? 't/ xt/' : 't/',
recursive_test_files => 1,
-
+
);
if (-d 'share') {
$args{share_dir} = 'share';
@@ -53,20 +51,15 @@
)->new(%args);
$builder->create_build_script();
-my $mbmeta = CPAN::Meta->load_file('MYMETA.json');
-my $meta = CPAN::Meta->load_file('META.json');
-my $prereqs_hash = CPAN::Meta::Prereqs->new(
- $meta->prereqs
-)->with_merged_prereqs(
- CPAN::Meta::Prereqs->new($mbmeta->prereqs)
-)->as_string_hash;
-my $mymeta = CPAN::Meta->new(
- {
- %{$meta->as_struct},
- prereqs => $prereqs_hash
- }
-);
-print "Merging cpanfile prereqs to MYMETA.yml\n";
-$mymeta->save('MYMETA.yml', { version => 1.4 });
-print "Merging cpanfile prereqs to MYMETA.json\n";
-$mymeta->save('MYMETA.json', { version => 2 });
+use File::Copy;
+
+print "cp META.json MYMETA.json\n";
+copy("META.json","MYMETA.json") or die "Copy failed(META.json): $!";
+
+if (-f 'META.yml') {
+ print "cp META.yml MYMETA.yml\n";
+ copy("META.yml","MYMETA.yml") or die "Copy failed(META.yml): $!";
+} else {
+ print "There is no META.yml... You may install this module from the
repository...\n";
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-CheckCompiler-0.05/Changes
new/Devel-CheckCompiler-0.06/Changes
--- old/Devel-CheckCompiler-0.05/Changes 2013-12-03 23:52:49.000000000
+0100
+++ new/Devel-CheckCompiler-0.06/Changes 2015-06-30 07:26:29.000000000
+0200
@@ -1,5 +1,11 @@
Revision history for Perl extension Devel::CheckCompiler
+0.06 2015-06-30T05:22:51Z
+ - More strict C99 check code
+ (tokuhirom)
+ - Fix for older GCC(< 5.0)
+ (Syohei YOSHIDA)
+
0.05 2013-12-03T22:52:46Z
- Add extra_linker_flags to check_compiler()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-CheckCompiler-0.05/META.json
new/Devel-CheckCompiler-0.06/META.json
--- old/Devel-CheckCompiler-0.05/META.json 2013-12-03 23:52:49.000000000
+0100
+++ new/Devel-CheckCompiler-0.06/META.json 2015-06-30 07:26:29.000000000
+0200
@@ -4,7 +4,7 @@
"Tokuhiro Matsuno <tokuhirom AAJKLFJEF@ GMAIL COM>"
],
"dynamic_config" : 0,
- "generated_by" : "Minilla/v0.11.0",
+ "generated_by" : "Minilla/v2.4.1",
"license" : [
"perl_5"
],
@@ -34,15 +34,14 @@
},
"configure" : {
"requires" : {
- "CPAN::Meta" : "0",
- "CPAN::Meta::Prereqs" : "0",
"Module::Build" : "0.38"
}
},
"develop" : {
"requires" : {
"Test::CPAN::Meta" : "0",
- "Test::MinimumVersion" : "0.10108",
+ "Test::MinimumVersion::Fast" : "0.04",
+ "Test::PAUSE::Permissions" : "0.04",
"Test::Pod" : "1.41",
"Test::Spellunker" : "v0.2.7"
}
@@ -63,7 +62,7 @@
},
"Devel::CheckCompiler" : {
"file" : "lib/Devel/CheckCompiler.pm",
- "version" : "0.05"
+ "version" : "0.06"
}
},
"release_status" : "stable",
@@ -77,7 +76,7 @@
"web" : "https://github.com/tokuhirom/Devel-CheckCompiler"
}
},
- "version" : "0.05",
+ "version" : "0.06",
"x_contributors" : [
"Neil Bowers <[email protected]>",
"Tokuhiro Matsuno <[email protected]>",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-CheckCompiler-0.05/META.yml
new/Devel-CheckCompiler-0.06/META.yml
--- old/Devel-CheckCompiler-0.05/META.yml 2013-12-03 23:52:49.000000000
+0100
+++ new/Devel-CheckCompiler-0.06/META.yml 2015-06-30 07:26:29.000000000
+0200
@@ -3,18 +3,16 @@
author:
- 'Tokuhiro Matsuno <tokuhirom AAJKLFJEF@ GMAIL COM>'
build_requires:
- Test::More: 0.98
- Test::Requires: 0
+ Test::More: '0.98'
+ Test::Requires: '0'
configure_requires:
- CPAN::Meta: 0
- CPAN::Meta::Prereqs: 0
- Module::Build: 0.38
+ Module::Build: '0.38'
dynamic_config: 0
-generated_by: 'Minilla/v0.11.0, CPAN::Meta::Converter version 2.132140'
+generated_by: 'Minilla/v2.4.1, CPAN::Meta::Converter version 2.150001'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ version: '1.4'
name: Devel-CheckCompiler
no_index:
directory:
@@ -31,18 +29,18 @@
file: lib/Devel/AssertC99.pm
Devel::CheckCompiler:
file: lib/Devel/CheckCompiler.pm
- version: 0.05
+ version: '0.06'
requires:
- Exporter: 0
- ExtUtils::CBuilder: 0
- File::Temp: 0
- parent: 0
- perl: 5.008001
+ Exporter: '0'
+ ExtUtils::CBuilder: '0'
+ File::Temp: '0'
+ parent: '0'
+ perl: '5.008001'
resources:
bugtracker: https://github.com/tokuhirom/Devel-CheckCompiler/issues
homepage: https://github.com/tokuhirom/Devel-CheckCompiler
repository: git://github.com/tokuhirom/Devel-CheckCompiler.git
-version: 0.05
+version: '0.06'
x_contributors:
- 'Neil Bowers <[email protected]>'
- 'Tokuhiro Matsuno <[email protected]>'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-CheckCompiler-0.05/README.md
new/Devel-CheckCompiler-0.06/README.md
--- old/Devel-CheckCompiler-0.05/README.md 2013-12-03 23:52:49.000000000
+0100
+++ new/Devel-CheckCompiler-0.06/README.md 2015-06-30 07:26:29.000000000
+0200
@@ -43,7 +43,7 @@
# SEE ALSO
-[ExtUtils::CBuilder](http://search.cpan.org/perldoc?ExtUtils::CBuilder)
+[ExtUtils::CBuilder](https://metacpan.org/pod/ExtUtils::CBuilder)
# LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Devel-CheckCompiler-0.05/lib/Devel/CheckCompiler.pm
new/Devel-CheckCompiler-0.06/lib/Devel/CheckCompiler.pm
--- old/Devel-CheckCompiler-0.05/lib/Devel/CheckCompiler.pm 2013-12-03
23:52:49.000000000 +0100
+++ new/Devel-CheckCompiler-0.06/lib/Devel/CheckCompiler.pm 2015-06-30
07:26:29.000000000 +0200
@@ -2,10 +2,11 @@
use strict;
use warnings;
use 5.008001;
-our $VERSION = '0.05';
+our $VERSION = '0.06';
use parent qw/Exporter/;
our @EXPORT = qw/check_c99 check_c99_or_exit check_compile/;
+use Config;
use ExtUtils::CBuilder;
my $C99_SOURCE = <<'C99';
@@ -16,6 +17,9 @@
int i = 0;
i++;
int j = i - 1; // another C99 feature: declaration after statement
+ // another C99 feature: for loop variable declarations
+ for (int k = 0; k < 3; i++) {
+ }
return j;
}
C99
@@ -31,6 +35,28 @@
};
}
+sub _is_gcc {
+ return 0 if $Config{gccversion} eq '';
+ # For clang on MacOSX and *BSD distributions
+ return 0 if $Config{gccversion} =~ m/clang/i;
+ # For Intel C and C++ compiler
+ return 0 if $Config{gccversion} =~ m/intel/i;
+
+ return 1;
+}
+
+sub _gcc_version {
+ if ($Config{gccversion} =~ m/^(\d+)\.(\d+)\.(\d+)/) {
+ return {
+ major => $1,
+ minor => $2,
+ patch => $3,
+ };
+ }
+
+ return;
+}
+
sub check_compile {
my ($src, %opt) = @_;
@@ -43,8 +69,17 @@
$tmpfile->print($src);
$tmpfile->close();
+ my $compile_flags;
+ if (_is_gcc()) {
+ my $gcc_version = _gcc_version();
+ # '-std=gnu11' is default from GCC 5
+ if (defined $gcc_version && $gcc_version->{major} < 5) {
+ $compile_flags = ['-std=c99'];
+ }
+ }
+
my $objname = eval {
- $cbuilder->compile(source => $tmpfile->filename);
+ $cbuilder->compile(source => $tmpfile->filename, extra_compiler_flags
=> $compile_flags);
};
if ($objname) {
my $ret = 1;
++++++ cpanspec.yml ++++++
---
#description_paragraphs: 3
#no_testing: broken upstream
#sources:
# - source1
# - source2
#patches:
# foo.patch: -p1
# bar.patch:
#preamble: |-
# BuildRequires: gcc-c++
#post_prep: |-
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
#post_install: |-
# sed on %{name}.files
#license: SUSE-NonFree
#skip_noarch: 1
#custom_build: |-
#./Build build flags=%{?_smp_mflags} --myflag
#custom_test: |-
#startserver && make test
#ignore_requires: Bizarre::Module