commit 38d5a54a85ed32228cca11cad04c52e050dca145 Author: David Dick <ddick@xxxxxxxx> Date: Sat Mar 22 10:05:18 2014 +1100 Initial import (#1077956). .gitignore | 1 + image_subimagefind_makefile.patch | 49 +++++++++++++++++++++++++++++++ perl-Image-SubImageFind.spec | 58 +++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 109 insertions(+), 0 deletions(-) --- diff --git a/.gitignore b/.gitignore index e69de29..eef90fb 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/Image-SubImageFind-0.03.tar.gz diff --git a/image_subimagefind_makefile.patch b/image_subimagefind_makefile.patch new file mode 100644 index 0000000..268736c --- /dev/null +++ b/image_subimagefind_makefile.patch @@ -0,0 +1,49 @@ +diff -Naur old/lib/Image/SubImageFind.pm new/lib/Image/SubImageFind.pm +--- lib/Image/SubImageFind.pm 2011-09-11 07:16:23.000000000 +1000 ++++ lib/Image/SubImageFind.pm 2014-03-19 10:54:19.500286139 +1100 +@@ -17,7 +17,7 @@ + # + package Image::SubImageFind; + +-use 5.012003; ++use 5.010; + use strict; + use warnings; + +diff -Naur old/Makefile.PL new/Makefile.PL +--- Makefile.PL 2011-09-11 06:21:38.000000000 +1000 ++++ Makefile.PL 2014-03-19 10:50:06.735308541 +1100 +@@ -1,10 +1,23 @@ +-use 5.012003; ++use 5.010; + use ExtUtils::MakeMaker; + # See lib/ExtUtils/MakeMaker.pm for details of how to influence + # the contents of the Makefile that is written. + + my $CC = "g++"; + ++use File::Spec(); ++my $includes = ''; ++if ($^O ne 'MSWin32') { ++ foreach my $include_file_path (`locate c++config.h`) { ++ chomp $include_file_path; ++ if (-e $include_file_path) { ++ my ($volume, $directories, $name) = File::Spec->splitpath($include_file_path); ++ $includes .= ' -I' . File::Spec->catdir($volume, $directories); ++ $includes =~ s/\/bits//smx; ++ } ++ } ++} ++ + WriteMakefile( + NAME => 'Image::SubImageFind', + VERSION_FROM => 'lib/Image/SubImageFind.pm', # finds $VERSION +@@ -16,7 +29,7 @@ + LD => '$(CC)', + XSOPT => '-C++', + LIBS => ['-lefence -lstdc++ -lfftw3 -lm '. `Magick++-config --ldflags --libs`], +- INC => '`Magick++-config --cppflags --cxxflags` -mpreferred-stack-boundary=8 -I procs/', ++ INC => '`Magick++-config --cppflags --cxxflags`' . $includes, + TYPEMAPS => ['perlobject.map'], + # Un-comment this if you add C files to link with later: + OBJECT => '$(O_FILES)', # link all the C files too diff --git a/perl-Image-SubImageFind.spec b/perl-Image-SubImageFind.spec new file mode 100644 index 0000000..e00372b --- /dev/null +++ b/perl-Image-SubImageFind.spec @@ -0,0 +1,58 @@ +Name: perl-Image-SubImageFind +Version: 0.03 +Release: 1%{?dist} +Summary: Perl extension for locating a sub-image within an image +License: GPLv2 and GPLv2+ +# patch to address https://fedoraproject.org/wiki/Common_Rpmlint_issues#incorrect-fsf-address has been sent upstream at https://rt.cpan.org/Ticket/Display.html?id=93990 +Group: Development/Libraries +URL: http://search.cpan.org/dist/Image-SubImageFind/ +Source0: http://www.cpan.org/modules/by-module/Image/Image-SubImageFind-%{version}.tar.gz +# https://rt.cpan.org/Ticket/Display.html?id=93989 +Patch1: image_subimagefind_makefile.patch +BuildRequires: fftw-devel +BuildRequires: libstdc++-devel +BuildRequires: ImageMagick-c++-devel +BuildRequires: perl +BuildRequires: perl(Cwd) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Spec) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) +BuildRequires: perl(XSLoader) +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) + +%description +Perl module to aide in locating a sub-image within an image. + +%prep +%setup -q -n Image-SubImageFind-%{version} + +%patch1 + +%build +%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS" +make %{?_smp_mflags} + +%install +make pure_install DESTDIR=$RPM_BUILD_ROOT + +find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \; +find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \; + +%{_fixperms} $RPM_BUILD_ROOT/* + +%check +make test + +%files +%doc Changes Copying README +%{perl_vendorarch}/auto/* +%{perl_vendorarch}/Image* +%{_mandir}/man3/* + +%changelog +* Wed Mar 19 2014 David Dick <ddick@xxxxxxxx> - 0.03-1 +- Initial release diff --git a/sources b/sources index e69de29..a8822e5 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +8226675bd687e8ca56152ac3580e6c0a Image-SubImageFind-0.03.tar.gz -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel