From e7ed5443384a8435981d198f917423ea37be99ebd3e69412244ed7cfa7c6cb6d Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Wed, 16 Mar 2016 07:59:19 +0000 Subject: [PATCH] - Fix build with CMake 3.5 * innoextract-cmake.patch OBS-URL: https://build.opensuse.org/package/show/Archiving/innoextract?expand=0&rev=11 --- innoextract-cmake.patch | 30 ++++++++++++++++++++++++++++++ innoextract.changes | 6 ++++++ innoextract.spec | 7 +++++-- 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 innoextract-cmake.patch diff --git a/innoextract-cmake.patch b/innoextract-cmake.patch new file mode 100644 index 0000000..f7e7db1 --- /dev/null +++ b/innoextract-cmake.patch @@ -0,0 +1,30 @@ +From 01705758dd04d937160c99c8b87c6fa2057db894 Mon Sep 17 00:00:00 2001 +From: Daniel Scharrer +Date: Tue, 23 Feb 2016 05:45:50 +0100 +Subject: [PATCH] CMake: Disable variable expansion for quoted strings in if() + +This makes the build system more rubust against stray variables +coming from included CMake scripts provided by the system. + +Fixes build with CMake 3.5 (tested with 3.5.0-rc3). + +Fixes: issue #50 +--- + CMakeLists.txt | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 02e0308..8653b93 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,6 +2,11 @@ project(innoextract) + + cmake_minimum_required(VERSION 2.8) + ++if(POLICY CMP0054) ++ # CMake 3.1+: Only interpret if() arguments as variables or keywords when unquoted. ++ cmake_policy(SET CMP0054 NEW) ++endif() ++ + + # Define configuration options diff --git a/innoextract.changes b/innoextract.changes index 0b2e0b0..3a21cb1 100644 --- a/innoextract.changes +++ b/innoextract.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Mar 16 07:57:11 UTC 2016 - mpluskal@suse.com + +- Fix build with CMake 3.5 + * innoextract-cmake.patch + ------------------------------------------------------------------- Wed Nov 11 19:11:41 UTC 2015 - p.drouand@gmail.com diff --git a/innoextract.spec b/innoextract.spec index 19752ac..e702e04 100644 --- a/innoextract.spec +++ b/innoextract.spec @@ -1,7 +1,7 @@ # # spec file for package innoextract # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2012 Pascal Bleser # # All modifications and additions to the file contributed by third parties @@ -25,6 +25,8 @@ License: Zlib Group: Productivity/Archiving/Backup Url: http://constexpr.org/innoextract/ Source: http://constexpr.org/innoextract/files/%{name}-%{version}.tar.gz +# PATCH-FIX-UPSTREAM innoextract-cmake.patch gh#50 +Patch0: innoextract-cmake.patch BuildRequires: boost-devel BuildRequires: cmake >= 2.8.0 BuildRequires: doxygen @@ -42,6 +44,7 @@ supports installers created by Inno Setup 1.2.10 to 5.4.3. %prep %setup -q +%patch0 -p1 %build %cmake @@ -54,6 +57,6 @@ make %{?_smp_mflags} %defattr(-,root,root) %doc CHANGELOG LICENSE README.md %{_bindir}/innoextract -%{_mandir}/man1/innoextract.1* +%{_mandir}/man1/innoextract.1%{ext_man} %changelog