diff -Nru gexiv2-0.4.1/debian/changelog gexiv2-0.4.1/debian/changelog --- gexiv2-0.4.1/debian/changelog 2012-05-29 21:45:33.000000000 +0000 +++ gexiv2-0.4.1/debian/changelog 2012-06-11 19:27:23.000000000 +0000 @@ -1,11 +1,12 @@ -gexiv2 (0.4.1-1oneiric3) oneiric; urgency=low +gexiv2 (0.4.1-1oneiric5) oneiric; urgency=low - * Reuploading in order to satisfy a Shotwell dependency. + * Made the Makefile detect the machine's word size before deciding + whether -fPIC should be enabled. - -- Clint Rogers Tue, 28 Mar 2012 17:06:48 -0700 + -- Clint Rogers Fri, 8 Jun 2012 14:06:48 -0700 -gexiv2 (0.4.1-0oneiric2) oneiric; urgency=low +gexiv2 (0.4.1-0oneiric1) maverick; urgency=low * An issue where the 64-bit version of the library would not be built with position-independent code under some circumstances has been corrected. diff -Nru gexiv2-0.4.1/debian/compat gexiv2-0.4.1/debian/compat --- gexiv2-0.4.1/debian/compat 2012-05-29 19:14:51.000000000 +0000 +++ gexiv2-0.4.1/debian/compat 2012-06-11 19:27:23.000000000 +0000 @@ -1 +1 @@ -9 +7 diff -Nru gexiv2-0.4.1/debian/control gexiv2-0.4.1/debian/control --- gexiv2-0.4.1/debian/control 2012-05-29 19:14:20.000000000 +0000 +++ gexiv2-0.4.1/debian/control 2012-06-11 19:27:23.000000000 +0000 @@ -15,13 +15,13 @@ Section: libdevel Architecture: any Depends: ${misc:Depends}, - libgexiv2-1 (= ${binary:Version}), + libgexiv2-0 (= ${binary:Version}), libexiv2-dev Description: GObject-based wrapper around the Exiv2 library (development files) gexiv2 is a GObject-based wrapper around the Exiv2 library. It makes the basic features of Exiv2 available to GNOME applications. -Package: libgexiv2-1 +Package: libgexiv2-0 Section: libs Architecture: any Depends: ${shlibs:Depends}, diff -Nru gexiv2-0.4.1/Makefile gexiv2-0.4.1/Makefile --- gexiv2-0.4.1/Makefile 2012-05-29 19:16:05.000000000 +0000 +++ gexiv2-0.4.1/Makefile 2012-06-11 21:21:05.000000000 +0000 @@ -1,5 +1,6 @@ PKGNAME = gexiv2 VERSION = 0.4.1 +WORD_SIZE:=$(shell getconf LONG_BIT) # This number must be edited whenever a change has been made that may affect libgexiv2's # external interface. Please see http://sourceware.org/autobook/autobook/autobook_91.html @@ -94,19 +95,35 @@ EXT_PKGS_LDFLAGS = `pkg-config --libs $(EXT_PKGS)` # REQUIRED_CFLAGS absolutely get appended to CFLAGS, whatever the -# the value of CFLAGS in the environment -REQUIRED_CFLAGS := -fPIC +# the value of CFLAGS in the environment. +REQUIRED_CFLAGS=-Wl,-lstdc++ +REQUIRED_LTFLAGS= + +# Because -fPIC can interfere with compilation on 32-bit platforms but +# is absolutely necessary for AMD64, we check what the target machine's +# word size is, and set our required flags based upon that. +ifeq "$(WORD_SIZE)" "64" + REQUIRED_CFLAGS += -fPIC -DPIC +else + # otherwise, the target is 32-bit, so we don't need to add -fPIC. + REQUIRED_LTFLAGS += -prefer-non-pic +endif # setting CFLAGS in configure.mk overrides build type -ifndef CFLAGS ifdef BUILD_DEBUG CFLAGS = -O0 -g -pipe -nostdlib else CFLAGS = -O2 -g -pipe -nostdlib endif + +ifdef BUILD_DEBUG +CXXFLAGS= -O0 -g -pipe -nostdlib +else +CXXFLAGS= -O2 -g -pipe -nostdlib endif CFLAGS += $(REQUIRED_CFLAGS) +CXXFLAGS += $(REQUIRED_CFLAGS) all: $(LIBRARY_BIN) $(PC_FILE) @@ -165,8 +182,8 @@ $(EXPANDED_OBJ_FILES): $(BUILD_DIR)/%.o: gexiv2/%.cpp $(EXPANDED_HEADER_FILES) $(CONFIG_IN) Makefile @pkg-config --print-errors --exists '$(EXT_PKG_VERSIONS)' @mkdir -p $(BUILD_DIR) - libtool --mode=compile --tag=CC $(CXX) -c $(EXT_PKGS_CFLAGS) $(CFLAGS) -I. -o $@ $< + libtool --mode=compile --tag=CC $(CXX) -c $(EXT_PKGS_CFLAGS) $(CFLAGS) $(REQUIRED_LTFLAGS) -I. -o $@ $< $(LIBRARY_BIN): $(EXPANDED_OBJ_FILES) - libtool --mode=link --tag=CC $(CXX) -rpath $(PREFIX)/$(LIB) $(EXPANDED_LO_FILES) $(EXT_PKGS_LDFLAGS) $(CFLAGS) $(LDFLAGS) -version-info $(VERSION_INFO) -o $(LIBRARY_BIN) + libtool --mode=link --tag=CC $(CXX) -rpath $(PREFIX)/$(LIB) $(EXPANDED_LO_FILES) $(EXT_PKGS_LDFLAGS) $(REQUIRED_LTFLAGS) $(CFLAGS) $(LDFLAGS) -version-info $(VERSION_INFO) -o $(LIBRARY_BIN)