gnu: cmake: Use 'modify-phases'.
* gnu/packages/cmake.scm (cmake)[arguments]: Use 'modify-phases'.master
parent
28b49c0791
commit
6e261af1e7
|
@ -50,67 +50,62 @@
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:test-target "test"
|
`(#:test-target "test"
|
||||||
#:phases (alist-cons-before
|
#:phases
|
||||||
'configure 'patch-bin-sh
|
(modify-phases %standard-phases
|
||||||
(lambda _
|
(add-before 'configure 'patch-bin-sh
|
||||||
;; Replace "/bin/sh" by the right path in... a lot of
|
(lambda _
|
||||||
;; files.
|
;; Replace "/bin/sh" by the right path in... a lot of
|
||||||
(substitute*
|
;; files.
|
||||||
'("Modules/CompilerId/Xcode-3.pbxproj.in"
|
(substitute*
|
||||||
"Modules/CompilerId/Xcode-1.pbxproj.in"
|
'("Modules/CompilerId/Xcode-3.pbxproj.in"
|
||||||
"Modules/CompilerId/Xcode-2.pbxproj.in"
|
"Modules/CompilerId/Xcode-1.pbxproj.in"
|
||||||
"Modules/CPack.RuntimeScript.in"
|
"Modules/CompilerId/Xcode-2.pbxproj.in"
|
||||||
"Source/cmakexbuild.cxx"
|
"Modules/CPack.RuntimeScript.in"
|
||||||
"Source/cmGlobalXCodeGenerator.cxx"
|
"Source/cmakexbuild.cxx"
|
||||||
"Source/CTest/cmCTestBatchTestHandler.cxx"
|
"Source/cmGlobalXCodeGenerator.cxx"
|
||||||
"Source/cmLocalUnixMakefileGenerator3.cxx"
|
"Source/CTest/cmCTestBatchTestHandler.cxx"
|
||||||
"Source/cmExecProgramCommand.cxx"
|
"Source/cmLocalUnixMakefileGenerator3.cxx"
|
||||||
"Utilities/cmbzip2/Makefile-libbz2_so"
|
"Source/cmExecProgramCommand.cxx"
|
||||||
"Utilities/Release/release_cmake.cmake"
|
"Utilities/cmbzip2/Makefile-libbz2_so"
|
||||||
"Utilities/cmlibarchive/libarchive/\
|
"Utilities/Release/release_cmake.cmake"
|
||||||
archive_write_set_format_shar.c"
|
"Utilities/cmlibarchive/libarchive/archive_write_set_format_shar.c"
|
||||||
"Tests/CMakeLists.txt"
|
"Tests/CMakeLists.txt"
|
||||||
"Tests/RunCMake/File_Generate/RunCMakeTest.cmake")
|
"Tests/RunCMake/File_Generate/RunCMakeTest.cmake")
|
||||||
(("/bin/sh") (which "sh"))))
|
(("/bin/sh") (which "sh")))))
|
||||||
(alist-cons-before
|
(add-before 'configure 'set-paths
|
||||||
'configure 'set-paths
|
(lambda _
|
||||||
(lambda _
|
;; Help cmake's bootstrap process to find system libraries
|
||||||
;; Help cmake's bootstrap process to find system libraries
|
(begin
|
||||||
(begin
|
(setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
|
||||||
(setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
|
(setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
|
||||||
(setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
|
;; Get verbose output from failed tests
|
||||||
;; Get verbose output from failed tests
|
(setenv "CTEST_OUTPUT_ON_FAILURE" "TRUE"))))
|
||||||
(setenv "CTEST_OUTPUT_ON_FAILURE" "TRUE")))
|
(replace 'configure
|
||||||
(alist-replace
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
'configure
|
(let ((out (assoc-ref outputs "out")))
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(zero? (system*
|
||||||
(let ((out (assoc-ref outputs "out")))
|
"./configure"
|
||||||
(zero? (system*
|
(string-append "--prefix=" out)
|
||||||
"./configure"
|
"--system-libs"
|
||||||
(string-append "--prefix=" out)
|
"--no-system-jsoncpp" ; not packaged yet
|
||||||
"--system-libs"
|
;; By default, the man pages and other docs land
|
||||||
"--no-system-jsoncpp" ; not packaged yet
|
;; in PREFIX/man and PREFIX/doc, but we want them
|
||||||
;; By default, the man pages and other docs land
|
;; in share/{man,doc}. Note that unlike
|
||||||
;; in PREFIX/man and PREFIX/doc, but we want them
|
;; autoconf-generated configure scripts, cmake's
|
||||||
;; in share/{man,doc}. Note that unlike
|
;; configure prepends "PREFIX/" to what we pass
|
||||||
;; autoconf-generated configure scripts, cmake's
|
;; to --mandir and --docdir.
|
||||||
;; configure prepends "PREFIX/" to what we pass
|
"--mandir=share/man"
|
||||||
;; to --mandir and --docdir.
|
,(string-append
|
||||||
"--mandir=share/man"
|
"--docdir=share/doc/cmake-"
|
||||||
,(string-append
|
(version-major+minor version)))))))
|
||||||
"--docdir=share/doc/cmake-"
|
(add-after 'unpack 'remove-libarchive-version-test
|
||||||
(version-major+minor version))))))
|
; This test check has been failing consistantly over libarchive 3.2.x
|
||||||
(alist-cons-after
|
; and cmake 3.4.x and 3.5.x so we disable it for now
|
||||||
'unpack 'remove-libarchive-version-test
|
(lambda _
|
||||||
; This test check has been failing consistantly over
|
(substitute*
|
||||||
; libarchive 3.2.x and cmake 3.4.x and 3.5.x so we
|
"Tests/CMakeOnly/AllFindModules/CMakeLists.txt"
|
||||||
; disable it for now
|
(("LibArchive") ""))
|
||||||
(lambda _
|
#t)))))
|
||||||
(substitute*
|
|
||||||
"Tests/CMakeOnly/AllFindModules/CMakeLists.txt"
|
|
||||||
(("LibArchive") ""))
|
|
||||||
#t)
|
|
||||||
%standard-phases))))))
|
|
||||||
(inputs
|
(inputs
|
||||||
`(("file" ,file)
|
`(("file" ,file)
|
||||||
("curl" ,curl)
|
("curl" ,curl)
|
||||||
|
|
Reference in New Issue