Skip to content

Commit b637672

Browse files
Fix fonts-rpm-macros build issue while applying the update patch (#14066)
1 parent f629e2e commit b637672

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

SPECS-EXTENDED/fonts-rpm-macros/update_for_azl.patch

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ index bb7475b..c9bd17c 100644
1414
local oldtag = nil
1515
local oldadvance = nil
1616
diff --git a/rpm/lua/srpm/fonts.lua b/rpm/lua/srpm/fonts.lua
17-
index 213fe61..2d3bf87 100644
17+
index 95cc2bd..36df0ea 100644
1818
--- a/rpm/lua/srpm/fonts.lua
1919
+++ b/rpm/lua/srpm/fonts.lua
2020
@@ -92,12 +92,12 @@ end
@@ -34,7 +34,7 @@ index 213fe61..2d3bf87 100644
3434
"fontpkgheader", "fonts", "fontsex", "fontconfs", "fontconfsex",
3535
"fontconfngs", "fontconfngsex",
3636
"fontappstreams", "fontappstreamsex",
37-
@@ -107,39 +107,39 @@ local function env(suffix, verbose, globvalues)
37+
@@ -107,41 +107,41 @@ local function env(suffix, verbose, globvalues)
3838
for _, v in ipairs({"foundry", "fontdocs", "fontdocsex",
3939
"fontlicense", "fontlicenses", "fontlicensesex"}) do
4040
if (rpm.expand("%{" .. v .. "}") ~= "%{" .. v .. "}") then
@@ -52,7 +52,9 @@ index 213fe61..2d3bf87 100644
5252
+ azl.explicitunset("current" .. g, verbose)
5353
end
5454
end
55-
local basename = rpm.expand("%{?foundry" .. suffix .. ":%{foundry" .. suffix .. "} }%{fontfamily" .. suffix .. "}")
55+
local foundry = rpm.expand("%{?foundry" .. suffix .. ":%{foundry" .. suffix .. "}}")
56+
local family = string.gsub(rpm.expand("%{fontfamily" .. suffix .. "}"), "^" .. foundry, "")
57+
local basename = foundry .. " " .. family
5658
- fedora.safeset("fontpkgname" .. suffix, rpmname(basename), verbose)
5759
- fedora.safeset("fonthumanname" .. suffix, basename, verbose)
5860
- fedora.safeset("fontdir" .. suffix, "%{_fontbasedir}/%{fontpkgname" .. suffix .. "}", verbose)
@@ -85,7 +87,7 @@ index 213fe61..2d3bf87 100644
8587
local sub = (not forcemain) and (forcesub or ((suffix ~= nil) and (suffix ~= "") and (suffix ~= "0")))
8688
env(suffix, verbose, {})
8789
name = sub and "%package -n " or "Name: "
88-
@@ -154,15 +154,15 @@ local function singlepkg(forcemain, forcesub, suffix, verbose)
90+
@@ -156,15 +156,15 @@ local function singlepkg(forcemain, forcesub, suffix, verbose)
8991
"Requires: fontpackages-filesystem\n" ..
9092
"%{?currentfontpkgheader}\n" ..
9193
"%description -n %{currentfontpkgname}\n") ..
@@ -104,7 +106,7 @@ index 213fe61..2d3bf87 100644
104106
singlepkg(forcemain, forcesub, suffix, verbose)
105107
end
106108
else
107-
@@ -172,8 +172,8 @@ end
109+
@@ -174,8 +174,8 @@ end
108110

109111
-- Create a font (sub)metapackage header
110112
local function metapkg(name, summary, description, suffixes)
@@ -115,7 +117,7 @@ index 213fe61..2d3bf87 100644
115117
if (name == "") then
116118
name, _ = string.gsub(rpm.expand("%{name}"), "-fonts$", "")
117119
name = name .. "-fonts-all"
118-
@@ -184,7 +184,7 @@ local function metapkg(name, summary, description, suffixes)
120+
@@ -186,7 +186,7 @@ local function metapkg(name, summary, description, suffixes)
119121
if (description == "") then
120122
description = "This meta-package installs all the font packages, generated from the %{name} source package."
121123
end
@@ -218,7 +220,7 @@ index 6d2fa82..2426370 100644
218220
end
219221
else
220222
diff --git a/rpm/macros.d/macros.fonts-srpm b/rpm/macros.d/macros.fonts-srpm
221-
index 77365d6..8132b95 100644
223+
index eec2b1c..7df42c3 100644
222224
--- a/rpm/macros.d/macros.fonts-srpm
223225
+++ b/rpm/macros.d/macros.fonts-srpm
224226
@@ -45,7 +45,7 @@

0 commit comments

Comments
 (0)