git: 821a031c3986 - main - archivers/py-brotli: Update to 1.1.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 11 Sep 2023 03:14:10 UTC
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=821a031c3986aed61bfaa368f140c182bc0dd70b commit 821a031c3986aed61bfaa368f140c182bc0dd70b Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2023-09-11 03:08:05 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2023-09-11 03:08:05 +0000 archivers/py-brotli: Update to 1.1.0 - Convert to USE_PYTHON=pep517 Changes: https://github.com/google/brotli/releases --- archivers/py-brotli/Makefile | 18 +++++++--------- archivers/py-brotli/distinfo | 6 +++--- archivers/py-brotli/files/patch-MANIFEST.in | 19 +++++++++++++++++ archivers/py-brotli/files/patch-setup.py | 32 ++++++++++++++++------------- 4 files changed, 47 insertions(+), 28 deletions(-) diff --git a/archivers/py-brotli/Makefile b/archivers/py-brotli/Makefile index 6138c5a79e01..469fb77231b7 100644 --- a/archivers/py-brotli/Makefile +++ b/archivers/py-brotli/Makefile @@ -1,6 +1,5 @@ PORTNAME= brotli -PORTVERSION= 1.0.9 -PORTREVISION= 1 +PORTVERSION= 1.1.0 CATEGORIES= archivers python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -13,25 +12,22 @@ WWW= https://github.com/google/brotli LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE -BUILD_DEPENDS= brotli>=${PORTVERSION}:archivers/brotli +BUILD_DEPENDS= brotli>=${PORTVERSION},1<${PORTVERSION}_99,1:archivers/brotli \ + ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} LIB_DEPENDS= libbrotlicommon.so:archivers/brotli -USES= compiler:c++0x cpe pkgconfig python shebangfix zip -USE_PYTHON= autoplist concurrent distutils +USES= cpe python +USE_PYTHON= autoplist concurrent pep517 CPE_VENDOR= google -SHEBANG_FILES= python/bro.py - post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/setup.py - @${MKDIR} ${WRKSRC}/common/ + @${MV} ${WRKSRC}/c/common/version.h ${WRKSRC}/ # Clean up bundled libraries @${RM} -r ${WRKSRC}/c/ -pre-configure: - @${PRINTF} "#define BROTLI_VERSION 0x%x%03x%03x\n" `pkgconf --modversion libbrotlicommon | sed 's|\.| |g'` > ${WRKSRC}/common/version.h - post-install: ${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} + diff --git a/archivers/py-brotli/distinfo b/archivers/py-brotli/distinfo index 96353356150e..47ce4f770c02 100644 --- a/archivers/py-brotli/distinfo +++ b/archivers/py-brotli/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1598605172 -SHA256 (Brotli-1.0.9.zip) = 4d1b810aa0ed773f81dceda2cc7b403d01057458730e309856356d4ef4188438 -SIZE (Brotli-1.0.9.zip) = 510202 +TIMESTAMP = 1694348256 +SHA256 (Brotli-1.1.0.tar.gz) = 81de08ac11bcb85841e440c13611c00b67d3bf82698314928d0b676362546724 +SIZE (Brotli-1.1.0.tar.gz) = 7372270 diff --git a/archivers/py-brotli/files/patch-MANIFEST.in b/archivers/py-brotli/files/patch-MANIFEST.in new file mode 100644 index 000000000000..7e2266d92276 --- /dev/null +++ b/archivers/py-brotli/files/patch-MANIFEST.in @@ -0,0 +1,19 @@ +--- MANIFEST.in.orig 2023-09-09 22:24:31 UTC ++++ MANIFEST.in +@@ -1,11 +1,4 @@ + include CONTRIBUTING.md +-include c/common/*.c +-include c/common/*.h +-include c/dec/*.c +-include c/dec/*.h +-include c/enc/*.c +-include c/enc/*.h +-include c/include/brotli/*.h + include LICENSE + include MANIFEST.in + include python/_brotli.cc +@@ -16,4 +9,3 @@ include python/tests/* + include README.md + include setup.py + include tests/testdata/* +-include c/tools/brotli.c diff --git a/archivers/py-brotli/files/patch-setup.py b/archivers/py-brotli/files/patch-setup.py index 9f97287a706f..fae3c7a6665f 100644 --- a/archivers/py-brotli/files/patch-setup.py +++ b/archivers/py-brotli/files/patch-setup.py @@ -1,22 +1,23 @@ ---- setup.py.orig 2020-08-27 06:24:08 UTC +--- setup.py.orig 2023-09-07 13:16:56 UTC +++ setup.py -@@ -25,7 +25,7 @@ CURR_DIR = os.path.abspath(os.path.dirname(os.path.rea +@@ -35,7 +35,7 @@ def read_define(path, macro): def get_version(): - """ Return BROTLI_VERSION string as defined in 'common/version.h' file. """ -- version_file_path = os.path.join(CURR_DIR, 'c', 'common', 'version.h') -+ version_file_path = os.path.join(CURR_DIR, 'common', 'version.h') - version = 0 - with open(version_file_path, 'r') as f: - for line in f: -@@ -181,92 +181,17 @@ EXT_MODULES = [ + """ Return library version string from 'common/version.h' file. """ +- version_file_path = os.path.join(CURR_DIR, 'c', 'common', 'version.h') ++ version_file_path = os.path.join(CURR_DIR, 'version.h') + major = read_define(version_file_path, 'BROTLI_VERSION_MAJOR') + minor = read_define(version_file_path, 'BROTLI_VERSION_MINOR') + patch = read_define(version_file_path, 'BROTLI_VERSION_PATCH') +@@ -177,96 +177,17 @@ EXT_MODULES = [ '_brotli', sources=[ - 'python/_brotli.cc', + 'python/_brotli.c', - 'c/common/constants.c', - 'c/common/context.c', - 'c/common/dictionary.c', - 'c/common/platform.c', +- 'c/common/shared_dictionary.c', - 'c/common/transform.c', - 'c/dec/bit_reader.c', - 'c/dec/decode.c', @@ -29,6 +30,7 @@ - 'c/enc/brotli_bit_stream.c', - 'c/enc/cluster.c', - 'c/enc/command.c', +- 'c/enc/compound_dictionary.c', - 'c/enc/compress_fragment.c', - 'c/enc/compress_fragment_two_pass.c', - 'c/enc/dictionary_hash.c', @@ -48,6 +50,7 @@ - 'c/common/context.h', - 'c/common/dictionary.h', - 'c/common/platform.h', +- 'c/common/shared_dictionary_internal.h', - 'c/common/transform.h', - 'c/common/version.h', - 'c/dec/bit_reader.h', @@ -66,6 +69,7 @@ - 'c/enc/cluster.h', - 'c/enc/cluster_inc.h', - 'c/enc/command.h', +- 'c/enc/compound_dictionary.h', - 'c/enc/compress_fragment.h', - 'c/enc/compress_fragment_two_pass.h', - 'c/enc/dictionary_hash.h', @@ -99,13 +103,13 @@ ], include_dirs=[ - 'c/include', -+ '%%LOCALBASE%%/include', ++ '/usr/local/include', + ], + libraries=[ + 'brotlicommon', 'brotlidec', 'brotlienc', + ], + library_dirs=[ -+ '%%LOCALBASE%%/lib', - ], - language='c++'), ++ '/usr/local/lib', + ]), ] +