You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/pyfits/files/pyfits-3.0.8-debundle_zlib....

65 lines
1.5 KiB

Debundle zlib
Patch written by Kacper Kowalik <xarthisius@gentoo.org>
--- a/setup.cfg
+++ b/setup.cfg
@@ -43,10 +43,7 @@
src/compressionmodule.c
src/quantize.c
src/ricecomp.c
- src/zlib.c
- src/inffast.c
- src/inftrees.c
- src/trees.c
+libraries = z
include_dirs = numpy
extra_compile_args =
-Wno-unused-function
--- a/src/compress.c
+++ b/src/compress.c
@@ -106,7 +106,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "zlib.h"
+#include <zlib.h>
int _pyfits_uncompress2mem_from_mem(
char *inmemptr,
@@ -182,7 +182,7 @@
d_stream.next_out = uncompr;
d_stream.avail_out = uncomprLen;
- err = _pyfits_inflate(&d_stream, Z_NO_FLUSH);
+ err = inflate(&d_stream, Z_NO_FLUSH);
if (err != Z_OK && err != Z_STREAM_END)
{
@@ -217,7 +217,7 @@
*filesize = d_stream.total_out;
/* End the decompression */
- err = _pyfits_inflateEnd(&d_stream);
+ err = inflateEnd(&d_stream);
/* free temporary output data buffer */
free(uncompr);
@@ -285,7 +285,7 @@
c_stream.next_out = compr;
c_stream.avail_out = comprLen;
- err = _pyfits_deflate(&c_stream, Z_FINISH);
+ err = deflate(&c_stream, Z_FINISH);
if (err != Z_OK && err != Z_STREAM_END)
{
@@ -320,7 +320,7 @@
*filesize = c_stream.total_out;
/* End the compression */
- err = _pyfits_deflateEnd(&c_stream);
+ err = deflateEnd(&c_stream);
/* free temporary output data buffer */
free(compr);