[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#50299: [PATCH v4 09/25] gnu: swi-prolog: Set PROG_SWIPL when cross-c
From: |
Maxime Devos |
Subject: |
bug#50299: [PATCH v4 09/25] gnu: swi-prolog: Set PROG_SWIPL when cross-compiling. |
Date: |
Fri, 31 Dec 2021 12:14:51 +0000 |
* gnu/packages/prolog.scm
(swi-prolog)[arguments]<#:configure-flags>: Set PROG_SWIPL and
SWIPL_NATIVE_FRIEND when cross-compiling and make this a G-expression.
(swi-prolog)[native-inputs]: Add 'this-package' when cross-compiling.
---
gnu/packages/prolog.scm | 35 ++++++++++++++++++++++++++---------
1 file changed, 26 insertions(+), 9 deletions(-)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index 3eaec533d7..00f09b49cc 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -22,11 +22,13 @@
(define-module (gnu packages prolog)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
+ #:use-module (guix utils)
#:use-module (gnu packages backup)
#:use-module (gnu packages bash)
#:use-module (gnu packages compression)
@@ -100,16 +102,23 @@ manner. It also features an interactive interpreter.")
(arguments
`(#:parallel-build? #t
#:configure-flags
- (list ,@(if (%current-target-system)
- ;; Set this manually, otherwise CMake would need to
- ;; run a cross-compiled binary, which it can't do.
- ;; These values were found on a Linux system.
- '("-DBSD_SIGNALS=1" "-DQSORT_R_GNU=1"
+ ,#~(list
+ #$@(if (%current-target-system)
+ ;; Set this manually, otherwise CMake would need to
+ ;; run a cross-compiled binary, which it can't do.
+ ;; These values were found on a Linux system.
+ #~("-DBSD_SIGNALS=1" "-DQSORT_R_GNU=1"
;; If absent, the non-existent 'cc' is used.
"-DCMAKE_HOST_CC=gcc"
- '())
- "-DINSTALL_DOCUMENTATION=ON"
- "-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
+ ;; swi-prolog needs a native copy of itself for
+ ;; cross-compilation.
+ "-DSWIPL_NATIVE_FRIEND=/nowhere"
+ (string-append "-DPROG_SWIPL="
+ #+(this-package-native-input "swi-prolog")
+ "/bin/swipl"))
+ #~())
+ "-DINSTALL_DOCUMENTATION=ON"
+ "-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
#:phases
(modify-phases %standard-phases
;; XXX: Delete the test phase that attempts to write to the
@@ -125,7 +134,15 @@ manner. It also features an interactive interpreter.")
'("save")))
#t)))))
(native-inputs
- `(("texinfo" ,texinfo)
+ `(,@(if (%current-target-system)
+ (begin
+ (unless (equal? (target-64bit?)
+ (target-64bit? (%current-system)))
+ (error "swi-prolog requires --system and --target to have \
+the same word size"))
+ `(("swi-prolog" ,this-package)))
+ '())
+ ("texinfo" ,texinfo)
("perl" ,perl)
("pkg-config" ,pkg-config)))
(inputs
--
2.30.2
- bug#50299: [PATCH v4 00/25] Fix 'check-tests-true' linter and some packages, Maxime Devos, 2021/12/31
- bug#50299: [PATCH v4 05/25] gnu: swi-prolog: Run tests conditionally., Maxime Devos, 2021/12/31
- bug#50299: [PATCH v4 17/25] gnu: libicns: Run tests conditionally., Maxime Devos, 2021/12/31
- bug#50299: [PATCH v4 15/25] gnu: ecl: Run tests conditionally., Maxime Devos, 2021/12/31
- bug#50299: [PATCH v4 09/25] gnu: swi-prolog: Set PROG_SWIPL when cross-compiling.,
Maxime Devos <=
- bug#50299: [PATCH v4 13/25] gnu: ruby-ffi-rzmq: Respect #:tests?., Maxime Devos, 2021/12/31
- bug#50299: [PATCH v4 16/25] gnu: perl-unicode-utf8: Run tests conditionally., Maxime Devos, 2021/12/31
- bug#50299: [PATCH v4 22/25] gnu: pjproject: Run tests conditionally., Maxime Devos, 2021/12/31
- bug#50299: [PATCH v4 21/25] gnu: belcard: Run tests conditionally., Maxime Devos, 2021/12/31
- bug#50299: [PATCH v4 01/25] lint: check-tests-true: Allow #:tests? #t for some build systems., Maxime Devos, 2021/12/31
- bug#50299: [PATCH v4 11/25] gnu: ruby-yard-with-tests: Run tests conditionally., Maxime Devos, 2021/12/31
- bug#50299: [PATCH v4 18/25] gnu: python2-empy: Run tests conditionally., Maxime Devos, 2021/12/31
- bug#50299: [PATCH v4 20/25] gnu: lablgtk: Run tests conditionally., Maxime Devos, 2021/12/31
- bug#50299: [PATCH v4 19/25] gnu: python2-promise: Run tests conditionally., Maxime Devos, 2021/12/31
- bug#50299: [PATCH v4 25/25] gnu: ghc-bsb-http-chunked: Don't run tests when cross-compiling., Maxime Devos, 2021/12/31