From 5275cc26fb287223ca4f7428761372b6b0eba405b7b0fb98acf989074eb18925 Mon Sep 17 00:00:00 2001 From: Marguerite Su Date: Mon, 28 Sep 2020 08:25:49 +0000 Subject: [PATCH] Accepting request 838198 from home:MargueriteSu:branches:M17N:fonts - ghostscript gs >= 9.50 needs "-dNOSAFER" to operate on files but pfbtopfa doesn't have that param OBS-URL: https://build.opensuse.org/request/show/838198 OBS-URL: https://build.opensuse.org/package/show/M17N:fonts/ghostscript-fonts-grops?expand=0&rev=17 --- ghostscript-fonts-grops.changes | 6 ++++++ ghostscript-fonts-grops.spec | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ghostscript-fonts-grops.changes b/ghostscript-fonts-grops.changes index 21d4933..80818f1 100644 --- a/ghostscript-fonts-grops.changes +++ b/ghostscript-fonts-grops.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Sep 28 08:23:56 UTC 2020 - Marguerite Su + +- ghostscript gs >= 9.50 needs "-dNOSAFER" to operate on files + but pfbtopfa doesn't have that param + ------------------------------------------------------------------- Sat Dec 15 20:47:32 UTC 2018 - thomas.schraitle@suse.com diff --git a/ghostscript-fonts-grops.spec b/ghostscript-fonts-grops.spec index c86d3dd..c3c6898 100644 --- a/ghostscript-fonts-grops.spec +++ b/ghostscript-fonts-grops.spec @@ -46,8 +46,13 @@ A version of PostScript® driver for Groff to support characters outside ISO Lat %build %define gs_fonts %{_datadir}/ghostscript/fonts -%define import_font() ln -s -T "%{gs_fonts}/%1.afm" "%2.afm" && pfbtopfa "%{gs_fonts}/%1.pfb" "devps/%1.pfa" %define gs_version %(gs --version) +%define gs_ver %(gs --version | sed "s/\\.//") +%if %{gs_ver} >= 950 +%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 +%endif %define gs_docdir %(if [ -d "%{_datadir}/ghostscript/%{gs_version}/doc" ] ; then echo "%{_datadir}/ghostscript/%{gs_version}/doc" ; else echo "%{_datadir}/doc/ghostscript/%{gs_version}"; fi) cp %{S:3} . mkdir devps