[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:38:24 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=cbbcbd3

The following commit has been merged in the master branch:
commit cbbcbd31fc3fd67f348696155d6f10f55ddce2fa
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Sun Mar 18 14:51:32 2007 +0000

    Added --disable-printucs2 configuration option to turn off Windows tag character encoding convertion using iconv.
---
 README              | 19 ++++++++++---------
 config/config.h.in  |  3 +++
 config/configure.ac | 17 +++++++++++++++++
 src/exv_msvc.h      |  3 +++
 src/tags.cpp        |  6 +++---
 5 files changed, 36 insertions(+), 12 deletions(-)

diff --git a/README b/README
index be9382a..cb42b0b 100644
--- a/README
+++ b/README
@@ -44,15 +44,16 @@ Dependencies
 ============
 
 The following features are enabled by default and may *) require external
-libraries. They can be controlled through configure options.
-
-Feature                    Package   Configure options
--------------------------  -------   ----------------------------
-PNG image support          zlib      --without-zlib
-                                     --with-zlib=DIR
-National language support  gettext   --disable-nls
-Decoding Windows XP tags   libiconv  --without-libiconv-prefix
-                                     --with-libiconv-prefix[=DIR]
+libraries. They can be controlled through configure options. See also
+'./configure --help'.
+
+Feature                     Package   Configure options
+--------------------------  -------   ----------------------------
+PNG image support           zlib      --without-zlib
+                                      --with-zlib=DIR
+National language support   gettext   --disable-nls
+Converting Windows XP tags  libiconv  --disable-printucs2
+                                      --with-libiconv-prefix[=DIR]
 
 zlib         http://www.zlib.net/
 gettext  *)  http://www.gnu.org/software/gettext/
diff --git a/config/config.h.in b/config/config.h.in
index 16a12c6..4369621 100644
--- a/config/config.h.in
+++ b/config/config.h.in
@@ -28,6 +28,9 @@
 /* Define to 1 if you have the `iconv' function. */
 #undef HAVE_ICONV
 
+/* Define to 1 to enable conversion of UCS2 encoded Windows tags to UTF-8. */
+#undef HAVE_PRINTUCS2
+
 #endif /* !EXV_COMMERCIAL_VERSION */
 
 /* Define to `const' or to empty, depending on the second argument of `iconv'. */
diff --git a/config/configure.ac b/config/configure.ac
index 98f95c8..3db69b6 100644
--- a/config/configure.ac
+++ b/config/configure.ac
@@ -107,6 +107,23 @@ if test "$USE_LENSDATA" = "yes"; then
     AC_DEFINE(HAVE_LENSDATA,1)
 fi
 
+AC_MSG_CHECKING([whether to convert UCS2 encoded Windows tags with iconv ])
+AC_ARG_ENABLE(printucs2,
+    [  --disable-printucs2     do not convert UCS2 encoded Windows tag to UTF-8 ],
+    USE_PRINTUCS2=$enableval, USE_PRINTUCS2=yes)
+AC_MSG_RESULT($USE_PRINTUCS2)
+if test "$USE_PRINTUCS2" = "yes"; then
+    AC_DEFINE(HAVE_PRINTUCS2,1)
+else
+# if NLS is also disabled, don't link with iconv
+# (since in some cases, AM_GNU_GETTEXT and/or AM_ICONV configure for this anyway)
+    if test "$USE_NLS" = "no"; then
+        unset LIBICONV
+        unset LTLIBICONV
+    fi
+fi
+
+# Udi's hack to add libiconv to the Libs section in exiv2.pc
 if test "$enable_shared" = "no"; then
     EXV_LIB_STATIC=$LTLIBICONV
 else
diff --git a/src/exv_msvc.h b/src/exv_msvc.h
index cafe123..f9983da 100644
--- a/src/exv_msvc.h
+++ b/src/exv_msvc.h
@@ -46,6 +46,9 @@
 /* Define to 1 if you have the `iconv' function. */
 # undef EXV_HAVE_ICONV
 
+/* Define to 1 to enable conversion of UCS2 encoded Windows tags to UTF-8. */
+# undef EXV_HAVE_PRINTUCS2
+
 #endif /* !EXV_COMMERCIAL_VERSION */
 
 /* File path seperator */
diff --git a/src/tags.cpp b/src/tags.cpp
index 5a0ba93..b69eed4 100644
--- a/src/tags.cpp
+++ b/src/tags.cpp
@@ -1677,7 +1677,7 @@ namespace Exiv2 {
 
     std::ostream& printUcs2(std::ostream& os, const Value& value)
     {
-#ifdef EXV_HAVE_ICONV
+#if defined EXV_HAVE_ICONV && defined EXV_HAVE_PRINTUCS2
         bool go = true;
         iconv_t cd = (iconv_t)(-1);
         if (value.typeId() != unsignedByte) {
@@ -1726,9 +1726,9 @@ namespace Exiv2 {
         if (!go) {
             os << value;
         }
-#else // !EXV_HAVE_ICONV
+#else // !(EXV_HAVE_ICONV && EXV_HAVE_PRINTUCS2)
         os << value;
-#endif // EXV_HAVE_ICONV
+#endif // EXV_HAVE_ICONV && EXV_HAVE_PRINTUCS2
         return os;
 
     } // printUcs2

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list