Skip to content

Commit 311366f

Browse files
authored
Upgrade: perl-Locale-Maketext-Gettext version to 1.32 (#13021)
1 parent 92fff69 commit 311366f

File tree

3 files changed

+106
-37
lines changed

3 files changed

+106
-37
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"Signatures": {
3-
"perl-Locale-Maketext-Gettext-1.30.tar.gz": "053dacd6dec3034ec4111de2be6a8b35379cd8630ce835567663f84bc4ea000b"
3+
"perl-Locale-Maketext-Gettext-1.32.tar.gz": "946a9d4506f97393314546557c13efb346f228e70d6c50aca06f65061584b2fb"
44
}
55
}

SPECS-EXTENDED/perl-Locale-Maketext-Gettext/perl-Locale-Maketext-Gettext.spec

Lines changed: 103 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,140 @@
1-
Vendor: Microsoft Corporation
2-
Distribution: Azure Linux
1+
# Perform optional tests
2+
%bcond_without perl_Locale_Maketext_Gettext_enables_optional_test
3+
34
Name: perl-Locale-Maketext-Gettext
4-
Version: 1.30
5-
Release: 3%{?dist}
5+
Version: 1.32
6+
Release: 1%{?dist}
67
Summary: Joins the gettext and Maketext frameworks
7-
License: GPL+ or Artistic
8+
# README.md: GPL+ or Artistic
9+
# t/02-big-endian.t: "the same terms as Perl" and "the same license as the commonlib package"
10+
# (The "commonlib" text is a few-line excerpt.)
11+
# Automatically converted from old format: GPL+ or Artistic - review is highly recommended.
12+
License: GPL-1.0-or-later OR Artistic-1.0-Perl
13+
Vendor: Microsoft Corporation
14+
Distribution: Azure Linux
815
URL: https://metacpan.org/release/Locale-Maketext-Gettext
916
Source0: https://cpan.metacpan.org/authors/id/I/IM/IMACAT/Locale-Maketext-Gettext-%{version}.tar.gz#/perl-Locale-Maketext-Gettext-%{version}.tar.gz
1017
BuildArch: noarch
1118
BuildRequires: coreutils
12-
BuildRequires: perl-interpreter
19+
# diffutils for cmp
20+
BuildRequires: diffutils
21+
BuildRequires: make
1322
BuildRequires: perl-generators
23+
BuildRequires: perl-interpreter
24+
BuildRequires: perl(:VERSION) >= 5.8
25+
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
26+
BuildRequires: perl(strict)
27+
BuildRequires: perl(warnings)
28+
# Run-time:
1429
BuildRequires: perl(base)
1530
BuildRequires: perl(Encode)
1631
BuildRequires: perl(Exporter)
17-
BuildRequires: perl(ExtUtils::MakeMaker)
32+
BuildRequires: perl(File::Spec::Functions)
33+
BuildRequires: perl(Getopt::Long)
34+
BuildRequires: perl(Locale::Maketext)
35+
# Tests:
1836
BuildRequires: perl(File::Basename)
1937
BuildRequires: perl(File::Copy)
20-
BuildRequires: perl(File::Spec::Functions)
2138
BuildRequires: perl(FindBin)
2239
BuildRequires: perl(lib)
23-
BuildRequires: perl(Locale::Maketext)
24-
BuildRequires: perl(Module::Build)
25-
# Module::Signature not used
26-
BuildRequires: perl(Socket)
27-
BuildRequires: perl(strict)
2840
BuildRequires: perl(Test)
2941
BuildRequires: perl(Test::More)
3042
BuildRequires: perl(vars)
31-
BuildRequires: perl(warnings)
32-
BuildRequires: sed
33-
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
34-
# Convert getext parameters to maketext parameters (CPAN RT#97771)
35-
Patch0: gettexttomakettext.patch
36-
43+
%if %{with perl_Locale_Maketext_Gettext_enables_optional_test}
44+
# Optional tests:
45+
# Module::Signature not used
46+
# Socket not used
47+
BuildRequires: perl(Test::Pod) >= 1.00
48+
%endif
49+
50+
# Filter private modules
51+
%global __provides_exclude %{?__provides_exclude:%{__provides_exclude}|}^perl\\(T_L10N
52+
3753
%description
3854
Locale::Maketext::Gettext joins the GNU gettext and Maketext frameworks. It
3955
is a subclass of Locale::Maketext(3) that follows the way GNU gettext
4056
works. It works seamlessly, both in the sense of GNU gettext and Maketext.
4157
As a result, you enjoy both their advantages, and get rid of both their
4258
problems, too.
43-
59+
60+
%package tests
61+
Summary: Tests for %{name}
62+
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
63+
Requires: coreutils
64+
Requires: perl-Test-Harness
65+
66+
%description tests
67+
Tests from %{name}. Execute them
68+
with "%{_libexecdir}/%{name}/test".
69+
4470
%prep
45-
%setup -q -n Locale-Maketext-Gettext-%{version}
46-
%patch 0 -p 1
47-
71+
%autosetup -p1 -n Locale-Maketext-Gettext-%{version}
72+
# Remove unsed tests
73+
for F in t/00-signature.t \
74+
%if !%{with perl_Locale_Maketext_Gettext_enables_optional_test}
75+
t/99-pod.t \
76+
%endif
77+
; do
78+
rm "$F"
79+
perl -i -ne 'print $_ unless m{^\Q'"$F"'\E}' MANIFEST
80+
done
81+
# Sym-link identical files
82+
if cmp t/locale/C/LC_MESSAGES/test.mo t/locale/en/LC_MESSAGES/test.mo; then
83+
rm t/locale/en/LC_MESSAGES/test.mo
84+
ln -s ../../C/LC_MESSAGES/test.mo t/locale/en/LC_MESSAGES/test.mo
85+
fi
86+
4887
%build
49-
%{__perl} Build.PL installdirs=vendor
50-
./Build
51-
88+
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
89+
%{make_build}
90+
5291
%install
53-
./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
54-
%{_fixperms} $RPM_BUILD_ROOT/*
55-
92+
%{make_install}
93+
%{_fixperms} %{buildroot}/*
94+
# Install tests
95+
mkdir -p %{buildroot}%{_libexecdir}/%{name}
96+
cp -a t %{buildroot}%{_libexecdir}/%{name}
97+
%if %{with perl_Locale_Maketext_Gettext_enables_optional_test}
98+
rm %{buildroot}%{_libexecdir}/%{name}/t/99-pod.t
99+
%endif
100+
mkdir -p %{buildroot}%{_libexecdir}/%{name}/blib/script
101+
ln -s \
102+
$(realpath --relative-to %{buildroot}%{_libexecdir}/%{name}/blib/script \
103+
%{buildroot}%{_bindir}/maketext) \
104+
%{buildroot}%{_libexecdir}/%{name}/blib/script/maketext
105+
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
106+
#!/bin/bash
107+
set -e
108+
# t/12-cache.t and others write into CWD.
109+
DIR=$(mktemp -d)
110+
pushd "$DIR"
111+
cp -a %{_libexecdir}/%{name}/* ./
112+
prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
113+
popd
114+
rm -rf "$DIR"
115+
EOF
116+
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
117+
56118
%check
57-
rm -f debugsources.list debugfiles.list debuglinks.list
58-
./Build test
59-
119+
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
120+
make test
121+
60122
%files
61-
%license Artistic COPYING
62-
%doc BUGS Changes README THANKS TODO
123+
%license Artistic
124+
%doc Changes README.md
63125
%{perl_vendorlib}/*
64126
%{_mandir}/man3/*
65127
%{_bindir}/maketext
66128
%{_mandir}/man1/*
129+
130+
%files tests
131+
%{_libexecdir}/%{name}
67132

68133
%changelog
134+
* Mon Mar 17 2025 Sumit Jena <[email protected]> - 1.32-1
135+
- Update to version 1.32
136+
- License verified
137+
69138
* Fri Oct 15 2021 Pawel Winogrodzki <[email protected]> - 1.30-3
70139
- Initial CBL-Mariner import from Fedora 32 (license: MIT).
71140

cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18333,8 +18333,8 @@
1833318333
"type": "other",
1833418334
"other": {
1833518335
"name": "perl-Locale-Maketext-Gettext",
18336-
"version": "1.30",
18337-
"downloadUrl": "https://cpan.metacpan.org/authors/id/I/IM/IMACAT/Locale-Maketext-Gettext-1.30.tar.gz"
18336+
"version": "1.32",
18337+
"downloadUrl": "https://cpan.metacpan.org/authors/id/I/IM/IMACAT/Locale-Maketext-Gettext-1.32.tar.gz"
1833818338
}
1833918339
}
1834018340
},

0 commit comments

Comments
 (0)