From patchwork Wed Feb 24 20:42:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Dong X-Patchwork-Id: 27298 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 7F2EE27BC4B; Wed, 24 Feb 2021 20:43:15 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B579427BC4A for ; Wed, 24 Feb 2021 20:43:14 +0000 (GMT) Received: from localhost ([::1]:58082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lF105-0001C2-O7 for patchwork@mira.cbaines.net; Wed, 24 Feb 2021 15:43:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lF0zu-0001AZ-NC for guix-patches@gnu.org; Wed, 24 Feb 2021 15:43:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:52741) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lF0zu-0007xL-Ff for guix-patches@gnu.org; Wed, 24 Feb 2021 15:43:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lF0zu-0006bH-DM for guix-patches@gnu.org; Wed, 24 Feb 2021 15:43:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46740] [PATCH] gnu: make-nsis: Fix build Resent-From: Carl Dong Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 24 Feb 2021 20:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46740 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: 46740@debbugs.gnu.org Received: via spool by 46740-submit@debbugs.gnu.org id=B46740.161419933125290 (code B ref 46740); Wed, 24 Feb 2021 20:43:02 +0000 Received: (at 46740) by debbugs.gnu.org; 24 Feb 2021 20:42:11 +0000 Received: from localhost ([127.0.0.1]:36054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lF0z4-0006Zq-VK for submit@debbugs.gnu.org; Wed, 24 Feb 2021 15:42:11 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:37587) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lF0z2-0006Zc-LN for 46740@debbugs.gnu.org; Wed, 24 Feb 2021 15:42:09 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 881BB5C008D; Wed, 24 Feb 2021 15:42:03 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 24 Feb 2021 15:42:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=carldong.me; h= from:message-id:content-type:mime-version:subject:date :in-reply-to:cc:to:references; s=fm3; bh=D7uIUd//CCTo6ZRW9/exnrV 4AqzQE3kB9pwQ9rQZFXE=; b=Vvjmhtb2VzJJG8f64gY4t1OYIuHhSdMQCj9wCtD rV+5GKmEEv25HlXYZbkmQagdx3PUEXPruwOOo9Wc+Si5cie/nzyHs8SkNeurf8v9 G0mnA+c1u2E/Y3N9g4x+hnKlEXGooai5yphqm2b3EBLiIMoUP2fZDmhLfDRW6lf+ tPX2R87ZHHpQcf7Ct0eVhJEyyFLJvzvfSSKfjYYo9ndmvp5j6MBk7mrokUafLVfx 9Ou8OZzTkwfRU2P1eD66omYYC0iXI9y7SKgx6gzXy/H1/2JWVGhHil4bE9nHCpQT rIvcBB8BcMY6PZBvrippbjzkM+SNe6hDfeFd4scDCGyk+ww== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=D7uIUd //CCTo6ZRW9/exnrV4AqzQE3kB9pwQ9rQZFXE=; b=Jil/LHmJ3LueKI8fpD8LUE V7CZYFBigY4JO8ATCpjURc86JlwZfLHlDaWUWC84cH2yQXtDaK+BG+eWtM1yCnV1 pP3O0oM3rzbwfTa5kCe3AmFFyEU+Z/o5/IoDu0sSM4lgs8rXbGQzn2xuHepJGJEK 9BDcB8T/AtiiIRe62Rm95V1OKiPeIHx0kqxJtSYHCpiQHBzv1t+sT5RKTfrgBaTG +GBoFBTzP7SRmYtS1Of7ItpAZK2wL7GEjXMyBVU0FtmY3Kw5d7x5SyaQhHeAoO/+ qk2ox2A6cnRAHmlOkNmLBJ5hfXwbfAxQ8Di4huYP7/7h5l1Rk8PKYODagKvFPsIg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrkeejgddufeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhkfgtggfuffgjvfhfofesghdtmh erhhdtvdenucfhrhhomhepvegrrhhlucffohhnghcuoegtohhnthgrtghtsegtrghrlhgu ohhnghdrmhgvqeenucggtffrrghtthgvrhhnpeefleehkeeuieevvdelfedtvdeihfejke duvdfhhfekieevuefhueehieektdfggeenucffohhmrghinhepshhouhhrtggvfhhorhhg vgdrnhgvthdptggsrghinhgvshdrnhgvthenucfkphepleeirddvfeelrddujedrvdegvd enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegtohhn thgrtghtsegtrghrlhguohhnghdrmhgv X-ME-Proxy: Received: from [192.168.0.6] (pool-96-239-17-242.nycmny.fios.verizon.net [96.239.17.242]) by mail.messagingengine.com (Postfix) with ESMTPA id E137B24005B; Wed, 24 Feb 2021 15:42:02 -0500 (EST) From: Carl Dong Message-Id: Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Date: Wed, 24 Feb 2021 15:42:01 -0500 In-Reply-To: <87ft1lluu4.fsf@cbaines.net> References: <20210224030050.457744-1-contact@carldong.me> <87ft1lluu4.fsf@cbaines.net> X-Mailer: Apple Mail (2.3608.120.23.2.4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi Chris! Been a while since I last submitted a patch, so want to make sure I get this right :-) Thanks for your help! Does this look alright? From 6b4460bdb64db6f7f9f33c80710bc7020b8fd1f0 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Wed, 3 Feb 2021 20:21:31 +0000 Subject: [PATCH] gnu: make-nsis: Fix build * gnu/packages/installers.scm (make-nsis)[arguments]: Use C{,PLUS}_INCLUDE_PATH instead of CPATH environment variable to fix build. --- gnu/packages/installers.scm | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) -- 2.30.1 Cheers, Carl Dong contact@carldong.me "I fight for the users" > On Feb 24, 2021, at 3:43 AM, Christopher Baines wrote: > > > Carl Dong writes: > >> * gnu/packages/installers.scm (make-nsis)[arguments]: Use >> C{,PLUS}_INCLUDE_PATH instead of CPATH environment variable to fix >> build. >> --- >> gnu/packages/installers.scm | 13 +++++++++++-- >> 1 file changed, 11 insertions(+), 2 deletions(-) >> >> diff --git a/gnu/packages/installers.scm b/gnu/packages/installers.scm >> index a8a5c36a18..e8196b27d0 100644 >> --- a/gnu/packages/installers.scm >> +++ b/gnu/packages/installers.scm >> @@ -96,9 +96,18 @@ >> ;; CROSS_-prefixed version of env vars >> (setenv (string-append "CROSS_" env-name) >> (filter-delimited-string env-val mingw-path?)))) >> - '("CPATH" "LIBRARY_PATH")) >> + '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH" "LIBRARY_PATH")) >> ;; Hack to place mingw-w64 path at the end of search >> ;; paths. Could probably use a specfile and dirafter >> + (setenv "CROSS_C_INCLUDE_PATH" >> + (string-join >> + `(,@(map (cut string-append (assoc-ref %build-inputs "xgcc") >> + "/lib/gcc/" ,triplet "/" >> + ,(package-version xgcc) <>) >> + '("/include" >> + "/include-fixed")) >> + ,(getenv "CROSS_C_INCLUDE_PATH")) >> + ":")) >> (setenv "CROSS_CPLUS_INCLUDE_PATH" >> (string-join >> `(,@(map (cut string-append (assoc-ref %build-inputs "xgcc") <>) >> @@ -108,7 +117,7 @@ >> ,@(map (cut string-append "/lib/gcc/" ,triplet "/" ,(package-version xgcc) <>) >> '("/include" >> "/include-fixed")))) >> - ,(getenv "CROSS_CPATH")) >> + ,(getenv "CROSS_CPLUS_INCLUDE_PATH")) >> ":")))) >> (add-before 'build 'fix-target-detection >> (lambda _ > > Hey! > > Looks like this does fix things which is great [1], but it also > introduces some lint warnings [2]. > > 1: https://data.guix-patches.cbaines.net/compare/package-derivations?base_commit=c418c6b64cbfa7a4eb1bfb7d02a99083103dd40e&target_commit=28d1e194346b3dae2ae4e969c00724d4d1037ff4&locale=en_US.UTF-8 > 2: https://data.guix-patches.cbaines.net/compare?base_commit=c418c6b64cbfa7a4eb1bfb7d02a99083103dd40e&target_commit=28d1e194346b3dae2ae4e969c00724d4d1037ff4 > > So, I'd remove the tabs and tweak the indentation so you're not > introducing any new long lines. But apart from that I think it's fine to > push, you can push right? > > Chris diff --git a/gnu/packages/installers.scm b/gnu/packages/installers.scm index a8a5c36a18..775b91f0f7 100644 --- a/gnu/packages/installers.scm +++ b/gnu/packages/installers.scm @@ -92,13 +92,23 @@ ;; for native toolchain (setenv env-name (filter-delimited-string env-val (negate mingw-path?))) - ;; Add the removed paths back into - ;; CROSS_-prefixed version of env vars + ;; Add the removed paths back into CROSS_-prefixed + ;; version of env vars (setenv (string-append "CROSS_" env-name) (filter-delimited-string env-val mingw-path?)))) - '("CPATH" "LIBRARY_PATH")) + '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH" "LIBRARY_PATH")) ;; Hack to place mingw-w64 path at the end of search ;; paths. Could probably use a specfile and dirafter + (setenv "CROSS_C_INCLUDE_PATH" + (string-join + `(,@(map (cut string-append + (assoc-ref %build-inputs "xgcc") + "/lib/gcc/" ,triplet "/" + ,(package-version xgcc) <>) + '("/include" + "/include-fixed")) + ,(getenv "CROSS_C_INCLUDE_PATH")) + ":")) (setenv "CROSS_CPLUS_INCLUDE_PATH" (string-join `(,@(map (cut string-append (assoc-ref %build-inputs "xgcc") <>) @@ -108,21 +118,20 @@ ,@(map (cut string-append "/lib/gcc/" ,triplet "/" ,(package-version xgcc) <>) '("/include" "/include-fixed")))) - ,(getenv "CROSS_CPATH")) + ,(getenv "CROSS_CPLUS_INCLUDE_PATH")) ":")))) (add-before 'build 'fix-target-detection (lambda _ - ;; NSIS target detection is screwed up, manually - ;; change it ourselves + ;; NSIS target detection is screwed up, manually change + ;; it ourselves (substitute* "Source/build.cpp" (("m_target_type=TARGET_X86ANSI") (string-append "m_target_type=" ,nsis-target-type)))))))) (home-page "http://nsis.sourceforge.net/") (synopsis "A professional open source system to create Windows installers") (description - "NSIS (Nullsoft Scriptable Install System) is a professional open -source system to create Windows installers. It is designed to be as small and -flexible as possible and is therefore very suitable for internet -distribution.") + "NSIS (Nullsoft Scriptable Install System) is a professional open source +system to create Windows installers. It is designed to be as small and flexible +as possible and is therefore very suitable for internet distribution.") (license (license:non-copyleft "file://COPYING" "See COPYING in the distribution.")))))