[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:36:07 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=3c1d47b
The following commit has been merged in the master branch:
commit 3c1d47b2ce1dfb074d03eb690ce9047d8286cef7
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Mon Mar 8 06:24:04 2004 +0000
Added a "knot" module, mn.o, to force initialization of static data when compiling the static library
---
src/Makefile | 13 +++++++++----
src/mn.sh | 10 ++++++++++
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/src/Makefile b/src/Makefile
index 55abaac..9f61f78 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -20,7 +20,7 @@
# 02111-1307, USA.
#
# File: Makefile
-# Version: $Name: $ $Revision: 1.13 $
+# Version: $Name: $ $Revision: 1.14 $
# Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
# History: 10-Dec-03, ahu: created
#
@@ -61,7 +61,7 @@ BINSRC = example1.cpp taglist.cpp exifprint.cpp exiftest.cpp makernote-test.cpp
EXIV2MAIN = exiv2.cpp
# Add additional source files of the real application to this list
-EXIV2SRC = actions.cpp utils.cpp
+EXIV2SRC = actions.cpp utils.cpp
# ******************************************************************************
# Library
@@ -116,6 +116,7 @@ ifdef STATIC_LIBS
INSTALL = bin
INSTALL_LIB = install-archive
UNINSTALL_LIB = uninstall-archive
+ LDLIBS := mn.o $(LDLIBS)
endif
ifdef SHARED_LIBS
LIBRARY := $(LIBRARY) sharedlib
@@ -167,6 +168,9 @@ $(BINARY): %: %.o
$(EXIV2BIN): %: %.o
$(CXX) $(CXXFLAGS) $(EXIV2OBJ) $(LDLIBS) $(LDFLAGS_BIN) -o $@
+mn.cpp: ./mn.sh
+ ./mn.sh
+
# ******************************************************************************
# Targets
.PHONY: all archive sharedlib bin check ctags doc \
@@ -189,7 +193,7 @@ $(ARCHIVE): $(ARCHIVE)($(OBJ))
archive: $(ARCHIVE)
$(SHAREDLIB): $(SOBJ)
- $(CXX) $^ $(PMTLIBS) $(LDFLAGS_SHARED) -o $@
+ $(CXX) $^ $(LDFLAGS_SHARED) -o $@
sharedlib: $(SHAREDLIB)
@@ -197,7 +201,7 @@ lib: $(LIBRARY)
# Re-link executables whenever the static library changes
ifdef STATIC_LIBS
-$(BINARY): $(ARCHIVE)
+$(BINARY): $(ARCHIVE) mn.o
endif
$(EXIV2BIN): $(EXIV2OBJ)
@@ -262,6 +266,7 @@ check:
mostlyclean:
$(RM) core
$(RM) $(CCSRC:.cpp=.ii)
+ $(RM) .mn.d mn.cpp mn.o
$(RM) $(OBJ) $(SOBJ) $(BINOBJ) $(EXIV2OBJ)
@if test -n "$(CXX_REPOSITORY)"; then \
echo "rm -rf $(CXX_REPOSITORY)"; \
diff --git a/src/mn.sh b/src/mn.sh
new file mode 100755
index 0000000..fab618d
--- /dev/null
+++ b/src/mn.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Create a module that depends on all MakerNote subclasses to
+# force initialisation of static data in the corresponding
+# components when using the static library.
+cat > mn.cpp <<EOF
+#include "canonmn.hpp"
+namespace {
+ Exif::CanonMakerNote canonMakerNote;
+}
+EOF
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list