mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
gnu: CMake: Update to 3.20.2.
* gnu/packages/cmake.scm (%common-disabled-tests): Don't disable BootstrapTest. (cmake-bootstrap): Update to 3.20.2. [source](modules, snippet): Move from here ... (cmake-minimal)[source]: ... to here. * gnu/packages/patches/mariadb-cmake-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/databases.scm (mariadb)[source](patches): Add it.
This commit is contained in:
parent
9e729d9a2f
commit
1539af46d0
4 changed files with 55 additions and 55 deletions
|
@ -1375,6 +1375,7 @@ dist_patch_DATA = \
|
|||
%D%/packages/patches/mailutils-fix-uninitialized-variable.patch \
|
||||
%D%/packages/patches/make-impure-dirs.patch \
|
||||
%D%/packages/patches/mariadb-CVE-2021-27928.patch \
|
||||
%D%/packages/patches/mariadb-cmake-compat.patch \
|
||||
%D%/packages/patches/mars-install.patch \
|
||||
%D%/packages/patches/mars-sfml-2.3.patch \
|
||||
%D%/packages/patches/maxima-defsystem-mkdir.patch \
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
|
||||
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
|
||||
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;; Copyright © 2017, 2018, 2020 Marius Bakke <mbakke@fastmail.com>
|
||||
;;; Copyright © 2017, 2018, 2020, 2021 Marius Bakke <marius@gnu.org>
|
||||
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
|
||||
;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;; Copyright © 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||
|
@ -123,9 +123,7 @@ (define %common-disabled-tests
|
|||
;; This test requires 'ldconfig' which is not available in Guix.
|
||||
"RunCMake.install"
|
||||
;; This test fails for unknown reason.
|
||||
"RunCMake.file-GET_RUNTIME_DEPENDENCIES"
|
||||
;; This test requires the bundled libuv.
|
||||
"BootstrapTest"))
|
||||
"RunCMake.file-GET_RUNTIME_DEPENDENCIES"))
|
||||
|
||||
(define %preserved-third-party-files
|
||||
'(;; 'Source/cm_getdate.c' includes archive_getdate.c wholesale, so it must
|
||||
|
@ -140,7 +138,7 @@ (define %preserved-third-party-files
|
|||
(define-public cmake-bootstrap
|
||||
(package
|
||||
(name "cmake-bootstrap")
|
||||
(version "3.19.2")
|
||||
(version "3.20.2")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "https://cmake.org/files/v"
|
||||
|
@ -148,49 +146,7 @@ (define-public cmake-bootstrap
|
|||
"/cmake-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"1w67w0ak6vf37501dlz9yhnzlvvpw1w10n2nm3hi7yxp4cxzvq73"))
|
||||
(modules '((guix build utils)
|
||||
(ice-9 ftw)))
|
||||
(snippet
|
||||
`(begin
|
||||
;; CMake bundles its dependencies in the "Utilities" directory.
|
||||
;; Delete those to ensure the system libraries are used.
|
||||
(define preserved-files
|
||||
'(,@%preserved-third-party-files
|
||||
;; Use the bundled JsonCpp during bootstrap to work around
|
||||
;; a circular dependency. TODO: JsonCpp can be built with
|
||||
;; Meson instead of CMake, but meson-build-system currently
|
||||
;; does not support cross-compilation.
|
||||
"Utilities/cmjsoncpp"
|
||||
;; LibUV is required to bootstrap the initial build system.
|
||||
"Utilities/cmlibuv"))
|
||||
|
||||
(file-system-fold (lambda (dir stat result) ;enter?
|
||||
(or (string=? "Utilities" dir) ;init
|
||||
;; The bundled dependencies are
|
||||
;; distinguished by having a "cm"
|
||||
;; prefix to their upstream names.
|
||||
(and (string-prefix? "Utilities/cm" dir)
|
||||
(not (member dir preserved-files)))))
|
||||
(lambda (file stat result) ;leaf
|
||||
(unless (or (member file preserved-files)
|
||||
;; Preserve top-level files.
|
||||
(string=? "Utilities"
|
||||
(dirname file)))
|
||||
(delete-file file)))
|
||||
(const #t) ;down
|
||||
(lambda (dir stat result) ;up
|
||||
(when (equal? (scandir dir) '("." ".."))
|
||||
(rmdir dir)))
|
||||
(const #t) ;skip
|
||||
(lambda (file stat errno result)
|
||||
(format (current-error-port)
|
||||
"warning: failed to delete ~a: ~a~%"
|
||||
file (strerror errno)))
|
||||
#t
|
||||
"Utilities"
|
||||
lstat)
|
||||
#t))
|
||||
"0kjlb7sxbwg8z4027c3jjcmyjh9d36p0r9d4nqxynyaijz5nxkxf"))
|
||||
(patches (search-patches "cmake-curl-certificates.patch"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
|
@ -290,13 +246,38 @@ (define-public cmake-minimal
|
|||
(name "cmake-minimal")
|
||||
(source (origin
|
||||
(inherit (package-source cmake-bootstrap))
|
||||
;; Purge CMakes bundled dependencies as they are no longer needed.
|
||||
(modules '((ice-9 ftw)))
|
||||
(snippet
|
||||
(match (origin-snippet (package-source cmake-bootstrap))
|
||||
((_ _ exp ...)
|
||||
;; Now we can delete the remaining software bundles.
|
||||
(append `(begin
|
||||
(define preserved-files ',%preserved-third-party-files))
|
||||
exp))))))
|
||||
`(begin
|
||||
(define preserved-files ',%preserved-third-party-files)
|
||||
|
||||
(file-system-fold (lambda (dir stat result) ;enter?
|
||||
(or (string=? "Utilities" dir) ;init
|
||||
;; The bundled dependencies are
|
||||
;; distinguished by having a "cm"
|
||||
;; prefix to their upstream names.
|
||||
(and (string-prefix? "Utilities/cm" dir)
|
||||
(not (member dir preserved-files)))))
|
||||
(lambda (file stat result) ;leaf
|
||||
(unless (or (member file preserved-files)
|
||||
;; Preserve top-level files.
|
||||
(string=? "Utilities"
|
||||
(dirname file)))
|
||||
(delete-file file)))
|
||||
(const #t) ;down
|
||||
(lambda (dir stat result) ;up
|
||||
(when (equal? (scandir dir) '("." ".."))
|
||||
(rmdir dir)))
|
||||
(const #t) ;skip
|
||||
(lambda (file stat errno result)
|
||||
(format (current-error-port)
|
||||
"warning: failed to delete ~a: ~a~%"
|
||||
file (strerror errno)))
|
||||
#t
|
||||
"Utilities"
|
||||
lstat)
|
||||
#t))))
|
||||
(inputs
|
||||
`(("jsoncpp" ,jsoncpp)
|
||||
,@(package-inputs cmake-bootstrap)))
|
||||
|
|
|
@ -716,7 +716,8 @@ (define-public mariadb
|
|||
(sha256
|
||||
(base32
|
||||
"1s3vfm73911cddjhgpcbkya6nz7ag2zygg56qqzwscn5ybv28j7b"))
|
||||
(patches (search-patches "mariadb-CVE-2021-27928.patch"))
|
||||
(patches (search-patches "mariadb-CVE-2021-27928.patch"
|
||||
"mariadb-cmake-compat.patch"))
|
||||
(modules '((guix build utils)))
|
||||
(snippet
|
||||
'(begin
|
||||
|
|
17
gnu/packages/patches/mariadb-cmake-compat.patch
Normal file
17
gnu/packages/patches/mariadb-cmake-compat.patch
Normal file
|
@ -0,0 +1,17 @@
|
|||
Fix if statement that triggers syntax error in CMake 3.20 and later.
|
||||
|
||||
Taken from upstream:
|
||||
https://github.com/mariadb-corporation/mariadb-connector-c/commit/242cab8c
|
||||
|
||||
diff --git a/libmariadb/cmake/ConnectorName.cmake b/libmariadb/cmake/ConnectorName.cmake
|
||||
--- a/libmariadb/cmake/ConnectorName.cmake
|
||||
+++ b/libmariadb/cmake/ConnectorName.cmake
|
||||
@@ -22,7 +22,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
SET(MACHINE_NAME "x64")
|
||||
ELSE()
|
||||
SET(MACHINE_NAME "32")
|
||||
- END()
|
||||
+ ENDIF()
|
||||
ENDIF()
|
||||
|
||||
SET(product_name "mysql-connector-c-${CPACK_PACKAGE_VERSION}-${PLATFORM_NAME}${CONCAT_SIGN}${MACHINE_NAME}")
|
Loading…
Reference in a new issue