From: Marius Bakke <mbakke@fastmail.com>
To: 30596@debbugs.gnu.org
Subject: [bug#30596] [PATCH 5/6] gnu: Add cmake@3.11.
Date: Sat, 24 Feb 2018 20:03:48 +0100 [thread overview]
Message-ID: <20180224190349.8155-5-mbakke@fastmail.com> (raw)
In-Reply-To: <20180224190349.8155-1-mbakke@fastmail.com>
* gnu/packages/patches/cmake-3.11-pthread-fix.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/cmake.scm (cmake-3.11): New public variable.
---
gnu/local.mk | 1 +
gnu/packages/cmake.scm | 63 +++++++++++++++++++++++
gnu/packages/patches/cmake-3.11-pthread-fix.patch | 30 +++++++++++
3 files changed, 94 insertions(+)
create mode 100644 gnu/packages/patches/cmake-3.11-pthread-fix.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index a10f3150e..75f275928 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -591,6 +591,7 @@ dist_patch_DATA = \
%D%/packages/patches/clucene-pkgconfig.patch \
%D%/packages/patches/clx-remove-demo.patch \
%D%/packages/patches/cmake-fix-tests.patch \
+ %D%/packages/patches/cmake-3.11-pthread-fix.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..801323c72 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -31,6 +31,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)
@@ -149,3 +150,65 @@ and workspaces that can be used in the compiler environment of your choice.")
license:bsd-2 ; cmlibarchive
license:expat ; cmjsoncpp is dual MIT/public domain
license:public-domain)))) ; cmlibarchive/archive_getdate.c
+
+;; Recent Ceph requires Boost 1.66, which in turn requires CMake 3.11 for
+;; its updated "FindBoost.cmake" facility.
+(define-public cmake-3.11
+ (package
+ (inherit cmake)
+ (version "3.11.0-rc1")
+ (source (origin
+ (inherit (package-source cmake))
+ (uri (string-append "https://www.cmake.org/files/v"
+ (version-major+minor version)
+ "/cmake-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0yz79h2yvqyhyzhr889mfadqq20am5g1z0aqz22kdia9jnxwl13g"))
+ (patches (append (origin-patches (package-source cmake))
+ (search-patches "cmake-3.11-pthread-fix.patch")))
+ (snippet
+ '(begin
+ ;; Drop bundled software.
+ (with-directory-excursion "Utilities"
+ (for-each delete-file-recursively
+ '("cmbzip2"
+ "cmcurl"
+ "cmexpat"
+ "cmliblzma"
+ "cmzlib"))
+ #t)))))
+ (build-system gnu-build-system)
+ (arguments
+ `(,@(substitute-keyword-arguments (package-arguments cmake)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (replace 'patch-bin-sh
+ (lambda _
+ ;; 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/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))
+ ;; Parallel tests are unsupported in newer releases.
+ (delete 'set-test-environment)
+ (add-before 'check 'disable-broken-test
+ (lambda _
+ ;; This test is broken with SOURCE_DATE_EPOCH since CMake 3.8.
+ ;; https://gitlab.kitware.com/cmake/cmake/issues/17762
+ (substitute* "Tests/CMakeTests/StringTest.cmake.in"
+ ((".*TIMESTAMP-UnixTime.*") "\n"))
+ #t)))))))
+ (inputs
+ `(("rhash" ,rhash)
+ ,@(package-inputs cmake)))))
diff --git a/gnu/packages/patches/cmake-3.11-pthread-fix.patch b/gnu/packages/patches/cmake-3.11-pthread-fix.patch
new file mode 100644
index 000000000..4f5ae5add
--- /dev/null
+++ b/gnu/packages/patches/cmake-3.11-pthread-fix.patch
@@ -0,0 +1,30 @@
+Fix pthread link failure when using system libuv.
+
+Copied from upstream source repository:
+https://gitlab.kitware.com/cmake/cmake/commit/94eee5e683b80e0ffd8e0c4fd3a45b03f0f37b18
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e4d2a9a0a2..66239595ef 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -310,6 +310,8 @@ endmacro()
+ # Simply to improve readability of the main script.
+ #-----------------------------------------------------------------------
+ macro (CMAKE_BUILD_UTILITIES)
++ find_package(Threads)
++
+ #---------------------------------------------------------------------
+ # Create the kwsys library for CMake.
+ set(KWSYS_NAMESPACE cmsys)
+diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
+index e7c0732675..a0010a292b 100644
+--- a/Source/CMakeLists.txt
++++ b/Source/CMakeLists.txt
+@@ -765,6 +765,7 @@ target_link_libraries(CMakeLib cmsys
+ ${CMAKE_LIBUV_LIBRARIES}
+ ${CMAKE_LIBRHASH_LIBRARIES}
+ ${CMake_KWIML_LIBRARIES}
++ ${CMAKE_THREAD_LIBS_INIT}
+ )
+
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "sparc")
--
2.16.2
next prev parent reply other threads:[~2018-02-24 19:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-24 19:01 [bug#30596] [PATCH 0/6] Update Ceph and dependencies Marius Bakke
2018-02-24 19:03 ` [bug#30596] [PATCH 1/6] gnu: rocksdb: Update to 5.10.3 Marius Bakke
2018-02-24 19:03 ` [bug#30596] [PATCH 2/6] gnu: snappy: Update to 1.1.7 Marius Bakke
2018-03-03 21:32 ` Ludovic Courtès
2018-02-24 19:03 ` [bug#30596] [PATCH 3/6] gnu: java-snappy: " Marius Bakke
2018-03-03 21:32 ` Ludovic Courtès
2018-02-24 19:03 ` [bug#30596] [PATCH 4/6] gnu: Add boost@1.66.0 Marius Bakke
2018-03-03 21:33 ` Ludovic Courtès
2018-02-24 19:03 ` Marius Bakke [this message]
2018-03-03 21:35 ` [bug#30596] [PATCH 5/6] gnu: Add cmake@3.11 Ludovic Courtès
2018-03-04 16:58 ` Marius Bakke
2018-02-24 19:03 ` [bug#30596] [PATCH 6/6] gnu: ceph: Update to 12.2.3 Marius Bakke
2018-03-03 21:37 ` Ludovic Courtès
2018-03-04 16:59 ` bug#30596: " Marius Bakke
2018-03-03 21:31 ` [bug#30596] [PATCH 1/6] gnu: rocksdb: Update to 5.10.3 Ludovic Courtès
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=20180224190349.8155-5-mbakke@fastmail.com \
--to=mbakke@fastmail.com \
--cc=30596@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).