Add hack to generate qt.conf after qtsvg
authorAndre Heinecke <aheinecke@intevation.de>
Wed, 23 Aug 2017 10:05:54 +0000 (12:05 +0200)
committerAndre Heinecke <aheinecke@intevation.de>
Wed, 23 Aug 2017 10:05:54 +0000 (12:05 +0200)
* configure.ac (qttranslations): Ensure it's built after qtsvg.
* src/Makefile.am (pkg_qtsvg_post_install): Generate qt.conf here.

--
For some reason I don't understand qmake does not add -lz to
the link line of qtsvg if the qt.conf exists when configuring
qtsvg. So as a workaround we create the file only after qtsvg.

configure.ac
src/Makefile.am

index 558dd62..5c0d6b1 100644 (file)
@@ -343,7 +343,7 @@ GPG4WIN_BPKG_BINSRC([kde-l10n])
 # Qt related stuff.
 GPG4WIN_SPKG([qtbase], [libpng])
 GPG4WIN_SPKG([qttools], [qtbase])
-GPG4WIN_SPKG([qttranslations], [qttools])
+GPG4WIN_SPKG([qttranslations], [qtsvg qttools qtwinextras])
 GPG4WIN_SPKG([qtwinextras], [qtbase])
 GPG4WIN_SPKG([qtsvg], [qtbase])
 GPG4WIN_SPKG([boost], [expat zlib bzip2])
index fc116de..2bc14ea 100644 (file)
@@ -318,9 +318,7 @@ gpg4win_pkg_qtbase_make_args = \
 # Qmake still writes debug names in pkgconfig files.
 define gpg4win_pkg_qtbase_post_install
        (cd $$$${pkgbdir}; \
-        make install; \
-        echo "[Paths]" > $$$${pkgidir}/bin/qt.conf; \
-        echo "Prefix = .." >> $$$${pkgidir}/bin/qt.conf)
+        make install;)
 endef
 
 
@@ -348,12 +346,19 @@ endef
 gpg4win_pkg_qtsvg_configure = \
        "$(idir)/bin/qmake" ../$$$${pkg_version}
 
+# XXX Adding the qtconf after qtsvg is a weird hack
+# because somhow (yay qmake) zlib is not linked if
+# the qt conf exists before that. The qt conf is
+# needed for qttranslations to find the correct path
+# of the translation tools.
 define gpg4win_pkg_qtsvg_post_install
  (cd $$$${pkgbdir}; \
   mkdir -p $$$${pkgidir}; \
   cp -r lib include plugins $$$${pkgidir}; \
   mkdir -p $$$${pkgidir}/bin; \
-  mv $$$${pkgidir}/lib/*.dll $$$${pkgidir}/bin;)
+  mv $$$${pkgidir}/lib/*.dll $$$${pkgidir}/bin; \
+  echo "[Paths]" > $$$${pkgidir}/bin/qt.conf; \
+  echo "Prefix = .." >> $$$${pkgidir}/bin/qt.conf)
 endef
 
 gpg4win_pkg_qttranslations_configure = \