From 84ac5c0eb1935a7917ce6321d9c3e1a1fc6470d4 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 07 2019 11:38:10 +0000 Subject: import perl-Net-LibIDN-0.12-29.el8 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..daa2d4d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/Net-LibIDN-0.12.tar.gz diff --git a/.perl-Net-LibIDN.metadata b/.perl-Net-LibIDN.metadata new file mode 100644 index 0000000..414152d --- /dev/null +++ b/.perl-Net-LibIDN.metadata @@ -0,0 +1 @@ +ac446edf66ac523d5463b59ed9698e2ccb9b04ab SOURCES/Net-LibIDN-0.12.tar.gz diff --git a/SOURCES/Net-LibIDN-0.12-Respect-Config-s-cc-ccflags-and-ldflags.patch b/SOURCES/Net-LibIDN-0.12-Respect-Config-s-cc-ccflags-and-ldflags.patch new file mode 100644 index 0000000..a1b6350 --- /dev/null +++ b/SOURCES/Net-LibIDN-0.12-Respect-Config-s-cc-ccflags-and-ldflags.patch @@ -0,0 +1,93 @@ +From 3bd67bf63ee68c88cc05a66607a79c5cd314a6d2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Tue, 14 Jul 2015 14:25:57 +0200 +Subject: [PATCH] Respect Config's cc ccflags and ldflags +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The ExtUils::MakeMaker expects LIBS contains only libs and INC contain +only include paths. Thus you cannot put ldflags od ccflags there. They +will be injected later when generating the Makefile. + +However to use the flags when checking for libidn, you have to use +apply them manually only for the manual check. + +This patch adds cc and ccflags into consideration as some systems +needs them when using cusotm ldflags. + +Signed-off-by: Petr Písař +--- + Makefile.PL | 31 +++++++++++++++++++------------ + 1 file changed, 19 insertions(+), 12 deletions(-) + +diff --git a/Makefile.PL b/Makefile.PL +index 6709fe1..47f63db 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -47,23 +47,17 @@ sub InitMakeParams + "disable-tld" => \$disable_tld + ); + ++ $Params{LIBS} = ''; + if ($libdir) + { +- $Params{LIBS} = "-L$libdir -lidn"; +- } +- else +- { +- $Params{LIBS} = $Config{ldflags} . ' -lidn'; ++ $Params{LIBS} .= "-L$libdir "; + } ++ $Params{LIBS} .= '-lidn'; + + if ($incdir) + { + $Params{INC} = "-I$incdir"; + } +- else +- { +- $Params{INC} = ''; +- } + + my $libidn = CheckLibidn($Params{INC}, $Params{LIBS}); + +@@ -146,11 +140,24 @@ sub FilterTLD + } + } + ++sub concat { ++ my ($a, $b) = @_; ++ if (!defined $a) ++ { ++ $a = ''; ++ } ++ if (!defined $b) ++ { ++ $b = ''; ++ }; ++ return ($a . ' ' . $b); ++} ++ + sub CheckCCode + { + my $code = shift; +- my $cflags = shift; +- my $ldflags = shift; ++ my $cflags = concat($Config{ccflags}, shift); ++ my $ldflags = concat($Config{ldflags}, shift); + my $output = shift; + my $test = '__test'.$testno++; + local * FILE; +@@ -165,7 +172,7 @@ sub CheckCCode + return 0; + } + +- foreach my $cc (qw/cc gcc/) ++ foreach my $cc ($Config{cc}, qw/cc gcc/) + { + unlink($test); + system "$cc $cflags -o $test $test.c $ldflags"; +-- +2.4.3 + diff --git a/SPECS/perl-Net-LibIDN.spec b/SPECS/perl-Net-LibIDN.spec new file mode 100644 index 0000000..1f1eae7 --- /dev/null +++ b/SPECS/perl-Net-LibIDN.spec @@ -0,0 +1,201 @@ +%global pkgname Net-LibIDN + +Summary: Perl bindings for GNU LibIDN +Name: perl-Net-LibIDN +Version: 0.12 +Release: 29%{?dist} +License: GPL+ or Artistic +Group: Development/Libraries +URL: http://search.cpan.org/dist/%{pkgname}/ +Source: http://search.cpan.org/CPAN/authors/id/T/TH/THOR/%{pkgname}-%{version}.tar.gz +# Use distribution CFLAGS for tests, bug #1242794, CPAN RT#105853 +Patch0: Net-LibIDN-0.12-Respect-Config-s-cc-ccflags-and-ldflags.patch +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +BuildRequires: libidn-devel >= 0.4.0 +BuildRequires: perl-interpreter >= 5.8.0 +BuildRequires: perl-devel +BuildRequires: perl-generators +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Getopt::Long) +# Run-time: +BuildRequires: perl(AutoLoader) +BuildRequires: perl(Carp) +BuildRequires: perl(Exporter) +# Tests: +BuildRequires: perl(Test) + +# Filter the Perl extension module +%{?perl_default_filter} + +%description +Provides perl bindings for GNU Libidn, a C library for handling +Internationalized Domain Names according to IDNA (RFC 3490), in +a way very much inspired by Turbo Fredriksson's PHP-IDN. + +%prep +%setup -q -n %{pkgname}-%{version} +%patch0 -p1 +# Change man page encoding into UTF-8 +for F in _LibIDN.pm; do + iconv -f latin1 -t utf-8 < "$F" > "${F}.utf" + sed -i -e '/^=encoding\s/ s/latin1/utf-8/' "${F}.utf" + touch -r "$F" "${F}.utf" + mv "${F}.utf" "$F" +done; + +%build +perl Makefile.PL INSTALLDIRS=vendor +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' -empty -exec rm -f {} + +%{_fixperms} $RPM_BUILD_ROOT/* + +%check +make test + +%files +%doc Artistic Changes README +%{_mandir}/man3/*.3pm* +%{perl_vendorarch}/Net +%{perl_vendorarch}/auto/Net + +%changelog +* Thu Feb 08 2018 Fedora Release Engineering - 0.12-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 0.12-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 0.12-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sun Jun 04 2017 Jitka Plesnikova - 0.12-26 +- Perl 5.26 rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 0.12-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Sun May 15 2016 Jitka Plesnikova - 0.12-24 +- Perl 5.24 rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 0.12-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Jul 14 2015 Petr Pisar - 0.12-22 +- Use distribution CFLAGS for Makefile.PL's tests (bug #1242794) + +* Thu Jun 18 2015 Fedora Release Engineering - 0.12-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed Jun 03 2015 Jitka Plesnikova - 0.12-20 +- Perl 5.22 rebuild + +* Wed Aug 27 2014 Jitka Plesnikova - 0.12-19 +- Perl 5.20 rebuild + +* Sun Aug 17 2014 Fedora Release Engineering - 0.12-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 0.12-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat Aug 03 2013 Fedora Release Engineering - 0.12-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Jul 17 2013 Petr Pisar - 0.12-15 +- Perl 5.18 rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 0.12-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Nov 27 2012 Petr Pisar - 0.12-13 +- Modernize spec file + +* Mon Aug 13 2012 Petr Pisar - 0.12-12 +- Build-require Carp + +* Mon Aug 13 2012 Petr Pisar - 0.12-11 +- Specify all dependencies + +* Fri Jul 20 2012 Fedora Release Engineering - 0.12-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sun Jun 10 2012 Petr Pisar - 0.12-9 +- Perl 5.16 rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 0.12-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Fri Jun 17 2011 Marcela Mašláňová - 0.12-7 +- Perl mass rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 0.12-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Dec 21 2010 Marcela Maslanova - 0.12-5 +- 661697 rebuild for fixing problems with vendorach/lib + +* Tue May 04 2010 Marcela Maslanova - 0.12-4 +- Mass rebuild with perl-5.12.0 + +* Mon Dec 7 2009 Stepan Kasal - 0.12-3 +- rebuild against perl 5.10.1 + +* Sun Jul 26 2009 Fedora Release Engineering - 0.12-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Sun May 03 2009 Robert Scheck 0.12-1 +- Upgrade to 0.12 + +* Mon Feb 23 2009 Robert Scheck 0.11-2 +- Rebuilt against gcc 4.4 and rpm 4.6 + +* Sun Jan 25 2009 Robert Scheck 0.11-1 +- Upgrade to 0.11 + +* Thu Mar 06 2008 Tom "spot" Callaway 0.10-2 +- Rebuild for new perl + +* Sun Feb 10 2008 Robert Scheck 0.10-1 +- Upgrade to 0.10 + +* Wed Aug 29 2007 Robert Scheck 0.09-4 +- Updated the license tag according to the guidelines + +* Mon May 07 2007 Robert Scheck 0.09-3 +- Rebuild + +* Thu Apr 26 2007 Robert Scheck 0.09-2 +- Added build requirement to perl(ExtUtils::MakeMaker) + +* Sun Sep 03 2006 Robert Scheck 0.09-1 +- Upgrade to 0.0.9 and rebuild for Fedora Core 6 + +* Fri Jun 23 2006 Robert Scheck 0.08-5 +- Changes to match with Fedora Packaging Guidelines (#193960) + +* Sun Dec 25 2005 Robert Scheck 0.08-4 +- Rebuilt against gcc 4.1 and libidn 0.6.0 + +* Fri Apr 01 2005 Robert Scheck 0.08-3 +- Some spec file cleanup + +* Mon Mar 14 2005 Robert Scheck 0.08-2 +- Rebuilt against gcc 4.0 + +* Thu Jan 20 2005 Robert Scheck 0.08-1 +- Upgrade to 0.0.8 + +* Sun Oct 03 2004 Robert Scheck 0.07-2 +- Use perl(:MODULE_COMPAT_*) as requirement for perl +- Lots of spec file cleanups + +* Mon May 24 2004 Robert Scheck 0.07-1 +- Upgrade to 0.0.7 + +* Mon Apr 05 2004 Robert Scheck 0.06-1 +- Upgrade to 0.0.6 +- Initial spec file for Red Hat Linux and Fedora Core