1
From: Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com>
2
Subject: Workaround issues in version comparisons with NM's large versions.
3
Bug-Ubuntu: https://bugs.launchpad.net/bugs/838099
5
The use of rather large version numbers in NM (e.g. 0.8.9997) for pre-releases
6
of NM 0.9 caused unexpected issues with version comparisons when we actually
7
made it to 0.9.0: the comparisons made in KDE's KDE_MAKE_VERSION macro and
8
CMake's macro_ensure_version cause 0.9.0 to be evaluated as "smaller" than
9
a version number of 0.8.996, for instance.
11
In KDE_MAKE_VERSION, this is because shifting bits around means a maximum third
12
number of 255 (otherwise it "leaks" forward). In other words, 0.8.255 is the
13
highest version number to be evaluated as smaller than 0.9.0, 0.8.256 will be
14
evaluated as equal, and 0.8.257 and on will be larger than 0.9.0.
16
Here we work around these issues by specifying that the minimum version is
17
to be 0.9.0. Also make sure the solid bits require the same version for NM libs.
19
Index: networkmanagement/CMakeLists.txt
20
===================================================================
21
--- networkmanagement.orig/CMakeLists.txt 2011-09-01 10:17:38.862607614 -0400
22
+++ networkmanagement/CMakeLists.txt 2011-09-01 10:26:02.232608571 -0400
24
project(plasma-networkmanagement)
26
option(INSTALL_KNM_AUTOSTART "Install the autostart file for knetworkmanager. Warning: This prevents the plasmoid from working properly")
27
-set (MINIMUM_NM_VERSION_REQUIRED "0.8.9997")
28
+set (MINIMUM_NM_VERSION_REQUIRED "0.9.0")
30
find_package(KDE4 REQUIRED)
31
include (KDE4Defaults)
32
Index: networkmanagement/solidcontrolfuture/solid/CMakeLists.txt
33
===================================================================
34
--- networkmanagement.orig/solidcontrolfuture/solid/CMakeLists.txt 2011-09-01 10:26:36.002608635 -0400
35
+++ networkmanagement/solidcontrolfuture/solid/CMakeLists.txt 2011-09-01 10:32:26.022609302 -0400
38
set(HAVE_NETWORKMANAGER FALSE)
39
if(NETWORKMANAGER_FOUND)
40
- macro_ensure_version("0.8.996" ${NETWORKMANAGER_VERSION} NM_0_9)
41
+ macro_ensure_version(${MINIMUM_NM_VERSION_REQUIRED} ${NETWORKMANAGER_VERSION} NM_0_9)
43
message(STATUS "Will build networkmanager-0.9")
44
set(HAVE_NETWORKMANAGER TRUE)