From 4b4b2b9bd0bb87399f3d335c174decb010052f07d131ff04dba415cd3373c20c Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 1 Feb 2021 13:46:16 +0000 Subject: [PATCH] Accepting request 868319 from home:Andreas_Schwab:Factory - Use rpm.vercmp to compare versions OBS-URL: https://build.opensuse.org/request/show/868319 OBS-URL: https://build.opensuse.org/package/show/M17N:fonts/ghostscript-fonts-grops?expand=0&rev=19 --- ghostscript-fonts-grops.changes | 5 +++++ ghostscript-fonts-grops.spec | 13 ++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ghostscript-fonts-grops.changes b/ghostscript-fonts-grops.changes index 80818f1..dbdcbf1 100644 --- a/ghostscript-fonts-grops.changes +++ b/ghostscript-fonts-grops.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Feb 1 10:13:58 UTC 2021 - Andreas Schwab + +- Use rpm.vercmp to compare versions + ------------------------------------------------------------------- Mon Sep 28 08:23:56 UTC 2020 - Marguerite Su diff --git a/ghostscript-fonts-grops.spec b/ghostscript-fonts-grops.spec index c3c6898..ecae0f6 100644 --- a/ghostscript-fonts-grops.spec +++ b/ghostscript-fonts-grops.spec @@ -1,7 +1,7 @@ # # spec file for package ghostscript-fonts-grops # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,14 +12,14 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: ghostscript-fonts-grops Version: 1.22.2 Release: 0 -Url: http://www.gnu.org/software/groff/groff.html +URL: http://www.gnu.org/software/groff/groff.html Summary: Ghostscript fonts imported to groff for use with grops License: GPL-2.0-only Group: Productivity/Publishing/Troff @@ -47,8 +47,7 @@ A version of PostScript® driver for Groff to support characters outside ISO Lat %build %define gs_fonts %{_datadir}/ghostscript/fonts %define gs_version %(gs --version) -%define gs_ver %(gs --version | sed "s/\\.//") -%if %{gs_ver} >= 950 +%if %{lua:print(rpm.vercmp(rpm.expand("%{gs_version}"), "9.50"))} >= 0 %define import_font() ln -s -T "%{gs_fonts}/%1.afm" "%2.afm" && gs -P- -dNOSAFER -dNODISPLAY -- pfbtopfa.ps %{gs_fonts}/%1.pfb devps/%1.pfa %else %define import_font() ln -s -T "%{gs_fonts}/%1.afm" "%2.afm" && pfbtopfa %{gs_fonts}/%1.pfb devps/%1.pfa @@ -57,7 +56,7 @@ A version of PostScript® driver for Groff to support characters outside ISO Lat cp %{S:3} . mkdir devps while read fn fa -# Grops font generator expects conventional font file names; +# Grops font generator expects conventional font file names; # the substitutes provided by ghostscript must be linked accordingly. # The link is needed only at build time. # Ghostscript substitutes stripped fonts, full fonts must be embedded in the printout. @@ -72,7 +71,7 @@ cd .. for f in *.afm do pf="$(readlink "${f}")" pf="${pf##*/}" -pf="${pf:0:-4}.pfa" +pf="${pf:0:-4}.pfa" read<"devps/${pf}" decl fn ver echo "${fn}" "${pf}" done >>devps/download