X-Loop: help-debbugs@HIDDEN Subject: [bug#37027] [PATCH] gnu: zlib: Add support for MinGW targets. Resent-From: David Thompson <dthompson2@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Wed, 14 Aug 2019 13:00:02 +0000 Resent-Message-ID: <handler.37027.B.156578754715975 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 37027 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37027 <at> debbugs.gnu.org Cc: David Thompson <dthompson2@HIDDEN> X-Debbugs-Original-To: guix-patches@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.156578754715975 (code B ref -1); Wed, 14 Aug 2019 13:00:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Aug 2019 12:59:07 +0000 Received: from localhost ([127.0.0.1]:49009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1hxsrq-00049a-6A for submit <at> debbugs.gnu.org; Wed, 14 Aug 2019 08:59:06 -0400 Received: from lists.gnu.org ([209.51.188.17]:36884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <dthompson2@HIDDEN>) id 1hxsro-00049I-HC for submit <at> debbugs.gnu.org; Wed, 14 Aug 2019 08:59:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48029) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <dthompson2@HIDDEN>) id 1hxsrn-00079H-0U for guix-patches@HIDDEN; Wed, 14 Aug 2019 08:59:04 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <dthompson2@HIDDEN>) id 1hxsrl-0004Ol-Ln for guix-patches@HIDDEN; Wed, 14 Aug 2019 08:59:02 -0400 Received: from mail-qk1-x732.google.com ([2607:f8b0:4864:20::732]:39655) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <dthompson2@HIDDEN>) id 1hxsrl-0004OW-GQ for guix-patches@HIDDEN; Wed, 14 Aug 2019 08:59:01 -0400 Received: by mail-qk1-x732.google.com with SMTP id 125so9362370qkl.6 for <guix-patches@HIDDEN>; Wed, 14 Aug 2019 05:59:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=worcester-edu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=/A/MrRhgaFSdrGV+QDwI17bvuzRXh0cQJo58BcTKWJw=; b=bmsx2zFNNYIMcfYfkE1zCkPdQN8aSWtAGyuU3VFUNg119J/jbxfHMM9+XJ1i2Fum/c vsh5EzrzQCqqY2RQa6Eh9fbuJ9cCAIOiRoYRl7Ycb+uWU5jypF8w1IbbuCcwPoYDGDSA t8VTpiDArXM5ofTOhvccf3m02/vGhaIPex8SUfH3vPRwJvSiTbsPPJ0zAJzBkv37lBm5 rWArG0A5w9G0HAw+TZF61cv5A7XnOf1RUFoVnalTWVbPzUHg31ewfPak3YJZEKiV1zAz Sv3IqUR20ps1yAZWyUDAaXty4ZvYzAHKPKLibWsMrL6ubyoduyV7nIHYshbUfSc50s1G Bq9Q== 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; bh=/A/MrRhgaFSdrGV+QDwI17bvuzRXh0cQJo58BcTKWJw=; b=pjvb18hvIUSekocRwNSH/hiCEHi+Wc9vJAUHy/h1SrldCIluo85lpl/LWFVWZxsD0O +ofcEK6LjIbr+Hahp5eMScjXKXp03K4H9H4YZVsoBCV/+O1y5EUNjbjnSeclCr+TrK5o ulA41mfAlgr/wDPBjSqky3aMuC5zRKHTMR9Nt05XsdeJTsPYmH8gbjcZRDqEpMqZk4Sb Q7RBfaO1AXy01etjSjDntdCMlWixK3gW60K06KeOLWrLSpgzijZFBW8/af859wTo/vLq GVJEX/0PfKVwj1qeRYRlZkpFgVzoSvMlUzTdRWpbmAjnvSoJqQy0kRiE/clhv0/bU2Qa WEKQ== X-Gm-Message-State: APjAAAU1on+IEMNgTqK2Y1zIvGlcMlSqombAfhCjDpK4Yfx/agEquhg2 bHsdWJwN00fcVhfWawLnifbRjsRPobPdqA== X-Google-Smtp-Source: APXvYqxWExDhCwDML19s7CvKM+TwN/MnbgDMSm5HNu+qlasy5yCgL4ptglFpHvrrERwinvSKdPTp6w== X-Received: by 2002:a37:464d:: with SMTP id t74mr36550501qka.342.1565787540596; Wed, 14 Aug 2019 05:59:00 -0700 (PDT) Received: from DT-ThinkPad-X1-Carbon-6th.lan (pool-72-74-52-43.bstnma.fios.verizon.net. [72.74.52.43]) by smtp.gmail.com with ESMTPSA id q6sm14422053qke.109.2019.08.14.05.58.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2019 05:59:00 -0700 (PDT) From: David Thompson <dthompson2@HIDDEN> Date: Wed, 14 Aug 2019 08:58:53 -0400 Message-Id: <20190814125853.18488-1-dthompson2@HIDDEN> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::732 X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) --- gnu/packages/compression.scm | 55 +++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 9834fcbe63..092eb4a54a 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -87,26 +87,43 @@ (arguments `(#:phases (modify-phases %standard-phases - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - ;; Zlib's home-made `configure' fails when passed - ;; extra flags like `--enable-fast-install', so we need to - ;; invoke it with just what it understand. - (let ((out (assoc-ref outputs "out"))) - ;; 'configure' doesn't understand '--host'. - ,@(if (%current-target-system) - `((setenv "CHOST" ,(%current-target-system))) - '()) - (invoke "./configure" - (string-append "--prefix=" out))))) + ,@(if (target-mingw?) + `((delete 'configure) + (add-before 'install 'set-install-paths + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (setenv "INCLUDE_PATH" (string-append out "/include")) + (setenv "LIBRARY_PATH" (string-append out "/lib")) + (setenv "BINARY_PATH" (string-append out "/bin")) + #t)))) + `((replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + ;; Zlib's home-made `configure' fails when passed + ;; extra flags like `--enable-fast-install', so we need to + ;; invoke it with just what it understand. + (let ((out (assoc-ref outputs "out"))) + ;; 'configure' doesn't understand '--host'. + ,@(if (%current-target-system) + `((setenv "CHOST" ,(%current-target-system))) + '()) + (invoke "./configure" + (string-append "--prefix=" out))))))) (add-after 'install 'move-static-library - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (static (assoc-ref outputs "static"))) - (with-directory-excursion (string-append out "/lib") - (install-file "libz.a" (string-append static "/lib")) - (delete-file "libz.a") - #t))))))) + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (static (assoc-ref outputs "static"))) + (with-directory-excursion (string-append out "/lib") + (install-file "libz.a" (string-append static "/lib")) + (delete-file "libz.a") + #t))))) + ,@(if (target-mingw?) + `(#:make-flags + '("-fwin32/Makefile.gcc" + "SHARED_MODE=1" + ,(string-append "CC=" (%current-target-system) "-gcc") + ,(string-append "RC=" (%current-target-system) "-windres") + ,(string-append "AR=" (%current-target-system) "-ar"))) + '()))) (home-page "https://zlib.net/") (synopsis "Compression library") (description -- 2.17.1
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: David Thompson <dthompson2@HIDDEN> Subject: bug#37027: Acknowledgement ([PATCH] gnu: zlib: Add support for MinGW targets.) Message-ID: <handler.37027.B.156578754715975.ack <at> debbugs.gnu.org> References: <20190814125853.18488-1-dthompson2@HIDDEN> X-Gnu-PR-Message: ack 37027 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 37027 <at> debbugs.gnu.org Date: Wed, 14 Aug 2019 13:00:03 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): guix-patches@HIDDEN If you wish to submit further information on this problem, please send it to 37027 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 37027: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D37027 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: [bug#37027] [PATCH] gnu: zlib: Add support for MinGW targets. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Tue, 27 Aug 2019 22:07:03 +0000 Resent-Message-ID: <handler.37027.B37027.15669435968949 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 37027 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: David Thompson <dthompson2@HIDDEN> Cc: 37027 <at> debbugs.gnu.org Received: via spool by 37027-submit <at> debbugs.gnu.org id=B37027.15669435968949 (code B ref 37027); Tue, 27 Aug 2019 22:07:03 +0000 Received: (at 37027) by debbugs.gnu.org; 27 Aug 2019 22:06:36 +0000 Received: from localhost ([127.0.0.1]:49524 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1i2jbn-0002KF-So for submit <at> debbugs.gnu.org; Tue, 27 Aug 2019 18:06:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59550) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1i2jbm-0002Jp-0f for 37027 <at> debbugs.gnu.org; Tue, 27 Aug 2019 18:06:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37944) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>) id 1i2jbg-0004yz-Ke; Tue, 27 Aug 2019 18:06:28 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=45150 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from <ludo@HIDDEN>) id 1i2jbg-0000hH-3X; Tue, 27 Aug 2019 18:06:28 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> References: <20190814125853.18488-1-dthompson2@HIDDEN> Date: Wed, 28 Aug 2019 00:06:26 +0200 In-Reply-To: <20190814125853.18488-1-dthompson2@HIDDEN> (David Thompson's message of "Wed, 14 Aug 2019 08:58:53 -0400") Message-ID: <87a7bumffh.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi David, David Thompson <dthompson2@HIDDEN> skribis: > --- > gnu/packages/compression.scm | 55 +++++++++++++++++++++++------------- > 1 file changed, 36 insertions(+), 19 deletions(-) Please add a commit log. :-) > + `((delete 'configure) > + (add-before 'install 'set-install-paths > + (lambda* (#:key outputs #:allow-other-keys) > + (let ((out (assoc-ref outputs "out"))) > + (setenv "INCLUDE_PATH" (string-append o= ut "/include")) > + (setenv "LIBRARY_PATH" (string-append o= ut "/lib")) > + (setenv "BINARY_PATH" (string-append ou= t "/bin")) > + #t)))) > + `((replace 'configure > + (lambda* (#:key outputs #:allow-other-keys) Minor issue: could you adjust indentation to look like: (add-before 'x 'y (lambda* =E2=80=A6 ? guix.el should take care of that. > - (with-directory-excursion (string-append out "/lib") > - (install-file "libz.a" (string-append static "/lib")) > - (delete-file "libz.a") > - #t))))))) > + (lambda* (#:key outputs #:allow-other-keys) > + (let ((out (assoc-ref outputs "out")) > + (static (assoc-ref outputs "static"))) > + (with-directory-excursion (string-append out "/l= ib") > + (install-file "libz.a"= (string-append static "/lib")) The =E2=80=98with-directory-excursion=E2=80=99 indentation went off here. > + ,@(if (target-mingw?) > + `(#:make-flags > + '("-fwin32/Makefile.gcc" > + "SHARED_MODE=3D1" > + ,(string-append "CC=3D" (%current-target-system) "-gcc") > + ,(string-append "RC=3D" (%current-target-system) "-wind= res") > + ,(string-append "AR=3D" (%current-target-system) "-ar")= )) > + '()))) I wonder if we could have a single =E2=80=98if=E2=80=99: (arguments (if (target-mingw?) =E2=80=A6 )) ? Thoughts? Otherwise LGTM, thanks! Ludo=E2=80=99.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.