Skip to content

Commit 06b6d1d

Browse files
authored
Build fix for package perl-Locale-Msgfmt (microsoft#12336)
1 parent 15fa21e commit 06b6d1d

File tree

4 files changed

+177
-16
lines changed

4 files changed

+177
-16
lines changed
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
2+
3+
4+
5+
The "Artistic License"
6+
7+
Preamble
8+
9+
The intent of this document is to state the conditions under which a
10+
Package may be copied, such that the Copyright Holder maintains some
11+
semblance of artistic control over the development of the package,
12+
while giving the users of the package the right to use and distribute
13+
the Package in a more-or-less customary fashion, plus the right to make
14+
reasonable modifications.
15+
16+
Definitions:
17+
18+
"Package" refers to the collection of files distributed by the
19+
Copyright Holder, and derivatives of that collection of files
20+
created through textual modification.
21+
22+
"Standard Version" refers to such a Package if it has not been
23+
modified, or has been modified in accordance with the wishes
24+
of the Copyright Holder as specified below.
25+
26+
"Copyright Holder" is whoever is named in the copyright or
27+
copyrights for the package.
28+
29+
"You" is you, if you're thinking about copying or distributing
30+
this Package.
31+
32+
"Reasonable copying fee" is whatever you can justify on the
33+
basis of media cost, duplication charges, time of people involved,
34+
and so on. (You will not be required to justify it to the
35+
Copyright Holder, but only to the computing community at large
36+
as a market that must bear the fee.)
37+
38+
"Freely Available" means that no fee is charged for the item
39+
itself, though there may be fees involved in handling the item.
40+
It also means that recipients of the item may redistribute it
41+
under the same conditions they received it.
42+
43+
1. You may make and give away verbatim copies of the source form of the
44+
Standard Version of this Package without restriction, provided that you
45+
duplicate all of the original copyright notices and associated disclaimers.
46+
47+
2. You may apply bug fixes, portability fixes and other modifications
48+
derived from the Public Domain or from the Copyright Holder. A Package
49+
modified in such a way shall still be considered the Standard Version.
50+
51+
3. You may otherwise modify your copy of this Package in any way, provided
52+
that you insert a prominent notice in each changed file stating how and
53+
when you changed that file, and provided that you do at least ONE of the
54+
following:
55+
56+
a) place your modifications in the Public Domain or otherwise make them
57+
Freely Available, such as by posting said modifications to Usenet or
58+
an equivalent medium, or placing the modifications on a major archive
59+
site such as uunet.uu.net, or by allowing the Copyright Holder to include
60+
your modifications in the Standard Version of the Package.
61+
62+
b) use the modified Package only within your corporation or organization.
63+
64+
c) rename any non-standard executables so the names do not conflict
65+
with standard executables, which must also be provided, and provide
66+
a separate manual page for each non-standard executable that clearly
67+
documents how it differs from the Standard Version.
68+
69+
d) make other distribution arrangements with the Copyright Holder.
70+
71+
4. You may distribute the programs of this Package in object code or
72+
executable form, provided that you do at least ONE of the following:
73+
74+
a) distribute a Standard Version of the executables and library files,
75+
together with instructions (in the manual page or equivalent) on where
76+
to get the Standard Version.
77+
78+
b) accompany the distribution with the machine-readable source of
79+
the Package with your modifications.
80+
81+
c) give non-standard executables non-standard names, and clearly
82+
document the differences in manual pages (or equivalent), together
83+
with instructions on where to get the Standard Version.
84+
85+
d) make other distribution arrangements with the Copyright Holder.
86+
87+
5. You may charge a reasonable copying fee for any distribution of this
88+
Package. You may charge any fee you choose for support of this
89+
Package. You may not charge a fee for this Package itself. However,
90+
you may distribute this Package in aggregate with other (possibly
91+
commercial) programs as part of a larger (possibly commercial) software
92+
distribution provided that you do not advertise this Package as a
93+
product of your own. You may embed this Package's interpreter within
94+
an executable of yours (by linking); this shall be construed as a mere
95+
form of aggregation, provided that the complete Standard Version of the
96+
interpreter is so embedded.
97+
98+
6. The scripts and library files supplied as input to or produced as
99+
output from the programs of this Package do not automatically fall
100+
under the copyright of this Package, but belong to whoever generated
101+
them, and may be sold commercially, and may be aggregated with this
102+
Package. If such scripts or library files are aggregated with this
103+
Package via the so-called "undump" or "unexec" methods of producing a
104+
binary executable image, then distribution of such an image shall
105+
neither be construed as a distribution of this Package nor shall it
106+
fall under the restrictions of Paragraphs 3 and 4, provided that you do
107+
not represent such an executable image as a Standard Version of this
108+
Package.
109+
110+
7. C subroutines (or comparably compiled subroutines in other
111+
languages) supplied by you and linked into this Package in order to
112+
emulate subroutines and variables of the language defined by this
113+
Package shall not be considered part of this Package, but are the
114+
equivalent of input as in Paragraph 6, provided these subroutines do
115+
not change the language in any way that would cause it to fail the
116+
regression tests for the language.
117+
118+
8. Aggregation of this Package with a commercial distribution is always
119+
permitted provided that the use of this Package is embedded; that is,
120+
when no overt attempt is made to make this Package's interfaces visible
121+
to the end user of the commercial distribution. Such use shall not be
122+
construed as a distribution of this Package.
123+
124+
9. The name of the Copyright Holder may not be used to endorse or promote
125+
products derived from this software without specific prior written permission.
126+
127+
10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
128+
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
129+
WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
130+
131+
The End
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
diff -up Locale-Msgfmt-0.15/Makefile.PL.dsl Locale-Msgfmt-0.15/Makefile.PL
2+
--- Locale-Msgfmt-0.15/Makefile.PL.dsl 2023-05-09 12:19:59.683493241 +0200
3+
+++ Locale-Msgfmt-0.15/Makefile.PL 2023-05-09 12:22:13.026638686 +0200
4+
@@ -1,7 +1,9 @@
5+
-use inc::Module::Install::DSL 0.92;
6+
+use inc::Module::Install;
7+
8+
-all_from lib/Locale/Msgfmt.pm
9+
-requires File::Spec 0.80
10+
-test_requires Test::More 0.47
11+
-test_requires Locale::Maketext::Gettext 1.28 if $ENV{AUTOMATED_TESTING}
12+
-no_index directory private
13+
\ No newline at end of file
14+
+all_from 'lib/Locale/Msgfmt.pm';
15+
+requires 'File::Spec' => '0.80';
16+
+test_requires 'Test::More' => '0.47';
17+
+test_requires 'Locale::Maketext::Gettext' => '1.28' if $ENV{AUTOMATED_TESTING};
18+
+no_index 'directory private';
19+
+
20+
+WriteAll;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"Signatures": {
3+
"Artistic": "b7fd9b73ea99602016a326e0b62e6646060d18febdd065ceca8bb482208c3d88",
34
"perl-Locale-Msgfmt-0.15.tar.gz": "c3276831cbeecf58be02081bcc180bd348daa35da21a7737b7b038a59f643ab4"
45
}
56
}

SPECS-EXTENDED/perl-Locale-Msgfmt/perl-Locale-Msgfmt.spec

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,25 @@ Vendor: Microsoft Corporation
22
Distribution: Azure Linux
33
Name: perl-Locale-Msgfmt
44
Version: 0.15
5-
Release: 28%{?dist}
5+
Release: 29%{?dist}
66
Summary: Compile .po files to .mo files
7-
License: GPL+ or Artistic
7+
License: GPL-1.0-or-later OR Artistic-1.0-Perl
88
URL: https://metacpan.org/release/Locale-Msgfmt
99
Source0: https://cpan.metacpan.org/authors/id/A/AZ/AZAWAWI/Locale-Msgfmt-%{version}.tar.gz#/perl-Locale-Msgfmt-%{version}.tar.gz
10+
# Update Makefile.PL to not use Module::Install::DSL CPAN RT#148295
11+
Source1: Artistic
12+
Patch0: Locale-Msgfmt-0.15-Remove-using-of-MI-DSL.patch
1013
BuildArch: noarch
1114
BuildRequires: coreutils
12-
BuildRequires: findutils
1315
BuildRequires: make
14-
BuildRequires: perl-interpreter
1516
BuildRequires: perl-generators
16-
BuildRequires: perl(inc::Module::Install::DSL) >= 0.92
17+
BuildRequires: perl-interpreter
18+
BuildRequires: perl(inc::Module::Install)
19+
BuildRequires: perl(FindBin)
20+
BuildRequires: perl(File::Remove)
21+
BuildRequires: perl(Module::CoreList)
1722
BuildRequires: perl(Module::Install::Metadata)
18-
BuildRequires: sed
23+
BuildRequires: perl(Module::Install::WriteAll)
1924
# Run-time
2025
BuildRequires: perl(Exporter)
2126
BuildRequires: perl(File::Spec)
@@ -26,46 +31,50 @@ BuildRequires: perl(warnings)
2631
BuildRequires: perl(File::Copy)
2732
BuildRequires: perl(File::Path)
2833
BuildRequires: perl(File::Temp)
29-
BuildRequires: perl(FindBin)
3034
BuildRequires: perl(Getopt::Long)
3135
BuildRequires: perl(Locale::Maketext::Gettext)
3236
BuildRequires: perl(Test::More)
33-
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
3437

3538
%description
3639
This module does the same thing as msgfmt from GNU gettext-tools,
3740
except this is pure Perl. The interface is best explained through
3841
examples on home page.
3942

4043
%prep
41-
%setup -q -n Locale-Msgfmt-%{version}
44+
%autosetup -p1 -n Locale-Msgfmt-%{version}
45+
cp %{SOURCE1} .
4246

4347
# Remove bundled libraries
4448
rm -r inc
45-
sed -i -e '/^inc\// d' MANIFEST
49+
perl -i -ne 'print $_ unless m{^inc/}' MANIFEST
4650
find -type f -exec chmod -x {} +
4751

4852
%build
49-
perl Makefile.PL installdirs=vendor
50-
make %{?_smp_mflags}
53+
perl Makefile.PL installdirs=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
54+
%{make_build}
5155

5256
%install
53-
make pure_install DESTDIR=$RPM_BUILD_ROOT
57+
%{make_install}
5458
mkdir $RPM_BUILD_ROOT%{_bindir}
5559
cp -v script/msgfmt.pl $RPM_BUILD_ROOT%{_bindir}
56-
find $RPM_BUILD_ROOT -type f -name .packlist -delete
5760
%{_fixperms} $RPM_BUILD_ROOT/*
5861

5962
%check
6063
make test
6164

6265
%files
66+
%license Artistic
6367
%doc Changes README
64-
%{perl_vendorlib}/*
68+
%{perl_vendorlib}/Locale*
69+
%{perl_vendorlib}/Module*
6570
%{_bindir}/msgfmt.pl
66-
%{_mandir}/man3/*
71+
%{_mandir}/man3/Locale*
6772

6873
%changelog
74+
* Thu Feb 12 2025 Sumit Jena <[email protected]> - 0.15-29
75+
- Added necessary patches as per Fedora 41.
76+
- Added appropriate license.
77+
6978
* Thu Jan 13 2022 Pawel Winogrodzki <[email protected]> - 0.15-28
7079
- License verified.
7180

0 commit comments

Comments
 (0)