[Pkg-cmake-commits] [cmake] 01/03: Make FindLibArchive compatible with libarchive 3.2.

Felix Geyer fgeyer at moszumanska.debian.org
Tue Jun 28 18:32:20 UTC 2016


This is an automated email from the git hooks/post-receive script.

fgeyer pushed a commit to branch master
in repository cmake.

commit 18ca9bac2d2e2f28b0ca05d5a924b819d206be8e
Author: Felix Geyer <fgeyer at debian.org>
Date:   Tue Jun 28 19:34:44 2016 +0200

    Make FindLibArchive compatible with libarchive 3.2.
    
    * Make FindLibArchive compatible with libarchive 3.2. (Closes: #828092)
      - Add FindLibArchive_Support_libarchive_3.2.patch
---
 debian/changelog                                   |  7 +++++
 .../FindLibArchive_Support_libarchive_3.2.patch    | 33 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 41 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 15cdcba..0d9e64e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+cmake (3.5.2-2) UNRELEASED; urgency=medium
+
+  * Make FindLibArchive compatible with libarchive 3.2. (Closes: #828092)
+    - Add FindLibArchive_Support_libarchive_3.2.patch
+
+ -- Felix Geyer <fgeyer at debian.org>  Tue, 28 Jun 2016 19:33:54 +0200
+
 cmake (3.5.2-1) unstable; urgency=medium
 
   * New upstream release.
diff --git a/debian/patches/FindLibArchive_Support_libarchive_3.2.patch b/debian/patches/FindLibArchive_Support_libarchive_3.2.patch
new file mode 100644
index 0000000..9996e8c
--- /dev/null
+++ b/debian/patches/FindLibArchive_Support_libarchive_3.2.patch
@@ -0,0 +1,33 @@
+From 38d18bab54cd9dceba5902dcb4407ecdb585953c Mon Sep 17 00:00:00 2001
+From: Orion Poplawski <orion at cora.nwra.com>
+Date: Fri, 3 Jun 2016 09:37:03 -0600
+Subject: [PATCH] FindLibArchive: Support libarchive 3.2 version string format
+
+---
+ Modules/FindLibArchive.cmake | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/Modules/FindLibArchive.cmake b/Modules/FindLibArchive.cmake
+index 471a4f1..dd93041 100644
+--- a/Modules/FindLibArchive.cmake
++++ b/Modules/FindLibArchive.cmake
+@@ -42,14 +42,15 @@ mark_as_advanced(LibArchive_INCLUDE_DIR LibArchive_LIBRARY)
+ 
+ # Extract the version number from the header.
+ if(LibArchive_INCLUDE_DIR AND EXISTS "${LibArchive_INCLUDE_DIR}/archive.h")
+-  # The version string appears in one of two known formats in the header:
++  # The version string appears in one of three known formats in the header:
+   #  #define ARCHIVE_LIBRARY_VERSION "libarchive 2.4.12"
+   #  #define ARCHIVE_VERSION_STRING "libarchive 2.8.4"
+-  # Match either format.
+-  set(_LibArchive_VERSION_REGEX "^#define[ \t]+ARCHIVE[_A-Z]+VERSION[_A-Z]*[ \t]+\"libarchive +([0-9]+)\\.([0-9]+)\\.([0-9]+)[^\"]*\".*$")
++  #  #define ARCHIVE_VERSION_ONLY_STRING "3.2.0"
++  # Match any format.
++  set(_LibArchive_VERSION_REGEX "^#define[ \t]+ARCHIVE[_A-Z]+VERSION[_A-Z]*[ \t]+\"(libarchive +)?([0-9]+)\\.([0-9]+)\\.([0-9]+)[^\"]*\".*$")
+   file(STRINGS "${LibArchive_INCLUDE_DIR}/archive.h" _LibArchive_VERSION_STRING LIMIT_COUNT 1 REGEX "${_LibArchive_VERSION_REGEX}")
+   if(_LibArchive_VERSION_STRING)
+-    string(REGEX REPLACE "${_LibArchive_VERSION_REGEX}" "\\1.\\2.\\3" LibArchive_VERSION "${_LibArchive_VERSION_STRING}")
++    string(REGEX REPLACE "${_LibArchive_VERSION_REGEX}" "\\2.\\3.\\4" LibArchive_VERSION "${_LibArchive_VERSION_STRING}")
+   endif()
+   unset(_LibArchive_VERSION_REGEX)
+   unset(_LibArchive_VERSION_STRING)
diff --git a/debian/patches/series b/debian/patches/series
index e9e2070..6043478 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 FindBoost_add_-lpthread_#563479.diff
 qt_import_dir_variable.diff
 fix-ftbfs-on-kfreebsd.patch
+FindLibArchive_Support_libarchive_3.2.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-cmake/cmake.git



More information about the Pkg-cmake-commits mailing list