File perl-MathML-Entities.spec of Package perl-MathML-Entities

#
# spec file for package perl-MathML-Entities
#
# Copyright (c) 2025 SUSE LLC
#
# 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/
#


%define cpan_name MathML-Entities
Name:           perl-MathML-Entities
Version:        0.20
Release:        0
License:        Artistic-1.0 OR GPL-1.0-or-later
Summary:        Convert XHTML+MathML named entities to numeric character refs or utf-8 c[cut]
URL:            https://metacpan.org/release/%{cpan_name}
Source0:        https://cpan.metacpan.org/authors/id/D/DI/DISTLER/%{cpan_name}-%{version}.tar.gz
BuildArch:      noarch
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(Test::Pod) >= 1.12
Requires:       perl(Test::Pod) >= 1.12
%{perl_requires}

%description
MathML::Entities a content conversion filter for named XHTML+MathML
entities. There are over two thousand named entities in the XHTML+MathML
DTD. All the Entities defined in the XHTML+MathML DTD except the five
"safe" ones ('<', '>', '&', '"', '''), will be
converted to the equivalent numeric character references or to utf-8
characters. Named entities which are not in the XHTML+MathML DTD are
escaped. This makes the resulting XHTML (or XHTML+MathML) safe for
consumption by non-validating XML parsers.

Unlike, HTML::Entities, the mapping between MathML named entities and
codepoints is many-to-one. Therefore, there's no particular sense in having
an inverse function, which takes codepoints to named entities.

Based on: HTML::Entities by Koichi Taniguchi <taniguchi@livedoor.jp>

%prep
%autosetup  -n %{cpan_name}-%{version}

%build
perl Makefile.PL INSTALLDIRS=vendor
%make_build

%check
make test

%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist

%files -f %{name}.files
%doc Changes README Todo
%license LICENSE

%changelog
openSUSE Build Service is sponsored by