[bug#49672,v2,6/6] gnu: Fix check of ‘%current-system’ and ‘%current-target-system’
Commit Message
The order of the check is important because ‘%current-system’ is always
defined, while ‘%current-target-system’ is only defined when
cross-building.
Therefore, it’s important to check ‘%current-target-system’ first,
otherwise the cross target is never considered.
* gnu/packages/crypto.scm (libb2)[arguments]<#:configure-flags>: Check
‘%current-target-system’ first.
* gnu/packages/java.scm (jamvm-1-bootstrap)[arguments]<#:phases>: Likewise.
[native-inputs]: Likewise.
(ant-bootstrap)[arguments]<#:phases>: Likewise.
(classpath-jamvm-wrappers)[arguments]<#:builder>: Likewise.
* gnu/packages/photo.scm (lensfun)[arguments]<#:configure-flags>: Likewise.
* gnu/packages/php.scm (php)[arguments]<#:phases>: Likewise.
* gnu/packages/sdl.scm (sdl-gfx)[arguments]<#:configure-flags>: Likewise.
* gnu/packages/telephony.scm (pjproject)[arguments]<#:configure-flags>: Likewise.
---
gnu/packages/crypto.scm | 4 ++--
gnu/packages/java.scm | 16 ++++++++--------
gnu/packages/photo.scm | 4 ++--
gnu/packages/php.scm | 4 ++--
gnu/packages/sdl.scm | 4 ++--
gnu/packages/telephony.scm | 4 ++--
6 files changed, 18 insertions(+), 18 deletions(-)
@@ -826,8 +826,8 @@ (define-public libb2
(arguments
`(#:configure-flags
(list
- ,@(if (any (cute string-prefix? <> (or (%current-system)
- (%current-target-system)))
+ ,@(if (any (cute string-prefix? <> (or (%current-target-system)
+ (%current-system)))
'("x86_64" "i686"))
;; fat only checks for Intel optimisations
'("--enable-fat")
@@ -207,8 +207,8 @@ (define jamvm-1-bootstrap
"--enable-runtime-reloc-checks"
"--enable-ffi")
#:phases
- ,(if (string-prefix? "aarch64" (or (%current-system)
- (%current-target-system)))
+ ,(if (string-prefix? "aarch64" (or (%current-target-system)
+ (%current-system)))
;; Makefiles and the configure script need to be regenerated to
;; incorporate support for AArch64.
'(modify-phases %standard-phases
@@ -218,8 +218,8 @@ (define jamvm-1-bootstrap
(inputs
(list classpath-bootstrap jikes libffi zip zlib))
(native-inputs
- (if (string-prefix? "aarch64" (or (%current-system)
- (%current-target-system)))
+ (if (string-prefix? "aarch64" (or (%current-target-system)
+ (%current-system)))
;; Additional packages needed for autoreconf.
`(("autoconf" ,autoconf)
("automake" ,automake)
@@ -285,8 +285,8 @@ (define ant-bootstrap
;; Without these JamVM options the build may freeze.
(substitute* "bootstrap.sh"
(("^\"\\$\\{JAVACMD\\}\" " m)
- ,@(if (string-prefix? "armhf" (or (%current-system)
- (%current-target-system)))
+ ,@(if (string-prefix? "armhf" (or (%current-target-system)
+ (%current-system)))
`((string-append m "-Xnocompact "))
`((string-append m "-Xnocompact -Xnoinlining ")))))
@@ -535,8 +535,8 @@ (define classpath-jamvm-wrappers
(for-each (lambda (tool)
(with-output-to-file (string-append bin tool)
(lambda _
- #$@(if (string-prefix? "armhf" (or (%current-system)
- (%current-target-system)))
+ #$@(if (string-prefix? "armhf" (or (%current-target-system)
+ (%current-system)))
`((format #t "#!~a/bin/sh
~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
gnu.classpath.tools.~a.~a $@"
@@ -426,8 +426,8 @@ (define-public lensfun
"0cfk8jjhs9nbfjfdy98plrj9ayi59aph0nx6ppslgjhlcvacm2xf"))))
(build-system cmake-build-system)
(arguments
- `(,@(if (any (cute string-prefix? <> (or (%current-system)
- (%current-target-system)))
+ `(,@(if (any (cute string-prefix? <> (or (%current-target-system)
+ (%current-system)))
'("x86_64" "i686"))
;; SSE and SSE2 are supported only on Intel processors.
'()
@@ -177,8 +177,8 @@ (define-public php
(substitute* "ext/standard/tests/streams/bug60602.phpt"
(("'ls'") (string-append "'" (which "ls") "'")))
- ,@(if (string-prefix? "arm" (or (%current-system)
- (%current-target-system)))
+ ,@(if (string-prefix? "arm" (or (%current-target-system)
+ (%current-system)))
;; Drop tests known to fail on armhf.
'((for-each delete-file
(list
@@ -198,8 +198,8 @@ (define-public sdl-gfx
(build-system gnu-build-system)
(outputs '("out" "debug"))
(arguments
- `(,@(if (any (cute string-prefix? <> (or (%current-system)
- (%current-target-system)))
+ `(,@(if (any (cute string-prefix? <> (or (%current-target-system)
+ (%current-system)))
'("x86_64" "i686"))
;; mmx is supported only on Intel processors.
'()
@@ -755,8 +755,8 @@ (define-public pjproject
"--with-external-srtp"
"--with-external-pa"
;; The following flag is Linux specific.
- ,@(if (string-contains (or (%current-system)
- (%current-target-system)) "linux")
+ ,@(if (string-contains (or (%current-target-system)
+ (%current-system)) "linux")
'("--enable-epoll")
'())
"--with-gnutls" ;disable OpenSSL checks