pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/exiv2 Add patch:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/37da61731b6b
branches:  trunk
changeset: 543173:37da61731b6b
user:      gdt <gdt%pkgsrc.org@localhost>
date:      Sat Jun 07 23:01:28 2008 +0000

description:
Add patch:

>From upstream SVN, svn diff -r 1388:1399.
Fixes http://dev.robotbattle.com/bugs/view.php?id=0000546.

PKGREVISION++.

diffstat:

 graphics/exiv2/Makefile         |   3 +-
 graphics/exiv2/distinfo         |   3 +-
 graphics/exiv2/patches/patch-aa |  62 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 66 insertions(+), 2 deletions(-)

diffs (90 lines):

diff -r cbc4ff835aed -r 37da61731b6b graphics/exiv2/Makefile
--- a/graphics/exiv2/Makefile   Sat Jun 07 22:26:10 2008 +0000
+++ b/graphics/exiv2/Makefile   Sat Jun 07 23:01:28 2008 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.17 2008/01/16 07:54:01 wiz Exp $
+# $NetBSD: Makefile,v 1.18 2008/06/07 23:01:28 gdt Exp $
 #
 
 DISTNAME=              exiv2-0.16
+PKGREVISION=           1
 CATEGORIES=            graphics
 MASTER_SITES=          http://www.exiv2.org/
 
diff -r cbc4ff835aed -r 37da61731b6b graphics/exiv2/distinfo
--- a/graphics/exiv2/distinfo   Sat Jun 07 22:26:10 2008 +0000
+++ b/graphics/exiv2/distinfo   Sat Jun 07 23:01:28 2008 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.10 2008/01/16 07:54:01 wiz Exp $
+$NetBSD: distinfo,v 1.11 2008/06/07 23:01:28 gdt Exp $
 
 SHA1 (exiv2-0.16.tar.gz) = fd5cdec6b60fd52a15c73c30760e099bbfa3cf50
 RMD160 (exiv2-0.16.tar.gz) = b0a67bbf3e9367b58b75170899b5820afed42d33
 Size (exiv2-0.16.tar.gz) = 1591822 bytes
+SHA1 (patch-aa) = edb516d5b65c097c5729e370269a6a6950d89d61
diff -r cbc4ff835aed -r 37da61731b6b graphics/exiv2/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/exiv2/patches/patch-aa   Sat Jun 07 23:01:28 2008 +0000
@@ -0,0 +1,62 @@
+$NetBSD: patch-aa,v 1.1 2008/06/07 23:01:28 gdt Exp $
+
+From upstream SVN, svn diff -r 1388:1399.
+Fixes http://dev.robotbattle.com/bugs/view.php?id=0000546.
+
+Index: src/nikonmn.cpp
+===================================================================
+--- src/nikonmn.cpp    (revision 1398)
++++ src/nikonmn.cpp    (revision 1399)
+@@ -931,29 +931,31 @@
+     std::ostream& Nikon3MakerNote::print0x0084(std::ostream& os,
+                                                const Value& value)
+     {
+-        if (value.count() == 4) {
+-            long len1 = value.toLong(0);
+-            long len2 = value.toLong(1);
+-            Rational fno1 = value.toRational(2);
+-            Rational fno2 = value.toRational(3);
+-            os << len1;
+-            if (len2 != len1) {
+-                os << "-" << len2;
+-            }
+-            os << "mm ";
+-            std::ostringstream oss;
+-            oss.copyfmt(os);
+-            os << "F" << std::setprecision(2)
+-               << static_cast<float>(fno1.first) / fno1.second;
+-            if (fno2 != fno1) {
+-                os << "-" << std::setprecision(2)
+-                   << static_cast<float>(fno2.first) / fno2.second;
+-            }
+-            os.copyfmt(oss);
+-        }
+-        else {
++        if (   value.count() != 4
++            || value.toRational(0).second == 0
++            || value.toRational(1).second == 0) {
+             os << "(" << value << ")";
++            return os;
+         }
++        long len1 = value.toLong(0);
++        long len2 = value.toLong(1);
++
++        Rational fno1 = value.toRational(2);
++        Rational fno2 = value.toRational(3);
++        os << len1;
++        if (len2 != len1) {
++            os << "-" << len2;
++        }
++        os << "mm ";
++        std::ostringstream oss;
++        oss.copyfmt(os);
++        os << "F" << std::setprecision(2)
++           << static_cast<float>(fno1.first) / fno1.second;
++        if (fno2 != fno1) {
++            os << "-" << std::setprecision(2)
++               << static_cast<float>(fno2.first) / fno2.second;
++        }
++        os.copyfmt(oss);
+         return os;
+     }
+ 



Home | Main Index | Thread Index | Old Index