[Gpg4win-commits] [git] Gpg4win - branch, kleo-kf5, updated. gpg4win-2.3.0-50-g9be969d

by Andre Heinecke cvs at cvs.gnupg.org
Tue Jan 26 10:58:46 CET 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG for Windows".

The branch, kleo-kf5 has been updated
       via  9be969d74ff76b0f9e6fe84e578ff00268c1357d (commit)
       via  20382db50b1acdda7e52cddd9f45eaae6d2296e0 (commit)
      from  04f92de785aa75fd94bafed557d09d13e9fbfa46 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9be969d74ff76b0f9e6fe84e578ff00268c1357d
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Tue Jan 26 10:55:39 2016 +0100

    Add KMime
    
    * Makefile.am (EXTRA_DIST): Add patches.
    * configure.ac: Add KMime.
    * packages/packages.current: Add KMime.
    * patches/kmime/0001-Check-for-and-replace-strcasestr.patch,
     patches/kmime/0002-Fix-Windows-build.patch: New.
    * src/Makefile.am, src/config.nsi.in: Update accordingly.
    * src/inst-sections.nsi: Update and fix duplicated kcodecs entry.
    * src/inst-kmime.nsi, src/uninst-kmime.nsi: New.
    
    --
    Patches were neccessary for Windows build and are already submitted
    to upstream for review / inclusion.

diff --git a/Makefile.am b/Makefile.am
index 5f270fe..9cd7b43 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,7 +35,9 @@ EXTRA_DIST = autogen.sh README.GIT ONEWS \
         patches/w32pth-2.0.5/workaround-broken-libtool.patch \
         patches/qttools/disable-most-tools.patch \
         patches/ki18n/no-tests.patch \
-        patches/gpgmepp/0002-disable-variants.patch
+        patches/gpgmepp/0002-disable-variants.patch \
+        patches/kmime/0001-Check-for-and-replace-strcasestr.patch \
+        patches/kmime/0002-Fix-Windows-build.patch
 
 copy-news:
 	cp NEWS doc/website/NEWS.last
diff --git a/configure.ac b/configure.ac
index 089e501..3f8ec25 100644
--- a/configure.ac
+++ b/configure.ac
@@ -355,7 +355,8 @@ GPG4WIN_KDEPKG([kcompletion], [kwidgetsaddons])
 GPG4WIN_KDEPKG([kwindowsystem], [qtbase qtwinextras])
 GPG4WIN_KDEPKG([kcoreaddons], [qtbase])
 GPG4WIN_KDEPKG([kcodecs], [qtbase])
-GPG4WIN_KDEPKG([libkleo], [gpgmepp kcodecs kcoreaddons kwidgetsaddons kwindowsystem kcompletion kconfig gpgme])
+GPG4WIN_KDEPKG([kmime], [kcodecs])
+GPG4WIN_KDEPKG([libkleo], [gpgmepp kcodecs kmime kwidgetsaddons kwindowsystem kcompletion kconfig gpgme])
 
 GPG4WIN_FINALIZE
 
diff --git a/packages/packages.current b/packages/packages.current
index fff39fb..43d56e8 100644
--- a/packages/packages.current
+++ b/packages/packages.current
@@ -420,13 +420,16 @@ file 5.18/kcoreaddons-5.18.0.tar.xz
 chk 7c41dbcc217d0e93cb276c84b23a55ad803e80a3
 
 # KCodecs
-# last changed: 2016-01-22
+# last changed: 2016-01-25
 # by: ah
 # verified: https://www.kde.org/info/kde-frameworks-5.18.0.php
 file 5.18/kcodecs-5.18.0.tar.xz
 chk 8d5f09a9fa5977658a31a13ae9cef4d81f741da3
 
 # KDE Applications
+#
+# Devel versions are needed until Kleopatra can be based on
+# a stable branch.
 
 # server http://download.kde.org/stable/applications/
 server http://files.intevation.de/projects/gpg4all
@@ -446,6 +449,21 @@ server http://files.intevation.de/projects/gpg4all
 file gpgmepp/gpgmepp-201601221458.tar.xz
 chk 04cfa9a41f06915d95d0d83a199f05bfcc9a527d
 
+# kmime
+# last changed: 2016-01-25
+# by: ah
+# verified: https://www.kde.org/info/applications-15.12.1.php
+# file 15.12.1/src/kmime-15.12.1.tar.xz
+# chk 0a9bbe73a2a2f24ee2addfb47f642646d2eae996
+#
+# kmime-devel
+# last changed: 2016-01-25
+# by: ah
+# verified: Tarball created by ah.
+
+file kmime/kmime-201601251644.tar.xz
+chk 0a9bbe73a2a2f24ee2addfb47f642646d2eae996
+
 # Libkleo
 # last changed: 2016-01-22
 # by: ah
diff --git a/patches/kmime/0001-Check-for-and-replace-strcasestr.patch b/patches/kmime/0001-Check-for-and-replace-strcasestr.patch
new file mode 100755
index 0000000..4695424
--- /dev/null
+++ b/patches/kmime/0001-Check-for-and-replace-strcasestr.patch
@@ -0,0 +1,157 @@
+#! /bin/sh
+patch -p1 -f -l $* < $0
+exit $?
+
+From 4e685983ef6f5ba09448378bf115ea581a2d1c58 Mon Sep 17 00:00:00 2001
+From: Andre Heinecke <aheinecke at intevation.de>
+Date: Mon, 25 Jan 2016 17:52:57 +0100
+Subject: [PATCH 1/2] Check for and replace strcasestr
+
+strcasestr is not standard and not available on Windows.
+Check for this and add a simple replacement in case it is
+not found.
+---
+ cmake/CMakeChecks.cmake   | 40 ++++++++++++++++++++++++++++++++++++++++
+ cmake/CheckTimezone.cmake | 34 ----------------------------------
+ src/CMakeLists.txt        |  2 +-
+ src/config-kmime.h.cmake  |  3 +++
+ src/kmime_util.cpp        | 15 +++++++++++++++
+ 5 files changed, 59 insertions(+), 35 deletions(-)
+ create mode 100644 cmake/CMakeChecks.cmake
+ delete mode 100644 cmake/CheckTimezone.cmake
+
+diff --git a/cmake/CMakeChecks.cmake b/cmake/CMakeChecks.cmake
+new file mode 100644
+index 0000000..d4c7375
+--- /dev/null
++++ b/cmake/CMakeChecks.cmake
+@@ -0,0 +1,40 @@
++# Discover the type of the timezone variable,
++# set HAVE_TIMEZONE if found for config.h
++
++include (CheckCXXSourceCompiles)
++
++check_cxx_source_compiles("
++#include <stdlib.h>
++#include <ctype.h>
++#include <time.h>
++#include <unistd.h>
++int main() { timezone = 1; return 0;}
++"
++  HAVE_TIMEZONE)
++
++if (NOT HAVE_TIMEZONE)
++  # Then it's probably this variant, just to be sure
++  check_cxx_source_compiles("
++#include <stdlib.h>
++#include <ctype.h>
++#include <time.h>
++#include <unistd.h>
++int main() { const char *p = timezone(0,0); return 0;}
++"
++    HAVE_BSD_TIMEZONE)
++endif()
++
++check_cxx_source_compiles("
++#include <stdlib.h>
++#include <ctype.h>
++#include <time.h>
++#include <unistd.h>
++int main() { struct tm tm; tm.tm_gmtoff=1; return 0; }
++"
++  HAVE_TM_GMTOFF)
++
++check_cxx_source_compiles("
++#include <string.h>
++int main() { strcasestr(\"\", \"\"); }
++"
++    HAVE_STRCASESTR)
+diff --git a/cmake/CheckTimezone.cmake b/cmake/CheckTimezone.cmake
+deleted file mode 100644
+index adc1937..0000000
+--- a/cmake/CheckTimezone.cmake
++++ /dev/null
+@@ -1,34 +0,0 @@
+-# Discover the type of the timezone variable,
+-# set HAVE_TIMEZONE if found for config.h
+-
+-include (CheckCXXSourceCompiles)
+-
+-check_cxx_source_compiles("
+-#include <stdlib.h>
+-#include <ctype.h>
+-#include <time.h>
+-#include <unistd.h>
+-int main() { timezone = 1; return 0;}
+-"
+-  HAVE_TIMEZONE)
+-
+-if (NOT HAVE_TIMEZONE)
+-  # Then it's probably this variant, just to be sure
+-  check_cxx_source_compiles("
+-#include <stdlib.h>
+-#include <ctype.h>
+-#include <time.h>
+-#include <unistd.h>
+-int main() { const char *p = timezone(0,0); return 0;}
+-"
+-    HAVE_BSD_TIMEZONE)
+-endif()
+-
+-check_cxx_source_compiles("
+-#include <stdlib.h>
+-#include <ctype.h>
+-#include <time.h>
+-#include <unistd.h>
+-int main() { struct tm tm; tm.tm_gmtoff=1; return 0; }
+-"
+-  HAVE_TM_GMTOFF)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index ef86420..3a4517b 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-include(CheckTimezone)
++include(CMakeChecks)
+
+ configure_file(config-kmime.h.cmake ${KMime_BINARY_DIR}/src/config-kmime.h)
+
+diff --git a/src/config-kmime.h.cmake b/src/config-kmime.h.cmake
+index 7b7ef6d..655565c 100644
+--- a/src/config-kmime.h.cmake
++++ b/src/config-kmime.h.cmake
+@@ -3,3 +3,6 @@
+
+ /* Define if you have a tm_gmtoff member in struct tm */
+ #cmakedefine HAVE_TM_GMTOFF 1
++
++/* Define if you have strcasestr in string.h */
++#cmakedefine HAVE_STRCASESTR 1
+diff --git a/src/kmime_util.cpp b/src/kmime_util.cpp
+index ed002b9..c1e5886 100644
+--- a/src/kmime_util.cpp
++++ b/src/kmime_util.cpp
+@@ -285,6 +285,21 @@ int findHeaderLineEnd(const QByteArray &src, int &dataBegin, bool *folded)
+     return end;
+ }
+
++#ifndef HAVE_STRCASESTR
++static const char *strcasestr(const char *haystack, const char *needle)
++{
++    /* Copied from libreplace as part of qtwebengine 5.5.1 */
++    const char *s;
++    size_t nlen = strlen(needle);
++    for (s = haystack; *s; s++) {
++        if (toupper(*needle) == toupper(*s) && strncasecmp(s, needle, nlen) == 0) {
++            return (char *)((uintptr_t)s);
++        }
++    }
++    return NULL;
++}
++#endif
++
+ int indexOfHeader(const QByteArray &src, const QByteArray &name, int &end, int &dataBegin, bool *folded)
+ {
+     QByteArray n = name;
+--
+2.1.4
diff --git a/patches/kmime/0002-Fix-Windows-build.patch b/patches/kmime/0002-Fix-Windows-build.patch
new file mode 100755
index 0000000..148a33a
--- /dev/null
+++ b/patches/kmime/0002-Fix-Windows-build.patch
@@ -0,0 +1,56 @@
+#! /bin/sh
+patch -p1 -f -l $* < $0
+exit $?
+
+From d977ebb7d83cdbe01875273f133d5696af628c29 Mon Sep 17 00:00:00 2001
+From: Andre Heinecke <aheinecke at intevation.de>
+Date: Mon, 25 Jan 2016 18:05:01 +0100
+Subject: [PATCH 2/2] Fix Windows build
+
+gethostname is part of Winsock2 on Windows.
+---
+ src/CMakeLists.txt | 5 +++++
+ src/kmime_mdn.cpp  | 6 +++++-
+ 2 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 3a4517b..2b62c6d 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -33,12 +33,17 @@ add_library(KF5::Mime ALIAS KF5Mime)
+ target_include_directories(KF5Mime INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/KMime>")
+ target_include_directories(KF5Mime PUBLIC "$<BUILD_INTERFACE:${KMime_SOURCE_DIR}/src;${KMime_BINARY_DIR}/src;${KMime_BINARY_DIR}>")
+
++if (WIN32)
++    set(_kmime_extra_libs ws2_32)
++endif()
++
+ target_link_libraries(KF5Mime
+ PUBLIC
+     Qt5::Core
+ PRIVATE
+     KF5::I18n
+     KF5::Codecs
++    ${_kmime_extra_libs}
+ )
+
+ set_target_properties(KF5Mime PROPERTIES
+diff --git a/src/kmime_mdn.cpp b/src/kmime_mdn.cpp
+index 3061112..c441291 100644
+--- a/src/kmime_mdn.cpp
++++ b/src/kmime_mdn.cpp
+@@ -41,7 +41,11 @@
+
+ #include <QtCore/QByteArray>
+
+-#include <unistd.h> // gethostname
++#ifdef Q_OS_WIN // gethostname
++# include <winsock2.h>
++#else
++# include <unistd.h>
++#endif
+
+ namespace KMime
+ {
+--
+2.1.4
diff --git a/src/Makefile.am b/src/Makefile.am
index e8906ab..039bf4a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -71,6 +71,7 @@ EXTRA_DIST = pkg-config gpg4win.nsi gpg4win-src.nsi \
         inst-libkleo.nsi uninst-libkleo.nsi \
         inst-kcoreaddons.nsi uninst-kcoreaddons.nsi \
         inst-kcodecs.nsi uninst-kcodecs.nsi \
+        inst-kmime.nsi uninst-kmime.nsi \
         inst-qttools.nsi uninst-qttools.nsi \
         inst-boost.nsi uninst-boost.nsi \
         inst-extra-cmake-modules.nsi uninst-extra-cmake-modules.nsi \
@@ -105,7 +106,8 @@ gpg4win_spkgs = glib libffi gdk-pixbuf gtk+ \
 
 # Source packages following the KDE pattern
 gpg4win_kdepkgs = kconfig kwidgetsaddons gpgmepp ki18n extra-cmake-modules \
-                  kcompletion kwindowsystem kcoreaddons libkleo kcodecs
+                  kcompletion kwindowsystem kcoreaddons libkleo kcodecs \
+                  kmime
 
 # Supported source packages to build in an additional architecture
 gpg4win_expkgs = libgpg-error libassuan libiconv gettext w32pth gpgex gpgol \
diff --git a/src/config.nsi.in b/src/config.nsi.in
index 2ac1169..bb35f45 100644
--- a/src/config.nsi.in
+++ b/src/config.nsi.in
@@ -249,6 +249,10 @@
 !define gpg4win_pkg_kcodecs @gpg4win_pkg_kcodecs@
 !define gpg4win_pkg_kcodecs_version @gpg4win_pkg_kcodecs_version@
 
+ at HAVE_PKG_KMIME@
+!define gpg4win_pkg_kmime @gpg4win_pkg_kmime@
+!define gpg4win_pkg_kmime_version @gpg4win_pkg_kmime_version@
+
 # Internal packages.
 @HAVE_PKG_COMPENDIUM@
 
diff --git a/src/inst-kmime.nsi b/src/inst-kmime.nsi
new file mode 100644
index 0000000..10d7238
--- /dev/null
+++ b/src/inst-kmime.nsi
@@ -0,0 +1,35 @@
+# Copyright (C) 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}/kmime-${gpg4win_pkg_kmime_version}
+
+!ifdef DEBUG
+Section "kmime" SEC_kmime
+!else
+Section "-kmime" SEC_kmime
+!endif
+  SetOutPath "$INSTDIR"
+!ifdef SOURCES
+  File "${gpg4win_pkg_kmime}"
+!else
+  SetOutPath "$INSTDIR\bin"
+  File ${prefix}/bin/libKF5Mime.dll
+!endif
+SectionEnd
diff --git a/src/inst-sections.nsi b/src/inst-sections.nsi
index f923aa8..7081fb4 100644
--- a/src/inst-sections.nsi
+++ b/src/inst-sections.nsi
@@ -137,6 +137,9 @@
 !ifdef HAVE_PKG_KCODECS
 !include "inst-kcodecs.nsi"
 !endif
+!ifdef HAVE_PKG_KMIME
+!include "inst-kmime.nsi"
+!endif
 !ifdef HAVE_PKG_LIBKLEO
 !include "inst-libkleo.nsi"
 !endif
@@ -335,6 +338,9 @@
 !ifdef HAVE_PKG_KCODECS
 !include "uninst-kcodecs.nsi"
 !endif
+!ifdef HAVE_PKG_KMIME
+!include "uninst-kmime.nsi"
+!endif
 !ifdef HAVE_PKG_LIBKLEO
 !include "uninst-libkleo.nsi"
 !endif
@@ -604,8 +610,8 @@ Function CalcDepends
 !ifdef HAVE_PKG_LIBKLEO
   !insertmacro UnselectSection ${SEC_libkleo}
 !endif
-!ifdef HAVE_PKG_KCODECS
-  !insertmacro UnselectSection ${SEC_kcodecs}
+!ifdef HAVE_PKG_KMIME
+  !insertmacro UnselectSection ${SEC_kmime}
 !endif
 
   # Always install gnupg2.  This is also ensured by putting
@@ -705,6 +711,7 @@ Function CalcDepends
   !insertmacro SelectSection ${SEC_kwindowsystem}
   !insertmacro SelectSection ${SEC_kcoreaddons}
   !insertmacro SelectSection ${SEC_kcodecs}
+  !insertmacro SelectSection ${SEC_kmime}
   !insertmacro SelectSection ${SEC_libkleo}
   !insertmacro SelectSection ${SEC_qttools}
   !insertmacro SelectSection ${SEC_qtwinextras}
diff --git a/src/uninst-kmime.nsi b/src/uninst-kmime.nsi
new file mode 100644
index 0000000..504e330
--- /dev/null
+++ b/src/uninst-kmime.nsi
@@ -0,0 +1,32 @@
+# Copyright (C) 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}/kmime-${gpg4win_pkg_kmime_version}
+
+; Uninstaller section.
+Section "-un.kmime"
+!ifdef SOURCES
+  Push "${gpg4win_pkg_kmime}"
+  Call un.SourceDelete
+!else
+  Delete "$INSTDIR\bin\libKF5Mime.dll"
+  RmDir "$INSTDIR\bin"
+!endif
+SectionEnd

commit 20382db50b1acdda7e52cddd9f45eaae6d2296e0
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Mon Jan 25 16:40:52 2016 +0100

    Add KCodecs
    
    * configure.ac: Add packages.
    * src/inst-kcodecs.nsi,
     src/uninst-kcodecs.nsi: New:
    * src/Makefile.am, src/inst-sections.nsi,
     packages/packages.current, src/config.nsi.in: Update accordingly.

diff --git a/configure.ac b/configure.ac
index a6b7543..089e501 100644
--- a/configure.ac
+++ b/configure.ac
@@ -354,7 +354,8 @@ GPG4WIN_KDEPKG([kwidgetsaddons], [kconfig qttools qtbase])
 GPG4WIN_KDEPKG([kcompletion], [kwidgetsaddons])
 GPG4WIN_KDEPKG([kwindowsystem], [qtbase qtwinextras])
 GPG4WIN_KDEPKG([kcoreaddons], [qtbase])
-GPG4WIN_KDEPKG([libkleo], [gpgmepp kcoreaddons kwidgetsaddons kwindowsystem kcompletion kconfig gpgme])
+GPG4WIN_KDEPKG([kcodecs], [qtbase])
+GPG4WIN_KDEPKG([libkleo], [gpgmepp kcodecs kcoreaddons kwidgetsaddons kwindowsystem kcompletion kconfig gpgme])
 
 GPG4WIN_FINALIZE
 
diff --git a/packages/packages.current b/packages/packages.current
index 732f875..fff39fb 100644
--- a/packages/packages.current
+++ b/packages/packages.current
@@ -419,6 +419,13 @@ chk 6aa1d1e590dc500a7511a95a8d0d6bac93eb19d2
 file 5.18/kcoreaddons-5.18.0.tar.xz
 chk 7c41dbcc217d0e93cb276c84b23a55ad803e80a3
 
+# KCodecs
+# last changed: 2016-01-22
+# by: ah
+# verified: https://www.kde.org/info/kde-frameworks-5.18.0.php
+file 5.18/kcodecs-5.18.0.tar.xz
+chk 8d5f09a9fa5977658a31a13ae9cef4d81f741da3
+
 # KDE Applications
 
 # server http://download.kde.org/stable/applications/
diff --git a/src/Makefile.am b/src/Makefile.am
index 72cbf42..e8906ab 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -70,6 +70,7 @@ EXTRA_DIST = pkg-config gpg4win.nsi gpg4win-src.nsi \
         inst-kwindowsystem.nsi uninst-kwindowsystem.nsi \
         inst-libkleo.nsi uninst-libkleo.nsi \
         inst-kcoreaddons.nsi uninst-kcoreaddons.nsi \
+        inst-kcodecs.nsi uninst-kcodecs.nsi \
         inst-qttools.nsi uninst-qttools.nsi \
         inst-boost.nsi uninst-boost.nsi \
         inst-extra-cmake-modules.nsi uninst-extra-cmake-modules.nsi \
@@ -104,7 +105,7 @@ gpg4win_spkgs = glib libffi gdk-pixbuf gtk+ \
 
 # Source packages following the KDE pattern
 gpg4win_kdepkgs = kconfig kwidgetsaddons gpgmepp ki18n extra-cmake-modules \
-                  kcompletion kwindowsystem kcoreaddons libkleo
+                  kcompletion kwindowsystem kcoreaddons libkleo kcodecs
 
 # Supported source packages to build in an additional architecture
 gpg4win_expkgs = libgpg-error libassuan libiconv gettext w32pth gpgex gpgol \
diff --git a/src/config.nsi.in b/src/config.nsi.in
index 3229f48..2ac1169 100644
--- a/src/config.nsi.in
+++ b/src/config.nsi.in
@@ -245,6 +245,10 @@
 !define gpg4win_pkg_libkleo @gpg4win_pkg_libkleo@
 !define gpg4win_pkg_libkleo_version @gpg4win_pkg_libkleo_version@
 
+ at HAVE_PKG_KCODECS@
+!define gpg4win_pkg_kcodecs @gpg4win_pkg_kcodecs@
+!define gpg4win_pkg_kcodecs_version @gpg4win_pkg_kcodecs_version@
+
 # Internal packages.
 @HAVE_PKG_COMPENDIUM@
 
diff --git a/src/inst-kcodecs.nsi b/src/inst-kcodecs.nsi
new file mode 100644
index 0000000..c3ec3de
--- /dev/null
+++ b/src/inst-kcodecs.nsi
@@ -0,0 +1,35 @@
+# Copyright (C) 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}/kcodecs-${gpg4win_pkg_kcodecs_version}
+
+!ifdef DEBUG
+Section "kcodecs" SEC_kcodecs
+!else
+Section "-kcodecs" SEC_kcodecs
+!endif
+  SetOutPath "$INSTDIR"
+!ifdef SOURCES
+  File "${gpg4win_pkg_kcodecs}"
+!else
+  SetOutPath "$INSTDIR\bin"
+  File ${prefix}/bin/libKF5Codecs.dll
+!endif
+SectionEnd
diff --git a/src/inst-sections.nsi b/src/inst-sections.nsi
index d8d4930..f923aa8 100644
--- a/src/inst-sections.nsi
+++ b/src/inst-sections.nsi
@@ -134,6 +134,9 @@
 !ifdef HAVE_PKG_KCOREADDONS
 !include "inst-kcoreaddons.nsi"
 !endif
+!ifdef HAVE_PKG_KCODECS
+!include "inst-kcodecs.nsi"
+!endif
 !ifdef HAVE_PKG_LIBKLEO
 !include "inst-libkleo.nsi"
 !endif
@@ -329,6 +332,9 @@
 !ifdef HAVE_PKG_KCOREADDONS
 !include "uninst-kcoreaddons.nsi"
 !endif
+!ifdef HAVE_PKG_KCODECS
+!include "uninst-kcodecs.nsi"
+!endif
 !ifdef HAVE_PKG_LIBKLEO
 !include "uninst-libkleo.nsi"
 !endif
@@ -592,9 +598,15 @@ Function CalcDepends
 !ifdef HAVE_PKG_KCOREADDONS
   !insertmacro UnselectSection ${SEC_kcoreaddons}
 !endif
+!ifdef HAVE_PKG_KCODECS
+  !insertmacro UnselectSection ${SEC_kcodecs}
+!endif
 !ifdef HAVE_PKG_LIBKLEO
   !insertmacro UnselectSection ${SEC_libkleo}
 !endif
+!ifdef HAVE_PKG_KCODECS
+  !insertmacro UnselectSection ${SEC_kcodecs}
+!endif
 
   # Always install gnupg2.  This is also ensured by putting
   # these packages in the RO section and enabling them by default, but
@@ -692,6 +704,7 @@ Function CalcDepends
   !insertmacro SelectSection ${SEC_kcompletion}
   !insertmacro SelectSection ${SEC_kwindowsystem}
   !insertmacro SelectSection ${SEC_kcoreaddons}
+  !insertmacro SelectSection ${SEC_kcodecs}
   !insertmacro SelectSection ${SEC_libkleo}
   !insertmacro SelectSection ${SEC_qttools}
   !insertmacro SelectSection ${SEC_qtwinextras}
diff --git a/src/uninst-kcodecs.nsi b/src/uninst-kcodecs.nsi
new file mode 100644
index 0000000..134948d
--- /dev/null
+++ b/src/uninst-kcodecs.nsi
@@ -0,0 +1,33 @@
+# Copyright (C) 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}/kcodecs-${gpg4win_pkg_kcodecs_version}
+
+; Uninstaller section.
+Section "-un.kcodecs"
+!ifdef SOURCES
+  Push "${gpg4win_pkg_kcodecs}"
+  Call un.SourceDelete
+!else
+  Delete "$INSTDIR\bin\libKF5Codecs.dll"
+  RmDir "$INSTDIR\bin"
+
+!endif
+SectionEnd

-----------------------------------------------------------------------

Summary of changes:
 Makefile.am                                        |   4 +-
 configure.ac                                       |   4 +-
 packages/packages.current                          |  25 ++++
 .../0001-Check-for-and-replace-strcasestr.patch    | 157 +++++++++++++++++++++
 patches/kmime/0002-Fix-Windows-build.patch         |  56 ++++++++
 src/Makefile.am                                    |   5 +-
 src/config.nsi.in                                  |   8 ++
 src/{inst-ki18n.nsi => inst-kcodecs.nsi}           |  10 +-
 src/{inst-ki18n.nsi => inst-kmime.nsi}             |  10 +-
 src/inst-sections.nsi                              |  20 +++
 src/{uninst-boost.nsi => uninst-kcodecs.nsi}       |   8 +-
 src/{uninst-boost.nsi => uninst-kmime.nsi}         |   9 +-
 12 files changed, 294 insertions(+), 22 deletions(-)
 create mode 100755 patches/kmime/0001-Check-for-and-replace-strcasestr.patch
 create mode 100755 patches/kmime/0002-Fix-Windows-build.patch
 copy src/{inst-ki18n.nsi => inst-kcodecs.nsi} (82%)
 copy src/{inst-ki18n.nsi => inst-kmime.nsi} (83%)
 copy src/{uninst-boost.nsi => uninst-kcodecs.nsi} (85%)
 copy src/{uninst-boost.nsi => uninst-kmime.nsi} (85%)


hooks/post-receive
-- 
GnuPG for Windows
http://git.gnupg.org



More information about the Gpg4win-commits mailing list