You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
3.4 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
  3. ;;;
  4. ;;; This file is part of GNU Guix.
  5. ;;;
  6. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  7. ;;; under the terms of the GNU General Public License as published by
  8. ;;; the Free Software Foundation; either version 3 of the License, or (at
  9. ;;; your option) any later version.
  10. ;;;
  11. ;;; GNU Guix is distributed in the hope that it will be useful, but
  12. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;;; GNU General Public License for more details.
  15. ;;;
  16. ;;; You should have received a copy of the GNU General Public License
  17. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  18. (define-module (gnu packages cmake)
  19. #:use-module (guix licenses)
  20. #:use-module (guix packages)
  21. #:use-module (guix download)
  22. #:use-module (guix build-system gnu)
  23. #:use-module (gnu packages)
  24. #:use-module (gnu packages file))
  25. (define-public cmake
  26. (package
  27. (name "cmake")
  28. (version "2.8.10.2")
  29. (source (origin
  30. (method url-fetch)
  31. (uri (string-append
  32. "http://www.cmake.org/files/v"
  33. (substring version 0
  34. (string-index version #\. (+ 1 (string-index version #\.))))
  35. "/cmake-" version ".tar.gz"))
  36. (sha256
  37. (base32 "1c8fj6i2x9sb39wc9av2ighj415mw33cxfrlfpafcvm0knrlylnf"))
  38. (patches (list (search-patch "cmake-fix-tests.patch")))))
  39. (build-system gnu-build-system)
  40. (arguments
  41. '(#:test-target "test"
  42. #:phases (alist-replace
  43. 'configure
  44. (lambda* (#:key outputs #:allow-other-keys)
  45. (let ((out (assoc-ref outputs "out")))
  46. ;; Replace "/bin/sh" by the right path in... a lot of
  47. ;; files.
  48. (substitute*
  49. '("Modules/CompilerId/Xcode-3.pbxproj.in"
  50. "Modules/CompilerId/Xcode-1.pbxproj.in"
  51. "Modules/CompilerId/Xcode-2.pbxproj.in"
  52. "Modules/CPack.RuntimeScript.in"
  53. "Source/cmakexbuild.cxx"
  54. "Source/cmGlobalXCodeGenerator.cxx"
  55. "Source/CTest/cmCTestBatchTestHandler.cxx"
  56. "Source/cmLocalUnixMakefileGenerator3.cxx"
  57. "Utilities/cmbzip2/Makefile-libbz2_so"
  58. "Utilities/Release/release_cmake.cmake"
  59. "Utilities/cmlibarchive/libarchive/archive_write_set_format_shar.c"
  60. "Tests/CMakeLists.txt")
  61. (("/bin/sh") (which "sh")))
  62. (zero? (system* "./configure"
  63. (string-append "--prefix=" out)))))
  64. %standard-phases)))
  65. (inputs
  66. `(("file" ,file)))
  67. (home-page "http://www.cmake.org/")
  68. (synopsis "Cross-platform build system")
  69. (description
  70. "CMake is a family of tools designed to build, test and package software.
  71. CMake is used to control the software compilation process using simple platform
  72. and compiler independent configuration files. CMake generates native makefiles
  73. and workspaces that can be used in the compiler environment of your choice.")
  74. (license bsd-3)))