Build Qt5 from source
authorAndre Heinecke <aheinecke@intevation.de>
Thu, 7 Jan 2016 11:27:36 +0000 (12:27 +0100)
committerAndre Heinecke <aheinecke@intevation.de>
Thu, 7 Jan 2016 11:27:36 +0000 (12:27 +0100)
* Makefile.am (EXTRA_DIST): Add patches
* configure.ac: Add qtbase as SPKG
* packages/packages.current: Add qtbase remove qt binary pacakge.
* patches/qtbase-5.5.1/fix-freetype-link.patch,
  patches/qtbase-5.5.1/fix-oci-detect.patch,
  patches/qtbase-5.5.1/fix-syssemaphore.patch,
  patches/qtbase-5.5.1/fix-zlib-link.patch: New. Mainly from MXE.
* src/Makefile.am (EXTRA_DIST): Add / Remove files.
  (gpg4win_pkg_qtbase_configure): New.
  (gpg4win_pkg_qtbase_make_args),
  (gpg4win_pkg_qtbase_post_install): Workaround QTBUG-30898
  (gpg4win_bpkgs): Remove qt.
* src/config.nsi.in: Change QT to QTBASE
* src/gpg4win.mk.in (DEFLAGE_macro): Transform Qtbase dir name.
  (OVERRIDE_CONF_TEMPLATE): New. Override configure step of SPKGs.
  Call it for Qtbase.
* src/gpg4win.nsi: Change QT to QTBASE
* src/inst-qt.nsi, src/uninst-qt.nsi: Removed.
* src/inst-qtbase.nsi, src/uninst-qtbase: New. Minimal install for
  pinentry.
* src/inst-sections.nsi: Update section name.

--
First step to build Kleopatra and dependencies from source.
For now the Qt installation is only used by Pinentry and Kleopatra
installation is broken.

The name was changed to qtbase as we might want to add additionall
qt modules if neccessary in the future.

18 files changed:
Makefile.am
configure.ac
packages/packages.current
patches/qtbase-5.5.1/fix-freetype-link.patch [new file with mode: 0755]
patches/qtbase-5.5.1/fix-oci-detect.patch [new file with mode: 0755]
patches/qtbase-5.5.1/fix-syssemaphore.patch [new file with mode: 0755]
patches/qtbase-5.5.1/fix-zlib-link.patch [new file with mode: 0755]
src/Makefile.am
src/QtCore.pc [deleted file]
src/QtGui.pc [deleted file]
src/config.nsi.in
src/gpg4win.mk.in
src/gpg4win.nsi
src/inst-qt.nsi [deleted file]
src/inst-qtbase.nsi [new file with mode: 0644]
src/inst-sections.nsi
src/uninst-qt.nsi [deleted file]
src/uninst-qtbase.nsi [new file with mode: 0644]

index 9feeafe..ea64ec2 100644 (file)
@@ -28,6 +28,10 @@ EXTRA_DIST = autogen.sh README.GIT ONEWS \
         doc/license-page doc/GPLv3 \
         build-aux/git-log-footer build-aux/git-log-fix \
         patches/glib-2.41.5/01-socket.patch \
+        patches/qtbase-5.5.1/fix-freetype-link.patch \
+        patches/qtbase-5.5.1/fix-oci-detect.patch \
+        patches/qtbase-5.5.1/fix-syssemaphore.patch \
+        patches/qtbase-5.5.1/fix-zlib-link.patch \
         patches/w32pth-2.0.5/workaround-broken-libtool.patch
 
 copy-news:
index ec5390a..323a346 100644 (file)
@@ -314,7 +314,7 @@ GPG4WIN_SPKG([libpng], [pkgconfig])
 
 GPG4WIN_SPKG([libgpg-error], [libiconv gettext])
 GPG4WIN_SPKG([libassuan], [libgpg-error w32pth])
-GPG4WIN_SPKG([pinentry], [libiconv gtk+])
+GPG4WIN_SPKG([pinentry], [qtbase libiconv gtk+])
 GPG4WIN_SPKG([gpgme], [libgpg-error glib])
 GPG4WIN_SPKG([gpgol], [gpgme libassuan])
 GPG4WIN_SPKG([gpgex], [libassuan])
@@ -340,8 +340,8 @@ GPG4WIN_BPKG_BINSRC([gnupg-w32])
 # Qt related stuff.
 GPG4WIN_BPKG_GNUWIN32([dbus])
 GPG4WIN_BPKG_BINSRC([oxygen-icons])
-GPG4WIN_BPKG_GNUWIN32([qt], [dbus])
-GPG4WIN_BPKG_BINSRC([kleopatra], [gpgme qt oxygen-icons])
+GPG4WIN_SPKG([qtbase], [dbus libpng])
+GPG4WIN_BPKG_BINSRC([kleopatra], [gpgme qtbase oxygen-icons])
 
 GPG4WIN_FINALIZE
 
index 3ff506a..623338d 100644 (file)
@@ -314,22 +314,20 @@ server http://www.jabberwocky.com/software/paperkey
 file paperkey-1.3.tar.gz
 chk  16af56d0e7bdf081d60c59ea4d72e7df6d9cec21
 
-
 #
-# Qt
-# Build recipe is available in kde git emerge
-# branch gpg4win qt-minimal
+#  Kleopatra and dependencies
 #
-server http://files.kolab.org/local/gpg4win/libs/
 
-file qt-x86-mingw4-4.8.6-bin.tar.bz2
-chk  657c833fa39a93c6d7bfccc03c9fb88df4746136
+# Qt base
+# last changed: 2016-01-05
+# by: ah
+# verified: HTTPS https://download.qt.io/official_releases/qt/5.5/5.5.1/submodules/qtbase-opensource-src-5.5.1.tar.xz.sha1
 
-file qt-x86-mingw4-4.8.6-lib.tar.bz2
-chk  bc7fc185fd54259be25833b4c482a5680279cdae
+server http://download.qt.io/official_releases/qt/
 
-file qt-x86-mingw4-4.8.6-src.tar.bz2
-chk  9d6e271446f4fac714d915aabbe26497e592d25c
+name qtbase-5.5.1.tar.xz
+file 5.5/5.5.1/submodules/qtbase-opensource-src-5.5.1.tar.xz
+chk 0b651543fa013ae151b7a11f0d0dee092050aa3f
 
 #
 # Qt links DBus and Kleopatra / KDE libs needs it
diff --git a/patches/qtbase-5.5.1/fix-freetype-link.patch b/patches/qtbase-5.5.1/fix-freetype-link.patch
new file mode 100755 (executable)
index 0000000..28b48e8
--- /dev/null
@@ -0,0 +1,24 @@
+#! /bin/sh
+patch -p1 -f $* < $0
+exit $?
+
+From b4a1284aa84466a5c757e1efd16a694d128b1038 Mon Sep 17 00:00:00 2001
+From: Mark Brand <mabrand@mabrand.nl>
+Date: Thu, 6 Aug 2015 23:35:08 +0200
+Subject: [PATCH 1/6] fix qwindows plugin linking with system-freetype (MXE
+ specific)
+
+Change-Id: I8783e3ab2d19011b083dd3c471107298a17293c4
+
+diff --git a/src/3rdparty/freetype_dependency.pri b/src/3rdparty/freetype_dependency.pri
+index 39280de..e152b0d 100644
+--- a/src/3rdparty/freetype_dependency.pri
++++ b/src/3rdparty/freetype_dependency.pri
+@@ -4,4 +4,5 @@ contains(QT_CONFIG, freetype) {
+ } else:contains(QT_CONFIG, system-freetype) {
+     # pull in the proper freetype2 include directory
+     include($$QT_SOURCE_TREE/config.tests/unix/freetype/freetype.pri)
++    win32:shared:LIBS_PRIVATE += -lfreetype
+ }
+--
+2.1.4
diff --git a/patches/qtbase-5.5.1/fix-oci-detect.patch b/patches/qtbase-5.5.1/fix-oci-detect.patch
new file mode 100755 (executable)
index 0000000..d3ed583
--- /dev/null
@@ -0,0 +1,22 @@
+#! /bin/sh
+patch -p1 -f $* < $0
+exit $?
+
+From 81c61f1cf8a2b8ea01545212081427eed0ab2950 Mon Sep 17 00:00:00 2001
+From: Mark Brand <mabrand@mabrand.nl>
+Date: Mon, 8 Dec 2014 14:15:12 +0100
+Subject: [PATCH 3/6] fix oci config test on windows
+
+Change-Id: If1ce2241682259ca495b0ba68bf18410f8548922
+
+diff --git a/config.tests/unix/oci/oci.pro b/config.tests/unix/oci/oci.pro
+index 3ffda1d..39b6f3759 100644
+--- a/config.tests/unix/oci/oci.pro
++++ b/config.tests/unix/oci/oci.pro
+@@ -1,3 +1,3 @@
+ SOURCES = oci.cpp
+ CONFIG -= qt dylib
+-LIBS += -lclntsh
++!win32:LIBS += -lclntsh
+--
+2.1.4
diff --git a/patches/qtbase-5.5.1/fix-syssemaphore.patch b/patches/qtbase-5.5.1/fix-syssemaphore.patch
new file mode 100755 (executable)
index 0000000..0ad3fb7
--- /dev/null
@@ -0,0 +1,26 @@
+#! /bin/sh
+patch -p1 -f $* < $0
+exit $?
+
+From b656a46abeecfa7ace2e08393b63412e74c62589 Mon Sep 17 00:00:00 2001
+From: Mark Brand <mabrand@mabrand.nl>
+Date: Thu, 6 Aug 2015 13:24:56 +0200
+Subject: [PATCH 4/6] configure: don't set QT_NO_SYSTEMSEMAPHORE for Windows
+
+Change-Id: I53c110ef40e3d14cc49fa23aa5d294611cac2ffa
+
+diff --git a/configure b/configure
+index cea62fb..d6bbcd2 100755
+--- a/configure
++++ b/configure
+@@ -4464,7 +4464,7 @@ fi
+ [ "$XPLATFORM_ANDROID" = "yes" ] && QMakeVar add styles "android"
+
+ # check IPC support
+-if ! compileTest unix/ipc_sysv "ipc_sysv" ; then
++if [ "$XPLATFORM_MINGW" = "no" ] && ! compileTest unix/ipc_sysv "ipc_sysv" ; then
+     # SYSV IPC is not supported - check POSIX IPC
+     if compileTest unix/ipc_posix "ipc_posix" ; then
+         QCONFIG_FLAGS="$QCONFIG_FLAGS QT_POSIX_IPC"
+--
+2.1.4
diff --git a/patches/qtbase-5.5.1/fix-zlib-link.patch b/patches/qtbase-5.5.1/fix-zlib-link.patch
new file mode 100755 (executable)
index 0000000..58ce03e
--- /dev/null
@@ -0,0 +1,17 @@
+#! /bin/sh
+patch -p0 -f $* < $0
+exit $?
+
+--- mkspecs/win32-g++/qmake.conf.orig   2016-01-05 17:15:29.915892960 +0100
++++ mkspecs/win32-g++/qmake.conf        2016-01-05 17:17:07.041560381 +0100
+@@ -85,8 +85,8 @@
+
+ QMAKE_LIBS              =
+ QMAKE_LIBS_CORE         = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32
+-QMAKE_LIBS_GUI          = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32
+-QMAKE_LIBS_NETWORK      = -lws2_32
++QMAKE_LIBS_GUI          = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -lz
++QMAKE_LIBS_NETWORK      = -lws2_32 -lz
+ QMAKE_LIBS_OPENGL       = -lglu32 -lopengl32 -lgdi32 -luser32
+ QMAKE_LIBS_OPENGL_ES2   = -llibEGL -llibGLESv2 -lgdi32 -luser32
+ QMAKE_LIBS_OPENGL_ES2_DEBUG = -llibEGLd -llibGLESv2d -lgdi32 -luser32
index 80c8e60..eb772eb 100644 (file)
@@ -22,7 +22,7 @@ EXTRA_DIST = pkg-config gpg4win.nsi gpg4win-src.nsi \
         installer-options.ini.in libiconv.def libintl.def loreley.mid \
         gpg4win-splash.wav gpgwrap.c exdll.h g4wihelp.c g4wihelp.nsi \
         inst-sections.nsi installer.nsi installer-finish.nsi  \
-       QtCore.pc QtGui.pc zlib.pc sha1sum.c mkportable.c     \
+       zlib.pc sha1sum.c mkportable.c     \
        mkportable-vanilla.h mkportable-light.h mkportable-full.h \
         qt.conf kleowrap.c potomo Memento.nsh \
         inst-gpg4win.nsi          uninst-gpg4win.nsi         \
@@ -56,7 +56,7 @@ EXTRA_DIST = pkg-config gpg4win.nsi gpg4win-src.nsi \
         inst-pkgconfig.nsi        uninst-pkgconfig.nsi       \
         inst-w32pth.nsi                   uninst-w32pth.nsi          \
         inst-zlib.nsi             uninst-zlib.nsi            \
-        inst-qt.nsi               uninst-qt.nsi              \
+        inst-qtbase.nsi                   uninst-qtbase.nsi              \
         inst-dbus.nsi             uninst-dbus.nsi      \
         inst-oxygen-icons.nsi             uninst-oxygen-icons.nsi    \
         inst-kleopatra.nsi        uninst-kleopatra.nsi       \
@@ -87,7 +87,8 @@ gpg4win_spkgs = glib libffi gdk-pixbuf gtk+ \
                 libgpg-error gpgme gpgol gpgex libpng \
                gpa opencdk \
                pinentry libassuan \
-               w32pth paperkey regex libiconv gettext
+               w32pth paperkey regex libiconv gettext \
+               qtbase
 
 # Supported source packages to build in an additional architecture
 gpg4win_expkgs = libgpg-error libassuan libiconv gettext w32pth gpgex gpgol \
@@ -235,6 +236,49 @@ gpg4win_pkg_gpgex_configure = --silent \
 
 gpg4win_pkg_paperkey_configure = --silent
 
+gpg4win_pkg_qtbase_configure = -opensource \
+            -confirm-license \
+            -xplatform win32-g++ \
+            -device-option CROSS_COMPILE=$(host)- \
+            -device-option PKG_CONFIG='$(host)-pkg-config' \
+            -force-pkg-config \
+            -no-use-gold-linker \
+            -release \
+            -shared \
+            -prefix $$$${pkgidir} \
+            -I '$(idir)/include' \
+            -L '$(idir)/lib' \
+            -no-icu \
+            -opengl desktop \
+            -no-glib \
+            -accessibility \
+            -nomake examples \
+            -nomake tests \
+            -no-sql-mysql \
+            -no-sql-sqlite \
+            -no-sql-odbc \
+            -no-sql-psql \
+            -no-sql-tds \
+            -qt-zlib \
+            -system-libpng \
+            -qt-libjpeg \
+            -fontconfig \
+            -system-freetype \
+            -qt-pcre \
+            -no-openssl \
+            -no-dbus
+
+# invoke qmake with removed debug options as a workaround for
+# https://bugreports.qt-project.org/browse/QTBUG-30898
+gpg4win_pkg_qtbase_make_args = \
+    QMAKE='$$$${pkgsdir}/bin/qmake CONFIG-="debug debug_and_release"'
+
+# Qmake still writes debug names in pkgconfig files.
+define gpg4win_pkg_qtbase_post_install
+ (cd $$$${pkgidir}; \
+ perl -pi -e 's/-lQt5\(\w*\)d/-lQt5\1/g' `find . -name \*.pc`)
+endef
+
 # Supported make-only source packages.
 gpg4win_mpkgs = zlib
 
@@ -249,7 +293,7 @@ gpg4win_pkg_zlib_make_args_inst = -fwin32/Makefile.gcc install \
 
 # Supported binary packages.
 gpg4win_bpkgs = pkgconfig pango expat freetype fontconfig \
-                cairo atk qt dbus oxygen-icons kleopatra bsfilter gnupg-w32
+                cairo atk dbus oxygen-icons kleopatra bsfilter gnupg-w32
 
 # libiconv needs some special magic to generate a usable import
 # library.
@@ -364,12 +408,6 @@ endef
 #$(DLLTOOL) --output-lib libiconv.dll.a --def libiconv.def)
 #endef
 
-# Qt is missing the pkgconfig files.
-define gpg4win_pkg_qt_post_install
-(mkdir $$$${pkgidir_dev}/lib/pkgconfig; \
- cp $(srcdir)/QtCore.pc $(srcdir)/QtGui.pc $$$${pkgidir_dev}/lib/pkgconfig/)
-endef
-
 # Supported internal packages.  Internal packages do not require any
 # special support.  Thus, this variable is actually unused, and no
 # rules are added in gpg4win.mk.
diff --git a/src/QtCore.pc b/src/QtCore.pc
deleted file mode 100644 (file)
index eb39fa3..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=/usr
-exec_prefix=${prefix}
-libdir=${prefix}/lib
-includedir=${prefix}/include/QtCore
-
-Name: Qtcore
-Description: Qtcore Library
-Version: 4.8.4
-Libs: -L${libdir} -lQtCore4 
-Cflags: -DQT_SHARED -DQT_THREAD_SUPPORT -I${includedir}
-
diff --git a/src/QtGui.pc b/src/QtGui.pc
deleted file mode 100644 (file)
index 148ff0d..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-prefix=/usr
-exec_prefix=${prefix}
-libdir=${prefix}/lib
-includedir=${prefix}/include/QtGui
-
-Name: Qtgui
-Description: Qtgui Library
-Version: 4.8.4
-Libs: -L${libdir} -lQtGui4
-Cflags: -DQT_SHARED -DQT_THREAD_SUPPORT -I${includedir}
-Requires: QtCore
-
index 0a5e332..71840c1 100644 (file)
 !define gpg4win_pkg_dbus_dev @gpg4win_pkg_dbus_dev@
 !define gpg4win_pkg_dbus_src @gpg4win_pkg_dbus_src@
 
-@HAVE_PKG_QT@
-!define gpg4win_pkg_qt @gpg4win_pkg_qt@
-!define gpg4win_pkg_qt_version @gpg4win_pkg_qt_version@
-!define gpg4win_pkg_qt_dev @gpg4win_pkg_qt_dev@
-!define gpg4win_pkg_qt_src @gpg4win_pkg_qt_src@
+@HAVE_PKG_QTBASE@
+!define gpg4win_pkg_qtbase @gpg4win_pkg_qtbase@
+!define gpg4win_pkg_qtbase_version @gpg4win_pkg_qtbase_version@
+!define gpg4win_pkg_qtbase_src @gpg4win_pkg_qtbase_src@
 
 @HAVE_PKG_OXYGEN_ICONS@
 !define gpg4win_pkg_oxygen_icons @gpg4win_pkg_oxygen_icons@
index 0631478..6a43013 100644 (file)
@@ -110,8 +110,8 @@ endef
 # Support macro.  Unpack the archive $(1).
 define DEFLATE_macro
        case "$(1)" in                  \
-          */gnupg2-2.*.tar.bz2)          \
-            $(TAR) -xj --transform='s,^gnupg-,gnupg2-,' -f "$(1)" ;; \
+          */qtbase*.*.tar.xz)          \
+            $(TAR) -xJ --transform='s,^qtbase-opensource-src,qtbase,' -f "$(1)" ;; \
          *.tar.gz | *.tgz)             \
            $(TAR) xzf "$(1)" ;;        \
          *.tar.bz2 | *.tbz2 | *.tbz)   \
@@ -515,6 +515,20 @@ clean-gpg4win:
 
 .PHONY : all-gpg4win clean-stamps clean-gpg4win
 
+define OVERRIDE_CONF_TEMPLATE
+# Override of the configure rule. For targets that not use
+# autotools configure to have more freedom with the options.
+stamps/stamp-$(1)-02-configure: stamps/stamp-$(1)-01-patch
+       ($(call SETVARS,$(1)); \
+       mkdir "$$$${pkgbdir}"; \
+       cd "$$$${pkgbdir}"; \
+       "../$$$${pkg_version}/configure" \
+               $$$${pkgcfg}) && \
+       touch stamps/stamp-$(1)-02-configure
+endef
+
+$(eval $(call OVERRIDE_CONF_TEMPLATE,qtbase))
+
 # @emacs_local_vars_begin@
 # @emacs_local_vars_read_only@
 # @emacs_local_vars_end@
index cce51f6..0146157 100644 (file)
@@ -36,8 +36,8 @@
 !ifdef HAVE_PKG_OXYGEN_ICONS
 !undef HAVE_PKG_OXYGEN_ICONS
 !endif
-!ifdef HAVE_PKG_QT
-!undef HAVE_PKG_QT
+!ifdef HAVE_PKG_QTBASE
+!undef HAVE_PKG_QTBASE
 !endif
 !endif
 
@@ -95,8 +95,8 @@
 !ifdef HAVE_PKG_DBUS
 !undef HAVE_PKG_DBUS
 !endif
-!ifdef HAVE_PKG_QT
-!undef HAVE_PKG_QT
+!ifdef HAVE_PKG_QTBASE
+!undef HAVE_PKG_QTBASE
 !endif
 !ifdef HAVE_PKG_OXYGEN_ICONS
 !undef HAVE_PKG_OXYGEN_ICONS
diff --git a/src/inst-qt.nsi b/src/inst-qt.nsi
deleted file mode 100644 (file)
index 5307cbe..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-# inst-qt.nsi - Installer snippet for qt.      -*- coding: latin-1; -*-
-# Copyright (C) 2005, 2007, 2008 g10 Code GmbH
-#
-# This file is part of GPG4Win.
-#
-# GPG4Win is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# GPG4Win is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-
-
-!ifdef prefix
-!undef prefix
-!endif
-!define prefix ${ipdir}/qt-${gpg4win_pkg_qt_version}
-
-!ifdef DEBUG
-Section "qt" SEC_qt
-!else
-Section "-qt" SEC_qt
-!endif
-  SetOutPath "$INSTDIR"
-!ifdef SOURCES
-  File "${gpg4win_pkg_qt_src}"
-!else
-  # Qt needs some help to find itself.
-  File ${SRCDIR}/qt.conf
-
-  File ${prefix}/bin/QtCore4.dll
-  File ${prefix}/bin/QtDBus4.dll
-  File ${prefix}/bin/QtGui4.dll
-  File ${prefix}/bin/QtNetwork4.dll
-  File ${prefix}/bin/QtSvg4.dll
-  File ${prefix}/bin/QtXml4.dll
-
-  SetOutPath "$INSTDIR\plugins\imageformats"
-
-  File ${prefix}/plugins/imageformats/qgif4.dll
-  File ${prefix}/plugins/imageformats/qico4.dll
-  File ${prefix}/plugins/imageformats/qjpeg4.dll
-  File ${prefix}/plugins/imageformats/qmng4.dll
-  File ${prefix}/plugins/imageformats/qsvg4.dll
-  File ${prefix}/plugins/imageformats/qtiff4.dll
-
-  # For some reason (BUG?) Accessibilty plugins are looked
-  # for in bin and not under plugins when they are loaded
-  # on demand later.
-  SetOutPath "$INSTDIR\bin\accessible"
-  File ${prefix}/plugins/accessible/qtaccessiblewidgets4.dll
-
-  # For what is this needed? Scripting?
-  SetOutPath "$INSTDIR"
-  File ${prefix}/bin/qdbus.exe
-
-!endif
-SectionEnd
diff --git a/src/inst-qtbase.nsi b/src/inst-qtbase.nsi
new file mode 100644 (file)
index 0000000..9b2ed30
--- /dev/null
@@ -0,0 +1,49 @@
+# inst-qtbase.nsi - Installer snippet for qt.     -*- coding: latin-1; -*-
+# Copyright (C) 2005, 2007, 2008 g10 Code GmbH
+#               2015 Intevation GmbH
+#
+# This file is part of GPG4Win.
+#
+# GPG4Win is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# GPG4Win is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+
+
+!ifdef prefix
+!undef prefix
+!endif
+!define prefix ${ipdir}/qtbase-${gpg4win_pkg_qtbase_version}
+
+!ifdef DEBUG
+Section "qtbase" SEC_qt
+!else
+Section "-qtbase" SEC_qt
+!endif
+  SetOutPath "$INSTDIR"
+!ifdef SOURCES
+  File "${gpg4win_pkg_qtbase}"
+!else
+  # Qt needs some help to find itself.
+  File ${SRCDIR}/qt.conf
+
+  File ${prefix}/bin/Qt5Core.dll
+  File ${prefix}/bin/Qt5Gui.dll
+
+  SetOutPath "$INSTDIR\plugins\imageformats"
+
+  File ${prefix}/plugins/imageformats/qgif.dll
+  File ${prefix}/plugins/imageformats/qjpeg.dll
+  File ${prefix}/plugins/platforms/qwindows.dll
+
+!endif
+SectionEnd
index d0bb30f..3459753 100644 (file)
@@ -47,8 +47,8 @@
 !ifdef HAVE_PKG_ZLIB
 !include "inst-zlib.nsi"
 !endif
-!ifdef HAVE_PKG_QT
-!include "inst-qt.nsi"
+!ifdef HAVE_PKG_QTBASE
+!include "inst-qtbase.nsi"
 !endif
 !ifdef HAVE_PKG_GETTEXT
 !include "inst-gettext.nsi"
 !ifdef HAVE_PKG_GETTEXT
 !include "uninst-gettext.nsi"
 !endif
-!ifdef HAVE_PKG_QT
-!include "uninst-qt.nsi"
+!ifdef HAVE_PKG_QTBASE
+!include "uninst-qtbase.nsi"
 !endif
 !ifdef HAVE_PKG_ZLIB
 !include "uninst-zlib.nsi"
@@ -478,8 +478,8 @@ Function CalcDepends
 !ifdef HAVE_PKG_DBUS
   !insertmacro UnselectSection ${SEC_dbus}
 !endif
-!ifdef HAVE_PKG_QT
-  !insertmacro UnselectSection ${SEC_qt}
+!ifdef HAVE_PKG_QTBASE
+  !insertmacro UnselectSection ${SEC_qtbase}
 !endif
 !ifdef HAVE_PKG_OXYGEN_ICONS
   !insertmacro UnselectSection ${SEC_oxygen_icons}
@@ -572,13 +572,13 @@ Function CalcDepends
   !insertmacro SectionFlagIsSet ${SEC_kleopatra} \
                ${SF_SELECTED} have_kleopatra_libs skip_kleopatra_libs
   have_kleopatra_libs:
-  !insertmacro SelectSection ${SEC_qt}
+  !insertmacro SelectSection ${SEC_qtbase}
   !insertmacro SelectSection ${SEC_oxygen_icons}
    skip_kleopatra_libs:
 !endif
 
-!ifdef HAVE_PKG_QT
-  !insertmacro SectionFlagIsSet ${SEC_qt} \
+!ifdef HAVE_PKG_QTBASE
+  !insertmacro SectionFlagIsSet ${SEC_qtbase} \
                ${SF_SELECTED} have_qt skip_qt
   have_qt:
   !insertmacro SelectSection ${SEC_dbus}
@@ -595,8 +595,8 @@ Function CalcDepends
   # GPGME does not depend on gnupg2.  Do this in the
   # actual application instead.
   !insertmacro SelectSection ${SEC_libgpg_error}
-!ifdef HAVE_PKG_QT
-  !insertmacro SelectSection ${SEC_qt}
+!ifdef HAVE_PKG_QTBASE
+  !insertmacro SelectSection ${SEC_qtbase}
 !endif
    skip_gpgme:
 !endif
@@ -606,8 +606,8 @@ Function CalcDepends
                ${SF_SELECTED} have_pinentry skip_pinentry
   have_pinentry:
   !insertmacro SelectSection ${SEC_libiconv}
-!ifdef HAVE_PKG_QT
-  !insertmacro SelectSection ${SEC_qt}
+!ifdef HAVE_PKG_QTBASE
+  !insertmacro SelectSection ${SEC_qtbase}
 !endif
 !ifdef HAVE_PKG_GTK_
   !insertmacro SelectSection ${SEC_gtk_}
diff --git a/src/uninst-qt.nsi b/src/uninst-qt.nsi
deleted file mode 100644 (file)
index ae93c8c..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-# uninst-qt.nsi - Installer snippet for qt.    -*- coding: latin-1; -*-
-# Copyright (C) 2005, 2007 g10 Code GmbH
-# 
-# This file is part of GPG4Win.
-# 
-# GPG4Win is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-# 
-# GPG4Win is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-
-
-!ifdef prefix
-!undef prefix
-!endif
-!define prefix ${ipdir}/qt-${gpg4win_pkg_qt_version}
-
-
-; Uninstaller section.
-Section "-un.qt"
-!ifdef SOURCES
-  Push "${gpg4win_pkg_qt_src}"
-  Call un.SourceDelete
-!else
-  Delete "$INSTDIR\qt.conf"
-
-  Delete "$INSTDIR\qdbus.exe"
-
-  Delete "$INSTDIR\QtCore4.dll"
-  Delete "$INSTDIR\QtDBus4.dll"
-  Delete "$INSTDIR\QtGui4.dll"
-  Delete "$INSTDIR\QtNetwork4.dll"
-  Delete "$INSTDIR\QtSvg4.dll"
-  Delete "$INSTDIR\QtXml4.dll"
-
-  Delete "$INSTDIR\plugins\imageformats\qgif4.dll"
-  Delete "$INSTDIR\plugins\imageformats\qico4.dll"
-  Delete "$INSTDIR\plugins\imageformats\qjpeg4.dll"
-  Delete "$INSTDIR\plugins\imageformats\qmng4.dll"
-  Delete "$INSTDIR\plugins\imageformats\qsvg4.dll"
-  Delete "$INSTDIR\plugins\imageformats\qtiff4.dll"
-
-  # Files installed by previous versions
-  Delete "$INSTDIR\mingwm10.dll"
-  Delete "$INSTDIR\Qt3Support4.dll"
-  Delete "$INSTDIR\QtHelp4.dll"
-  Delete "$INSTDIR\QtOpenGL4.dll"
-  Delete "$INSTDIR\QtScript4.dll"
-  Delete "$INSTDIR\QtSql4.dll"
-  Delete "$INSTDIR\translations\assistant_adp_de.qm"
-  Delete "$INSTDIR\translations\assistant_de.qm"
-  Delete "$INSTDIR\translations\designer_de.qm"
-  Delete "$INSTDIR\translations\linguist_de.qm"
-  Delete "$INSTDIR\translations\qt_de.qm"
-  Delete "$INSTDIR\translations\qt_help_de.qm"
-
-  Delete "$INSTDIR\bin\accessible\qtaccessiblewidgets4.dll"
-
-  RMDir "$INSTDIR\bin\accessible"
-
-  Delete "$INSTDIR\plugins\codecs\qcncodecs4.dll"
-  Delete "$INSTDIR\plugins\codecs\qjpcodecs4.dll"
-  Delete "$INSTDIR\plugins\codecs\qkrcodecs4.dll"
-  Delete "$INSTDIR\plugins\codecs\qtwcodecs4.dll"
-
-  RMDir "$INSTDIR\plugins\codecs"
-
-  Delete "$INSTDIR\plugins\designer\qwebview.dll"
-  Delete "$INSTDIR\plugins\designer\qt3supportwidgets.dll"
-  # Not in Qt anymore since 4.3.3.
-  Delete "$INSTDIR\plugins\designer\arthurplugin.dll"
-  Delete "$INSTDIR\plugins\designer\containerextension.dll"
-  Delete "$INSTDIR\plugins\designer\customwidgetplugin.dll"
-  Delete "$INSTDIR\plugins\designer\taskmenuextension.dll"
-  Delete "$INSTDIR\plugins\designer\worldtimeclockplugin.dll"
-
-  RMDir "$INSTDIR\plugins\designer"
-
-  Delete "$INSTDIR\plugins\iconengines\qsvg4.dll"
-  Delete "$INSTDIR\plugins\iconengines\qsvgicon4.dll"
-
-  RMDir "$INSTDIR\plugins\iconengines"
-
-  Delete "$INSTDIR\plugins\script\qtscriptdbus4.dll"
-  RMDir "$INSTDIR\plugins\script"
-
-  Delete "$INSTDIR\plugins\sqldrivers\qsqlite4.dll"
-  RMDir  "$INSTDIR\plugins\sqldrivers"
-
-
-  RMDir "$INSTDIR\translations"
-
-  RMDir "$INSTDIR\plugins\imageformats"
-
-  RMDir  "$INSTDIR\plugins"
-
-  RMDir "$INSTDIR"
-!endif
-SectionEnd
diff --git a/src/uninst-qtbase.nsi b/src/uninst-qtbase.nsi
new file mode 100644 (file)
index 0000000..7f2c8df
--- /dev/null
@@ -0,0 +1,50 @@
+# uninst-qtbase.nsi - Installer snippet for qt.    -*- coding: latin-1; -*-
+# Copyright (C) 2005, 2007 g10 Code GmbH
+#               2015 Intevation GmbH
+#
+# This file is part of GPG4Win.
+#
+# GPG4Win is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# GPG4Win is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+
+
+!ifdef prefix
+!undef prefix
+!endif
+!define prefix ${ipdir}/qt-${gpg4win_pkg_qtbase_version}
+
+
+; Uninstaller section.
+Section "-un.qtbase"
+!ifdef SOURCES
+  Push "${gpg4win_pkg_qtbase_src}"
+  Call un.SourceDelete
+!else
+  Delete "$INSTDIR\qt.conf"
+
+  Delete "$INSTDIR\Qt5Core.dll"
+  Delete "$INSTDIR\Qt5Gui.dll"
+
+  Delete "$INSTDIR\plugins\imageformats\qgif.dll"
+  Delete "$INSTDIR\plugins\imageformats\qjpeg.dll"
+  Delete "$INSTDIR\plugins\platforms\qwindows.dll"
+
+  RMDir "$INSTDIR\plugins\imageformats"
+  RMDir "$INSTDIR\plugins\platforms"
+
+  RMDir  "$INSTDIR\plugins"
+
+  RMDir "$INSTDIR"
+!endif
+SectionEnd