~ubuntu-branches/ubuntu/precise/networkmanagement/precise

« back to all changes in this revision

Viewing changes to debian/patches/nm_versions_comparison.patch

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-10-23 14:00:13 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20111023140013-e38hdzybcg6zndrk
Tags: 0.9~svngit.nm09.20111023.ff842e-0ubuntu1
* New upstream snapshot.
* Drop all patches, merged upstream.
* Add kubuntu_add_subdirectory_po.diff to build the translations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
4
 
 
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.
10
 
 
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.
15
 
 
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.
18
 
 
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
23
 
@@ -1,7 +1,7 @@
24
 
 project(plasma-networkmanagement)
25
 
 
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")
29
 
 
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
36
 
@@ -3,7 +3,7 @@
37
 
     
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)
42
 
   if (NM_0_9)
43
 
     message(STATUS "Will build networkmanager-0.9")
44
 
     set(HAVE_NETWORKMANAGER TRUE)