pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/archivers/py-zstandard py-zstandard: adapt for zstd-1....
details: https://anonhg.NetBSD.org/pkgsrc/rev/eb5eac6b7605
branches: trunk
changeset: 395223:eb5eac6b7605
user: wiz <wiz%pkgsrc.org@localhost>
date: Thu May 02 10:10:56 2019 +0000
description:
py-zstandard: adapt for zstd-1.4.0 and depend on it
Bump PKGREVISION.
diffstat:
archivers/py-zstandard/Makefile | 4 +-
archivers/py-zstandard/distinfo | 5 +-
archivers/py-zstandard/patches/patch-c-ext_compressionparams.c | 48 +++++
archivers/py-zstandard/patches/patch-zstandard_cffi.py | 25 ++
archivers/py-zstandard/patches/patch-zstd_compress_zstd__compress.c | 92 ++++++++++
5 files changed, 172 insertions(+), 2 deletions(-)
diffs (213 lines):
diff -r 3819f734bf7b -r eb5eac6b7605 archivers/py-zstandard/Makefile
--- a/archivers/py-zstandard/Makefile Thu May 02 09:41:25 2019 +0000
+++ b/archivers/py-zstandard/Makefile Thu May 02 10:10:56 2019 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.9 2019/02/26 06:42:27 adam Exp $
+# $NetBSD: Makefile,v 1.10 2019/05/02 10:10:56 wiz Exp $
DISTNAME= zstandard-0.11.0
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
+PKGREVISION= 1
CATEGORIES= archivers python
MASTER_SITES= ${MASTER_SITE_PYPI:=z/zstandard/}
@@ -15,6 +16,7 @@
PYSETUPBUILDARGS+= --system-zstd
+BUILDLINK_API_DEPENDS.zstd+= zstd>=1.4.0
.include "../../archivers/zstd/buildlink3.mk"
.include "../../lang/python/egg.mk"
.include "../../mk/bsd.pkg.mk"
diff -r 3819f734bf7b -r eb5eac6b7605 archivers/py-zstandard/distinfo
--- a/archivers/py-zstandard/distinfo Thu May 02 09:41:25 2019 +0000
+++ b/archivers/py-zstandard/distinfo Thu May 02 10:10:56 2019 +0000
@@ -1,7 +1,10 @@
-$NetBSD: distinfo,v 1.9 2019/02/26 06:42:27 adam Exp $
+$NetBSD: distinfo,v 1.10 2019/05/02 10:10:56 wiz Exp $
SHA1 (zstandard-0.11.0.tar.gz) = 05951ab7a967d8cff7e5dccd964e370496943388
RMD160 (zstandard-0.11.0.tar.gz) = 2e3017be22389dd7bed9a5c9d78795e2eac914f5
SHA512 (zstandard-0.11.0.tar.gz) = 96e6faa3c31fce59379e037e4e7789b91d1608703ad8540fc8fe3d249ec65670377f2c3233ff21d7ff90a1478ac1fbbd2e169fe2d798a6889a200d71540f75a7
Size (zstandard-0.11.0.tar.gz) = 641440 bytes
+SHA1 (patch-c-ext_compressionparams.c) = f9b2674e9e0816ef8ba23cf3cb77294a6b2008f7
+SHA1 (patch-zstandard_cffi.py) = f6d0f070160d9e977701d4d1fb26878d75e19898
SHA1 (patch-zstd.c) = ee9e8d349759fcc0dd43bcd68fefdf3390feca6c
+SHA1 (patch-zstd_compress_zstd__compress.c) = 94c28e6b9bd594693656eac9e7cbdacc04a24c70
diff -r 3819f734bf7b -r eb5eac6b7605 archivers/py-zstandard/patches/patch-c-ext_compressionparams.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/archivers/py-zstandard/patches/patch-c-ext_compressionparams.c Thu May 02 10:10:56 2019 +0000
@@ -0,0 +1,48 @@
+$NetBSD: patch-c-ext_compressionparams.c,v 1.1 2019/05/02 10:10:56 wiz Exp $
+
+Adapt for zstd-1.4.0
+https://github.com/indygreg/python-zstandard/commit/f00431bf3b8a16b6cc17fa7c7a442e80d558e5e8
+
+--- c-ext/compressionparams.c.orig 2019-02-26 00:17:23.000000000 +0000
++++ c-ext/compressionparams.c
+@@ -11,7 +11,7 @@
+ extern PyObject* ZstdError;
+
+ int set_parameter(ZSTD_CCtx_params* params, ZSTD_cParameter param, int value) {
+- size_t zresult = ZSTD_CCtxParam_setParameter(params, param, value);
++ size_t zresult = ZSTD_CCtxParams_setParameter(params, param, value);
+ if (ZSTD_isError(zresult)) {
+ PyErr_Format(ZstdError, "unable to set compression context parameter: %s",
+ ZSTD_getErrorName(zresult));
+@@ -25,11 +25,11 @@ int set_parameter(ZSTD_CCtx_params* para
+
+ #define TRY_COPY_PARAMETER(source, dest, param) { \
+ int result; \
+- size_t zresult = ZSTD_CCtxParam_getParameter(source, param, &result); \
++ size_t zresult = ZSTD_CCtxParams_getParameter(source, param, &result); \
+ if (ZSTD_isError(zresult)) { \
+ return 1; \
+ } \
+- zresult = ZSTD_CCtxParam_setParameter(dest, param, result); \
++ zresult = ZSTD_CCtxParams_setParameter(dest, param, result); \
+ if (ZSTD_isError(zresult)) { \
+ return 1; \
+ } \
+@@ -78,7 +78,7 @@ int reset_params(ZstdCompressionParamete
+ }
+
+ #define TRY_GET_PARAMETER(params, param, value) { \
+- size_t zresult = ZSTD_CCtxParam_getParameter(params, param, value); \
++ size_t zresult = ZSTD_CCtxParams_getParameter(params, param, value); \
+ if (ZSTD_isError(zresult)) { \
+ PyErr_Format(ZstdError, "unable to retrieve parameter: %s", ZSTD_getErrorName(zresult)); \
+ return 1; \
+@@ -436,7 +436,7 @@ static void ZstdCompressionParameters_de
+ int result; \
+ size_t zresult; \
+ ZstdCompressionParametersObject* p = (ZstdCompressionParametersObject*)(self); \
+- zresult = ZSTD_CCtxParam_getParameter(p->params, param, &result); \
++ zresult = ZSTD_CCtxParams_getParameter(p->params, param, &result); \
+ if (ZSTD_isError(zresult)) { \
+ PyErr_Format(ZstdError, "unable to get compression parameter: %s", \
+ ZSTD_getErrorName(zresult)); \
diff -r 3819f734bf7b -r eb5eac6b7605 archivers/py-zstandard/patches/patch-zstandard_cffi.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/archivers/py-zstandard/patches/patch-zstandard_cffi.py Thu May 02 10:10:56 2019 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-zstandard_cffi.py,v 1.1 2019/05/02 10:10:56 wiz Exp $
+
+Adapt for zstd-1.4.0
+https://github.com/indygreg/python-zstandard/commit/f00431bf3b8a16b6cc17fa7c7a442e80d558e5e8
+
+--- zstandard/cffi.py.orig 2019-02-26 00:17:23.000000000 +0000
++++ zstandard/cffi.py
+@@ -416,7 +416,7 @@ def estimate_decompression_context_size(
+
+
+ def _set_compression_parameter(params, param, value):
+- zresult = lib.ZSTD_CCtxParam_setParameter(params, param, value)
++ zresult = lib.ZSTD_CCtxParams_setParameter(params, param, value)
+ if lib.ZSTD_isError(zresult):
+ raise ZstdError('unable to set compression context parameter: %s' %
+ _zstd_error(zresult))
+@@ -425,7 +425,7 @@ def _set_compression_parameter(params, p
+ def _get_compression_parameter(params, param):
+ result = ffi.new('int *')
+
+- zresult = lib.ZSTD_CCtxParam_getParameter(params, param, result)
++ zresult = lib.ZSTD_CCtxParams_getParameter(params, param, result)
+ if lib.ZSTD_isError(zresult):
+ raise ZstdError('unable to get compression context parameter: %s' %
+ _zstd_error(zresult))
diff -r 3819f734bf7b -r eb5eac6b7605 archivers/py-zstandard/patches/patch-zstd_compress_zstd__compress.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/archivers/py-zstandard/patches/patch-zstd_compress_zstd__compress.c Thu May 02 10:10:56 2019 +0000
@@ -0,0 +1,92 @@
+$NetBSD: patch-zstd_compress_zstd__compress.c,v 1.1 2019/05/02 10:10:56 wiz Exp $
+
+Adapt for zstd-1.4.0
+https://github.com/indygreg/python-zstandard/commit/f00431bf3b8a16b6cc17fa7c7a442e80d558e5e8
+
+--- zstd/compress/zstd_compress.c.orig 2019-02-26 00:17:23.000000000 +0000
++++ zstd/compress/zstd_compress.c
+@@ -431,11 +431,11 @@ size_t ZSTD_CCtx_setParameter(ZSTD_CCtx*
+ switch(param)
+ {
+ case ZSTD_c_format :
+- return ZSTD_CCtxParam_setParameter(&cctx->requestedParams, param, value);
++ return ZSTD_CCtxParams_setParameter(&cctx->requestedParams, param, value);
+
+ case ZSTD_c_compressionLevel:
+ if (cctx->cdict) return ERROR(stage_wrong);
+- return ZSTD_CCtxParam_setParameter(&cctx->requestedParams, param, value);
++ return ZSTD_CCtxParams_setParameter(&cctx->requestedParams, param, value);
+
+ case ZSTD_c_windowLog:
+ case ZSTD_c_hashLog:
+@@ -445,31 +445,31 @@ size_t ZSTD_CCtx_setParameter(ZSTD_CCtx*
+ case ZSTD_c_targetLength:
+ case ZSTD_c_strategy:
+ if (cctx->cdict) return ERROR(stage_wrong);
+- return ZSTD_CCtxParam_setParameter(&cctx->requestedParams, param, value);
++ return ZSTD_CCtxParams_setParameter(&cctx->requestedParams, param, value);
+
+ case ZSTD_c_contentSizeFlag:
+ case ZSTD_c_checksumFlag:
+ case ZSTD_c_dictIDFlag:
+- return ZSTD_CCtxParam_setParameter(&cctx->requestedParams, param, value);
++ return ZSTD_CCtxParams_setParameter(&cctx->requestedParams, param, value);
+
+ case ZSTD_c_forceMaxWindow : /* Force back-references to remain < windowSize,
+ * even when referencing into Dictionary content.
+ * default : 0 when using a CDict, 1 when using a Prefix */
+- return ZSTD_CCtxParam_setParameter(&cctx->requestedParams, param, value);
++ return ZSTD_CCtxParams_setParameter(&cctx->requestedParams, param, value);
+
+ case ZSTD_c_forceAttachDict:
+- return ZSTD_CCtxParam_setParameter(&cctx->requestedParams, param, value);
++ return ZSTD_CCtxParams_setParameter(&cctx->requestedParams, param, value);
+
+ case ZSTD_c_nbWorkers:
+ if ((value!=0) && cctx->staticSize) {
+ return ERROR(parameter_unsupported); /* MT not compatible with static alloc */
+ }
+- return ZSTD_CCtxParam_setParameter(&cctx->requestedParams, param, value);
++ return ZSTD_CCtxParams_setParameter(&cctx->requestedParams, param, value);
+
+ case ZSTD_c_jobSize:
+ case ZSTD_c_overlapLog:
+ case ZSTD_c_rsyncable:
+- return ZSTD_CCtxParam_setParameter(&cctx->requestedParams, param, value);
++ return ZSTD_CCtxParams_setParameter(&cctx->requestedParams, param, value);
+
+ case ZSTD_c_enableLongDistanceMatching:
+ case ZSTD_c_ldmHashLog:
+@@ -477,16 +477,16 @@ size_t ZSTD_CCtx_setParameter(ZSTD_CCtx*
+ case ZSTD_c_ldmBucketSizeLog:
+ case ZSTD_c_ldmHashRateLog:
+ if (cctx->cdict) return ERROR(stage_wrong);
+- return ZSTD_CCtxParam_setParameter(&cctx->requestedParams, param, value);
++ return ZSTD_CCtxParams_setParameter(&cctx->requestedParams, param, value);
+
+ default: return ERROR(parameter_unsupported);
+ }
+ }
+
+-size_t ZSTD_CCtxParam_setParameter(ZSTD_CCtx_params* CCtxParams,
++size_t ZSTD_CCtxParams_setParameter(ZSTD_CCtx_params* CCtxParams,
+ ZSTD_cParameter param, int value)
+ {
+- DEBUGLOG(4, "ZSTD_CCtxParam_setParameter (%i, %i)", (int)param, value);
++ DEBUGLOG(4, "ZSTD_CCtxParams_setParameter (%i, %i)", (int)param, value);
+ switch(param)
+ {
+ case ZSTD_c_format :
+@@ -636,10 +636,10 @@ size_t ZSTD_CCtxParam_setParameter(ZSTD_
+
+ size_t ZSTD_CCtx_getParameter(ZSTD_CCtx* cctx, ZSTD_cParameter param, int* value)
+ {
+- return ZSTD_CCtxParam_getParameter(&cctx->requestedParams, param, value);
++ return ZSTD_CCtxParams_getParameter(&cctx->requestedParams, param, value);
+ }
+
+-size_t ZSTD_CCtxParam_getParameter(
++size_t ZSTD_CCtxParams_getParameter(
+ ZSTD_CCtx_params* CCtxParams, ZSTD_cParameter param, int* value)
+ {
+ switch(param)
Home |
Main Index |
Thread Index |
Old Index