Commit 189ca8fe authored by Pierre Lamot's avatar Pierre Lamot Committed by Jean-Baptiste Kempf

Contribs: add support for QtSVG for Qt

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <>
parent da7bd76e
......@@ -60,7 +60,7 @@ endif
mkdir -p $(PREFIX)/include/QtGui/qpa
cp $(PREFIX)/include/QtGui/$(QT_VERSION)/QtGui/qpa/qplatformnativeinterface.h $(PREFIX)/include/QtGui/qpa
# Clean Qt mess
rm -rf $(PREFIX)/lib/libQt5Bootstrap* $(PREFIX)/lib/*.prl $(PREFIX)/mkspecs
rm -rf $(PREFIX)/lib/libQt5Bootstrap*
# Fix .pc files to remove debug version (d)
cd $(PREFIX)/lib/pkgconfig; for i in Qt5Core.pc Qt5Gui.pc Qt5Widgets.pc; do sed -i -e 's/d\.a/.a/g' -e 's/d $$/ /' $$i; done
# Fix Qt5Gui.pc file to include qwindows (QWindowsIntegrationPlugin) and Qt5Platform Support
......@@ -69,6 +69,7 @@ ifdef HAVE_CROSS_COMPILE
# Building Qt build tools for Xcompilation
cd $</include/QtCore; ln -sf $(QT_VERSION)/QtCore/private
cd $</qmake; $(MAKE)
cd $<; $(MAKE) install_qmake install_mkspecs
cd $</src/tools; \
for i in bootstrap uic rcc moc; \
do (cd $$i; echo $$i && ../../../bin/qmake -spec $(QT_SPEC) && $(MAKE) clean && $(MAKE) CC=$(HOST)-gcc CXX=$(HOST)-g++ LINKER=$(HOST)-g++ && $(MAKE) install); \
From ed55cab9836d8ed9a4738c795855b0b2af6fa6b9 Mon Sep 17 00:00:00 2001
From: Pierre Lamot <>
Date: Thu, 21 Sep 2017 12:05:15 +0200
Subject: [PATCH] Force the usage of QtZlib header
qmake adds -I$(PREFIX)/include before adding
-I$(PREFIX)/include/QtZlib in its path while cross
compiling which ends up using the definition from the
system zlib while linking to QtZlib
src/svg/qsvgtinydocument.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/svg/qsvgtinydocument.cpp b/src/svg/qsvgtinydocument.cpp
index cc0fd5d..450c2d1 100644
--- a/src/svg/qsvgtinydocument.cpp
+++ b/src/svg/qsvgtinydocument.cpp
@@ -45,7 +45,7 @@
#include "qdebug.h"
-#include <zlib.h>
+#include <QtZlib/zlib.h>
ff78a75d0452de56dfe5b33f64d611c9e75e1a46c2ca168f9d3467ef3bb32f17ef256b45df275ed45bc2215d31dbf321d9cacb3f428096354041481276683958 qtsvg-5.6.2.tar.xz
# Qt
QTSVG_URL :=$(QTSVG_VERSION)/submodules/qtsvg-opensource-src-$(QTSVG_VERSION).tar.xz
DEPS_qtsvg += qt $(DEPS_qt)
ifeq ($(call need_pkg,"Qt5Svg"),)
PKGS_FOUND += qtsvg
$(call download,$(QTSVG_URL))
.sum-qtsvg: qtsvg-$(QTSVG_VERSION).tar.xz
qtsvg: qtsvg-$(QTSVG_VERSION).tar.xz .sum-qtsvg
mv qtsvg-opensource-src-$(QTSVG_VERSION) qtsvg-$(QTSVG_VERSION)
$(APPLY) $(SRC)/qtsvg/0001-Force-the-usage-of-QtZlib-header.patch
.qtsvg: qtsvg
cd $< && $(PREFIX)/bin/qmake
# Make && Install libraries
cd $< && $(MAKE)
cd $</src && $(MAKE) sub-plugins-install_subtargets sub-svg-install_subtargets
mv $(PREFIX)/plugins/iconengines/libqsvgicon.a $(PREFIX)/lib/
mv $(PREFIX)/plugins/imageformats/libqsvg.a $(PREFIX)/lib/
cd $(PREFIX)/lib/pkgconfig; sed -i \
-e 's/d\.a/.a/g' \
-e 's/-lQt\([^ ]*\)d/-lQt\1/g' \
-e '/Libs:/ s/$$/ -lqsvg -lqsvgicon/ ' \
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment