From patchwork Wed Aug 21 08:54:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 15119 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 21A691724B; Wed, 21 Aug 2019 10:11:27 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id CBBF41724B for ; Wed, 21 Aug 2019 10:11:26 +0100 (BST) Received: from localhost ([::1]:46038 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0MeM-0002Ge-50 for patchwork@mira.cbaines.net; Wed, 21 Aug 2019 05:11:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59220) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0MQY-0008FD-Dw for guix-patches@gnu.org; Wed, 21 Aug 2019 04:57:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i0MQW-0005uj-GV for guix-patches@gnu.org; Wed, 21 Aug 2019 04:57:10 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54176) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i0MQV-0005t7-Ml for guix-patches@gnu.org; Wed, 21 Aug 2019 04:57:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i0MQV-0006hc-LG for guix-patches@gnu.org; Wed, 21 Aug 2019 04:57:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36477] [PATCH v2 46/61] gnu: libnl: Fix cross-compilation. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 21 Aug 2019 08:57:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36477 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 36477@debbugs.gnu.org Received: via spool by 36477-submit@debbugs.gnu.org id=B36477.156637779825547 (code B ref 36477); Wed, 21 Aug 2019 08:57:07 +0000 Received: (at 36477) by debbugs.gnu.org; 21 Aug 2019 08:56:38 +0000 Received: from localhost ([127.0.0.1]:34724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0MQ1-0006dt-Lu for submit@debbugs.gnu.org; Wed, 21 Aug 2019 04:56:38 -0400 Received: from mail-wr1-f53.google.com ([209.85.221.53]:41934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0MPC-0006TV-Bw for 36477@debbugs.gnu.org; Wed, 21 Aug 2019 04:55:51 -0400 Received: by mail-wr1-f53.google.com with SMTP id j16so1229216wrr.8 for <36477@debbugs.gnu.org>; Wed, 21 Aug 2019 01:55:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=okINyQSmSVRHzdI3lQevXFNPn35xWXx+YBIHiITo/hk=; b=Eys5EcZNVO6m+n42aPw2EL69XoUCB0yxgJmg4TfYNU8TxFV5gegB9QfMCNyUnJD2Ft 0lHovX5B1d9q0E37Z13r4U4w0OdB8GMixQo2T8iyHTvXz6I21ik9x1ickOiYb03sQCci TU9VCDDWixVq61eN0AUQ0J5nE37z3eqiTRqBxxh9JJxho3jANbQ4ku5XZiH3n/LfF8iL HoyvZ8RRgArIoVH+Erj58u5csQzsUFOU4gEDI2CK7OzU8qGHSSUew/7CWS8dCezbHVRj S3n/MLjBA303vKz8vj2ZKQGit0IRN3bBEkU4AFUmONSHdMFl45tSrbaZe7mG34XHIuNU nsgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=okINyQSmSVRHzdI3lQevXFNPn35xWXx+YBIHiITo/hk=; b=JB1iDMQKIbbXEO2uZaTHWWstrtyIeW9y99/2sBeLq/Aw4vqi3qY3aGEyhfYIttmuaE RLpiLUJRDlRT3SB3PCiGU6dlGS9QJ5IhiXx3XlH0jEYVzaijzAy6NsCW4B2I3hAGMeYg x+cmep//QhXICdRlZ0rQTx1VZhMOWHJZqw30jsPucdC7mFQIwRbgeSRkJ9mHjOF0qIDy GpokrNROF86RLminMA47s1/pNdTM7lk4L4vpcuoXFx1Ir/cpNBMVi+rjgOyVXnjVlZBM wQ7GbZWjp0s0AeBpsovikgaYoX7wcud9IRwgqMAIWg9SbU1f8ZDDcJPm7RJnrzfnBkFx 2IGw== X-Gm-Message-State: APjAAAUHC7oVGYwsLPubA7CouzzHZBeTW8uDWvJpbzRHD61R8wo+ncp0 Bkyd18Wm4TTr83GsAhnH1TrVetvZGEI= X-Google-Smtp-Source: APXvYqyYFpqmfMnfeLAwUGZckvfy9s6lRbprcRI0nrZdysRbjmj+JoCsELWp83sClGN+hB3fcvPT7A== X-Received: by 2002:a5d:5408:: with SMTP id g8mr32768782wrv.201.1566377740478; Wed, 21 Aug 2019 01:55:40 -0700 (PDT) Received: from fuji.Parrot.Biz (smtp.parrot.biz. [62.23.167.188]) by smtp.gmail.com with ESMTPSA id v3sm22110739wrq.34.2019.08.21.01.55.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2019 01:55:39 -0700 (PDT) From: Mathieu Othacehe Date: Wed, 21 Aug 2019 10:54:40 +0200 Message-Id: <20190821085455.18508-46-m.othacehe@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190821085455.18508-1-m.othacehe@gmail.com> References: <20190821085455.18508-1-m.othacehe@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pierre-Moana Levesque Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches From: Pierre-Moana Levesque * 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 cf403c46f1..7503e47805 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -36,6 +36,7 @@ ;;; Copyright © 2019 Maxim Cournoyer ;;; Copyright © 2019 Stefan Stefanović ;;; Copyright © 2019 Pierre Langlois +;;; Copyright © 2019 Pierre-Moana Levesque ;;; ;;; 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")