unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Arun Isaac <arunisaac@systemreboot.net>
To: 30390@debbugs.gnu.org
Subject: [bug#30390] [PATCH 3/3] gnu: cmake: Update to 3.10.2.
Date: Thu,  8 Feb 2018 17:47:47 +0530	[thread overview]
Message-ID: <20180208121747.15072-3-arunisaac@systemreboot.net> (raw)
In-Reply-To: <20180208121747.15072-1-arunisaac@systemreboot.net>

* gnu/packages/cmake.scm (cmake): Update to 3.10.2. Re-indent.
[source]: Remove cmake-fix-tests patch.
Do not remove bundled cmlibuv.
[arguments]: Replace system* with invoke.
[inputs]: Add rhash. Sort.
[home-page]: Update URL.
* gnu/packages/patches/cmake-fix-tests.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Unregister it.
---
 gnu/local.mk                               |   1 -
 gnu/packages/cmake.scm                     | 153 ++++++++++++++++-------------
 gnu/packages/patches/cmake-fix-tests.patch | 120 ----------------------
 3 files changed, 83 insertions(+), 191 deletions(-)
 delete mode 100644 gnu/packages/patches/cmake-fix-tests.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 3f0023a2f..94803a39f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -583,7 +583,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/clisp-remove-failing-test.patch		\
   %D%/packages/patches/clucene-pkgconfig.patch			\
   %D%/packages/patches/clx-remove-demo.patch			\
-  %D%/packages/patches/cmake-fix-tests.patch			\
   %D%/packages/patches/coda-use-system-libs.patch		\
   %D%/packages/patches/cool-retro-term-dont-check-uninit-member.patch	\
   %D%/packages/patches/cool-retro-term-fix-array-size.patch	\
diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index a4e2d38e3..cbe1ed701 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -31,6 +32,7 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages backup)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages crypto)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages file)
   #:use-module (gnu packages libevent)
@@ -40,57 +42,65 @@
 (define-public cmake
   (package
     (name "cmake")
-    (version "3.7.2")
+    (version "3.10.2")
     (source (origin
-             (method url-fetch)
-             (uri (string-append "https://www.cmake.org/files/v"
-                                 (version-major+minor version)
-                                 "/cmake-" version ".tar.gz"))
-             (sha256
-              (base32
-               "1q6a60695prpzzsmczm2xrgxdb61fyjznb04dr6yls6iwv24c4nw"))
-             (patches (search-patches "cmake-fix-tests.patch"))
-             (modules '((guix build utils)))
-             (snippet
-              '(begin
-                 ;; Drop bundled software.
-                 (with-directory-excursion "Utilities"
-                   (for-each delete-file-recursively
-                             '("cmbzip2"
-                               ;"cmcompress"
-                               "cmcurl"
-                               "cmexpat"
-                               ;"cmjsoncpp"
-                               ;"cmlibarchive"
-                               "cmliblzma"
-                               "cmlibuv"
-                               "cmzlib"))
-                   #t)))))
+              (method url-fetch)
+              (uri (string-append "https://www.cmake.org/files/v"
+                                  (version-major+minor version)
+                                  "/cmake-" version ".tar.gz"))
+              (sha256
+               (base32
+                "12r1ldq4l032d6f5gc22dlayck4cr29cczqsl9xf0vdm9anzml40"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  ;; Drop bundled software.
+                  (with-directory-excursion "Utilities"
+                    (for-each delete-file-recursively
+                              '("cmbzip2"
+                                ;; "cmcompress"
+                                "cmcurl"
+                                "cmexpat"
+                                ;; "cmjsoncpp"
+                                ;; "cmlibarchive"
+                                "cmliblzma"
+                                ;; "cmlibuv"
+                                "cmzlib"))
+                    #t)))))
     (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"
+       #:make-flags
+       (let ((skipped-tests
+              (list "CTestTestUpload" ; This test requires network access.
+                    ;; These tests fail.
+                    "CTestTestSubdir"
+                    "CMake.String"
+                    "CTestCoverageCollectGCOV"
+                    "BundleUtilities")))
+         (list
+          (string-append
+           "ARGS=--exclude-regex ^\\(" (string-join skipped-tests "\\|") "\\)$")))
        #:phases
        (modify-phases %standard-phases
          (add-before 'configure 'patch-bin-sh
            (lambda _
-           ;; Replace "/bin/sh" by the right path in... a lot of
-           ;; files.
-           (substitute*
-               '("Modules/CompilerId/Xcode-3.pbxproj.in"
-                 "Modules/CompilerId/Xcode-1.pbxproj.in"
-                 "Modules/CompilerId/Xcode-2.pbxproj.in"
-                 "Modules/CPack.RuntimeScript.in"
-                 "Source/cmakexbuild.cxx"
-                 "Source/cmGlobalXCodeGenerator.cxx"
-                 "Source/CTest/cmCTestBatchTestHandler.cxx"
-                 "Source/cmLocalUnixMakefileGenerator3.cxx"
-                 "Source/cmExecProgramCommand.cxx"
-                 "Utilities/Release/release_cmake.cmake"
-                 "Utilities/cmlibarchive/libarchive/archive_write_set_format_shar.c"
-                 "Tests/CMakeLists.txt"
-                 "Tests/RunCMake/File_Generate/RunCMakeTest.cmake")
+             ;; Replace "/bin/sh" by the right path in... a lot of
+             ;; files.
+             (substitute*
+                 '("Modules/CompilerId/Xcode-3.pbxproj.in"
+                   "Modules/CPack.RuntimeScript.in"
+                   "Source/cmakexbuild.cxx"
+                   "Source/cmGlobalXCodeGenerator.cxx"
+                   "Source/CTest/cmCTestBatchTestHandler.cxx"
+                   "Source/cmLocalUnixMakefileGenerator3.cxx"
+                   "Source/cmExecProgramCommand.cxx"
+                   "Utilities/Release/release_cmake.cmake"
+                   "Utilities/cmlibarchive/libarchive/archive_write_set_format_shar.c"
+                   "Tests/CMakeLists.txt"
+                   "Tests/RunCMake/File_Generate/RunCMakeTest.cmake")
                (("/bin/sh") (which "sh")))
-           #t))
+             #t))
          (add-before 'configure 'set-paths
            (lambda _
              ;; Help cmake's bootstrap process to find system libraries
@@ -101,43 +111,46 @@
          (replace 'configure
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
-               (zero? (system*
-                       "./configure"
-                       (string-append "--prefix=" out)
-                       "--system-libs"
-                       "--no-system-jsoncpp" ; FIXME: Circular dependency.
-                       ;; By default, the man pages and other docs land
-                       ;; in PREFIX/man and PREFIX/doc, but we want them
-                       ;; in share/{man,doc}.  Note that unlike
-                       ;; autoconf-generated configure scripts, cmake's
-                       ;; configure prepends "PREFIX/" to what we pass
-                       ;; to --mandir and --docdir.
-                       "--mandir=share/man"
-                       ,(string-append
-                         "--docdir=share/doc/cmake-"
-                         (version-major+minor version)))))))
+               (invoke
+                "./configure"
+                (string-append "--prefix=" out)
+                "--system-libs"
+                "--no-system-jsoncpp" ; FIXME: Circular dependency.
+                ;; By default, the man pages and other docs land
+                ;; in PREFIX/man and PREFIX/doc, but we want them
+                ;; in share/{man,doc}.  Note that unlike
+                ;; autoconf-generated configure scripts, cmake's
+                ;; configure prepends "PREFIX/" to what we pass
+                ;; to --mandir and --docdir.
+                "--mandir=share/man"
+                ,(string-append
+                  "--docdir=share/doc/cmake-"
+                  (version-major+minor version)))
+               #t)))
          (add-before 'check 'set-test-environment
            (lambda _
              ;; Get verbose output from failed tests.
              (setenv "CTEST_OUTPUT_ON_FAILURE" "TRUE")
+             ;; Parallel tests fail in the 3.10.2 release.
              ;; Run tests in parallel.
-             (setenv "CTEST_PARALLEL_LEVEL"
-                     (number->string (parallel-job-count)))
+             ;; (setenv "CTEST_PARALLEL_LEVEL"
+             ;;         (number->string (parallel-job-count)))
              #t)))))
     (inputs
-     `(("file"       ,file)
-       ("curl"       ,curl)
-       ("zlib"       ,zlib)
-       ("expat"      ,expat)
-       ("bzip2"      ,bzip2)
-       ("ncurses"    ,ncurses) ; required for ccmake
-       ("libuv"      ,libuv)
-       ("libarchive" ,libarchive)))
+     `(("bzip2" ,bzip2)
+       ("curl" ,curl)
+       ("expat" ,expat)
+       ("file" ,file)
+       ("libarchive" ,libarchive)
+       ("libuv" ,libuv)
+       ("ncurses" ,ncurses) ; required for ccmake
+       ("rhash" ,rhash)
+       ("zlib" ,zlib)))
     (native-search-paths
      (list (search-path-specification
-             (variable "CMAKE_PREFIX_PATH")
-             (files '("")))))
-    (home-page "https://www.cmake.org/")
+            (variable "CMAKE_PREFIX_PATH")
+            (files '("")))))
+    (home-page "https://cmake.org/")
     (synopsis "Cross-platform build system")
     (description
      "CMake is a family of tools designed to build, test and package software.
diff --git a/gnu/packages/patches/cmake-fix-tests.patch b/gnu/packages/patches/cmake-fix-tests.patch
deleted file mode 100644
index 732b0023a..000000000
--- a/gnu/packages/patches/cmake-fix-tests.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-From af0a62dadfb3db25880bc653e2e4c97435a604c9 Mon Sep 17 00:00:00 2001
-From: Efraim Flashner <efraim@flashner.co.il>
-Date: Mon, 29 Aug 2016 20:07:58 +0300
-Subject: [PATCH] cmake-fix-tests
-
----
- Tests/CMakeLists.txt | 83 ++++++++++++++++++++++++++++------------------------
- 1 file changed, 44 insertions(+), 39 deletions(-)
-
-diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
-index f21e430..56014a2 100644
---- a/Tests/CMakeLists.txt
-+++ b/Tests/CMakeLists.txt
-@@ -416,10 +416,12 @@ if(BUILD_TESTING)
-   endif()
- 
-   # run test for BundleUtilities on supported platforms/compilers
--  if(MSVC OR
--     MINGW OR
--     CMAKE_SYSTEM_NAME MATCHES "Linux" OR
--     CMAKE_SYSTEM_NAME MATCHES "Darwin")
-+#  if(MSVC OR
-+#     MINGW OR
-+#     CMAKE_SYSTEM_NAME MATCHES "Linux" OR
-+#     CMAKE_SYSTEM_NAME MATCHES "Darwin")
-+# This test fails on Guix: skip it.
-+  if(FALSE)
-   if(NOT "${CMAKE_GENERATOR}" STREQUAL "Watcom WMake")
- 
-     add_test(BundleUtilities ${CMAKE_CTEST_COMMAND}
-@@ -2481,30 +2483,32 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
-     PASS_REGULAR_EXPRESSION "Could not find executable"
-     FAIL_REGULAR_EXPRESSION "SegFault")
- 
--  configure_file(
--    "${CMake_SOURCE_DIR}/Tests/CTestTestUpload/test.cmake.in"
--    "${CMake_BINARY_DIR}/Tests/CTestTestUpload/test.cmake"
--    @ONLY ESCAPE_QUOTES)
--  add_test(CTestTestUpload ${CMAKE_CTEST_COMMAND}
--    -S "${CMake_BINARY_DIR}/Tests/CTestTestUpload/test.cmake" -V
--    --output-log "${CMake_BINARY_DIR}/Tests/CTestTestUpload/testOut.log"
--    )
--  set_tests_properties(CTestTestUpload PROPERTIES
--    PASS_REGULAR_EXPRESSION "Upload\\.xml")
--
--  configure_file(
--    "${CMake_SOURCE_DIR}/Tests/CTestCoverageCollectGCOV/test.cmake.in"
--    "${CMake_BINARY_DIR}/Tests/CTestCoverageCollectGCOV/test.cmake"
--    @ONLY ESCAPE_QUOTES)
--  add_test(CTestCoverageCollectGCOV ${CMAKE_CTEST_COMMAND}
--    -C \${CTEST_CONFIGURATION_TYPE}
--    -S "${CMake_BINARY_DIR}/Tests/CTestCoverageCollectGCOV/test.cmake" -VV
--    --output-log "${CMake_BINARY_DIR}/Tests/CTestCoverageCollectGCOV/testOut.log"
--    )
--  set_tests_properties(CTestCoverageCollectGCOV PROPERTIES
--    PASS_REGULAR_EXPRESSION
--    "PASSED with correct output.*Testing/CoverageInfo/main.cpp.gcov")
--  set_property(TEST CTestCoverageCollectGCOV PROPERTY ENVIRONMENT CTEST_PARALLEL_LEVEL=)
-+# This test requires network connectivity: skip it.
-+#  configure_file(
-+#    "${CMake_SOURCE_DIR}/Tests/CTestTestUpload/test.cmake.in"
-+#    "${CMake_BINARY_DIR}/Tests/CTestTestUpload/test.cmake"
-+#    @ONLY ESCAPE_QUOTES)
-+#  add_test(CTestTestUpload ${CMAKE_CTEST_COMMAND}
-+#    -S "${CMake_BINARY_DIR}/Tests/CTestTestUpload/test.cmake" -V
-+#    --output-log "${CMake_BINARY_DIR}/Tests/CTestTestUpload/testOut.log"
-+#    )
-+#  set_tests_properties(CTestTestUpload PROPERTIES
-+#    PASS_REGULAR_EXPRESSION "Upload\\.xml")
-+
-+# This test times out
-+#  configure_file(
-+#    "${CMake_SOURCE_DIR}/Tests/CTestCoverageCollectGCOV/test.cmake.in"
-+#    "${CMake_BINARY_DIR}/Tests/CTestCoverageCollectGCOV/test.cmake"
-+#    @ONLY ESCAPE_QUOTES)
-+#  add_test(CTestCoverageCollectGCOV ${CMAKE_CTEST_COMMAND}
-+#    -C \${CTEST_CONFIGURATION_TYPE}
-+#    -S "${CMake_BINARY_DIR}/Tests/CTestCoverageCollectGCOV/test.cmake" -VV
-+#    --output-log "${CMake_BINARY_DIR}/Tests/CTestCoverageCollectGCOV/testOut.log"
-+#    )
-+#  set_tests_properties(CTestCoverageCollectGCOV PROPERTIES
-+#    PASS_REGULAR_EXPRESSION
-+#    "PASSED with correct output.*Testing/CoverageInfo/main.cpp.gcov")
-+#  set_property(TEST CTestCoverageCollectGCOV PROPERTY ENVIRONMENT CTEST_PARALLEL_LEVEL=)
- 
-   configure_file(
-     "${CMake_SOURCE_DIR}/Tests/CTestTestEmptyBinaryDirectory/test.cmake.in"
-@@ -2860,17 +2864,18 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
-   set_tests_properties(CTestTestStopTime PROPERTIES
-     PASS_REGULAR_EXPRESSION "The stop time has been passed")
- 
--  configure_file(
--    "${CMake_SOURCE_DIR}/Tests/CTestTestSubdir/test.cmake.in"
--    "${CMake_BINARY_DIR}/Tests/CTestTestSubdir/test.cmake"
--    @ONLY ESCAPE_QUOTES)
--  add_test(CTestTestSubdir ${CMAKE_CTEST_COMMAND}
--    -S "${CMake_BINARY_DIR}/Tests/CTestTestSubdir/test.cmake" -V
--    --output-log "${CMake_BINARY_DIR}/Tests/CTestTestSubdir/testOutput.log"
--    )
--  #make sure all 3 subdirs were added
--  set_tests_properties(CTestTestSubdir PROPERTIES
--    PASS_REGULAR_EXPRESSION "0 tests failed out of 3")
-+# This test fails to build 2 of the 3 tests
-+#  configure_file(
-+#    "${CMake_SOURCE_DIR}/Tests/CTestTestSubdir/test.cmake.in"
-+#    "${CMake_BINARY_DIR}/Tests/CTestTestSubdir/test.cmake"
-+#    @ONLY ESCAPE_QUOTES)
-+#  add_test(CTestTestSubdir ${CMAKE_CTEST_COMMAND}
-+#    -S "${CMake_BINARY_DIR}/Tests/CTestTestSubdir/test.cmake" -V
-+#    --output-log "${CMake_BINARY_DIR}/Tests/CTestTestSubdir/testOutput.log"
-+#    )
-+#  #make sure all 3 subdirs were added
-+#  set_tests_properties(CTestTestSubdir PROPERTIES
-+#    PASS_REGULAR_EXPRESSION "0 tests failed out of 3")
- 
-   configure_file(
-     "${CMake_SOURCE_DIR}/Tests/CTestTestTimeout/test.cmake.in"
--- 
-2.9.3
-
-- 
2.15.1

  parent reply	other threads:[~2018-02-08 12:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-08 12:13 [bug#30390] [PATCH 0/3] Update cmake to 3.10.2 Arun Isaac
2018-02-08 12:17 ` [bug#30390] [PATCH 1/3] gnu: Add rhash Arun Isaac
2018-02-08 12:17   ` [bug#30390] [PATCH 2/3] gnu: libuv: Update to 1.19.1 Arun Isaac
2018-02-20 17:46     ` Marius Bakke
2018-02-08 12:17   ` Arun Isaac [this message]
2018-02-20 17:54     ` [bug#30390] [PATCH 3/3] gnu: cmake: Update to 3.10.2 Marius Bakke
2018-02-20 17:44   ` [bug#30390] [PATCH 1/3] gnu: Add rhash Marius Bakke
2018-02-22 14:42     ` Arun Isaac
2018-02-22 14:48       ` Marius Bakke
2018-02-24 13:08 ` [bug#30390] [PATCH 0/3] Update cmake Arun Isaac
2018-02-24 13:08   ` [bug#30390] [PATCH 1/3] gnu: sqlite: Fix source URI Arun Isaac
2018-02-24 13:08   ` [bug#30390] [PATCH 2/3] gnu: cmake: Update to 3.10.2 Arun Isaac
2018-02-24 13:08   ` [bug#30390] [PATCH 3/3] gnu: cmake: Re-indent Arun Isaac
2018-02-24 15:16   ` [bug#30390] [PATCH 0/3] Update cmake Marius Bakke
2018-02-24 19:06     ` Arun Isaac
2018-02-24 21:17       ` Marius Bakke
2018-02-27 17:20     ` Ludovic Courtès
2018-02-24 15:19   ` Marius Bakke
2018-03-20 10:41     ` Marius Bakke
2018-03-21 21:38       ` Arun Isaac
2018-03-23  6:25         ` bug#30390: " Arun Isaac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180208121747.15072-3-arunisaac@systemreboot.net \
    --to=arunisaac@systemreboot.net \
    --cc=30390@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).