diff --git a/.gitignore b/.gitignore index e69de29..2e243e9 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/Inline-CPP-0.74.tar.gz diff --git a/Inline-CPP-0.74-Install-into-architecture-specific-path.patch b/Inline-CPP-0.74-Install-into-architecture-specific-path.patch new file mode 100644 index 0000000..fc9c767 --- /dev/null +++ b/Inline-CPP-0.74-Install-into-architecture-specific-path.patch @@ -0,0 +1,39 @@ +From 6e5e2257a2fe454fd580c95756cf362fe4a1bf43 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Fri, 21 Jul 2017 11:16:23 +0200 +Subject: [PATCH] Install into architecture specific path +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Inline/CPP/Config.pm stores C++ flags that are specific to +architecture. + +CPAN RT#122557 + +Signed-off-by: Petr Písař +--- + Makefile.PL | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/Makefile.PL b/Makefile.PL +index 0d5f4a5..6fad74d 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -57,6 +57,13 @@ WriteMakefile( + 'FindBin' => '0', # Core. + 'Config' => '0', # Core. + }, ++ PM => { ++ 'lib/Inline/CPP.pod' => '$(INST_LIB)/Inline/CPP.pod', ++ 'lib/Inline/CPP.pm' => '$(INST_LIB)/Inline/CPP.pm', ++ 'lib/Inline/CPP/Config.pm' => '$(INST_ARCHLIB)/Inline/CPP/Config.pm', ++ 'lib/Inline/CPP/Parser/RecDescent.pm' => ++ '$(INST_LIB)/Inline/CPP/Parser/RecDescent.pm', ++ }, + META_MERGE => { + 'meta-spec' => { + version => 2, +-- +2.9.4 + diff --git a/Inline-CPP-0.74-Non-interactive-Makefile.PL.patch b/Inline-CPP-0.74-Non-interactive-Makefile.PL.patch new file mode 100644 index 0000000..8d72610 --- /dev/null +++ b/Inline-CPP-0.74-Non-interactive-Makefile.PL.patch @@ -0,0 +1,35 @@ +From 3e0738649d5131a043fccf4fcdac5aecf5191f71 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Fri, 21 Jul 2017 10:20:00 +0200 +Subject: [PATCH] Non-interactive Makefile.PL +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Písař +--- + Makefile.PL | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/Makefile.PL b/Makefile.PL +index 04045ff..0d5f4a5 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -34,13 +34,7 @@ my %PREREQ_PM = ( + + check_prereqs( \%PREREQ_PM ) or warn "!!! PREREQUISITES NOT MET !!!"; + +-my( $cc_guess, $libs_guess ) = guess_compiler(); +- +-my $cpp_compiler +- = prompt( "What C++ compiler would you like to use?", $cc_guess ); +- +-my $libs +- = prompt( "What default libraries would you like to include?", $libs_guess ); ++my( $cpp_compiler, $libs ) = guess_compiler(); + + configure_distribution( $test_cpp_filename, $cpp_compiler, $libs ); + +-- +2.9.4 + diff --git a/perl-Inline-CPP.spec b/perl-Inline-CPP.spec new file mode 100644 index 0000000..536d1a3 --- /dev/null +++ b/perl-Inline-CPP.spec @@ -0,0 +1,86 @@ +Name: perl-Inline-CPP +Version: 0.74 +Release: 1%{?dist} +Summary: Write Perl subroutines and classes in C++ +License: Artistic 2.0 +URL: http://search.cpan.org/dist/Inline-CPP/ +Source0: http://www.cpan.org/authors/id/D/DA/DAVIDO/Inline-CPP-%{version}.tar.gz +# Do not ask questions at build time +Patch0: Inline-CPP-0.74-Non-interactive-Makefile.PL.patch +# Install into archicture specific path because of stored C++ compiler flags, +# CPAN RT#122557 +Patch1: Inline-CPP-0.74-Install-into-architecture-specific-path.patch +# This is a full-arch package because it stores arch-specific C++ options, +# CPAN RT#122557 +%global debug_package %{nil} +BuildRequires: gcc-c++ +BuildRequires: make +BuildRequires: perl-generators +BuildRequires: perl-interpreter +BuildRequires: perl(:VERSION) >= 5.8.1 +BuildRequires: perl(Config) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::CppGuess) >= 0.11 +BuildRequires: perl(ExtUtils::MakeMaker) >= 7.04 +BuildRequires: perl(Fcntl) +BuildRequires: perl(FindBin) +BuildRequires: perl(lib) +BuildRequires: perl(strict) +BuildRequires: perl(warnings) +# Run-time: +# Perl header files included into generated code +BuildRequires: perl-devel +BuildRequires: perl(Carp) +BuildRequires: perl(Inline::C) >= 0.67 +BuildRequires: perl(Parse::RecDescent) +BuildRequires: perl(vars) +# Tests: +BuildRequires: perl(English) +BuildRequires: perl(File::Temp) +BuildRequires: perl(Inline) >= 0.78 +BuildRequires: perl(Test::More) >= 1.001009 +# Optional tests: +BuildRequires: perl(Inline::Filters) +# Test::Kwalitee not used +# Test::Perl::Critic not used +# Test::Pod 1.00 not used +# Test::Pod::Coverage 1.00 not used +Requires: gcc-c++(%{__isa}) +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +Requires: perl(Inline::C) >= 0.67 +# Perl header files included into generated code +Requires: perl-devel(%{__isa}) + +# Remove under-specified dependencies +%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\(Inline::C\\)$ + +%description +The Inline::CPP Perl module allows you to put C++ source code directly "inline" +in a Perl script or module. You code classes or functions in C++, and you +can use them as if they were written in Perl. + +%prep +%setup -q -n Inline-CPP-%{version} +%patch0 -p1 +%patch1 -p1 + +%build +perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 +make %{?_smp_mflags} + +%install +make pure_install DESTDIR=$RPM_BUILD_ROOT +%{_fixperms} $RPM_BUILD_ROOT/* + +%check +make test + +%files +%license LICENSE +%doc Changes README +%{perl_vendorarch}/* +%{_mandir}/man3/* + +%changelog +* Fri Jul 21 2017 Petr Pisar 0.74-1 +- Specfile autogenerated by cpanspec 1.78. diff --git a/sources b/sources index e69de29..086e0a0 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +SHA512 (Inline-CPP-0.74.tar.gz) = b10dc1f823bfb022fd0f839198ebaf8039910c0ae9837304eb1385a68d83a6e183a473e14e2e21e4c6ad4998beefee980abca02ddede2f753808ddfc4ac80e27