mirror of
https://git.freebsd.org/ports.git
synced 2025-07-17 01:09:24 -04:00
archivers/py-brotli: Update to 1.1.0
- Convert to USE_PYTHON=pep517 Changes: https://github.com/google/brotli/releases
This commit is contained in:
parent
243c6ee72e
commit
821a031c39
4 changed files with 47 additions and 28 deletions
|
@ -1,6 +1,5 @@
|
||||||
PORTNAME= brotli
|
PORTNAME= brotli
|
||||||
PORTVERSION= 1.0.9
|
PORTVERSION= 1.1.0
|
||||||
PORTREVISION= 1
|
|
||||||
CATEGORIES= archivers python
|
CATEGORIES= archivers python
|
||||||
MASTER_SITES= PYPI
|
MASTER_SITES= PYPI
|
||||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||||
|
@ -13,25 +12,22 @@ WWW= https://github.com/google/brotli
|
||||||
LICENSE= MIT
|
LICENSE= MIT
|
||||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
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
|
LIB_DEPENDS= libbrotlicommon.so:archivers/brotli
|
||||||
|
|
||||||
USES= compiler:c++0x cpe pkgconfig python shebangfix zip
|
USES= cpe python
|
||||||
USE_PYTHON= autoplist concurrent distutils
|
USE_PYTHON= autoplist concurrent pep517
|
||||||
|
|
||||||
CPE_VENDOR= google
|
CPE_VENDOR= google
|
||||||
|
|
||||||
SHEBANG_FILES= python/bro.py
|
|
||||||
|
|
||||||
post-patch:
|
post-patch:
|
||||||
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/setup.py
|
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/setup.py
|
||||||
@${MKDIR} ${WRKSRC}/common/
|
@${MV} ${WRKSRC}/c/common/version.h ${WRKSRC}/
|
||||||
# Clean up bundled libraries
|
# Clean up bundled libraries
|
||||||
@${RM} -r ${WRKSRC}/c/
|
@${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:
|
post-install:
|
||||||
${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +
|
${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
TIMESTAMP = 1598605172
|
TIMESTAMP = 1694348256
|
||||||
SHA256 (Brotli-1.0.9.zip) = 4d1b810aa0ed773f81dceda2cc7b403d01057458730e309856356d4ef4188438
|
SHA256 (Brotli-1.1.0.tar.gz) = 81de08ac11bcb85841e440c13611c00b67d3bf82698314928d0b676362546724
|
||||||
SIZE (Brotli-1.0.9.zip) = 510202
|
SIZE (Brotli-1.1.0.tar.gz) = 7372270
|
||||||
|
|
19
archivers/py-brotli/files/patch-MANIFEST.in
Normal file
19
archivers/py-brotli/files/patch-MANIFEST.in
Normal file
|
@ -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
|
|
@ -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
|
+++ 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():
|
def get_version():
|
||||||
""" Return BROTLI_VERSION string as defined in 'common/version.h' file. """
|
""" 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, 'c', 'common', 'version.h')
|
||||||
+ version_file_path = os.path.join(CURR_DIR, 'common', 'version.h')
|
+ version_file_path = os.path.join(CURR_DIR, 'version.h')
|
||||||
version = 0
|
major = read_define(version_file_path, 'BROTLI_VERSION_MAJOR')
|
||||||
with open(version_file_path, 'r') as f:
|
minor = read_define(version_file_path, 'BROTLI_VERSION_MINOR')
|
||||||
for line in f:
|
patch = read_define(version_file_path, 'BROTLI_VERSION_PATCH')
|
||||||
@@ -181,92 +181,17 @@ EXT_MODULES = [
|
@@ -177,96 +177,17 @@ EXT_MODULES = [
|
||||||
'_brotli',
|
'_brotli',
|
||||||
sources=[
|
sources=[
|
||||||
'python/_brotli.cc',
|
'python/_brotli.c',
|
||||||
- 'c/common/constants.c',
|
- 'c/common/constants.c',
|
||||||
- 'c/common/context.c',
|
- 'c/common/context.c',
|
||||||
- 'c/common/dictionary.c',
|
- 'c/common/dictionary.c',
|
||||||
- 'c/common/platform.c',
|
- 'c/common/platform.c',
|
||||||
|
- 'c/common/shared_dictionary.c',
|
||||||
- 'c/common/transform.c',
|
- 'c/common/transform.c',
|
||||||
- 'c/dec/bit_reader.c',
|
- 'c/dec/bit_reader.c',
|
||||||
- 'c/dec/decode.c',
|
- 'c/dec/decode.c',
|
||||||
|
@ -29,6 +30,7 @@
|
||||||
- 'c/enc/brotli_bit_stream.c',
|
- 'c/enc/brotli_bit_stream.c',
|
||||||
- 'c/enc/cluster.c',
|
- 'c/enc/cluster.c',
|
||||||
- 'c/enc/command.c',
|
- 'c/enc/command.c',
|
||||||
|
- 'c/enc/compound_dictionary.c',
|
||||||
- 'c/enc/compress_fragment.c',
|
- 'c/enc/compress_fragment.c',
|
||||||
- 'c/enc/compress_fragment_two_pass.c',
|
- 'c/enc/compress_fragment_two_pass.c',
|
||||||
- 'c/enc/dictionary_hash.c',
|
- 'c/enc/dictionary_hash.c',
|
||||||
|
@ -48,6 +50,7 @@
|
||||||
- 'c/common/context.h',
|
- 'c/common/context.h',
|
||||||
- 'c/common/dictionary.h',
|
- 'c/common/dictionary.h',
|
||||||
- 'c/common/platform.h',
|
- 'c/common/platform.h',
|
||||||
|
- 'c/common/shared_dictionary_internal.h',
|
||||||
- 'c/common/transform.h',
|
- 'c/common/transform.h',
|
||||||
- 'c/common/version.h',
|
- 'c/common/version.h',
|
||||||
- 'c/dec/bit_reader.h',
|
- 'c/dec/bit_reader.h',
|
||||||
|
@ -66,6 +69,7 @@
|
||||||
- 'c/enc/cluster.h',
|
- 'c/enc/cluster.h',
|
||||||
- 'c/enc/cluster_inc.h',
|
- 'c/enc/cluster_inc.h',
|
||||||
- 'c/enc/command.h',
|
- 'c/enc/command.h',
|
||||||
|
- 'c/enc/compound_dictionary.h',
|
||||||
- 'c/enc/compress_fragment.h',
|
- 'c/enc/compress_fragment.h',
|
||||||
- 'c/enc/compress_fragment_two_pass.h',
|
- 'c/enc/compress_fragment_two_pass.h',
|
||||||
- 'c/enc/dictionary_hash.h',
|
- 'c/enc/dictionary_hash.h',
|
||||||
|
@ -99,13 +103,13 @@
|
||||||
],
|
],
|
||||||
include_dirs=[
|
include_dirs=[
|
||||||
- 'c/include',
|
- 'c/include',
|
||||||
+ '%%LOCALBASE%%/include',
|
+ '/usr/local/include',
|
||||||
+ ],
|
+ ],
|
||||||
+ libraries=[
|
+ libraries=[
|
||||||
+ 'brotlicommon', 'brotlidec', 'brotlienc',
|
+ 'brotlicommon', 'brotlidec', 'brotlienc',
|
||||||
+ ],
|
+ ],
|
||||||
+ library_dirs=[
|
+ library_dirs=[
|
||||||
+ '%%LOCALBASE%%/lib',
|
+ '/usr/local/lib',
|
||||||
],
|
]),
|
||||||
language='c++'),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue