Switch from imagemagick to icoutils for ico files
authorAndre Heinecke <aheinecke@gnupg.org>
Mon, 4 Mar 2019 12:08:26 +0000 (13:08 +0100)
committerAndre Heinecke <aheinecke@gnupg.org>
Mon, 4 Mar 2019 12:08:26 +0000 (13:08 +0100)
* Makefile.am (EXTRA_DIST): Update accordingly
* README: Update dependencies
* patches/extra-cmake-modules/
0001-Add-convert-utility-support-for-Windows-icons.patch: Removed.

--
This helps because we no longer have to patch ECM but
can use the upstream version.

Makefile.am
README
patches/extra-cmake-modules/0001-Add-convert-utility-support-for-Windows-icons.patch [deleted file]

index 9e1f3dc..3b1e085 100644 (file)
@@ -28,7 +28,6 @@ EXTRA_DIST = autogen.sh README.GIT ONEWS \
         doc/license-page doc/GPLv3 \
         build-aux/git-log-footer build-aux/git-log-fix \
                patches/boost/boost-1-fixes.patch \
-        patches/extra-cmake-modules/0001-Add-convert-utility-support-for-Windows-icons.patch \
         patches/extra-cmake-modules/0001-Use-BIN_INSTALL_DIR-data-for-DATAROOTDIR-on-Windows.patch \
         patches/glib-2.41.5/01-socket.patch \
         patches/glib-2.41.5/02-formatsec.patch \
diff --git a/README b/README
index 2770fb7..74f22ca 100644 (file)
--- a/README
+++ b/README
@@ -46,7 +46,7 @@ To satisfy all needs of configure at least the following packages need
 to be installed:
 
     build-essential autoconf automake mingw-w64 mingw-w64-i686-dev \
-    mingw-w64-x86-64-dev nsis stow unzip imagemagick texlive \
+    mingw-w64-x86-64-dev nsis stow unzip icoutils texlive \
     libglib2.0-dev gettext docbook-utils ghostscript \
     texinfo libgdk-pixbuf2.0-dev texlive-latex-extra libqt4-dev-bin \
     wget mingw-w64 texlive-lang-german cmake libgtk2.0-bin libxml2-utils \
diff --git a/patches/extra-cmake-modules/0001-Add-convert-utility-support-for-Windows-icons.patch b/patches/extra-cmake-modules/0001-Add-convert-utility-support-for-Windows-icons.patch
deleted file mode 100755 (executable)
index 24cf44c..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-#! /bin/sh
-patch -p1 -l -f $* < $0
-exit $?
-
-From 9032d5c41ada1c50eddf6ea5562887af7a941aa9 Mon Sep 17 00:00:00 2001
-From: Andre Heinecke <aheinecke@intevation.de>
-Date: Thu, 4 Feb 2016 11:00:31 +0100
-Subject: [PATCH] Add convert utility support for Windows icons
-
----
- find-modules/FindConvert.cmake | 66 ++++++++++++++++++++++++++++++++++++++++++
- modules/ECMAddAppIcon.cmake    | 27 +++++++++++++----
- 2 files changed, 88 insertions(+), 5 deletions(-)
- create mode 100644 find-modules/FindConvert.cmake
-
-diff --git a/find-modules/FindConvert.cmake b/find-modules/FindConvert.cmake
-new file mode 100644
-index 0000000..a723c37
---- /dev/null
-+++ b/find-modules/FindConvert.cmake
-@@ -0,0 +1,66 @@
-+#.rst:
-+# FindConvert
-+# -----------
-+#
-+# Try to find convert.
-+#
-+# If the convert executable is not in your PATH, you can provide
-+# an alternative name or full path location with the ``Convert_EXECUTABLE``
-+# variable.
-+#
-+#=============================================================================
-+# Copyright 2016 Intevation GmbH <intevation@intevation.org>
-+#
-+# Redistribution and use in source and binary forms, with or without
-+# modification, are permitted provided that the following conditions
-+# are met:
-+#
-+# 1. Redistributions of source code must retain the copyright
-+#    notice, this list of conditions and the following disclaimer.
-+# 2. Redistributions in binary form must reproduce the copyright
-+#    notice, this list of conditions and the following disclaimer in the
-+#    documentation and/or other materials provided with the distribution.
-+# 3. The name of the author may not be used to endorse or promote products
-+#    derived from this software without specific prior written permission.
-+#
-+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+
-+include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake)
-+
-+ecm_find_package_version_check(Convert)
-+
-+find_program(Convert_EXECUTABLE NAMES convert)
-+
-+include(FindPackageHandleStandardArgs)
-+find_package_handle_standard_args(Convert
-+    FOUND_VAR
-+        Convert_FOUND
-+    REQUIRED_VARS
-+        Convert_EXECUTABLE
-+)
-+
-+mark_as_advanced(Convert_EXECUTABLE)
-+
-+if (Convert_FOUND)
-+    if (NOT TARGET Convert::Convert)
-+        add_executable(Convert::Convert IMPORTED)
-+        set_target_properties(Convert::Convert PROPERTIES
-+            IMPORTED_LOCATION "${Convert_EXECUTABLE}"
-+        )
-+    endif()
-+endif()
-+
-+include(FeatureSummary)
-+set_package_properties(Convert PROPERTIES
-+    URL "http://www.imagemagick.org/"
-+    DESCRIPTION "Generic image format conversion tool from imagemagick."
-+)
-diff --git a/modules/ECMAddAppIcon.cmake b/modules/ECMAddAppIcon.cmake
-index 5233a5f..2b5dca1 100644
---- a/modules/ECMAddAppIcon.cmake
-+++ b/modules/ECMAddAppIcon.cmake
-@@ -192,8 +192,11 @@
-     if (WIN32 AND (windows_icons_modern OR windows_icons_classic))
-         set(saved_CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}")
-         set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_FIND_MODULE_DIR})
--        find_package(Png2Ico)
--        find_package(IcoTool)
-+        find_package(Convert)
-+        if (NOT Convert_FOUND)
-+            find_package(IcoTool)
-+            find_package(Png2Ico)
-+        endif()
-         set(CMAKE_MODULE_PATH "${saved_CMAKE_MODULE_PATH}")
-
-         function(create_windows_icon_and_rc command args deps)
-@@ -204,6 +207,10 @@
-                     DEPENDS ${deps}
-                     WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
-                 )
-+
-+        if (Convert_FOUND OR Png2Ico_FOUND)
-+            set(${appsources} "${${appsources}};${_outfilename}.rc" PARENT_SCOPE)
-+            if (NOT Png2Ico_HAS_RCFILE_ARGUMENT)
-                 # this bit's a little hacky to make the dependency stuff work
-                 file(WRITE "${_outfilename}.rc.in" "IDI_ICON1        ICON        DISCARDABLE    \"${_outfilename}.ico\"\n")
-                 add_custom_command(
-@@ -220,6 +220,8 @@
-                     DEPENDS "${_outfilename}.ico"
-                     WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
-                 )
-+            endif()
-+        endif()
-         endfunction()
-
-         if (IcoTool_FOUND)
-@@ -270,8 +281,6 @@
-
-             set(${appsources} "${${appsources}};${_outfilename}.rc" PARENT_SCOPE)
-         # else none of the supported tools was found
--        else()
--            message(WARNING "Unable to find the png2ico or icotool utilities or icons in matching sizes - application will not have an application icon!")
-         endif()
-     elseif (APPLE AND (mac_icons OR mac_sidebar_icons))
-         # first generate .iconset directory structure, then convert to .icns format using the Mac OS X "iconutil" utility,
---
-2.1.4