CVS debian/patches

CVS User rousseau ludovic.rousseau@free.fr
Sun, 02 Jan 2005 14:59:35 -0700


Update of /cvsroot/pkg-bins/debian/patches
In directory haydn:/tmp/cvs-serv24292

Added Files:
	10_bins.dpatch 
Log Message:
fixes bug #287768 "add support of jpegtran-mmx"



--- /cvsroot/pkg-bins/debian/patches/10_bins.dpatch	2005/01/02 21:59:35	NONE
+++ /cvsroot/pkg-bins/debian/patches/10_bins.dpatch	2005/01/02 21:59:35	1.1
#!/bin/sh -e
## bins by Ludovic Rousseau <rousseau@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: fixes bug #287768 "add support of jpegtran-mmx"

if [ $# -lt 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"

case "$1" in
       -patch) patch $patch_opts -p0 < $0;;
       -unpatch) patch $patch_opts -p0 -R < $0;;
        *)
                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
                exit 1;;
esac

exit 0

@DPATCH@
--- bins.old	2005-01-02 22:13:17.000000000 +0100
+++ bins	2005-01-02 22:14:25.000000000 +0100
@@ -4472,8 +4472,13 @@
 	$rotateJPEG = 'jpegtran -copy all -rotate %s -outfile "%s.tmp" "%s" && mv "%s.tmp" "%s"';
 	beVerboseN(" found jpegtran.", 3);
       } else {
-	$rotateJPEG = "";
-	beVerboseN(" not found, trying a generic one.", 3);
+	if (commandAvailable("jpegtran-mmx")) {
+	  $rotateJPEG = 'jpegtran-mmx -copy all -rotate %s -outfile "%s.tmp" "%s" && mv "%s.tmp" "%s"';
+	  beVerboseN(" found jpegtran-mmx.", 3);
+	} else {
+	  $rotateJPEG = "";
+	  beVerboseN(" not found, trying a generic one.", 3);
+	}
       }
     }