From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id eIrROgvH6GXVOAEAe85BDQ:P1 (envelope-from ) for ; Wed, 06 Mar 2024 20:42:04 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id eIrROgvH6GXVOAEAe85BDQ (envelope-from ) for ; Wed, 06 Mar 2024 20:42:04 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=S62Ur+K2; 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"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1709754123; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: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=6RtohfRnVcE6kiiLOhfjkYzO/Vhmgxwa3y6o6Ar5FT4=; b=PZvs2csGXd5s5+LjdG6ZdLUwMffzAZbzyRuBU5N/8cogtV2OZWhSTHD2YcXBNnv3tdAOIQ 4Krm39TIoVPzLHbCBJVvSedSr2eiBWfbWbC+6dB9qlDQMYSvaPT1LgBJlp66QjQ8GMomm6 tta7QraN+vQmyaBQaJJcUpnkr39wFtLnanVe6t54ULubttC7aVshEK3nKRRIbEJlRn7bqz RzcijmH1DAykESbQIx5v7eMO/r52HBN90nuLNVfvc2nodBCQVzfFQpDrKdBH8k5+H/OJD3 28GQqBgAq5c2pSkRxkEhqFL8SHPRQDZaYWz9j18rxUKtsPXPLZyuKdBzXT3EYw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=S62Ur+K2; 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"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1709754123; a=rsa-sha256; cv=none; b=TnuydBFOce92SepAUJFc0Ges0NrSc21Kvr25wiHr3PYN+BH2vg1zshS8wdUELkXvA4Xjvx +Agx64nBTZYoi0/FalGkLPF2pnt0GG2hSAz8QdeVZUFI0W/fvNHBp3MZ1htcuFwms2BnCE vzJBwwHzNfuM4VA9bGT4zZ63JMUXirqUORWJ04R98MB3dYvNQ9a7bp0XEsiq7YkKpb9wX2 tKygpFfaGhx5ipsEkSWOeGTEXpJMkduZWhJgjXIiKTG71s1cdtW0wboSafTaRRbI88u3kq eIF0rPB28EpIoLv4aMelMe2Wmeyre4paQ0UdDNsk+m2vgHD9k6dzh9ED0Z6Ujw== 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 9CE5B117BF for ; Wed, 6 Mar 2024 20:42:03 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhx90-0001fn-Nb; Wed, 06 Mar 2024 14:41:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhx8x-0001cm-Ai for guix-patches@gnu.org; Wed, 06 Mar 2024 14:41:35 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhx8x-0006D8-2E for guix-patches@gnu.org; Wed, 06 Mar 2024 14:41:35 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rhx9S-0008FE-0H for guix-patches@gnu.org; Wed, 06 Mar 2024 14:42:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69591] [PATCH 09/31] gnu: Add miniz-for-pytorch. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 06 Mar 2024 19:42:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69591 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69591@debbugs.gnu.org Cc: David Elsing Received: via spool by 69591-submit@debbugs.gnu.org id=B69591.170975411531573 (code B ref 69591); Wed, 06 Mar 2024 19:42:05 +0000 Received: (at 69591) by debbugs.gnu.org; 6 Mar 2024 19:41:55 +0000 Received: from localhost ([127.0.0.1]:51536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rhx9E-0008Cs-Gb for submit@debbugs.gnu.org; Wed, 06 Mar 2024 14:41:55 -0500 Received: from mout01.posteo.de ([185.67.36.65]:39131) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rhx8u-00089H-5K for 69591@debbugs.gnu.org; Wed, 06 Mar 2024 14:41:35 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 896C7240027 for <69591@debbugs.gnu.org>; Wed, 6 Mar 2024 20:40:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1709754055; bh=5JD6ImUjgYsSUy7diRmHjkPTpUbmvV4a1NiExszaVXw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=S62Ur+K2uKeKqMQ413uCaUH05FKTP73IAkqkU4tKdFnH0xsstQ1MnV1apgLkXiCJi eSoXLEeEoXlDGFkwxbp0hrx0Z736O1EuthwJ640norQn1N6fNOXiMfnRrl7aiHlqdF z4ZPj0vfOZJep1UN40NmCBO9sF9135Dv6pTRBCpLhjmlXy2/qhE3YcAxYGmC930Xs9 +Z0OEIj3CndArBc4CbozbYJg2YLrw5KGfwC+9L6TwGyCTNFyIpJj8SfVZZ7MND7+6K qjio1gAn77aj/K0TbTu4evRdlDzpdeRzJn5tqH7Nr/zeExGe1HJPrtjmnDUasJ1zyT cI/cCbuY9/tmg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TqjTg1BjMz6twn; Wed, 6 Mar 2024 20:40:55 +0100 (CET) From: David Elsing Date: Wed, 6 Mar 2024 19:40:15 +0000 Message-ID: <20240306194037.17992-9-david.elsing@posteo.net> In-Reply-To: <20240306193725.17463-1-david.elsing@posteo.net> References: <20240306193725.17463-1-david.elsing@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -2.37 X-Spam-Score: -2.37 X-Migadu-Queue-Id: 9CE5B117BF X-Migadu-Scanner: mx13.migadu.com X-TUID: llSZvYLWYXgh * gnu/packages/compression.scm (miniz-for-pytorch): New variable. * gnu/packages/patches/miniz-for-pytorch.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/compression.scm | 21 +++++++++ gnu/packages/patches/miniz-for-pytorch.patch | 47 ++++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 gnu/packages/patches/miniz-for-pytorch.patch diff --git a/gnu/local.mk b/gnu/local.mk index 83937db4c8..06b3238684 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1687,6 +1687,7 @@ dist_patch_DATA = \ %D%/packages/patches/mingw-w64-reproducible-gendef.patch \ %D%/packages/patches/minisat-friend-declaration.patch \ %D%/packages/patches/minisat-install.patch \ + %D%/packages/patches/miniz-for-pytorch.patch \ %D%/packages/patches/mit-krb5-hurd.patch \ %D%/packages/patches/mixxx-link-qtscriptbytearray-qtscript.patch \ %D%/packages/patches/mixxx-system-googletest-benchmark.patch \ diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 74075df0ee..dcea1f9ec7 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -2866,3 +2866,24 @@ (define-public miniz specification standards. It supports the most commonly used functions exported by the zlib library.") (license license:expat))) + +(define-public miniz-for-pytorch + (package + (inherit miniz) + (version "pytorch-2.2.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/richgel999/miniz") + (commit "2.2.0"))) + (file-name (git-file-name (package-name miniz) version)) + (sha256 + (base32 + "09j9ihigfsavgcmk8l36zmbjvdf1x1w7h2v4rkww1qk1sb43y5zf")) + (patches (search-patches "miniz-for-pytorch.patch")))) + (arguments + (substitute-keyword-arguments (package-arguments miniz) + ((#:configure-flags flags '()) + ;; The changes break the examples. + `(cons "-DBUILD_EXAMPLES=OFF" ,flags)))) + (properties '((hidden? . #t))))) diff --git a/gnu/packages/patches/miniz-for-pytorch.patch b/gnu/packages/patches/miniz-for-pytorch.patch new file mode 100644 index 0000000000..19fa705a31 --- /dev/null +++ b/gnu/packages/patches/miniz-for-pytorch.patch @@ -0,0 +1,47 @@ +Modifications from the internal fork of the python-pytorch package. + +diff --git a/miniz.h b/miniz.h +index 42e1ea2..5869ab9 100644 +--- a/miniz.h ++++ b/miniz.h +@@ -123,7 +123,7 @@ + /* If MINIZ_NO_TIME is specified then the ZIP archive functions will not be able to get the current time, or */ + /* get/set file times, and the C run-time funcs that get/set times won't be called. */ + /* The current downside is the times written to your archives will be from 1979. */ +-/*#define MINIZ_NO_TIME */ ++#define MINIZ_NO_TIME + + /* Define MINIZ_NO_ARCHIVE_APIS to disable all ZIP archive API's. */ + /*#define MINIZ_NO_ARCHIVE_APIS */ +@@ -135,7 +135,7 @@ + /*#define MINIZ_NO_ZLIB_APIS */ + + /* Define MINIZ_NO_ZLIB_COMPATIBLE_NAME to disable zlib names, to prevent conflicts against stock zlib. */ +-/*#define MINIZ_NO_ZLIB_COMPATIBLE_NAMES */ ++#define MINIZ_NO_ZLIB_COMPATIBLE_NAMES + + /* Define MINIZ_NO_MALLOC to disable all calls to malloc, free, and realloc. + Note if MINIZ_NO_MALLOC is defined then the user must always provide custom user alloc/free/realloc +@@ -172,8 +172,7 @@ + #if !defined(MINIZ_USE_UNALIGNED_LOADS_AND_STORES) + #if MINIZ_X86_OR_X64_CPU + /* Set MINIZ_USE_UNALIGNED_LOADS_AND_STORES to 1 on CPU's that permit efficient integer loads and stores from unaligned addresses. */ +-#define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1 +-#define MINIZ_UNALIGNED_USE_MEMCPY ++#define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 0 + #else + #define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 0 + #endif +diff --git a/miniz_zip.h b/miniz_zip.h +index 82502bd..3d92255 100644 +--- a/miniz_zip.h ++++ b/miniz_zip.h +@@ -150,7 +150,7 @@ typedef enum { + MZ_ZIP_TOTAL_ERRORS + } mz_zip_error; + +-typedef struct ++typedef struct mz_zip_archive + { + mz_uint64 m_archive_size; + mz_uint64 m_central_directory_file_ofs; -- 2.41.0