gnu: gcj: Conditionally apply patch for armhf.
* gnu/packages/gcc.scm (gcj)[source]: Inherit from "gcc" package. [native-inputs]: Conditionally add arm-patch. [arguments]: Conditionally add phase "apply-arm-patch".
This commit is contained in:
parent
1d60f7c2b3
commit
7edd195ac8
|
@ -522,9 +522,6 @@ as the 'native-search-paths' field."
|
||||||
(package (inherit gcc)
|
(package (inherit gcc)
|
||||||
(name "gcj")
|
(name "gcj")
|
||||||
(version (package-version gcc))
|
(version (package-version gcc))
|
||||||
(source (origin (inherit (package-source gcc))
|
|
||||||
(patches (cons (search-patch "gcj-arm-mode.patch")
|
|
||||||
(origin-patches (package-source gcc))))))
|
|
||||||
(inputs
|
(inputs
|
||||||
`(("fastjar" ,fastjar)
|
`(("fastjar" ,fastjar)
|
||||||
("perl" ,perl)
|
("perl" ,perl)
|
||||||
|
@ -533,6 +530,15 @@ as the 'native-search-paths' field."
|
||||||
,@(package-inputs gcc)))
|
,@(package-inputs gcc)))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("dejagnu" ,dejagnu)
|
`(("dejagnu" ,dejagnu)
|
||||||
|
,@(if (string-prefix? "armhf" (or (%current-system)
|
||||||
|
(%current-target-system)))
|
||||||
|
`(("arm-patch" ,(origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (search-patch "gcj-arm-mode.patch"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"1z15xs5yx6qinnb572swzxrn9f668sw7ga5280q3gznj1jyrynfn")))))
|
||||||
|
'())
|
||||||
,@(package-native-inputs gcc)))
|
,@(package-native-inputs gcc)))
|
||||||
(native-search-paths %generic-search-paths)
|
(native-search-paths %generic-search-paths)
|
||||||
|
|
||||||
|
@ -560,6 +566,14 @@ as the 'native-search-paths' field."
|
||||||
,flags))))
|
,flags))))
|
||||||
((#:phases phases)
|
((#:phases phases)
|
||||||
`(modify-phases ,phases
|
`(modify-phases ,phases
|
||||||
|
;; Conditionally add phase to apply patch
|
||||||
|
,@(if (string-prefix? "armhf" (or (%current-system)
|
||||||
|
(%current-target-system)))
|
||||||
|
`((add-after 'unpack 'apply-arm-patch
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(zero? (system* "patch" "-p1"
|
||||||
|
"-i" (assoc-ref inputs "arm-patch"))))))
|
||||||
|
'())
|
||||||
(add-after
|
(add-after
|
||||||
'unpack 'add-lib-output-to-rpath
|
'unpack 'add-lib-output-to-rpath
|
||||||
(lambda _
|
(lambda _
|
||||||
|
|
Loading…
Reference in New Issue