[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
46/61: gnu: libnl: Fix cross-compilation.
From: |
guix-commits |
Subject: |
46/61: gnu: libnl: Fix cross-compilation. |
Date: |
Wed, 21 Aug 2019 04:24:56 -0400 (EDT) |
mothacehe pushed a commit to branch wip-cross-system
in repository guix.
commit da04f704d9e48b5461a218daf7a215b76631a9d0
Author: Pierre-Moana Levesque <address@hidden>
Date: Fri Aug 2 12:57:29 2019 +0200
gnu: libnl: Fix cross-compilation.
* gnu/packages/linux.scm (libnl)[native-inputs]: Add python-2 and python-3,
[arguments]: In install-python phase, use the cross-compiler and linker to
build extensions. In install-doc phase, search libnl3-doc in both inputs and
native-inputs.
---
gnu/packages/linux.scm | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index cf403c4..7503e47 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -36,6 +36,7 @@
;;; Copyright © 2019 Maxim Cournoyer <address@hidden>
;;; Copyright © 2019 Stefan Stefanović <address@hidden>
;;; Copyright © 2019 Pierre Langlois <address@hidden>
+;;; Copyright © 2019 Pierre-Moana Levesque <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1941,6 +1942,8 @@ transparently through a bridge.")
("flex" ,flex)
("pkg-config" ,pkg-config)
("swig" ,swig)
+ ("python-2" ,python-2)
+ ("python-3" ,python-3)
("libnl3-doc"
,(origin
(method url-fetch)
@@ -1961,24 +1964,27 @@ transparently through a bridge.")
#:phases
(modify-phases %standard-phases
(add-after 'install 'install-python
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda* (#:key target outputs #:allow-other-keys)
(define (python-inst python)
(invoke python "setup.py" "build")
(invoke python "setup.py" "install"
(string-append "--prefix="
(assoc-ref %outputs python)))
(invoke python "setup.py" "clean"))
+ (when target
+ (setenv "CC" (string-append target "-gcc"))
+ (setenv "LDSHARED" (string-append target "-gcc -shared")))
(setenv "LDFLAGS" (format #f "-Wl,-rpath=~a/lib"
(assoc-ref %outputs "out")))
(with-directory-excursion "./python"
(for-each python-inst '("python2" "python3")))
#t))
(add-after 'install 'install-doc
- (lambda* (#:key inputs outputs #:allow-other-keys)
+ (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
(let ((dest (string-append (assoc-ref outputs "doc")
"/share/doc/libnl")))
(mkdir-p dest)
- (invoke "tar" "xf" (assoc-ref inputs "libnl3-doc")
+ (invoke "tar" "xf" (assoc-ref (or native-inputs inputs)
"libnl3-doc")
"--strip-components=1" "-C" dest)))))))
(home-page "https://www.infradead.org/~tgr/libnl/")
(synopsis "NetLink protocol library suite")
- 21/61: gnu: mit-krb5: Fix cross-compilation., (continued)
- 21/61: gnu: mit-krb5: Fix cross-compilation., guix-commits, 2019/08/21
- 20/61: gnu: libsamplerate: Fix aarch64 cross-compilation., guix-commits, 2019/08/21
- 23/61: gnu: help2man: Fix cross-compilation., guix-commits, 2019/08/21
- 33/61: gnu: eudev: Fix cross-compilation., guix-commits, 2019/08/21
- 35/61: gnu: nghttp2: Fix cross-compilation., guix-commits, 2019/08/21
- 36/61: gnu: openldap: Fix cross-compilation., guix-commits, 2019/08/21
- 37/61: gnu: swig: Fix cross-compilation., guix-commits, 2019/08/21
- 18/61: gnu: bc: Fix cross-compilation., guix-commits, 2019/08/21
- 38/61: gnu: git: Fix cross-compilation., guix-commits, 2019/08/21
- 47/61: gnu: crda: Fix cross-compilation, guix-commits, 2019/08/21
- 46/61: gnu: libnl: Fix cross-compilation.,
guix-commits <=
- 45/61: gnu: texinfo-4: Fix cross compilation, guix-commits, 2019/08/21
- 49/61: gnu: guile-wm: Fix cross-compilation., guix-commits, 2019/08/21
- 44/61: gnu: libtool: Fix cross-compilation., guix-commits, 2019/08/21
- 50/61: gnu: cmake: Fix cross-compilation., guix-commits, 2019/08/21
- 55/61: gnu: linux-libre: Enable built-in ext4 support., guix-commits, 2019/08/21
- 58/61: utils: Use target-arm64? and target-arm? helpers., guix-commits, 2019/08/21
- 52/61: gnu: mdadm: Fix cross-compilation., guix-commits, 2019/08/21
- 54/61: linux-initrd: Use native gzip., guix-commits, 2019/08/21
- 60/61: system: vm: Support cross-compilation., guix-commits, 2019/08/21
- 57/61: gexp: Pass target to compiled-modules in lower-gexp., guix-commits, 2019/08/21