[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:37:07 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=a70511c
The following commit has been merged in the master branch:
commit a70511cc4a0be733d7c69abb98f3f27d97c721aa
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Sat May 28 05:48:43 2005 +0000
Changed MakerNoteFactory according to ImageFactory. Removes the need to link applications with mn.o. Fixes bug #427
---
msvc/addmoddel/addmoddel.vcproj | 3 -
msvc/exifcomment/exifcomment.vcproj | 3 -
msvc/exifprint/exifprint.vcproj | 3 -
msvc/exiv2/exiv2.vcproj | 3 -
msvc/exiv2lib/exiv2lib.vcproj | 18 +----
msvc/exivsimple/exivsimple.vcproj | 15 ----
msvc/ifd-test/ifd-test.vcproj | 3 -
msvc/iptceasy/iptceasy.vcproj | 3 -
msvc/iptcprint/iptcprint.vcproj | 3 -
msvc/iptctest/iptctest.vcproj | 3 -
msvc/makernote-test/makernote-test.vcproj | 3 -
msvc/metacopy/metacopy.vcproj | 3 -
msvc/taglist/taglist.vcproj | 3 -
msvc/utiltest/utiltest.vcproj | 3 -
msvc/write-test/write-test.vcproj | 3 -
msvc/write2-test/write2-test.vcproj | 3 -
src/Makefile | 19 +++--
src/canonmn.cpp | 21 +++++-
src/canonmn.hpp | 45 +++---------
src/exif.cpp | 19 +++--
src/fujimn.cpp | 11 ++-
src/fujimn.hpp | 34 +++------
src/makernote.cpp | 41 ++++++-----
src/makernote.hpp | 58 ++++++---------
msvc/exivsimple/stdafx.h => src/mn.hpp | 76 +++++++++++---------
src/mn.sh | 28 --------
src/nikonmn.cpp | 31 +++++++-
src/nikonmn.hpp | 113 +++++++-----------------------
src/olympusmn.cpp | 12 +++-
src/olympusmn.hpp | 43 ++++--------
src/sigmamn.cpp | 12 +++-
src/sigmamn.hpp | 36 +++-------
src/sonymn.cpp | 11 ++-
src/sonymn.hpp | 35 +++------
src/taglist.cpp | 2 +-
src/tags.cpp | 8 +--
src/types.hpp | 3 +-
test/data/exiv2-test.out | 1 +
38 files changed, 277 insertions(+), 457 deletions(-)
diff --git a/msvc/addmoddel/addmoddel.vcproj b/msvc/addmoddel/addmoddel.vcproj
index ccd159e..40a920f 100644
--- a/msvc/addmoddel/addmoddel.vcproj
+++ b/msvc/addmoddel/addmoddel.vcproj
@@ -126,9 +126,6 @@
<File
RelativePath="..\..\srcddmoddel.cpp">
</File>
- <File
- RelativePath="..\..\src\mn.cpp">
- </File>
</Filter>
<Filter
Name="Header Files"
diff --git a/msvc/exifcomment/exifcomment.vcproj b/msvc/exifcomment/exifcomment.vcproj
index 99dd954..9f74bd2 100644
--- a/msvc/exifcomment/exifcomment.vcproj
+++ b/msvc/exifcomment/exifcomment.vcproj
@@ -126,9 +126,6 @@
<File
RelativePath="..\..\src\exifcomment.cpp">
</File>
- <File
- RelativePath="..\..\src\mn.cpp">
- </File>
</Filter>
<Filter
Name="Header Files"
diff --git a/msvc/exifprint/exifprint.vcproj b/msvc/exifprint/exifprint.vcproj
index 1f782bd..268c6e1 100644
--- a/msvc/exifprint/exifprint.vcproj
+++ b/msvc/exifprint/exifprint.vcproj
@@ -126,9 +126,6 @@
<File
RelativePath="..\..\src\exifprint.cpp">
</File>
- <File
- RelativePath="..\..\src\mn.cpp">
- </File>
</Filter>
<Filter
Name="Header Files"
diff --git a/msvc/exiv2/exiv2.vcproj b/msvc/exiv2/exiv2.vcproj
index 0d7e9f1..56da082 100644
--- a/msvc/exiv2/exiv2.vcproj
+++ b/msvc/exiv2/exiv2.vcproj
@@ -136,9 +136,6 @@
RelativePath="..\..\src\localtime.c">
</File>
<File
- RelativePath="..\..\src\mn.cpp">
- </File>
- <File
RelativePath="..\..\src\utils.cpp">
</File>
</Filter>
diff --git a/msvc/exiv2lib/exiv2lib.vcproj b/msvc/exiv2lib/exiv2lib.vcproj
index b40b704..ba40be4 100644
--- a/msvc/exiv2lib/exiv2lib.vcproj
+++ b/msvc/exiv2lib/exiv2lib.vcproj
@@ -242,21 +242,6 @@
RelativePath="..\..\src\metadatum.cpp">
</File>
<File
- RelativePath="..\..\src\mn.cpp">
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>
- </FileConfiguration>
- </File>
- <File
RelativePath="..\..\src
ikonmn.cpp">
</File>
<File
@@ -397,6 +382,9 @@
RelativePath="..\..\src\metadatum.hpp">
</File>
<File
+ RelativePath="..\..\src\mn.hpp">
+ </File>
+ <File
RelativePath="..\..\src
ikonmn.hpp">
</File>
<File
diff --git a/msvc/exivsimple/exivsimple.vcproj b/msvc/exivsimple/exivsimple.vcproj
index d8b7f3b..22a8252 100644
--- a/msvc/exivsimple/exivsimple.vcproj
+++ b/msvc/exivsimple/exivsimple.vcproj
@@ -133,21 +133,6 @@
RelativePath=".\exivsimple.cpp">
</File>
<File
- RelativePath="..\..\src\mn.cpp">
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="0"/>
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="0"/>
- </FileConfiguration>
- </File>
- <File
RelativePath=".\stdafx.cpp">
<FileConfiguration
Name="Debug|Win32">
diff --git a/msvc/ifd-test/ifd-test.vcproj b/msvc/ifd-test/ifd-test.vcproj
index ddbe3cd..529c413 100644
--- a/msvc/ifd-test/ifd-test.vcproj
+++ b/msvc/ifd-test/ifd-test.vcproj
@@ -124,9 +124,6 @@
<File
RelativePath="..\..\src\ifd-test.cpp">
</File>
- <File
- RelativePath="..\..\src\mn.cpp">
- </File>
</Filter>
<Filter
Name="Header Files"
diff --git a/msvc/iptceasy/iptceasy.vcproj b/msvc/iptceasy/iptceasy.vcproj
index 366778a..9a93220 100644
--- a/msvc/iptceasy/iptceasy.vcproj
+++ b/msvc/iptceasy/iptceasy.vcproj
@@ -124,9 +124,6 @@
<File
RelativePath="..\..\src\iptceasy.cpp">
</File>
- <File
- RelativePath="..\..\src\mn.cpp">
- </File>
</Filter>
<Filter
Name="Header Files"
diff --git a/msvc/iptcprint/iptcprint.vcproj b/msvc/iptcprint/iptcprint.vcproj
index cc737d4..61fe7ed 100644
--- a/msvc/iptcprint/iptcprint.vcproj
+++ b/msvc/iptcprint/iptcprint.vcproj
@@ -124,9 +124,6 @@
<File
RelativePath="..\..\src\iptcprint.cpp">
</File>
- <File
- RelativePath="..\..\src\mn.cpp">
- </File>
</Filter>
<Filter
Name="Header Files"
diff --git a/msvc/iptctest/iptctest.vcproj b/msvc/iptctest/iptctest.vcproj
index 712301a..106f9fd 100644
--- a/msvc/iptctest/iptctest.vcproj
+++ b/msvc/iptctest/iptctest.vcproj
@@ -125,9 +125,6 @@
<File
RelativePath="..\..\src\iptctest.cpp">
</File>
- <File
- RelativePath="..\..\src\mn.cpp">
- </File>
</Filter>
<Filter
Name="Header Files"
diff --git a/msvc/makernote-test/makernote-test.vcproj b/msvc/makernote-test/makernote-test.vcproj
index 001d7cb..78543b9 100644
--- a/msvc/makernote-test/makernote-test.vcproj
+++ b/msvc/makernote-test/makernote-test.vcproj
@@ -124,9 +124,6 @@
<File
RelativePath="..\..\src\makernote-test.cpp">
</File>
- <File
- RelativePath="..\..\src\mn.cpp">
- </File>
</Filter>
<Filter
Name="Header Files"
diff --git a/msvc/metacopy/metacopy.vcproj b/msvc/metacopy/metacopy.vcproj
index d63c998..fb83500 100644
--- a/msvc/metacopy/metacopy.vcproj
+++ b/msvc/metacopy/metacopy.vcproj
@@ -130,9 +130,6 @@
RelativePath="..\..\src\metacopy.cpp">
</File>
<File
- RelativePath="..\..\src\mn.cpp">
- </File>
- <File
RelativePath="..\..\src\utils.cpp">
</File>
</Filter>
diff --git a/msvc/taglist/taglist.vcproj b/msvc/taglist/taglist.vcproj
index bc78dd5..ffda2de 100644
--- a/msvc/taglist/taglist.vcproj
+++ b/msvc/taglist/taglist.vcproj
@@ -124,9 +124,6 @@
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
<File
- RelativePath="..\..\src\mn.cpp">
- </File>
- <File
RelativePath="..\..\src aglist.cpp">
</File>
</Filter>
diff --git a/msvc/utiltest/utiltest.vcproj b/msvc/utiltest/utiltest.vcproj
index de1fefe..4a00fb2 100644
--- a/msvc/utiltest/utiltest.vcproj
+++ b/msvc/utiltest/utiltest.vcproj
@@ -127,9 +127,6 @@
RelativePath="..\..\src\getopt_win32.c">
</File>
<File
- RelativePath="..\..\src\mn.cpp">
- </File>
- <File
RelativePath="..\..\src\utils.cpp">
</File>
<File
diff --git a/msvc/write-test/write-test.vcproj b/msvc/write-test/write-test.vcproj
index 507f74d..81827f4 100644
--- a/msvc/write-test/write-test.vcproj
+++ b/msvc/write-test/write-test.vcproj
@@ -124,9 +124,6 @@
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
<File
- RelativePath="..\..\src\mn.cpp">
- </File>
- <File
RelativePath="..\..\src\write-test.cpp">
</File>
</Filter>
diff --git a/msvc/write2-test/write2-test.vcproj b/msvc/write2-test/write2-test.vcproj
index 5b35022..03bc97f 100644
--- a/msvc/write2-test/write2-test.vcproj
+++ b/msvc/write2-test/write2-test.vcproj
@@ -124,9 +124,6 @@
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
<File
- RelativePath="..\..\src\mn.cpp">
- </File>
- <File
RelativePath="..\..\src\write2-test.cpp">
</File>
</Filter>
diff --git a/src/Makefile b/src/Makefile
index ccec948..1b07470 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -48,7 +48,7 @@ include $(top_srcdir)/config/config.mk
# Source files
# Add standalone C++ header files to this list
-CCHDR = exv_conf.h exv_msvc.h rcsid.hpp
+CCHDR = exv_conf.h exv_msvc.h mn.hpp rcsid.hpp
# Add library C++ source files to this list
CCSRC = basicio.cpp canonmn.cpp datasets.cpp error.cpp exif.cpp futils.cpp \
@@ -87,7 +87,7 @@ LIBRARY = libexiv2.la
# Defines, Includes and Libraries
CXXDEFS = $(DEFS)
CXXINCS = $(INCS)
-LDLIBS = $(LIBS) mn.o $(LIBRARY)
+LDLIBS = $(LIBS) $(LIBRARY)
# ******************************************************************************
# ==============================================================================
@@ -146,7 +146,7 @@ endif
$(OBJ): %.o: %.cpp
@$(LIBTOOL) --mode=compile $(CXX) $(CXXFLAGS) $(CXXDEFS) $(CXXINCS) -c $<
-$(sort $(BINOBJ) $(EXIV2OBJ) $(MCOBJ) mn.o): %.o: %.cpp
+$(sort $(BINOBJ) $(EXIV2OBJ) $(MCOBJ)): %.o: %.cpp
$(CXX) $(CXXFLAGS) $(CXXDEFS) $(CXXINCS) -c $<
%.o: %.c
@@ -179,9 +179,6 @@ actions.cpp exiv2.cpp image.cpp utils.cpp: exv_conf.h
exv_conf.h: $(top_srcdir)/config/config.h
sed 's/#define \([A-Z]\)/#define EXV_/; s/#undef \([A-Z]\)/#undef EXV_/' < $< > $@
-mn.cpp: ./mn.sh
- ./mn.sh
-
$(LIBTOOL): $(LIBTOOL_DEPS)
$(SHELL) $(top_srcdir)/config.status --recheck
@@ -194,13 +191,13 @@ lib: $(OBJ)
path-test: path-test.o utils.o
$(CXX) $(CXXFLAGS) path-test.o utils.o -o $@
-$(BINARY): %: %.o lib mn.o
+$(BINARY): %: %.o lib
@$(LIBTOOL) --mode=link $(CXX) $(CXXFLAGS) $(LDLIBS) $@.o $(LDFLAGS) -o $@ -rpath $(libdir)
-$(EXIV2BIN): lib $(EXIV2OBJ) $(EXIV2COBJ) mn.o
+$(EXIV2BIN): lib $(EXIV2OBJ) $(EXIV2COBJ)
@$(LIBTOOL) --mode=link $(CXX) $(CXXFLAGS) $(EXIV2OBJ) $(EXIV2COBJ) $(LDLIBS) $(LDFLAGS) -o $@ -rpath $(libdir)
-$(MCBIN): lib $(MCOBJ) mn.o
+$(MCBIN): lib $(MCOBJ)
@$(LIBTOOL) --mode=link $(CXX) $(CXXFLAGS) $(MCOBJ) $(LDLIBS) $(LDFLAGS) -o $@ -rpath $(libdir)
install-header:
@@ -247,7 +244,8 @@ mostlyclean:
$(RM) core
$(RM) $(CCSRC:.cpp=.ii)
$(RM) lib
- @$(LIBTOOL) --mode=clean $(RM) $(LOBJ) $(sort $(BINOBJ) $(EXIV2OBJ) $(EXIV2COBJ) $(MCOBJ) mn.o)
+ $(RM) path-test.o
+ @$(LIBTOOL) --mode=clean $(RM) $(LOBJ) $(sort $(BINOBJ) $(EXIV2OBJ) $(EXIV2COBJ) $(MCOBJ))
clean: mostlyclean
@$(LIBTOOL) --mode=clean $(RM) $(LIBRARY)
@@ -265,4 +263,3 @@ distclean: clean
# that may need special tools to rebuild.
maintainer-clean: uninstall distclean
$(RM) $(DEP)
- $(RM) mn.cpp
diff --git a/src/canonmn.cpp b/src/canonmn.cpp
index 32b60b9..a431b6c 100644
--- a/src/canonmn.cpp
+++ b/src/canonmn.cpp
@@ -77,7 +77,26 @@ namespace {
// class member definitions
namespace Exiv2 {
- const CanonMakerNote::RegisterMakerNote CanonMakerNote::register_;
+ //! @cond IGNORE
+ CanonMakerNote::RegisterMn::RegisterMn()
+ {
+ MakerNoteFactory::registerMakerNote("Canon", "*", createCanonMakerNote);
+
+ MakerNoteFactory::registerMakerNote(
+ canonIfdId, MakerNote::AutoPtr(new CanonMakerNote));
+ MakerNoteFactory::registerMakerNote(
+ canonCs1IfdId, MakerNote::AutoPtr(new CanonMakerNote));
+ MakerNoteFactory::registerMakerNote(
+ canonCs2IfdId, MakerNote::AutoPtr(new CanonMakerNote));
+ MakerNoteFactory::registerMakerNote(
+ canonCfIfdId, MakerNote::AutoPtr(new CanonMakerNote));
+
+ ExifTags::registerMakerTagInfo(canonIfdId, tagInfo_);
+ ExifTags::registerMakerTagInfo(canonCs1IfdId, tagInfoCs1_);
+ ExifTags::registerMakerTagInfo(canonCs2IfdId, tagInfoCs2_);
+ ExifTags::registerMakerTagInfo(canonCfIfdId, tagInfoCf_);
+ }
+ //! @endcond
// Canon MakerNote Tag Info
const TagInfo CanonMakerNote::tagInfo_[] = {
diff --git a/src/canonmn.hpp b/src/canonmn.hpp
index 54188fb..890c524 100644
--- a/src/canonmn.hpp
+++ b/src/canonmn.hpp
@@ -189,6 +189,13 @@ namespace Exiv2 {
static std::ostream& printCs20x0013(std::ostream& os, const Value& value);
//@}
+ //! @cond IGNORE
+ // Public only so that we can create a static instance
+ struct RegisterMn {
+ RegisterMn();
+ };
+ //! @endcond
+
private:
//! @name Manipulators
//@{
@@ -223,45 +230,9 @@ namespace Exiv2 {
static const TagInfo tagInfoCs2_[];
static const TagInfo tagInfoCf_[];
- //! Structure used to auto-register the MakerNote.
- struct RegisterMakerNote {
- //! Default constructor
- RegisterMakerNote()
- {
- MakerNoteFactory& mnf = MakerNoteFactory::instance();
- mnf.registerMakerNote("Canon", "*", createCanonMakerNote);
-
- mnf.registerMakerNote(canonIfdId,
- MakerNote::AutoPtr(new CanonMakerNote));
- mnf.registerMakerNote(canonCs1IfdId,
- MakerNote::AutoPtr(new CanonMakerNote));
- mnf.registerMakerNote(canonCs2IfdId,
- MakerNote::AutoPtr(new CanonMakerNote));
- mnf.registerMakerNote(canonCfIfdId,
- MakerNote::AutoPtr(new CanonMakerNote));
-
- ExifTags::registerMakerTagInfo(canonIfdId, tagInfo_);
- ExifTags::registerMakerTagInfo(canonCs1IfdId, tagInfoCs1_);
- ExifTags::registerMakerTagInfo(canonCs2IfdId, tagInfoCs2_);
- ExifTags::registerMakerTagInfo(canonCfIfdId, tagInfoCf_);
- }
- };
- /*!
- The static member variable is (see note) initialized before main and
- will in the process register the MakerNote class. (Remember the
- definition of the variable in the implementation file!)
-
- @note The standard says that, if no function is explicitly called ever
- in a module, then that module's static data might be never
- initialized. This clause was introduced to allow dynamic link
- libraries. The idea is, with this clause the loader is not
- forced to eagerly load all modules, but load them only on
- demand.
- */
- static const RegisterMakerNote register_;
-
}; // class CanonMakerNote
+ static CanonMakerNote::RegisterMn registerCanonMakerNote;
} // namespace Exiv2
#endif // #ifndef CANONMN_HPP_
diff --git a/src/exif.cpp b/src/exif.cpp
index 59b0649..7b90740 100644
--- a/src/exif.cpp
+++ b/src/exif.cpp
@@ -479,16 +479,16 @@ namespace Exiv2 {
Ifd::iterator model = pIfd0_->findTag(0x0110);
if ( pos != pExifIfd_->end()
&& make != pIfd0_->end() && model != pIfd0_->end()) {
- MakerNoteFactory& mnf = MakerNoteFactory::instance();
// Todo: The conversion to string assumes that there is a
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list