From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wNZeKGClzWLgYgEAbAwnHQ (envelope-from ) for ; Tue, 12 Jul 2022 18:46:24 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id IEw0KGClzWI7DgAAauVa8A (envelope-from ) for ; Tue, 12 Jul 2022 18:46:24 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8A86711797 for ; Tue, 12 Jul 2022 18:46:19 +0200 (CEST) Received: from localhost ([::1]:46260 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBJ1e-0006TR-Q4 for larch@yhetil.org; Tue, 12 Jul 2022 12:46:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBJ1R-0006Nj-6k for guix-patches@gnu.org; Tue, 12 Jul 2022 12:46:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49714) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oBJ1O-0001aX-5A for guix-patches@gnu.org; Tue, 12 Jul 2022 12:46:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oBJ1N-0008TP-V4 for guix-patches@gnu.org; Tue, 12 Jul 2022 12:46:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56504] [PATCH] Mingw support for zlib Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 12 Jul 2022 16:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56504 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Liliana Marie Prikler , 56504@debbugs.gnu.org Received: via spool by 56504-submit@debbugs.gnu.org id=B56504.165764431232503 (code B ref 56504); Tue, 12 Jul 2022 16:46:01 +0000 Received: (at 56504) by debbugs.gnu.org; 12 Jul 2022 16:45:12 +0000 Received: from localhost ([127.0.0.1]:43611 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBJ0a-0008SA-Fk for submit@debbugs.gnu.org; Tue, 12 Jul 2022 12:45:12 -0400 Received: from planete-kraus.eu ([89.234.140.182]:59370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBJ0X-0008Ry-Qk for 56504@debbugs.gnu.org; Tue, 12 Jul 2022 12:45:10 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id dd3b4fd0; Tue, 12 Jul 2022 16:45:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:subject:from:to:date:in-reply-to:references :content-type:mime-version; s=dkim; bh=hF4MSRRhR8pQuAsIHnLkU15fr 7I=; b=MZfpdlzM0FlOzp4CM6JdgH917Gg2/nPU842ntS4aTylub97CV9qGyeeoQ 3fc8CGKMggshqqM4n+9QKPo0u6ReZll5YxSwNGB6oBT44/70xQZq9ukXymbqojX8 uxkpOLCeLpzx7qhYoZdmCI/XomKKDerdc3kT4C3kh+yiev4OPs= Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id c97c1ee3 (TLSv1.3:AEAD-CHACHA20-POLY1305-SHA256:256:NO); Tue, 12 Jul 2022 16:45:04 +0000 (UTC) Message-ID: <29fa1e573d51f351796ba22d7344d9738d71c9be.camel@planete-kraus.eu> Date: Tue, 12 Jul 2022 18:45:03 +0200 In-Reply-To: References: <9418154f0a4f8c2b06b1b5bbce8df570ec4028de.camel@planete-kraus.eu> Content-Type: multipart/mixed; boundary="=-IvgXrNwuHh59gfMqAslQ" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Vivien Kraus X-ACL-Warn: , Vivien Kraus via Guix-patches From: Vivien Kraus via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1657644379; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=0c1YDyYzNZjzaK8tfyrezuKfZiTr9KsgfJa/vh8nr3k=; b=oGl6SvS+h36tNQUEaTYedg83WfGeOgb4L4idqLPan1QOhC+jmKQT+EgbmwkFFMcXpxy9jN g20i1RbbvKRLga580u84Y2qiNxqvtjqGTJWPKhP4JcFD4cUErMR0cUkG7grK4PefdS75Jw 1BD4eclVJ1Vfr930dwrzLOaVHmO6eXvnsSaIS/hOuDcha1nJGueRGWyKI2Il2R+3WJUR5S FEGdFYbOhnn7rIozxykBGA/j/PkkiwA9duVR/3nxOJELcpsjqQyII4BbT7mW55HILlgP97 r3hme3pRL90qeKFjG8mZBegpByXowO1pKpkXjUIT0jfR+ucDQIi/AQGdw4DsJA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657644379; a=rsa-sha256; cv=none; b=QbXwvtpuKpW4sGFwFhl9lL7sfS5o+zWdjiNIS4mvo2GiEjARN043s48F7wto1pT0jGPvpc L4ig581NaTtM7lGWHNzqEQSnibT4NQam0TX988KqRlkb70IDQ28yQ8QepbXkAAZXuuF3Ht MChmqDAbfj8Sr6+lBmBAVPZz1WBHB0q4zn0k+U0YpgzCWwHysIP6hBaq69/Wl1CgioGquN BbQAUEPMWxwShZiE7OTVp20UQDl1SMTVzG+knwxmG/jIT6K0PyZOK4ktoAuQWbzQh2GO+D koIqdcTBe8fie85xqeijXZf/LdUHaj1TDvo/Yk8oJFshF2cQPdj5jRowhhTw1g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=planete-kraus.eu header.s=dkim header.b=MZfpdlzM; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.35 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=planete-kraus.eu header.s=dkim header.b=MZfpdlzM; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 8A86711797 X-Spam-Score: -2.35 X-Migadu-Scanner: scn1.migadu.com X-TUID: SLD7WzSDVXe9 --=-IvgXrNwuHh59gfMqAslQ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Le mardi 12 juillet 2022 à 08:07 +0200, Liliana Marie Prikler a écrit : > Am Dienstag, dem 12.07.2022 um 01:53 +0200 schrieb Vivien Kraus: > > > +               ,@(if (and (%current-target-system) > > +                          (string-suffix? "-w64-mingw32" > > (%current- > > target-system))) > I'm pretty sure there's an abbreviation for this like target-mingw? Precisely! Fixed it, thank you. > > +                     `((substitute* "win32/Makefile.gcc" > > +                         (("PREFIX =") > > +                          (string-append "PREFIX = " ,(%current- > > target-system) "-")) > > +                         (("prefix \\?= /usr/local") > > +                          (string-append "prefix ?= " out)) > > +                         (("# BINARY_PATH, INCLUDE_PATH and > > LIBRARY_PATH must be set.") > > +                          "\ > > +BINARY_PATH = $(prefix)/bin > > +INCLUDE_PATH = $(prefix)/include > > +LIBRARY_PATH = $(prefix)/lib")) > > +                       (rename-file "win32/Makefile.gcc" > > "Makefile")) > I think these can be conditionally added to #:make-flags I did it for all but prefix, because I have to have the output path. Is there a way to get it from within the make-flags? > > +                     `((invoke "./configure" > > +                               (string-append "--prefix=" > > out))))))) > > > +         ,@(if (and (%current-target-system) > > +                    (string-suffix? "-mingw32" (%current-target- > > system))) > > +               `(add-after 'install 'install-mingw-shared > > +                  (lambda* (#:key make-flags #:allow-other-keys) > > +                    (apply invoke "make" > > +                           (append make-flags > > +                                   '("install" > > "SHARED_MODE=1"))))) > SHARED_MODE might likewise be conditionally added to #:make-flags. I get both the DLL loader and the DLL in the default output, and the static lib in the static output, so it works. Thank you for your review! Vivien --=-IvgXrNwuHh59gfMqAslQ Content-Disposition: attachment; filename="v2-0001-gnu-zlib-Support-mingw-cross-compilation.patch" Content-Type: text/x-patch; name="v2-0001-gnu-zlib-Support-mingw-cross-compilation.patch"; charset="UTF-8" Content-Transfer-Encoding: base64 RnJvbSAxZGRiNTY3ZjMwZjU2NWU5NTEzMjFiODA5MjFmMjdlZDdmMTBmNjA0IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBWaXZpZW4gS3JhdXMgPHZpdmllbkBwbGFuZXRlLWtyYXVzLmV1 PgpEYXRlOiBTYXQsIDI1IEp1biAyMDIyIDE2OjMzOjQ0ICswMjAwClN1YmplY3Q6IFtQQVRDSCB2 Ml0gZ251OiB6bGliOiBTdXBwb3J0IG1pbmd3IGNyb3NzLWNvbXBpbGF0aW9uLgoKKiBnbnUvcGFj a2FnZXMvY29tcHJlc3Npb24uc2NtICh6bGliKTogT25seSBydW4gY29uZmlndXJlIGlmIG5vdCBt aW5ndy4KLS0tCiBnbnUvcGFja2FnZXMvY29tcHJlc3Npb24uc2NtIHwgMTkgKysrKysrKysrKysr KysrKy0tLQogMSBmaWxlIGNoYW5nZWQsIDE2IGluc2VydGlvbnMoKyksIDMgZGVsZXRpb25zKC0p CgpkaWZmIC0tZ2l0IGEvZ251L3BhY2thZ2VzL2NvbXByZXNzaW9uLnNjbSBiL2dudS9wYWNrYWdl cy9jb21wcmVzc2lvbi5zY20KaW5kZXggZDViZDNhYmYwZi4uZWExYmMyYTAzZiAxMDA2NDQKLS0t IGEvZ251L3BhY2thZ2VzL2NvbXByZXNzaW9uLnNjbQorKysgYi9nbnUvcGFja2FnZXMvY29tcHJl c3Npb24uc2NtCkBAIC0xMTMsNyArMTEzLDE1IEBAIChkZWZpbmUtcHVibGljIHpsaWIKICAgICAo YnVpbGQtc3lzdGVtIGdudS1idWlsZC1zeXN0ZW0pCiAgICAgKG91dHB1dHMgJygib3V0IiAic3Rh dGljIikpCiAgICAgKGFyZ3VtZW50cwotICAgICBgKCM6cGhhc2VzCisgICAgIGAoIzptYWtlLWZs YWdzCisgICAgICAgLChpZiAodGFyZ2V0LW1pbmd3PykKKyAgICAgICAgICAgIGAobGlzdCAsKHN0 cmluZy1hcHBlbmQgIlBSRUZJWD0iICglY3VycmVudC10YXJnZXQtc3lzdGVtKSAiLSIpCisgICAg ICAgICAgICAgICAgICAgIkJJTkFSWV9QQVRIID0gJChwcmVmaXgpL2JpbiIKKyAgICAgICAgICAg ICAgICAgICAiSU5DTFVERV9QQVRIID0gJChwcmVmaXgpL2luY2x1ZGUiCisgICAgICAgICAgICAg ICAgICAgIkxJQlJBUllfUEFUSCA9ICQocHJlZml4KS9saWIiCisgICAgICAgICAgICAgICAgICAg IlNIQVJFRF9NT0RFID0gMSIpCisgICAgICAgICAgICAnJygpKQorICAgICAgICM6cGhhc2VzCiAg ICAgICAgKG1vZGlmeS1waGFzZXMgJXN0YW5kYXJkLXBoYXNlcwogICAgICAgICAgKHJlcGxhY2Ug J2NvbmZpZ3VyZQogICAgICAgICAgICAobGFtYmRhKiAoIzprZXkgb3V0cHV0cyAjOmFsbG93LW90 aGVyLWtleXMpCkBAIC0xMjUsOCArMTMzLDEzIEBAIChkZWZpbmUtcHVibGljIHpsaWIKICAgICAg ICAgICAgICAgICxAKGlmICglY3VycmVudC10YXJnZXQtc3lzdGVtKQogICAgICAgICAgICAgICAg ICAgICAgYCgoc2V0ZW52ICJDSE9TVCIgLCglY3VycmVudC10YXJnZXQtc3lzdGVtKSkpCiAgICAg ICAgICAgICAgICAgICAgICAnKCkpCi0gICAgICAgICAgICAgICAoaW52b2tlICIuL2NvbmZpZ3Vy ZSIKLSAgICAgICAgICAgICAgICAgICAgICAgKHN0cmluZy1hcHBlbmQgIi0tcHJlZml4PSIgb3V0 KSkpKSkKKyAgICAgICAgICAgICAgICxAKGlmICh0YXJnZXQtbWluZ3c/KQorICAgICAgICAgICAg ICAgICAgICAgYCgoc3Vic3RpdHV0ZSogIndpbjMyL01ha2VmaWxlLmdjYyIKKyAgICAgICAgICAg ICAgICAgICAgICAgICAoKCJwcmVmaXggXFw/PSAvdXNyL2xvY2FsIikKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgKHN0cmluZy1hcHBlbmQgInByZWZpeCA/PSAiIG91dCkpKQorICAgICAgICAg ICAgICAgICAgICAgICAocmVuYW1lLWZpbGUgIndpbjMyL01ha2VmaWxlLmdjYyIgIk1ha2VmaWxl IikpCisgICAgICAgICAgICAgICAgICAgICBgKChpbnZva2UgIi4vY29uZmlndXJlIgorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIChzdHJpbmctYXBwZW5kICItLXByZWZpeD0iIG91dCkp KSkpKSkKICAgICAgICAgIChhZGQtYWZ0ZXIgJ2luc3RhbGwgJ21vdmUtc3RhdGljLWxpYnJhcnkK ICAgICAgICAgICAgKGxhbWJkYSogKCM6a2V5IG91dHB1dHMgIzphbGxvdy1vdGhlci1rZXlzKQog ICAgICAgICAgICAgIChsZXQgKChvdXQgKGFzc29jLXJlZiBvdXRwdXRzICJvdXQiKSkKCmJhc2Ut Y29tbWl0OiBmMGM4YWJlODU3ODdhMDAxOGMwYWRlYjBiYzRhNjY3MmQ0NjY4NmU0Ci0tIAoyLjM2 LjEKCg== --=-IvgXrNwuHh59gfMqAslQ--