From patchwork Tue Oct 29 16:02:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Dong X-Patchwork-Id: 15884 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 61CD61768E; Tue, 29 Oct 2019 16:05:52 +0000 (GMT) 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,RCVD_IN_MSPIKE_H2, T_DKIM_INVALID 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 2AD2E17607 for ; Tue, 29 Oct 2019 16:05:52 +0000 (GMT) Received: from localhost ([::1]:59356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPU0F-00028f-Hr for patchwork@mira.cbaines.net; Tue, 29 Oct 2019 12:05:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47425) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPTxY-0007r8-Mo for guix-patches@gnu.org; Tue, 29 Oct 2019 12:03:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPTxX-0003f3-IH for guix-patches@gnu.org; Tue, 29 Oct 2019 12:03:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39719) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iPTxX-0003ej-1s for guix-patches@gnu.org; Tue, 29 Oct 2019 12:03:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iPTxV-0004yN-U1 for guix-patches@gnu.org; Tue, 29 Oct 2019 12:03:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#37870] [PATCH v2] gnu: make-nsis: Fix cross-compilation. References: In-Reply-To: Resent-From: Carl Dong Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 29 Oct 2019 16:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37870 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "37870@debbugs.gnu.org" <37870@debbugs.gnu.org> Received: via spool by 37870-submit@debbugs.gnu.org id=B37870.157236493819051 (code B ref 37870); Tue, 29 Oct 2019 16:03:01 +0000 Received: (at 37870) by debbugs.gnu.org; 29 Oct 2019 16:02:18 +0000 Received: from localhost ([127.0.0.1]:48540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPTwo-0004xC-EE for submit@debbugs.gnu.org; Tue, 29 Oct 2019 12:02:18 -0400 Received: from mail-40132.protonmail.ch ([185.70.40.132]:17521) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPTwi-0004wv-SJ for 37870@debbugs.gnu.org; Tue, 29 Oct 2019 12:02:16 -0400 Date: Tue, 29 Oct 2019 16:02:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=carldong.me; s=protonmail; t=1572364924; bh=KnVOWJfxD9fpiLQVDdNkZcCIiQhesYNDiTDlqtsnVks=; h=Date:To:From:Reply-To:Subject:Feedback-ID:From; b=BZlhQ/DsxqPEGUV3gz22LBr95KRbp9RfrTHjPdyMY20Ao1qlgBZjXCcEfm9lLM9CL Nq0VFf+O9/2iWSiSnOxyIV4Kak34L82WD6sRtC3m/nbv8ikWOUc3RjA4WxwZHg2XX0 D160QNVkotk+1yWi5qotX40NxotlwWWyaik/D8xc= From: Carl Dong Message-ID: Feedback-ID: a8j8tDUaJ4AYuDVBywMTwsJebN4w8TVXadJLsJb8td3t3dZi9RdXFlPaQvoFKnI9KgXySsPXcRkajVyY0cGTcA==:Ext:ProtonMail 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: , Reply-To: Carl Dong Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Updated the patch to make it look a little better :-) Will push to master tomorrow if no objections. ----- * gnu/packages/installers.scm (make-nsis)[arguments]: Enforce correct ordering of search paths (mingw-w64 last). --- gnu/packages/installers.scm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) -- 2.23.0 diff --git a/gnu/packages/installers.scm b/gnu/packages/installers.scm index c987254d61..035d38ac5a 100644 --- a/gnu/packages/installers.scm +++ b/gnu/packages/installers.scm @@ -48,6 +48,7 @@ (arguments `(#:scons ,scons-python2 #:modules ((srfi srfi-1) + (srfi srfi-26) (guix build utils) (guix build scons-build-system)) #:tests? #f @@ -92,7 +93,19 @@ ;; CROSS_-prefixed version of env vars (setenv (string-append "CROSS_" env-name) (filter-delimited-string env-val mingw-path?)))) - '("CPLUS_INCLUDE_PATH" "LIBRARY_PATH" "C_INCLUDE_PATH")))) + '("CPATH" "LIBRARY_PATH")) + ;; Hack to place mingw-w64 path at the end of search + ;; paths. Could probably use a specfile and dirafter + (setenv "CROSS_CPLUS_INCLUDE_PATH" + (string-join + `(,@(map (cut string-append (assoc-ref %build-inputs "xgcc") <>) + `("/include/c++" + ,(string-append "/include/c++/" ,triplet) + "/include/c++/backward" + "/lib/gcc/x86_64-w64-mingw32/7.4.0/include" + "/lib/gcc/x86_64-w64-mingw32/7.4.0/include-fixed")) + ,(getenv "CROSS_CPATH")) + ":")))) (add-before 'build 'fix-target-detection (lambda _ ;; NSIS target detection is screwed up, manually