A new user interface for you! Read more...

File 0001-Use-cmakedefine01-instead-of-macro_bool_to_01.patch of Package krename5

From ec90823494f5ec9bb2e8098f44209f383ef8c22a Mon Sep 17 00:00:00 2001
From: Heiko Becker <heirecka@exherbo.org>
Date: Tue, 20 Nov 2018 18:24:29 +0100
Subject: [PATCH 1/3] Use #cmakedefine01 instead  of macro_bool_to_01

---
 CMakeLists.txt                    | 13 +++++--------
 cmake/modules/MacroBoolTo01.cmake | 20 --------------------
 config-krename.h.cmake            | 10 +++++-----
 3 files changed, 10 insertions(+), 33 deletions(-)
 delete mode 100644 cmake/modules/MacroBoolTo01.cmake

diff --git a/CMakeLists.txt b/CMakeLists.txt
index dc986fa..717d859 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -80,13 +80,10 @@ set_package_properties(Freetype PROPERTIES
 
 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
-
-# Update configuration
-include(MacroBoolTo01)
-macro_bool_to_01(TAGLIB_FOUND HAVE_TAGLIB)
-macro_bool_to_01(EXIV2_FOUND HAVE_EXIV2)
-macro_bool_to_01(PoDoFo_FOUND HAVE_PODOFO)
-macro_bool_to_01(FREETYPE_FOUND HAVE_FREETYPE)
+set(HAVE_TAGLIB TAGLIB_FOUND)
+set(HAVE_EXIV2 EXIV2_FOUND)
+set(HAVE_PODOFO PoDoFo_FOUND)
+set(HAVE_FREETYPE FREETYPE_FOUND)
 configure_file(config-krename.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-krename.h)
 
 # Directories
diff --git a/cmake/modules/MacroBoolTo01.cmake b/cmake/modules/MacroBoolTo01.cmake
deleted file mode 100644
index 63b9852..0000000
--- a/cmake/modules/MacroBoolTo01.cmake
+++ /dev/null
@@ -1,20 +0,0 @@
-# MACRO_BOOL_TO_01( VAR RESULT0 ... RESULTN )
-# This macro evaluates its first argument
-# and sets all the given vaiables either to 0 or 1
-# depending on the value of the first one
-
-# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-
-MACRO(MACRO_BOOL_TO_01 FOUND_VAR )
-   FOREACH (_current_VAR ${ARGN})
-      IF(${FOUND_VAR})
-         SET(${_current_VAR} 1)
-      ELSE(${FOUND_VAR})
-         SET(${_current_VAR} 0)
-      ENDIF(${FOUND_VAR})
-   ENDFOREACH(_current_VAR)
-ENDMACRO(MACRO_BOOL_TO_01)
diff --git a/config-krename.h.cmake b/config-krename.h.cmake
index 959e5cb..862e40b 100644
--- a/config-krename.h.cmake
+++ b/config-krename.h.cmake
@@ -1,15 +1,15 @@
 /* config.h. Generated by cmake from config.h.cmake */
 
 /* have TagLib */
-#define HAVE_TAGLIB ${HAVE_TAGLIB}
+#cmakedefine01 HAVE_TAGLIB
 
 /* have Exiv2 */
-#define HAVE_EXIV2 ${HAVE_EXIV2}
+#cmakedefine01 HAVE_EXIV2
 
 /* have PoDoFo */
-#define HAVE_PODOFO ${HAVE_PODOFO}
+#cmakedefine01 HAVE_PODOFO
 
 /* have Freetype */
-#define HAVE_FREETYPE ${HAVE_FREETYPE}
+#cmakedefine01 HAVE_FREETYPE
 
 #define VERSION "${KRENAME_VERSION}"
-- 
2.16.4