#
# spec file for package perl-Net-IDN-Encode
#
# Copyright (c) 2019 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           perl-Net-IDN-Encode
Version:        2.500
Release:        1.21
%define cpan_name Net-IDN-Encode
Summary:        Internationalizing Domain Names in Applications (IDNA)
License:        Artistic-1.0 OR GPL-1.0-or-later
Group:          Development/Libraries/Perl
Url:            https://metacpan.org/release/%{cpan_name}
Source0:        https://cpan.metacpan.org/authors/id/C/CF/CFAERBER/%{cpan_name}-%{version}.tar.gz
Source1:        cpanspec.yml
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(ExtUtils::CBuilder)
BuildRequires:  perl(Module::Build) >= 0.420000
BuildRequires:  perl(Test::NoWarnings)
%{perl_requires}

%description
This module provides an easy-to-use interface for encoding and decoding
Internationalized Domain Names (IDNs).

IDNs use characters drawn from a large repertoire (Unicode), but IDNA
allows the non-ASCII characters to be represented using only the ASCII
characters already allowed in so-called host names today
(letter-digit-hyphen, '/[A-Z0-9-]/i').

Use this module if you just want to convert domain names (or email
addresses), using whatever IDNA standard is the best choice at the moment.

You should be familiar with Unicode support in perl, as this module expects
correctly encoded input. See perlunitut, perluniintro and perlunicode for
details.

%prep
%setup -q -n %{cpan_name}-%{version}
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -name "*.sh" -print0 | xargs -0 chmod 644

%build
perl Build.PL installdirs=vendor optimize="%{optflags}"
./Build build flags=%{?_smp_mflags}

%check
./Build test

%install
./Build install destdir=%{buildroot} create_packlist=0
%perl_gen_filelist

%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes README
%license LICENSE

%changelog
* Mon Oct 21 2019 Tina Mueller <tina.mueller@suse.com>
- Remove patch encodeoffbyone.diff
  * The corresponding code has been refactored, so the patch does not apply
    anymore. Tests are passing without the patch, so I assume it was fixed.
    I could not figure out the corresponding RT Ticket or github issue.
* Wed Apr  3 2019 Stephan Kulow <coolo@suse.com>
- updated to 2.500
  see /usr/share/doc/packages/perl-Net-IDN-Encode/Changes
* Wed Sep 30 2015 coolo@suse.com
- add cpanspec.yml
* Tue Sep 29 2015 ro@suse.de
- update to 2.300
  - update to Unicode 8.0.0
- update to 2.202
  - use updated IdnaTest.txt from Unicode 7.0.0 database
    FIXES: #96749: Fails with bleadperl
  - documentation updates, point to perl Unicode tutorials
  - tests for domain xn--zcaa.de;
    REJECTED: #103205 for Net-IDN-Encode: conversion of domain name
* Mon Sep 15 2014 coolo@suse.com
- updated to 2.201
  - correct handling of uppercase a-labels in
    domain_to_{ascii,unicode}
  - FIXES: #98354: Capitalized ACE prefix does not work (reported
    by victor@*****.ru)
* Tue Jul 22 2014 mls@suse.de
- fix off-by-one error in memory allocation in the punycode encoder
  new patch: encodeoffbyone.diff
* Sun Jul 20 2014 coolo@suse.com
- updated to 2.200
  - Net::IDN::UTS46: update to Unicode® 7.0.0 and UTS #46 r13
  - typo and metadata fixes from dstreinbrunner
* Mon Mar 17 2014 coolo@suse.com
- updated to 2.100
  - Net::IDN::Encode: preserve case in pure-ASCII labels (bypass
    en-/decoding)
    FIXES: #91059: case not preserved (reported by DMUEY)
  - Net::IDN::Encode: simplify scalar-via-blob syntax (pull req.
    by DMUEY)
  - Net::IDN::Encode: add SMALL COMMERCIAL AT to list of possible
    @ signs (pull req. by DMUEY)
  - Net::IDN::UTS46: update to Unicode® 6.3.0 and UTS #46 r11:
  * new UTS #46 test vectors in data/IdnaTest.txt
  * built on perl-blead (5.19.7) for support of Unicode® 6.3.0
    in tests generated from data/IdnaTest.txt
  * tweaks and fixes regarding edge cases not clearly described
    in UTS #46
  - Net::IDN::UTS46: test vectors supposed to fail due to
    Unassigned characters are no longer skipped.
  - Net::IDN::Punycode: use utf8_to_uvchr_buf instead of deprecated
    utf8_to_uvuni (perl 5.15.9 and higher; utf8_to_uvuni_buf is
    deprecated from perl 5.19.5)
* Mon Nov 25 2013 coolo@suse.com
- updated to 2.005
  - better documentation for unassigned characters,
    FIXES: #89750: Can't create IDN for a special domain
    (reported by felix.*****@*****.de)
  - FIXES: #89270: [PATCH] fix spelling errors in the docs
    (reported by cstamas@*****.hu)
* Fri Oct  4 2013 coolo@suse.com
- updated to 2.004
  - FIXES: #85552 3 uts46 tests FAIL under perl-5.18.0
    (reported by d.thomas@*****.au)
* Tue Jul 30 2013 coolo@suse.com
- updated to 2.003
  - FIXES required version of Unicode::Normalize in UTS46.pm
    (reported by CPAN testers)
  2.002 (2012-01-18)
  - FIXES dependencies/required perl version
  - FIXES: #74021 Makefile.PL bad value for
    version-requirement
  2.001 (2012-01-12)
  - FIXES XS_VERSION mismatch
  - FIXES depencency on Unicode::Normalize (was 1.000 or higher,
    but this is not needed).
  2.000 (2012-01-08)
  - switch to Unicode Technical Standard #46 (previously,
    IDNA2003 has been used, which is now available as
    Net::IDN::IDNA2003):
  - add Net::IDN::UTS46 + test vectors from UTS #46
  - remove Net::IDN::Nameprep (only required for IDNA2003)
  - add documentation about IDNA Standards and IDNA module
    Overview/Roadmad
  - allow NON-LDH labels (e.g. for SRV records), even if
    UseSTD3Rules=true (parameter now only applies to
    U-labels and A-labels, i.e. labels that are converted by
    IDNA).
  - FIXES potential portability problems in
    Net::IDN::Punycode XS 1.999_20120108
  - FIXES 'wide character' warning with tests if tests
    fail/if TB2 is used on modern perl installations.
  - FIXES decoding bug in Net::IDN::Punycode::PP (discovered
    through UTS #46 test vectors)
  1.101 (2011-12-08)
  - FIXES: #72615 faulty data in Build.PL causes a lack of
    meta files, which breaks carton.
* Wed Dec  1 2010 coolo@novell.com
- switch to perl_requires macro
* Mon Nov  1 2010 pascal.bleser@opensuse.org
- initial package (1.100)