[freeimage] 01/03: Fix FTCBFS: use triplet-prefixed build tools
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Tue Dec 13 16:53:40 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch master
in repository freeimage.
commit df5dc0f29a03c0c104fedd041dd98f38234e500f
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date: Tue Dec 13 16:09:34 2016 +0000
Fix FTCBFS: use triplet-prefixed build tools
Gbp-Dch: full
Closes: #845279
Thanks: Helmut Grohne for the fix
---
.../Enable-substitution-of-pkg-config.patch | 39 ++++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 15 ++++++---
3 files changed, 51 insertions(+), 4 deletions(-)
diff --git a/debian/patches/Enable-substitution-of-pkg-config.patch b/debian/patches/Enable-substitution-of-pkg-config.patch
new file mode 100644
index 0000000..3761e1e
--- /dev/null
+++ b/debian/patches/Enable-substitution-of-pkg-config.patch
@@ -0,0 +1,39 @@
+From: Helmut Grohne <helmut at subdivi.de>
+Date: Tue, 13 Dec 2016 15:59:00 +0000
+Subject: Enable substitution of pkg-config
+
+---
+ Makefile.gnu | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.gnu b/Makefile.gnu
+index 4e61efa..fd867ca 100644
+--- a/Makefile.gnu
++++ b/Makefile.gnu
+@@ -11,7 +11,10 @@ INSTALLDIR ?= $(DESTDIR)/usr/lib
+ # Converts cr/lf to just lf
+ DOS2UNIX = dos2unix
+
+-LIBRARIES = -lstdc++ -ljxrglue $(shell pkg-config --libs libjpeg libopenjp2 libpng libraw libtiff-4 libwebpmux OpenEXR zlib) -lm
++# See Bug-Debian #845279
++PKG_CONFIG ?= pkg-config
++
++LIBRARIES = -lstdc++ -ljxrglue $(shell $(PKG_CONFIG) --libs libjpeg libopenjp2 libpng libraw libtiff-4 libwebpmux OpenEXR zlib) -lm
+
+ MODULES = $(SRCS:.c=.o)
+ MODULES := $(MODULES:.cpp=.o)
+@@ -23,12 +26,12 @@ override CFLAGS += -DOPJ_STATIC
+ override CFLAGS += -DNO_LCMS
+ # LibJXR
+ override CFLAGS += -DDISABLE_PERF_MEASUREMENT -D__ANSI__
+-override CFLAGS += $(INCLUDE) -I/usr/include/jxrlib $(shell pkg-config --cflags libjpeg libopenjp2 libpng libraw libtiff-4 libwebpmux OpenEXR zlib)
++override CFLAGS += $(INCLUDE) -I/usr/include/jxrlib $(shell $(PKG_CONFIG) --cflags libjpeg libopenjp2 libpng libraw libtiff-4 libwebpmux OpenEXR zlib)
+ CXXFLAGS ?= -O3 -fPIC
+ override CXXFLAGS += -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
+ # LibJXR
+ override CXXFLAGS += -D__ANSI__
+-override CXXFLAGS += $(INCLUDE) -I/usr/include/jxrlib $(shell pkg-config --cflags libjpeg libopenjp2 libpng libraw libtiff-4 libwebpmux OpenEXR zlib)
++override CXXFLAGS += $(INCLUDE) -I/usr/include/jxrlib $(shell $(PKG_CONFIG) --cflags libjpeg libopenjp2 libpng libraw libtiff-4 libwebpmux OpenEXR zlib)
+
+ TARGET = freeimage
+ STATICLIB = lib$(TARGET).a
diff --git a/debian/patches/series b/debian/patches/series
index dc77e78..c7b7f4b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -12,3 +12,4 @@ Fix-endianness-detection.patch
Fix-CVE-2015-0852.patch
Fix-encoding-of-fi-header.patch
Fix-CVE-2016-5684.patch
+Enable-substitution-of-pkg-config.patch
diff --git a/debian/rules b/debian/rules
index eff66f1..a45ec60 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,8 +6,15 @@ export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic -fPIC
export DEB_CXXFLAGS_MAINT_APPEND = -Wall -pedantic -fPIC
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
-# Environment information.
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+# See Bug-Debian #845279.
+include /usr/share/dpkg/architecture.mk
+ifeq ($(origin CC),default)
+CC := $(DEB_HOST_GNU_TYPE)-gcc
+endif
+ifeq ($(origin CXX),default)
+CXX := $(DEB_HOST_GNU_TYPE)-g++
+endif
+export PKG_CONFIG ?= $(DEB_HOST_GNU_TYPE)-pkg-config
# Installation paths.
DESTDIR = $(CURDIR)/debian/tmp
@@ -27,8 +34,8 @@ override_dh_autoreconf:
dh_autoreconf $(MAKE) -- -f $(CURDIR)/debian/rules gen-src-list
override_dh_auto_build-arch:
- $(MAKE) CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)"
- $(MAKE) -f Makefile.fip CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)"
+ $(MAKE) CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)"
+ $(MAKE) -f Makefile.fip CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)"
override_dh_auto_build-indep:
cd $(CURDIR)/Wrapper/FreeImagePlus/doc && doxygen FreeImagePlus.dox
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/freeimage.git
More information about the debian-science-commits
mailing list