mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-27 04:59:27 -05:00
gnu: libgit2: Fix cross compilation.
* gnu/packages/version-control.scm (libgit2)[arguments]: Set PKG_CONFIG_EXECUTABLE variable when cross-compiling. Also do not run test suite if cross-compiling.
This commit is contained in:
parent
078784ce7c
commit
bc5ae287b7
1 changed files with 14 additions and 3 deletions
|
@ -545,7 +545,14 @@ (define-public libgit2
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(outputs '("out" "debug"))
|
(outputs '("out" "debug"))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:configure-flags '("-DUSE_SHA1DC=ON") ; SHA-1 collision detection
|
`(#:configure-flags
|
||||||
|
(list "-DUSE_SHA1DC=ON" ; SHA-1 collision detection
|
||||||
|
,@(if (%current-target-system)
|
||||||
|
`((string-append
|
||||||
|
"-DPKG_CONFIG_EXECUTABLE="
|
||||||
|
(assoc-ref %build-inputs "pkg-config")
|
||||||
|
"/bin/" ,(%current-target-system) "-pkg-config"))
|
||||||
|
'()))
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'fix-hardcoded-paths
|
(add-after 'unpack 'fix-hardcoded-paths
|
||||||
|
@ -560,9 +567,13 @@ (define-public libgit2
|
||||||
(lambda _
|
(lambda _
|
||||||
(for-each make-file-writable (find-files "."))
|
(for-each make-file-writable (find-files "."))
|
||||||
#t))
|
#t))
|
||||||
;; Run checks more verbosely.
|
;; Run checks more verbosely, unless we are cross-compiling.
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda _ (invoke "./libgit2_clar" "-v" "-Q"))))))
|
(lambda* (#:key (tests? #t) #:allow-other-keys)
|
||||||
|
(if tests?
|
||||||
|
(invoke "./libgit2_clar" "-v" "-Q")
|
||||||
|
;; Tests may be disabled if cross-compiling.
|
||||||
|
(format #t "Test suite not run.~%")))))))
|
||||||
(inputs
|
(inputs
|
||||||
`(("libssh2" ,libssh2)
|
`(("libssh2" ,libssh2)
|
||||||
("http-parser" ,http-parser)))
|
("http-parser" ,http-parser)))
|
||||||
|
|
Loading…
Reference in a new issue