diff options
| author | Marius Bakke <marius@gnu.org> | 2021-05-09 14:38:36 +0200 |
|---|---|---|
| committer | Marius Bakke <marius@gnu.org> | 2021-05-09 23:43:32 +0200 |
| commit | 1539af46d08e6cd05712c0368e6becdcebd32d9f (patch) | |
| tree | 8619f7ccc9284de6790ed2187eac8ca33774f4d6 /gnu | |
| parent | 9e729d9a2fa8f27157424f14b281ad31a1396a22 (diff) | |
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.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/local.mk | 1 | ||||
| -rw-r--r-- | gnu/packages/cmake.scm | 89 | ||||
| -rw-r--r-- | gnu/packages/databases.scm | 3 | ||||
| -rw-r--r-- | gnu/packages/patches/mariadb-cmake-compat.patch | 17 |
4 files changed, 55 insertions, 55 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index cbaccb7f39e..9cc5a02587f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk | |||
| @@ -1375,6 +1375,7 @@ dist_patch_DATA = \ | |||
| 1375 | %D%/packages/patches/mailutils-fix-uninitialized-variable.patch \ | 1375 | %D%/packages/patches/mailutils-fix-uninitialized-variable.patch \ |
| 1376 | %D%/packages/patches/make-impure-dirs.patch \ | 1376 | %D%/packages/patches/make-impure-dirs.patch \ |
| 1377 | %D%/packages/patches/mariadb-CVE-2021-27928.patch \ | 1377 | %D%/packages/patches/mariadb-CVE-2021-27928.patch \ |
| 1378 | %D%/packages/patches/mariadb-cmake-compat.patch \ | ||
| 1378 | %D%/packages/patches/mars-install.patch \ | 1379 | %D%/packages/patches/mars-install.patch \ |
| 1379 | %D%/packages/patches/mars-sfml-2.3.patch \ | 1380 | %D%/packages/patches/mars-sfml-2.3.patch \ |
| 1380 | %D%/packages/patches/maxima-defsystem-mkdir.patch \ | 1381 | %D%/packages/patches/maxima-defsystem-mkdir.patch \ |
diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm index 8d6a0915072..68d215da93e 100644 --- a/gnu/packages/cmake.scm +++ b/gnu/packages/cmake.scm | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net> | 5 | ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net> |
| 6 | ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> | 6 | ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> |
| 7 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> | 7 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> |
| 8 | ;;; Copyright © 2017, 2018, 2020 Marius Bakke <mbakke@fastmail.com> | 8 | ;;; Copyright © 2017, 2018, 2020, 2021 Marius Bakke <marius@gnu.org> |
| 9 | ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net> | 9 | ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net> |
| 10 | ;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr> | 10 | ;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
| 11 | ;;; Copyright © 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com> | 11 | ;;; Copyright © 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
| @@ -123,9 +123,7 @@ using the CMake build system.") | |||
| 123 | ;; This test requires 'ldconfig' which is not available in Guix. | 123 | ;; This test requires 'ldconfig' which is not available in Guix. |
| 124 | "RunCMake.install" | 124 | "RunCMake.install" |
| 125 | ;; This test fails for unknown reason. | 125 | ;; This test fails for unknown reason. |
| 126 | "RunCMake.file-GET_RUNTIME_DEPENDENCIES" | 126 | "RunCMake.file-GET_RUNTIME_DEPENDENCIES")) |
| 127 | ;; This test requires the bundled libuv. | ||
| 128 | "BootstrapTest")) | ||
| 129 | 127 | ||
| 130 | (define %preserved-third-party-files | 128 | (define %preserved-third-party-files |
| 131 | '(;; 'Source/cm_getdate.c' includes archive_getdate.c wholesale, so it must | 129 | '(;; 'Source/cm_getdate.c' includes archive_getdate.c wholesale, so it must |
| @@ -140,7 +138,7 @@ using the CMake build system.") | |||
| 140 | (define-public cmake-bootstrap | 138 | (define-public cmake-bootstrap |
| 141 | (package | 139 | (package |
| 142 | (name "cmake-bootstrap") | 140 | (name "cmake-bootstrap") |
| 143 | (version "3.19.2") | 141 | (version "3.20.2") |
| 144 | (source (origin | 142 | (source (origin |
| 145 | (method url-fetch) | 143 | (method url-fetch) |
| 146 | (uri (string-append "https://cmake.org/files/v" | 144 | (uri (string-append "https://cmake.org/files/v" |
| @@ -148,49 +146,7 @@ using the CMake build system.") | |||
| 148 | "/cmake-" version ".tar.gz")) | 146 | "/cmake-" version ".tar.gz")) |
| 149 | (sha256 | 147 | (sha256 |
| 150 | (base32 | 148 | (base32 |
| 151 | "1w67w0ak6vf37501dlz9yhnzlvvpw1w10n2nm3hi7yxp4cxzvq73")) | 149 | "0kjlb7sxbwg8z4027c3jjcmyjh9d36p0r9d4nqxynyaijz5nxkxf")) |
| 152 | (modules '((guix build utils) | ||
| 153 | (ice-9 ftw))) | ||
| 154 | (snippet | ||
| 155 | `(begin | ||
| 156 | ;; CMake bundles its dependencies in the "Utilities" directory. | ||
| 157 | ;; Delete those to ensure the system libraries are used. | ||
| 158 | (define preserved-files | ||
| 159 | '(,@%preserved-third-party-files | ||
| 160 | ;; Use the bundled JsonCpp during bootstrap to work around | ||
| 161 | ;; a circular dependency. TODO: JsonCpp can be built with | ||
| 162 | ;; Meson instead of CMake, but meson-build-system currently | ||
| 163 | ;; does not support cross-compilation. | ||
| 164 | "Utilities/cmjsoncpp" | ||
| 165 | ;; LibUV is required to bootstrap the initial build system. | ||
| 166 | "Utilities/cmlibuv")) | ||
| 167 | |||
| 168 | (file-system-fold (lambda (dir stat result) ;enter? | ||
| 169 | (or (string=? "Utilities" dir) ;init | ||
| 170 | ;; The bundled dependencies are | ||
| 171 | ;; distinguished by having a "cm" | ||
| 172 | ;; prefix to their upstream names. | ||
| 173 | (and (string-prefix? "Utilities/cm" dir) | ||
| 174 | (not (member dir preserved-files))))) | ||
| 175 | (lambda (file stat result) ;leaf | ||
| 176 | (unless (or (member file preserved-files) | ||
| 177 | ;; Preserve top-level files. | ||
| 178 | (string=? "Utilities" | ||
| 179 | (dirname file))) | ||
| 180 | (delete-file file))) | ||
| 181 | (const #t) ;down | ||
| 182 | (lambda (dir stat result) ;up | ||
| 183 | (when (equal? (scandir dir) '("." "..")) | ||
| 184 | (rmdir dir))) | ||
| 185 | (const #t) ;skip | ||
| 186 | (lambda (file stat errno result) | ||
| 187 | (format (current-error-port) | ||
| 188 | "warning: failed to delete ~a: ~a~%" | ||
| 189 | file (strerror errno))) | ||
| 190 | #t | ||
| 191 | "Utilities" | ||
| 192 | lstat) | ||
| 193 | #t)) | ||
| 194 | (patches (search-patches "cmake-curl-certificates.patch")))) | 150 | (patches (search-patches "cmake-curl-certificates.patch")))) |
| 195 | (build-system gnu-build-system) | 151 | (build-system gnu-build-system) |
| 196 | (arguments | 152 | (arguments |
| @@ -290,13 +246,38 @@ and workspaces that can be used in the compiler environment of your choice.") | |||
| 290 | (name "cmake-minimal") | 246 | (name "cmake-minimal") |
| 291 | (source (origin | 247 | (source (origin |
| 292 | (inherit (package-source cmake-bootstrap)) | 248 | (inherit (package-source cmake-bootstrap)) |
| 249 | ;; Purge CMakes bundled dependencies as they are no longer needed. | ||
| 250 | (modules '((ice-9 ftw))) | ||
| 293 | (snippet | 251 | (snippet |
| 294 | (match (origin-snippet (package-source cmake-bootstrap)) | 252 | `(begin |
| 295 | ((_ _ exp ...) | 253 | (define preserved-files ',%preserved-third-party-files) |
| 296 | ;; Now we can delete the remaining software bundles. | 254 | |
| 297 | (append `(begin | 255 | (file-system-fold (lambda (dir stat result) ;enter? |
| 298 | (define preserved-files ',%preserved-third-party-files)) | 256 | (or (string=? "Utilities" dir) ;init |
| 299 | exp)))))) | 257 | ;; The bundled dependencies are |
| 258 | ;; distinguished by having a "cm" | ||
| 259 | ;; prefix to their upstream names. | ||
| 260 | (and (string-prefix? "Utilities/cm" dir) | ||
| 261 | (not (member dir preserved-files))))) | ||
| 262 | (lambda (file stat result) ;leaf | ||
| 263 | (unless (or (member file preserved-files) | ||
| 264 | ;; Preserve top-level files. | ||
| 265 | (string=? "Utilities" | ||
| 266 | (dirname file))) | ||
| 267 | (delete-file file))) | ||
| 268 | (const #t) ;down | ||
| 269 | (lambda (dir stat result) ;up | ||
| 270 | (when (equal? (scandir dir) '("." "..")) | ||
| 271 | (rmdir dir))) | ||
| 272 | (const #t) ;skip | ||
| 273 | (lambda (file stat errno result) | ||
| 274 | (format (current-error-port) | ||
| 275 | "warning: failed to delete ~a: ~a~%" | ||
| 276 | file (strerror errno))) | ||
| 277 | #t | ||
| 278 | "Utilities" | ||
| 279 | lstat) | ||
| 280 | #t)))) | ||
| 300 | (inputs | 281 | (inputs |
| 301 | `(("jsoncpp" ,jsoncpp) | 282 | `(("jsoncpp" ,jsoncpp) |
| 302 | ,@(package-inputs cmake-bootstrap))) | 283 | ,@(package-inputs cmake-bootstrap))) |
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index c1cd31fc730..b41a68e4fbf 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm | |||
| @@ -716,7 +716,8 @@ Language.") | |||
| 716 | (sha256 | 716 | (sha256 |
| 717 | (base32 | 717 | (base32 |
| 718 | "1s3vfm73911cddjhgpcbkya6nz7ag2zygg56qqzwscn5ybv28j7b")) | 718 | "1s3vfm73911cddjhgpcbkya6nz7ag2zygg56qqzwscn5ybv28j7b")) |
| 719 | (patches (search-patches "mariadb-CVE-2021-27928.patch")) | 719 | (patches (search-patches "mariadb-CVE-2021-27928.patch" |
| 720 | "mariadb-cmake-compat.patch")) | ||
| 720 | (modules '((guix build utils))) | 721 | (modules '((guix build utils))) |
| 721 | (snippet | 722 | (snippet |
| 722 | '(begin | 723 | '(begin |
diff --git a/gnu/packages/patches/mariadb-cmake-compat.patch b/gnu/packages/patches/mariadb-cmake-compat.patch new file mode 100644 index 00000000000..44b0daa1866 --- /dev/null +++ b/gnu/packages/patches/mariadb-cmake-compat.patch | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | Fix if statement that triggers syntax error in CMake 3.20 and later. | ||
| 2 | |||
| 3 | Taken from upstream: | ||
| 4 | https://github.com/mariadb-corporation/mariadb-connector-c/commit/242cab8c | ||
| 5 | |||
| 6 | diff --git a/libmariadb/cmake/ConnectorName.cmake b/libmariadb/cmake/ConnectorName.cmake | ||
| 7 | --- a/libmariadb/cmake/ConnectorName.cmake | ||
| 8 | +++ b/libmariadb/cmake/ConnectorName.cmake | ||
| 9 | @@ -22,7 +22,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Windows") | ||
| 10 | SET(MACHINE_NAME "x64") | ||
| 11 | ELSE() | ||
| 12 | SET(MACHINE_NAME "32") | ||
| 13 | - END() | ||
| 14 | + ENDIF() | ||
| 15 | ENDIF() | ||
| 16 | |||
| 17 | SET(product_name "mysql-connector-c-${CPACK_PACKAGE_VERSION}-${PLATFORM_NAME}${CONCAT_SIGN}${MACHINE_NAME}") \ No newline at end of file | ||
