summaryrefslogtreecommitdiff
path: root/graphics/exiv2/patches
diff options
context:
space:
mode:
authorgdt <gdt>2008-06-07 23:01:28 +0000
committergdt <gdt>2008-06-07 23:01:28 +0000
commit1c1a4228aacf798a6815774037751519101dc57a (patch)
tree34d6dc3b0f88b570d207b3fb962d198452a7c49f /graphics/exiv2/patches
parent4bcc7107a6a4cf0ef01a0d5c7baf07ea78f72b5f (diff)
downloadpkgsrc-1c1a4228aacf798a6815774037751519101dc57a.tar.gz
Add patch:
From upstream SVN, svn diff -r 1388:1399. Fixes http://dev.robotbattle.com/bugs/view.php?id=0000546. PKGREVISION++.
Diffstat (limited to 'graphics/exiv2/patches')
-rw-r--r--graphics/exiv2/patches/patch-aa62
1 files changed, 62 insertions, 0 deletions
diff --git a/graphics/exiv2/patches/patch-aa b/graphics/exiv2/patches/patch-aa
new file mode 100644
index 00000000000..9811c990292
--- /dev/null
+++ b/graphics/exiv2/patches/patch-aa
@@ -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;
+ }
+