~ruther/guix-local

785d771fb56fd5c49732fdc9b2baea2fb5da446e — Ayan Das 1 year, 1 month ago 95ca1a5
gnu: miniz-for-pytorch: Update to pytorch-2.7.0.

* gnu/packages/compression.scm (miniz-for-pytorch): Update to
pytorch-2.7.0 using miniz 3.0.2.
* gnu/packages/patches/miniz-for-pytorch.patch: Update for miniz 3.0.2.

Signed-off-by: Ayan Das <bvits@riseup.net>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2 files changed, 19 insertions(+), 13 deletions(-)

M gnu/packages/compression.scm
M gnu/packages/patches/miniz-for-pytorch.patch
M gnu/packages/compression.scm => gnu/packages/compression.scm +3 -3
@@ 3095,16 3095,16 @@ exported by the zlib library.")
(define-public miniz-for-pytorch
  (package
    (inherit miniz)
    (version "pytorch-2.2.0")
    (version "pytorch-2.7.0")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/richgel999/miniz")
                    (commit "2.2.0")))
                    (commit "3.0.2")))
              (file-name (git-file-name (package-name miniz) version))
              (sha256
               (base32
                "09j9ihigfsavgcmk8l36zmbjvdf1x1w7h2v4rkww1qk1sb43y5zf"))
                "0672q35vjrpakmsr1gwj9k5fwv5ihzhahm19bq4y74wqpn91p7fw"))
              (patches (search-patches "miniz-for-pytorch.patch"))))
    (arguments
     (substitute-keyword-arguments (package-arguments miniz)

M gnu/packages/patches/miniz-for-pytorch.patch => gnu/packages/patches/miniz-for-pytorch.patch +16 -10
@@ 1,7 1,7 @@
Modifications from the internal fork of the python-pytorch package.

diff --git a/miniz.h b/miniz.h
index 42e1ea2..5869ab9 100644
index 2f86380..336d33d 100644
--- a/miniz.h
+++ b/miniz.h
@@ -123,7 +123,7 @@


@@ 11,9 11,9 @@ index 42e1ea2..5869ab9 100644
-/*#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_DEFLATE_APIS to disable all compression API's. */
 /*#define MINIZ_NO_DEFLATE_APIS */
@@ -141,7 +141,7 @@
 /*#define MINIZ_NO_ZLIB_APIS */
 
 /* Define MINIZ_NO_ZLIB_COMPATIBLE_NAME to disable zlib names, to prevent conflicts against stock zlib. */


@@ 22,21 22,27 @@ index 42e1ea2..5869ab9 100644
 
 /* 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)
@@ -209,7 +209,6 @@
 #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_USE_UNALIGNED_LOADS_AND_STORES 0
-#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
index 876d844..c9aa987 100644
--- a/miniz_zip.h
+++ b/miniz_zip.h
@@ -150,7 +150,7 @@ typedef enum {
@@ -94,6 +94,7 @@ typedef enum {
     MZ_ZIP_FLAG_IGNORE_PATH = 0x0200,
     MZ_ZIP_FLAG_COMPRESSED_DATA = 0x0400,
     MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY = 0x0800,
+    MZ_ZIP_FLAG_DO_NOT_COMPUTE_CRC32 = 0x80000,
     MZ_ZIP_FLAG_VALIDATE_LOCATE_FILE_FLAG = 0x1000, /* if enabled, mz_zip_reader_locate_file() will be called on each file as its validated to ensure the func finds the file in the central dir (intended for testing) */
     MZ_ZIP_FLAG_VALIDATE_HEADERS_ONLY = 0x2000,     /* validate the local headers, but don't decompress the entire file and check the crc32 */
     MZ_ZIP_FLAG_WRITE_ZIP64 = 0x4000,               /* always use the zip64 file format, instead of the original zip file format with automatic switch to zip64. Use as flags parameter with mz_zip_writer_init*_v2 */
@@ -151,7 +152,7 @@ typedef enum {
     MZ_ZIP_TOTAL_ERRORS
 } mz_zip_error;