Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37047914
en ru br
ALT Linux repos
S:1.2.1-alt1
5.0: 1.1.35-alt1.1
4.1: 1.1.35-alt1
4.0: 1.1.31-alt1.1
3.0: 1.1.31-alt1

Group :: Communications
RPM: mgetty

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: mgetty-1.1.31-no-acroread.patch
Download


diff --git a/mgetty/fax/faxspool.in b/mgetty/fax/faxspool.in
index 2be42fc..1f65a9c 100644
--- a/mgetty/fax/faxspool.in
+++ b/mgetty/fax/faxspool.in
@@ -414,10 +414,23 @@ fs_cvt_pdf()
 {
     driver="$GS_DRIVER_HI"
     test X$3 = X-n && driver="$GS_DRIVER_LO"
-
-    cat $1 |
-	acroread -toPostScript |
-	gs $driver -sOutputFile=$2%03d -dNOPAUSE -q -dSAFER -
+    r=0;
+    if /usr/bin/which acroread >/dev/null 2>&1; then
+       cat $1 |
+	  acroread -toPostScript |
+	  gs $driver -sOutputFile=$2%03d -dNOPAUSE -q -dSAFER -
+       r=$?;
+       if [ $r != 0 ]; then
+          cat $1 |
+	     acroread -toPostScript -level1 |
+	     gs $driver -sOutputFile=$2%03d -dNOPAUSE -q -dSAFER -
+	  r=$?;
+       fi;
+    else
+       cat $1 | gs $driver -sOutputFile=$2%03d -dNOPAUSE -q -dSAFER -
+       r=$?;
+    fi;
+    return $r;
 }
 
 
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin