[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:44 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=2c16464
The following commit has been merged in the master branch:
commit 2c16464268b3245a67c94524d29dd31ed3cfccba
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Thu Sep 20 14:23:18 2007 +0000
Fixed build without XMP support. See README-XMP.
---
README-XMP | 4 +++-
src/Makefile | 12 ++++++------
src/xmp.cpp | 14 ++++++++++----
test/xmpparser-test.sh | 7 +++++++
4 files changed, 26 insertions(+), 11 deletions(-)
diff --git a/README-XMP b/README-XMP
index 1ca7bd7..6496832 100644
--- a/README-XMP
+++ b/README-XMP
@@ -8,7 +8,9 @@ has a new interface to access the raw XMP packet.
Todo: XMP support is controlled with the ENABLE_XMP directive
in config/config.mk.in. This will be a configure option
-eventually.
+eventually. For now, comment the line "ENABLE_XMP = 1" either
+in config.mk.in before running ./configure or in config.mk to
+build without XMP support.
Exiv2 uses the Adobe XMP toolkit (XMP SDK) to parse
and serialize XMP packets (only the XMPCore component).
diff --git a/src/Makefile b/src/Makefile
index bb2d3fe..6fcd802 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -91,11 +91,9 @@ CCSRC += rafimage.cpp \
tiffvisitor.cpp \
types.cpp \
value.cpp \
- version.cpp
-ifdef ENABLE_XMP
-CCSRC += properties.cpp \
+ version.cpp \
+ properties.cpp \
xmp.cpp
-endif
# Add library C source files to this list
ifndef HAVE_TIMEGM
@@ -121,9 +119,11 @@ BINSRC = addmoddel.cpp \
taglist.cpp \
write-test.cpp \
write2-test.cpp \
- tiffparse.cpp \
- xmpparse.cpp \
+ tiffparse.cpp
+ifdef ENABLE_XMP
+BINSRC += xmpparse.cpp \
xmpparser-test.cpp
+endif
# Main source file of the Exiv2 application
EXIV2MAIN = exiv2.cpp
diff --git a/src/xmp.cpp b/src/xmp.cpp
index de98143..58ab787 100644
--- a/src/xmp.cpp
+++ b/src/xmp.cpp
@@ -365,7 +365,11 @@ namespace Exiv2 {
bool XmpParser::initialize()
{
if (!initialized_) {
+#ifdef EXV_HAVE_XMP_TOOLKIT
initialized_ = SXMPMeta::Initialize();
+#else
+ initialized_ = true;
+#endif
}
return initialized_;
}
@@ -373,7 +377,9 @@ namespace Exiv2 {
void XmpParser::terminate()
{
if (initialized_) {
+#ifdef EXV_HAVE_XMP_TOOLKIT
SXMPMeta::Terminate();
+#endif
initialized_ = false;
}
}
@@ -516,7 +522,7 @@ namespace Exiv2 {
return 3;
}} // XmpParser::decode
#else
- int XmpParser::decode( XmpData& /*xmpData*/,
+ int XmpParser::decode( XmpData& xmpData,
const std::string& xmpPacket)
{
xmpData.clear();
@@ -603,16 +609,16 @@ namespace Exiv2 {
return 3;
}} // XmpParser::decode
#else
- void XmpParser::encode( std::string& xmpPacket,
- const XmpData& xmpData)
+ int XmpParser::encode( std::string& xmpPacket,
+ const XmpData& xmpData)
{
xmpPacket.clear();
if (!xmpData.empty()) {
#ifndef SUPPRESS_WARNINGS
std::cerr << "Warning: XMP toolkit support not compiled in.
";
#endif
- return 1;
}
+ return 1;
} // XmpParser::encode
#endif // !EXV_HAVE_XMP_TOOLKIT
diff --git a/test/xmpparser-test.sh b/test/xmpparser-test.sh
index c2abc85..485ea45 100755
--- a/test/xmpparser-test.sh
+++ b/test/xmpparser-test.sh
@@ -2,6 +2,13 @@
# XMP parser test driver
# ----------------------------------------------------------------------
+# Check if xmpparser-test exists
+if [ ! -x ../../src/xmpparser-test ] ; then
+ echo "xmpparser-test not found. Assuming XMP support is not enabled."
+ exit 0
+fi
+
+# ----------------------------------------------------------------------
# Setup
results="./tmp/xmpparser-test.out"
good="./data/xmpparser-test.out"
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list