wireshark: fix on darwin

Need CMP0025 to be set. No way to do it from the command
line (overrode by the cmake_minimimum_version policy).

Fixes #44878
This commit is contained in:
Matthew Bauer 2018-08-16 21:56:36 -05:00
parent bca8144274
commit 2d63877fa4
2 changed files with 5 additions and 21 deletions

View File

@ -1,19 +0,0 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
+cmake_minimum_required(VERSION 3.7)
project(Wireshark C CXX)
# Updated by make-version.pl
@@ -40,7 +41,7 @@
# Needed for GREATER_EQUAL operator
cmake_minimum_required(VERSION 3.7)
else()
- cmake_minimum_required(VERSION 2.8.8)
+ cmake_minimum_required(VERSION 3.7)
endif()
# Needs to be set after cmake_minimum_required or cmake_policy(VERSION)

View File

@ -49,8 +49,11 @@ in stdenv.mkDerivation {
name = "fix-timeout.patch";
url = "https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commitdiff_plain;h=8b5b843fcbc3e03e0fc45f3caf8cf5fc477e8613;hp=94af9724d140fd132896b650d10c4d060788e4f0";
sha256 = "1g2dm7lwsnanwp68b9xr9swspx7hfj4v3z44sz3yrfmynygk8zlv";
})
++ stdenv.lib.optional stdenv.isDarwin ./cmake.patch;
});
postPatch = ''
sed -i -e '1i cmake_policy(SET CMP0025 NEW)' CMakeLists.txt
'';
preBuild = ''
export LD_LIBRARY_PATH="$PWD/run"